query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Unsets the "selectedAuthProfile" element | public void unsetSelectedAuthProfile()
{
synchronized (monitor())
{
check_orphaned();
get_store().remove_element(SELECTEDAUTHPROFILE$6, 0);
}
} | [
"void unsetProfile();",
"public void xsetSelectedAuthProfile(org.apache.xmlbeans.XmlString selectedAuthProfile)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_stor... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the underlying Dec an AdviceDec. | protected AdviceDec adviceDec() {
return (AdviceDec) codeDec();
} | [
"public interface Advice {\n\n /**\n\t * The declaring aspect\n\t */\n AjType getDeclaringType();\n\n /**\n\t * The kind of advice (before, after-returning, after-throwing, etc.)\n\t */\n AdviceKind getKind();\n\n /**\n\t * Returns the advice name, or the empty string if the advice is anonymous.\n\t ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
recebe o array de string do arquivo e armazena no mapa correto de acordo com o arquivo. | public void armazena(String[] str) {
if (arquivo.equals("linhas.csv")) {
int idlinha = Integer.parseInt(str[0]);
String nome = str[1];
String codigo = str[2];
char tipo = str[3].charAt(0);
Linha nova = new Linha(idlinha, nome, codigo, tipo);
linhas.add(nova); // adicionar ao mapa de linhas
} els... | [
"public void loadArray() {\n // initialize string to hold the information from the file\n String text = \"\";\n try {\n // initializes input stream to read file\n InputStream is = getAssets().open(\"instructions.txt\");\n int size = is.available(); // determines... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column borrow_repayment.punish_amount | public void setPunishAmount(BigDecimal punishAmount) {
this.punishAmount = punishAmount;
} | [
"public BigDecimal getPunishAmount() {\n return punishAmount;\n }",
"public void setReducePunishAmount(BigDecimal reducePunishAmount) {\n this.reducePunishAmount = reducePunishAmount;\n }",
"public void setRepaymoney(BigDecimal repaymoney) {\r\n this.repaymoney = repaymoney;\r\n }"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Format stored in AD as 20100429152722.0Z Format stored in Solr as 20100429T15:27:22Z | private static String rearrangeToSolrDate(String adDate) {
String solrDate = adDate.substring(0,4) + "-" + adDate.substring(4,6) + "-" + adDate.substring(6,8) + "T" + adDate.substring(8,10) + ":" + adDate.substring(10,12) + ":" + adDate.substring(12,14) + "Z";
return solrDate;
} | [
"private String zuluFormat(String beginTimestamp) {\n\t\t\t// turn 20081215135500 into 2008-12-15T13:55:00Z\n\t\t\tStringBuffer buf = new StringBuffer(beginTimestamp);\n\t\t\tbuf.insert(4, '-');\n\t\t\tbuf.insert(7, '-');\n\t\t\tbuf.insert(10, 'T');\n\t\t\tbuf.insert(13, ':');\n\t\t\tbuf.insert(16, ':');\n\t\t\tbuf... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a LambdaFactory instance with the given configuration. | public static LambdaFactory get(LambdaFactoryConfiguration configuration) {
JavaCompiler compiler = Optional.ofNullable(configuration.getJavaCompiler()).orElseThrow(JavaCompilerNotFoundException::new);
return new LambdaFactory(
configuration.getDefaultHelperClassSourceProvider(),
... | [
"private void setLambdaInvokeFactory(Context context) {\n factory = new LambdaInvokerFactory(\n context,\n Regions.US_EAST_1,\n this.credentialsProvider);\n }",
"private Function createLambdaFunction()\n {\n return lambdaFunctionBuilder().build();\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new instance of BookSearchResource | public BookSearchResource() {
} | [
"Search createSearch();",
"public SearchClient createSearchClient() {\n return SearchClient.create(this);\n }",
"private Book createBookForQuery(String filter, String query) {\n switch(filter) {\n case \"Title\":\n return new Book(\n null, query, null,... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Define o atributo numRamal | public void setNumRamal(String numRamal) {
this.numRamal = numRamal;
} | [
"public void setRamal(java.lang.Integer ramal) {\n this.ramal = ramal;\n }",
"public java.lang.Integer getRamal() {\n return ramal;\n }",
"public void setRam(java.lang.Integer ram) {\r\n this.ram = ram;\r\n }",
"public void setNumArmies(int num){\n numArmies = num;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves the character's nick's color. | int getNickColor(); | [
"public String getColorNumber() {\n return color.substring(1);\n }",
"java.lang.String getNameColor();",
"public Color getColor() {\n try {\n Field field = Class.forName(\"com.badlogic.gdx.graphics.Color\").getField(colour);\n return (Color)field.get(null);\n } catc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get a color with the given hue, saturation, and brightness. | public final static RGB getColorFromHSB(float hue, float saturation, float brightness){
return new RGB(hue, saturation, brightness);
} | [
"public static Color getColorFromHSB(int hue, float saturation, float brightness) {\n float c = saturation * brightness;\n float x = c * (1 - Math.abs(hue/60 % 2 - 1));\n float m = brightness - c;\n float rr, gg, bb;\n rr = gg = bb = 0;\n if (0 <= hue && hue < 60){\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the boolean setCanBeDestroyed | public void setCanBeDestroyed(Boolean i) {
this.canBeDestroyed = i;
} | [
"public synchronized void setDestroyed(boolean value) {\n this.destroyed = value;\n }",
"public boolean getIsDestroyed(){\r\n\t\treturn isDestroyed;\r\n\t}",
"public boolean isDestroyed(){\n return destroyed;\n }",
"@Override\n public boolean isDestroyed() {\n return destroyed;\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get Default Exception Handler | protected ExceptionHandler getExceptionHandler() {
return new GeneralResultExceptionHandler();
} | [
"protected abstract Throwable defaultException();",
"Object getExceptionHandlers();",
"public IApiRequestHandler getExceptionHandler() {\n\t\treturn exceptionHandler;\n\t}",
"public Catch[] exceptionHandlers();",
"IExceptionHandler createHandlerFor(java.lang.Class typeOfExceptionToHandle);",
"private stat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Verifies if the content of the Text component is equals to of the given step text. | public boolean hasEqualStep(String step, Text text)
{
if (!text.getText().contains(","))
{
if (step.equals(text.getText()))
{
text.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_RED));
return true;
}
else
... | [
"public void assertTextPresent(final String text);",
"@Test(priority=1)\n\tpublic void verifyText() {\n\t\tString expectedText = \"Facebook helps you connect and share with the people in your life.\";\n\t\tString actualText = driver.findElement(By.cssSelector(\"#content > div > div > div > div > div.lfloat._ohe >... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called when end of an element was found in the XMLdata. Ex: or | public void XMLendElement(String element); | [
"public abstract void endElement();",
"void endElement();",
"public static void end() {\n Log.writeln(\"<xml-end/> <!-- Non-xml data follows ... -->\");\n }",
"public void endDocument () { Log.i(\"DataHandler\", \"End of XML document\"); }",
"protected void callIAPIElementEnd() throws SAXException {\n\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Enter options here... HashMap map = new HashMap(); staticAuthRequestOptionsService.setOptions(map); | @Bean
public StaticAuthRequestOptionsService staticAuthRequestOptionsService() {
return new StaticAuthRequestOptionsService();
} | [
"private void setupOptions() {\r\n\t\tfinal Options options = this.soapEndPoint._getServiceClient().getOptions();\r\n\t\toptions.setProperty(HTTPConstants.CHUNKED, Boolean.FALSE);\r\n\t\toptions.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, Boolean.TRUE);\r\n\t\tHttpTransportProperties.Authenticator auth = this.conf... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes the file dinh kem where resourceCode = &63; and primKey = &63; and fileEntryId = &63; from the database. | public com.alpha.portlet.dmdc.model.FileDinhKem removeByR_P_F(
long resourceCode, long primKey, long fileEntryId)
throws com.alpha.portlet.dmdc.NoSuchFileDinhKemException,
com.liferay.portal.kernel.exception.SystemException; | [
"public void removeByFileEntryId(long fileEntryId);",
"void delete(InformationResourceFile file);",
"public void removeByFileEntryName(String fileEntryName);",
"private void deleteFileFromDb(final FileEntity file) {\n\t\tTaskRuntime.instance().run(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the field weightPerFoot. | public String getWeightPerFoot() {
return weightPerFoot;
} | [
"public void setWeightPerFoot(String weightPerFoot) {\r\n this.weightPerFoot = weightPerFoot;\r\n }",
"public float getWeightValue() {\r\n\t\treturn this.value;\r\n\t}",
"public double getWeighting() {\r\n return weighting;\r\n }",
"public double getWeight() {\n\t\tIterator<Ball> it = this... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the declaring class of the current method is instance of the given type, whereby type may be a superclass. This method works properly only if the statement being processed is a method call. [performance] | @Override
public boolean mcDeclaringClassInstanceOf(String type)
throws InstrumenterException {
boolean result;
if (null != methodCall) {
if (null == methodCallDeclaringClass) {
try {
methodCallDeclaringClass
=... | [
"public Class getBaseClass();",
"static native Class getSuperclass(Class clazz);",
"Class<?> getDeclaringClass();",
"Type getSuperType();",
"boolean hasEnclosingInstance(ClassType encl);",
"void isInstanceOf(Class type);",
"public abstract String getDeclaringClass();",
"IType getSuperclass(IType type)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Represents an annotation path | public interface EdmAnnotationPath extends EdmDynamicExpression {
/**
* Value of the path
* @return value of the path
*/
String getValue();
} | [
"public IPath getExternalAnnotationsPath();",
"public abstract ArrayList<CustomPath> getAnnotationPathList();",
"Annotation(int pathLength)\n {\n this.pathLength = pathLength;\n }",
"protected PathInformation parsePath() throws RestAnnotationException {\n \n final Literal[] annotationVa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Loads all cards of an extension. | public List loadExtensionCards(int number); | [
"public List loadCoreCards();",
"public void loadDeck()\n {\n for(int i = 0; i < DESCRIPTIONS.length; i++)\n {\n for(int j = 0; j < SUITS.length; j++)\n {\n Card c = new Card();\n c.setSuit(SUITS[j]);\n c.setDescription(DESCRIPTIO... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter for structure. Does NOT perform validation, database saves etc | public void setStructure(Structure structure) {
this.structure = structure;
} | [
"private void setStruct(byte[] struct) {\n this.struct = struct;\n }",
"public IStructureConfig setStructType(String value);",
"@Override\n public void setStructure(java.lang.String structure) {\n _appVersion.setStructure(structure);\n }",
"public void updateStructure(JournalStr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the tile that this node corresponds to. This tile can be used to determine the position of this node in the game map. | public Tile getTile() {
return tile;
} | [
"public GameTile getTile() {\n\t\treturn tile;\n\t}",
"public Node getBoardNode() {\r\n return tilesNode;\r\n }",
"public Bitmap getTile() {\n return tile;\n }",
"public int getTileCoordinate() {\r\n\t\treturn this.tileCoordinate;\r\n\t}",
"public Tile getTile() { return tile; }",
"pub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the base directory to use for the tests. | protected File getBaseDir() {
String basedir = System.getProperty("basedir");
if (basedir != null) {
return new File(basedir);
} else {
return new File(".");
}
} | [
"public static String getBaseDir() {\n // 'basedir' is set by Maven Surefire. It always points to the current subproject,\n // even in reactor builds.\n String baseDir = System.getProperty(\"basedir\");\n\n // if 'basedir' is not set, try the current directory\n if (baseDir == nul... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fills in the date and time fields | public static void fillInDateAndTime(DateTime date, WebDriver browser){
logger.debug("Attempting to fill in the date and time inputs @:" + browser.getCurrentUrl());
try{
//Date Inputs
WebElement monthInput = browser.findElement(By.id(inputMonthId));
WebElement da... | [
"private void fillInDateTime ( final String dateField, final String date, final String timeField,\n final String time ) {\n waitForAngular();\n fillInDate( dateField, date );\n fillInTime( timeField, time );\n }",
"private void setLocationTimeAndDateDetails() {\n\n Locati... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reads a specific resource by its Id | public <T extends IBaseResource> T readById(final Class<T> resourceClass,
final String id) {
var baseResource = client
.read()
.resource(resourceClass)
.withId(requireNonBlank(id, "id"))
.execute();
... | [
"ResourceContent readContent(final String resourceId);",
"Resource getResourceById(String resourceId)\n throws UMAServerException, UMAClientException;",
"@Override\n public ResourceDo loadResourceById(String id) {\n return (ResourceDo) getSqlMapClientTemplate().queryForObject(\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converte um objeto para JSON byte array. | public static byte[] convertObjectToJsonBytes(Object object)
throws IOException {
ObjectMapper mapper = new ObjectMapper();
mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
JavaTimeModule module = new JavaTimeModule();
mapper.registerModule(module);
r... | [
"public byte[] toJsonUtf8() {\n try {\n ByteArrayOutputStream bOs = new ByteArrayOutputStream(512);\n\n try (JsonGenerator generator = jsonFactory.createJsonGenerator(bOs, JsonEncoding.UTF8)\n .setCodec(objectMapper)) {\n toJsonUtf8(generator);\n }\n\n return bOs.toByteArray()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Es wird ein Intent initialisiert, um den Test vorzubereiten. | @Before
public void setUp() throws Exception {
Intents.init();
} | [
"public ServiceIntentTest(String name) {\n\t\tsuper(name);\n\t}",
"@Before\n public void initIntents() {\n Intents.init();\n }",
"public void testActivityTestCaseSetUpProperly() {\n\t\tassertNotNull(\"activity should be launched successfully\", mActivity);\n\t}",
"@Before public void setUp() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method wraps the invocation of URLEncoderencode method using the "UTF8" encoding. This call also wraps the UnsupportedEncodingException thrown by URLEncoderencode into a RuntimeException. Such an exception should never be thrown. | private static String internalURLEncode(String s)
{
try
{
return URLEncoder.encode(s, "UTF-8");
}
catch (UnsupportedEncodingException e)
{
throw new IllegalArgumentException("UTF-8 encoding is not supported by URLEncoder.", e);
}
} | [
"public abstract String encodeURL(CharSequence url);",
"private static String encodeValue(String value) {\n try {\n return URLEncoder.encode(value, StandardCharsets.UTF_8.toString());\n } catch (UnsupportedEncodingException ex) {\n throw new RuntimeException(ex.getCause());\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds an edge to the map | public void add(Edge e) { edges.put(e.getFirst(),e); } | [
"void addEdge(E edge);",
"void addEdge(Edge e);",
"void add(Edge edge);",
"public void addEdge(E e){\n\t\tedges.add(e);\n\t}",
"private void addEdge(int from, int to, Edge e) {\n _edges.get(from).set(to, e);\n _edgeMap.put(e, new int [] {from, to});\n }",
"public void addEdge(Edge e) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Metodo encargado de obtener los registros Promocion por medio de parametros de busqueda | public List<Promocion> consultarPromocionesPorParametro(Map<String, String> filtros); | [
"public String[] requisicaoPassageiros() {\n\t\tConector con = new Conector();\r\n\t\tString params[] = new String[1];\r\n\t\tString resultado;\r\n\t\tString passageiros[];\r\n\r\n\t\tparams[0] = \"op=7\";\r\n\r\n\t\tresultado = con.sendHTTP(params);\r\n\r\n\t\tpassageiros = resultado.split(\";\");\r\n\r\n\t\tretur... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
For data saving we use ReminderData class ReminderData class has a function that saves all the information to SharedPreferences | private void saveData() {
// Save data to ReminderData class
reminderData.setMinutes(timePicker.getMinute());
reminderData.setDataHours(timePicker.getHour());
reminderData.setNotificationText(reminderText.getText().toString());
reminderData.saveDataToSharedPreferences();
} | [
"static void saveData() {\n SharedPreferences.Editor editor = sharedPreferences.edit();\n Gson gson = new Gson();\n String json = gson.toJson(noteList);\n editor.putString(NOTE, json);\n editor.apply();\n }",
"private void saveData() {\n sharedPreferences = getSharedPr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Implementation of testRepeatedCompat with a given value. | private void testRepeatedCompat(int[] val) throws Exception {
final long fieldFlags = ProtoStream.FIELD_COUNT_REPEATED | ProtoStream.FIELD_TYPE_SINT32;
final long fieldId = fieldFlags | ((long) 71 & 0x0ffffffffL);
final Test.All all = new Test.All();
all.sint32FieldRepeated = val;
... | [
"@Test\n\tvoid RepeatedNumberTest() \n\t{ int[] oneNum = new int[] {1};\n\t\tint[] twoDiffNums = new int[] {1, 2};\n\t\tint[] twoSameNums = new int[] {2, 2};\n\t\tint[] insideOut = new int[] {5, 4, 3, 2, 1, 1, 2, 3, 4, 5};\n\t\t\n\t\tassertFalse(utilities.RepeatedNumber(oneNum));\n\t\tassertFalse(utilities.Repeated... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks whether the 'bm_space_id' field has been set | public boolean hasBmSpaceId() {
return fieldSetFlags()[0];
} | [
"public boolean isSetSpace_id() {\n return __isset_bit_vector.get(__SPACE_ID_ISSET_ID);\n }",
"public void setBmSpaceId(java.lang.CharSequence value) {\n this.bm_space_id = value;\n }",
"public iodine.avro.TapRecord.Builder setBmSpaceId(java.lang.CharSequence value) {\n validate(fields()[0], value)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column PMSTRADE.PREV_CPN_DUE_DATE | public void setPREV_CPN_DUE_DATE(Date PREV_CPN_DUE_DATE) {
this.PREV_CPN_DUE_DATE = PREV_CPN_DUE_DATE;
} | [
"public Date getPREV_CPN_DUE_DATE() {\r\n return PREV_CPN_DUE_DATE;\r\n }",
"public void setNEXT_CPN_DUE_DATE(Date NEXT_CPN_DUE_DATE) {\r\n this.NEXT_CPN_DUE_DATE = NEXT_CPN_DUE_DATE;\r\n }",
"public void setPREV_EXP_DATE(Date PREV_EXP_DATE) {\r\n this.PREV_EXP_DATE = PREV_EXP_DATE;\r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Load a small image. | public void setSmallImg(String path){
Picasso.with(context).load(SMALL+path).into(imageView);
} | [
"protected abstract Image loadImage();",
"private void load() {\n try {\n System.out.print(\"Trying to load: \" + url.toString() + \"... \");\n BufferedImage image = ImageIO.read(url);\n width = image.getWidth();\n height = image.getHeight();\n pixels ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Overridden from SwipeRefreshLayout. Uses a custom callback. If the custom callback is null, it falls back to the parent canChildScrollUp() | @Override
public boolean canChildScrollUp() {
if (callback != null) { return callback.canChildScrollUp(); }
return super.canChildScrollUp();
} | [
"void setCallback(TurbolinksScrollUpCallback callback) { this.callback = callback; }",
"boolean canScrollUp();",
"@Override\n public void run() {\n if (mScrollingUp && !mComicsFabUpView.isUpFABVisible() && pastItems > THRESHOLD) {\n mComicsFabUpView.setShownUpFAB(tru... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Control Collisions between player, projectiles, enemies and powerups | private void controlCollisions() {
//new debris list to avoid concurrent modification in foreach
List<Debris> newdebris = new ArrayList<Debris>();
//player projectiles with enemy
if ((this.enemylist.size() > 0) && (this.playerprojectilelist.size() > 0)) {
this.playerprojectilelist.stream()
.fi... | [
"public void areaEffect(Player player){\n if(object.getProperties().containsKey(\"endLevel\")) {\n System.out.println(\"Fin du level\");\n setCategoryFilter(GameTest.DESTROYED_BIT);\n PlayScreen.setEndLevel();\n }\n\n if(object.getProperties().containsKey(\"star... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initializes content manager. It is better to give it an application context | public static synchronized void init(Context context) {
if(context == null)
throw new NullPointerException("Can't create instance with null context");
if(INSTANCE != null)
throw new IllegalStateException("Can't initialize ContentManager twice");
INSTANCE = new ContentMan... | [
"public ContentManager() {\n\t\tsuper();\n\t}",
"public void initialize() {\r\n\t\tcontext.initialize();\r\n\t}",
"public void init(Context context) {\n this.mContext = context;\n vollyRequestManager = new VollyRequestManager(VolleyUtil.getInstance(mContext).getRequestQueue());\n }",
"public ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Appends and returns a new empty "extentOf" element | public net.opengis.gml.x32.SurfacePropertyType addNewExtentOf()
{
synchronized (monitor())
{
check_orphaned();
net.opengis.gml.x32.SurfacePropertyType target = null;
target = (net.opengis.gml.x32.SurfacePropertyType)get_store().add_element_user(EXTENTOF$0);
... | [
"public Extent getExtent();",
"public int getExtent()\n {\n return extent;\n }",
"public IExtent union(IExtent extent) throws ThinklabException;",
"private void reCalculateFullExtent(){\r\n\t\tif (graphics.size() > 0) {\r\n\t\t\tFGraphic g = (FGraphic) graphics.get(0);\r\n\t\t\tfullExtent = g.get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determines if dogpile prevention is enabled. | public boolean isDogpilePreventionEnabled() {
String key = toKey(DOGPILE_PREVENTION);
return getBoolean(key, DEFAULT_DOGPILE_PREVENTION);
} | [
"public boolean canProtectPieces() {\r\n\t\treturn (cityCards.stream().anyMatch(c -> (c.isSmallGods() && !c.isDisabled())\r\n\t\t\t\t&& money >= PROTECTION_COST)); \r\n\t}",
"protected boolean isDamageDiscount()\n {\n return false;\n }",
"public boolean damagable() {\n return !this.state.equals(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Description: Verify provided billing address details of company are displaying in billing summary of Confirmation page | @Test
public void verifyProvidedBillingDetailsForCompanyAreDisplayinginAccountSummary() throws Exception {
SignupTPROPage signUpObj = new SignupTPROPage(driver);
SignUpPackageSectionTradusPROPage signUpPkgObj = new SignUpPackageSectionTradusPROPage(driver);
signUpObj.setAccountUsernameAndPassword();
explicitWa... | [
"public void VerifyBillingAddress(String billingaddresstitle, String billingaddress){\r\n\t\tString BilingTitle=getValue(billingaddresstitle);\r\n\t\tString Billingaddress=getValue(billingaddress);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tR... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a highlevel process GUI based on an HLProcess only. This means that there is no HLModel available that links highlevel process information to certain nodes in the process model. | public EditHighLevelProcessGui(HLProcess hlprocess) {
hlProcess = hlprocess;
processGui = new HLProcessGui(hlprocess);
jbInit();
} | [
"public EditHighLevelProcessGui(HLModel process) {\n\t\thlProcessImpl = process;\n\t\thlProcess = process.getHLProcess();\n\t\tprocessGui = new HLProcessGui(process);\n\t\tjbInit();\n\t}",
"BoundProcessModel createBoundProcessModel();",
"AbstractProcessModel createAbstractProcessModel();",
"public void showLo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clears any code units in the given range returning everything to "db"s, and removing any references in the affected area. Note that the module and fragment structure is unaffected. If part of a code unit is contained in the given address range then the whole code unit will be cleared. | public void clearCodeUnits(Address startAddr, Address endAddr, boolean clearContext); | [
"public void clearCodeUnits(Address startAddr, Address endAddr, boolean clearContext,\n\t\t\tTaskMonitor monitor) throws CancelledException;",
"public void clearRange(String[] hashRange);",
"public void clearComments(Address startAddr, Address endAddr);",
"void unsetAddress();",
"void clearPowertypeRanges()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional .game.msg.DMemberInfo beKillerInfo = 2; | public game.msg.Define.DMemberInfo getBeKillerInfo() {
if (beKillerInfoBuilder_ == null) {
return beKillerInfo_;
} else {
return beKillerInfoBuilder_.getMessage();
}
} | [
"game.msg.Define.DMemberInfo getBeKillerInfo();",
"game.msg.Define.DMemberInfo getKillerInfo();",
"game.msg.Define.DMemberInfo getHuman();",
"game.msg.Define.DMemberInfoOrBuilder getHumanOrBuilder();",
"public game.msg.Define.DMemberInfo getBeKillerInfo() {\n return beKillerInfo_;\n }",
"public ga... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds an input arc to the transition. | public void addInArc(Arc arc) {
inArcs.add(arc);
addFreeVariables(arc.getExpression());
} | [
"void arcAdded(Arc anArc);",
"public void addArc(Arc arc){\n\t\tArc[] oldArc = outArcs;\n\t\t\n\t\toutArcs = new Arc[oldArc.length+1];\n\t\tfor(int i=0;i<oldArc.length;i++){\n\t\t\toutArcs[i] = oldArc[i];\n\t\t}\n\t\toutArcs[oldArc.length] = arc;\n\t}",
"public void addOutArc(Arc arc) {\n outArcs.add(arc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a string representing a number in fixedpoint notation. | native public java.lang.String toFixed(double fractionDigits); | [
"native public java.lang.String toFixed();",
"public String fixedNumbersToString(){\n\t\tint numDigits = size / 10 + 1;\n\t\tStringBuilder builder = new StringBuilder();\n\t\t// delimiter between size x size squares\n\t\tString delimiter = \"\";\n\t\tfor (int i = 0; i < (numDigits+1)*size*size+2*(size-1); i++){\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if the mouse is over the entity's bound | public boolean isMouseOver(){
return this.contains(Main.camera.getMousePos());
} | [
"@Override\r\n\tpublic final boolean isMouseOver() {\r\n\t\tfinal float x = getMouseWorldX();\r\n\t\tfinal float y = getMouseWorldY();\r\n\r\n\t\tfinal boolean ans = x >= getState().position.x - getWidth()/2 && x <= getState().position.x + getWidth()/2 && y >= getState().position.y && y <= getState().position.y + g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an [IgniteQuery] to retrieve all elements | public IgniteQuery getAllQuery() {
return new IgniteAllQuery(name, admin);
} | [
"List<E> queryAll(String namedQuery);",
"public static JPAQuery all() {\n throw new AutoGeneration();\n }",
"Subquery all();",
"remote.RemoteStorage.Query getQueries(int index);",
"protected List<T> queryAll() throws SQLException {\n\t\tlogQuery(\"SELECT * FROM {}\", DatabaseHelper.getTable(mClazz... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
string validFlag = 34; | public java.lang.String getValidFlag() {
java.lang.Object ref = validFlag_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8... | [
"java.lang.String getValidFlag();",
"java.lang.String getValidFlagCorrected();",
"public String getValidflag() {\n return validflag;\n }",
"public String getValidflag() {\n\t\treturn validflag;\n\t}",
"java.lang.String getFlag();",
"char parseFlag(String rawFlag) {\n return parseFlags(rawFl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ step function to "advance" one second, updating the position of the Point based on its velocity | public void step() {
x += dX;
y += dY;
} | [
"@Override\n public void move() {\n this.point.x += vector.x * getCurrentSpeed();\n this.point.y += vector.y * getCurrentSpeed();\n }",
"public void incrementPosition(double timestep) {\n\t\tdouble vy = Math.sin(angle)*velocity;\n\t\tdouble vx = Math.cos(angle)*velocity;\n\t\tif ((double)block... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Car Purchase Request. Details are calculated based on the car type requested. | public CarPurchase(String carType) {
this.carType = carType.toLowerCase();
} | [
"private static void purchaseCar(Scanner scan, List<UsedCar> carList, int menuChoice, int numCars) {\n String input = \"\";\n\n if (menuChoice == numCars) { // if user chooses to quit then jump out of the loop. this ensures we won't get\n // an out of bounds excepti... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
before creating a new file we need to check if the previously opened file was saved or not | void createNewFile(){
if(!checkSaved()){
this.npd.statusBar.setText("Well, you must save the file to continue...");
return;
}
newFileFlag = true;
newFile();
updateStatus(new File("Untitled.txt"), true);
saved = false;
} | [
"private static void createFile() {\n\t\ttry {\n\t\t\tboolean newFile = false;\n\n\t\t\tSystem.out.println(\"Is the file exist ? \" + file.exists()); // look\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// for a\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// real\n\t\t\tSystem.out.println(file.canExecute());\n\t\t\tSystem.out.pri... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns unqiue material key. | public final long getMaterialKey() {
return mMaterialKey;
} | [
"java.lang.String getClientKey();",
"public String getMinKey();",
"public String GetKey() {\n return toString() + \"_\" + hashCode();\n }",
"private String getKey()\r\n\t\t{\r\n\t\t\tif (key != null)\r\n\t\t\t{\r\n\t\t\t\treturn key.toString();\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn \... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method corresponds to the database table USER1.CAR | @Select({
"select",
"ID, BRAND, MODEL, TYPE, PLATE, SEATS",
"from USER1.CAR",
"where ID = #{id,jdbcType=DECIMAL}"
})
@Results({
@Result(column="ID", property="id", jdbcType=JdbcType.DECIMAL, id=true),
@Result(column="BRAND", property="brand", jdbcType=JdbcType.VAR... | [
"public interface CarinfoDao {\n /**\n * 带分页的显示汽车方法\n *\n */\n @Select(\"<script>select a.ID,a.LSICENSE,a.CARTYPE,a.SADDLE,a.APPLICATIONTYPE,a.DRIVER,to_char(a.BEGINTIME,'yyyy-mm-dd') as BEGINTIME,a.STATE,to_char(a.INSURANCETIMR,'yyyy-mm-dd') as INSURANCETIMR,a.MILEAGE,a.REMARK from \\n\" +\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
takes a file and checks its filename and appends the xml extension if it does not already use that extension in the filename | public static File checkPath(File file) {
String filename = file.getAbsolutePath();
if(filename.contains(".")) {
filename = filename.substring(0, filename.indexOf(".") + 1);
filename += "xml";
File newFile = new File(filename);
return newFile;
} else {
filename += ".xml";
File newFile = new File... | [
"private File appendFileExtension(File file) {\r\n \t\tString filename = file.getName();\r\n \t\tif (isMissingExtension(filename)) {\r\n \t\t\tcurFile = new File(curFile.getAbsolutePath() + EXTENSION);\r\n \t\t}\r\n \r\n \t\treturn curFile;\r\n \t}",
"private String adaptExtension(File file, String extension)\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the vendor organization of this application. | public static String getImplementationVendor() {
return getJarInfo("Implementation-Vendor");
} | [
"java.lang.String getVendor();",
"public String getVendor() {\r\n\r\n // The XSD specifies the XML vendor and path should only contain [a-zA-Z0-9]+\r\n // and cannot be empty. Let's be defensive and enforce that anyway since things\r\n // like \"____\" are still valid values that we don't wan... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Copy and paste a directory into another directory | public void copyPaste(String dir1, String dir2) throws FileNotFoundException, IOException {
InputStream input = new FileInputStream(dir1);
OutputStream output = new FileOutputStream(dir2);
IOUtils.copy(input, output);
} | [
"void copyTo(String folder);",
"void copyFolder(String sourceFolder, String targetFolder) throws JackrabbitException;",
"@Test\r\n public void testDirToNewDir() {\r\n String[] args = {\"cp\", \"/dir1/dir1/\", \"/yyy/\"};\r\n cp.run(args);\r\n assertFalse(ErrorHandler.checkIfErrorOccurred());\r\n as... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Describe an SDX Connection. :: Describe an SDX Connection. | public void describeConnection(com.cloudera.thunderhead.service.sdxsvcadmin.SDXSvcAdminProto.DescribeConnectionRequest request,
io.grpc.stub.StreamObserver<com.cloudera.thunderhead.service.sdxsvcadmin.SDXSvcAdminProto.DescribeConnectionResponse> responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplemen... | [
"public com.cloudera.thunderhead.service.sdxsvcadmin.SDXSvcAdminProto.DescribeConnectionResponse describeConnection(com.cloudera.thunderhead.service.sdxsvcadmin.SDXSvcAdminProto.DescribeConnectionRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getDescribeConnect... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clears the value of the 'field867' field | public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField867() {
field867 = null;
fieldSetFlags()[867] = false;
return this;
} | [
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField987() {\n field987 = null;\n fieldSetFlags()[987] = false;\n return this;\n }",
"public com.maxpoint.cascading.avro.TestExtraLarge.Builder clearField232() {\n field232 = null;\n fieldSetFlags()[232] = false;\n re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
void add(BinaryNumber aBinaryNumber) for adding two binary numbers, one is the binary number that receives the message and the other is given as a parameter. | public void add(BinaryNumber aBinaryNumber) {
if(data.length != aBinaryNumber.getLength()) {
System.out.println("the lengths of the binary numbers do not coincide");
}else {
int carried = 0;
int sum = 0;
for(int i = data.length - 1;i >= 0;i--) {
sum = data[i] + aBinaryNumber.getDigit(i) + carrie... | [
"void add(BigInt number);",
"BaseNumber add(BaseNumber operand);",
"public int addTwoNumber(int input1,int input2);",
"public String addBinary(String a, String b) {\n StringBuilder res = new StringBuilder();\n int x=0; int y=0; int carry=0;\n while(a.length() != b.length()){\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Processes the specified commandline argument. | private void processArgument(final char arg, final String param) {
switch (arg) {
case 'c':
doConnect(param);
break;
case 'd':
doDirectory(Paths.get(param));
break;
case 'e':
doExisting();
... | [
"void process(\n final WriteableCommandLine commandLine,\n final ListIterator args)\n throws OptionException;",
"void processCommandLineArguments(String[] args) throws ConfigurationException;",
"public interface IArgumentEvent {\r\n\r\n /**\r\n * Called when the argument registered t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of setDOB method, of class PhoneConvRecord. | @Test
public void testSetDOB() {
System.out.println("setDOB");
String dob = "TestDoB";
PhoneConvRecord instance = new PhoneConvRecord();
instance.setDOB(dob);
assertEquals(dob, instance.getDOB());
} | [
"@Test\n public void testGetDOB() {\n System.out.println(\"getDOB\");\n PhoneConvRecord instance = this.setupObject();\n String expResult = \"TestDoB\";\n String result = instance.getDOB();\n assertEquals(expResult, result);\n }",
"public static void setDOB(String dob){\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of interpreting the object as an instance of 'Sphere'. This implementation returns null; returning a nonnull result will terminate the switch. | public T caseSphere(Sphere object) {
return null;
} | [
"public boolean getSphere() {\n return useSphere;\n }",
"boolean isSphere();",
"public SphereMeshes sphereType() {\r\n assert sphereType != null;\r\n return sphereType;\r\n }",
"private int getSphere(final Sector sector) {\n if (sector == null || String.valueOf(sector.getPoli... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a st.apply_train table reference | public ApplyTrain() {
this(DSL.name("apply_train"), null);
} | [
"public void populateTrainTable() {\n\n\t\ttrainRepo.deleteAll();\n\t\tscheduleRepo.deleteAll();\n\n\t\t// Adding Express Train Info\n\t\taddExpressTrain(\"SB\");\n\t\taddExpressTrain(\"NB\");\n\n\t\t// Adding Regular Train Info\n\t\taddRegularTrain(\"SB\");\n\t\taddRegularTrain(\"NB\");\n\t}",
"Train createTrain... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter for cell paddings in pixels using several numbers. | public TableBase setCellPadding(Number value1, Number value3, Number value5, Number value7) {
if (jsBase == null) {
this.value = null;
this.value1 = null;
this.value2 = null;
this.value3 = null;
this.value4 = null;
this.value5 = null;
... | [
"public void setCellpadding(java.lang.String cellpadding)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(CELLPADDING$30);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Upgrade to Cyklotron 2.19.7 | public void upgrade_2_19_7() {
try {
logger.info("Start upgrade to Cyklotron 2.19.7");
tomcatHelper.stop();
tomcatHelper.deleteWebappRootDir();
tomcatHelper.setRootXml("cyklotron-2.19.7.war", "ledge.root",
"false");
tomcatHelper.start();
logger.info("Upgrade to Cyklotron 2.19.7 successful");
... | [
"public void upgrade_2_17_2() {\n\t\ttry {\n\t\t\tlogger.info(\"Start upgrade to Cyklotron 2.17.2\");\n\t\t\ttomcatHelper.stop();\n\t\t\ttomcatHelper.deleteWebappRootDir();\n\t\t\ttomcatHelper.setRootXml(\"cyklotron-2.17.2.war\", \"ledge.root\",\n\t\t\t\t\t\"false\");\n\t\t\ttomcatHelper.start();\n\t\t\tcyklotronHe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a copy of the effect with a new priority | @Override
public TemplateEffect changePriority(int priority) {
return new TemplateEffect(labelTemplate, valueTemplate, type, priority);
} | [
"public void addPriorityEffect(Ability to);",
"public int getEffectivePriority() {\r\n\t\trefresh();\r\n\t return priorityCache;\r\n\t}",
"Effect getEffect();",
"@Override\n\tpublic TemplateEffect copy() {\n\t\treturn new TemplateEffect(labelTemplate, valueTemplate, type, priority);\n\t}",
"double addToP... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Validates application documents for duplicates | private void validateDuplicateDocuments(TradeLicenseRequest request){
List<String> documentFileStoreIds = new LinkedList();
request.getLicenses().forEach(license -> {
if(license.getTradeLicenseDetail().getApplicationDocuments()!=null){
license.getTradeLicenseDetail().getAppli... | [
"private void validateDuplicateDocuments(Noc noc) {\n\t\tif (!ObjectUtils.isEmpty(noc.getDocuments())) {\n\t\t\tList<String> documentFileStoreIds = new LinkedList<String>();\n\t\t\tnoc.getDocuments().forEach(document -> {\n\t\t\t\tif (documentFileStoreIds.contains(document.getFileStoreId()))\n\t\t\t\t\tthrow new Cu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Implicitly bind the specified identifier. Depending on the current parsing context, the identifier is either bound as a type or as an object/function/constant. | public void bind(String id) {
// Ignore the binding if a function parameter list has already
// been parsed or the binding appears inside a structure
// declaration list.
if (top.next.isSet(FLAG_PARAMS) || top.next.isSet(FLAG_STRUCTURE)) {
if (DEBUG) {
System.out.println("ignoring bind(" +... | [
"void bind(Symbol symbol, SExpression value);",
"public void bind(int variableID, Object obj){\n\t\tbinding.setVariable (variableID, obj);\n\t\tvariable = obj;\n\t\tbinding.executePendingBindings ();\n\t}",
"Binding newBinding(Variable var, AST ast, EvalVisitor ev);",
"public static String bind(String id, Str... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function should be call only when open account. This function returns the PIN of this account in a string. | String getPIN() {
return PIN;
} | [
"public String getPIN();",
"public java.lang.String getPIN()\n\t{\n\t\treturn PIN;\n\t}",
"public String getPIN() {\n return PIN;\n }",
"java.lang.String getAccountNumber();",
"public java.lang.String getPin() {\r\n return pin;\r\n }",
"int getPinNumber();",
"public String generatePI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Attempts to find the last field of the specified type | public Field resolveByLastType(Class<?> type) throws ReflectiveOperationException {
Field field = null;
for (Field field1 : this.clazz.getDeclaredFields()) {
if (field1.getType().equals(type)) {
field = field1;
}
}
if (field == null) { throw new NoSuchFieldException("Could not resolve field of type '"... | [
"public Field resolveByLastExtendingType(Class<?> type) throws ReflectiveOperationException {\n\t\tField field = null;\n\t\tfor (Field field1 : this.clazz.getDeclaredFields()) {\n\t\t\tif (type.isAssignableFrom(field1.getType())) {\n\t\t\t\tfield = field1;\n\t\t\t}\n\t\t}\n\t\tif (field == null) { throw new NoSuchF... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the isIncomplete value for this SurveyResult. | public void setIsIncomplete(java.lang.Boolean isIncomplete) {
this.isIncomplete = isIncomplete;
} | [
"public java.lang.Boolean getIsIncomplete() {\n return isIncomplete;\n }",
"public boolean isIncomplete() {\n\t\treturn incomplete;\n\t}",
"public void setIncompleteRequestingInstitution(String incompleteRequestingInstitution) {\n this.incompleteRequestingInstitution = incompleteRequestingInsti... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ A function to return the current maximum ID for planes that exists in the database, to avoid ID duplication | @Override
public int getMaxID() {
ResultSet resultSet = null;
int max = 0;
try {
resultSet = DBManager.getInstance().readFromDB("SELECT max(planeid) from fleet");
resultSet.next();
max = resultSet.getInt(1);
} catch (SQLException e) {
e.printStackTrace();
}
if(max == 0) {
return 999;
}
r... | [
"private long findMaxId() {\n\t\tlong max = 0;\n\t\tfor (Block block : this.getBlockCollection()) {\n\t\t\tif (block.getId() > max) {\n\t\t\t\tmax = block.getId();\n\t\t\t}\n\t\t}\n\t\treturn max;\n\t}",
"int getMaxID() throws DatabaseNotAccessibleException;",
"public int getMaxId() {\n int maxID = 1;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Transition vehicle to parked state (mutator) Parking starts on arrival or on exit from the queue, but time is set here | public void enterParkedState(int parkingTime, int intendedDuration)
throws VehicleException {
exitTime = parkingTime + intendedDuration;
this.parkingTime = parkingTime;
// this.intendedDuration = intendedDuration;
if (isParked() == true) {
throw new VehicleException("Vehicle is already parked.")... | [
"void park(Vehicle v) {\n\t\t\tcurrentVehicle = v;\n\t\t}",
"public void setTimeParked(long timeParked) {\r\n this.timeParked = timeParked;\r\n }",
"public void flyToDeparturePoint() {\n Pilot pilot = null;\n try{\n this.mutex.lock();\n\n this.repository.logEvent(Ev... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the default project location. | public static String getDefaultProjectLocation() {
return Platform.getLocation().toOSString();
} | [
"public String getProjectLocation() {\n if (isNewProject() && useDefaultLocation()) {\n return Platform.getLocation().toString();\n } else {\n return getLocationPathFieldValue();\n }\n }",
"public RuntimeProjectConfiguration getDefaultProject() {\n return... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Apply red color on g2 context | public void red() {
g2.setPaint(Color.red);
} | [
"public void modeColor(Graphics2D g2d) { g2d.setColor(RTColorManager.getColor(\"label\", \"default\")); }",
"public void green() {\n g2.setPaint(Color.green);\r\n }",
"public void blue() {\n g2.setPaint(Color.blue);\r\n }",
"@Override\n public void redCell() {\n gCell.setFill(Col... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor (id: long, name: String, bot: TelegramBot, b_bot: AusbildungsnachweiseBot) This Constructor is called if a new User has registered. initialize variables. create schedule and job and put context into the jobs JobDataMap. | public User (long id, String name, TelegramBot bot, BerichteBot b_bot)
{
expectTime = false;
expectInput = false;
confirmDelete = false;
inputs = new ArrayList<String>();
this.id = id;
this.name = name;
this.bot = bot;
this.b_bot = b_bot;
textFileDirectory = RunBot.config.getFilePath();
sa... | [
"public User (long id, String name, String time, TelegramBot bot, BerichteBot b_bot)\n\t{\n\t\texpectTime = false;\n\t\texpectInput = false;\n\t\tconfirmDelete = false;\n\t\t\n\t\tinputs = new ArrayList<String>();\n\t\t\n\t\tthis.id = id;\n\t\tthis.name = name;\n\t\tthis.bot = bot;\n\t\tthis.b_bot = b_bot;\n\t\t\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handles user changes to input fields, parse their values and writes it to our entry. | private void handleInputs() {
final EditText startTimeEdit = (EditText) findViewById(R.id.start_time_text_edit);
final EditText endTimeEdit = (EditText) findViewById(R.id.end_time_text_edit);
startTimeEdit.addTextChangedListener(new TimeTextWatcher(startTimeEdit));
endTimeEdit.addTextCh... | [
"public static void askToChangeFields() {\n // Prompt user to choose if they want to modify the description.\n System.out.print(\"The item that was randomly selected was \" + allItemObjects[itemObjectCount].getDescription()\n + \", do you to keep this item or change it? (Enter 1 to KEEP... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test generate uri_01. When Node input does not exist. | public void testGenerateURI_01() {
try {
restImagesRendererService.generateImageURI(null, null);
fail();
} catch (Exception e) {
assertNotNull(e);
}
} | [
"public void testGenerateURI_02() {\n try {\n File file = new File(\"src/test/resources/test.html\");\n Node imageNode = this.createdNodeImages(documentNode, file.getName(), getFileImages(file));\n restImagesRendererService.generateImageURI(imageNode.getParent(), null);\n } catch (Exception e) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__XClosure__ExplicitSyntaxAssignment_2_0_1" $ANTLR start "rule__XClosure__ExpressionAssignment_3" ../org.xtext.example.rmodp.ui/srcgen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:30967:1: rule__XClosure__ExpressionAssignment_3 : ( ruleXExpressionInClosure ) ; | public final void rule__XClosure__ExpressionAssignment_3() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:30971:1: ( ( ruleXExpressionIn... | [
"public final void rule__XClosure__Group__3__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:20522:1: ( ( ( rule__... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the price of the unit. | public void setUnitPrice(double value)
{
unitPrice = value;
} | [
"void setUnitPrice(java.math.BigDecimal unitPrice);",
"public void setPrice(double price);",
"public void setPrice(double p) {\n price = p;\n }",
"protected void setPrice(double price) {\n this.price = price;\n }",
"public void setUnitPrice(Number value) {\n setAttributeInternal(U... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
sets the quantity of the item that this method is called on the setQuantity() method sets the amount of stock there is for a certain item we have in our shop | void setQuantity(int quantity); | [
"public void setQuantity(int itemQuantity){\n\t\tquantity = itemQuantity;\n\t}",
"public void setProductStock(int qty){\n\t\tstockQuantity = qty;\r\n\t}",
"public void setQuantity(int quantity) {\n this.quantity = quantity;\n this.updateTotalPrice();\n }",
"public void setItemQuantity(String ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a row identifier or empty string if the given properties contains no identifier. | String getRowId(DynamicPropertySet properties)
{
Object idObject = properties.getValue(DatabaseConstants.ID_COLUMN_LABEL);
return idObject != null ? String.valueOf(idObject) : null;
} | [
"public final String getRowIdentifier() {\n return properties.get(ROW_IDENTIFIER_PROPERTY);\n }",
"public String getRowKey() {\n Property p = getProperty(\"RowKey\");\n return p == null ? null : (String) p.getValue();\n }",
"private Object _getRowKey()\n {\n Object data = getRowData();\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column REP_INFO.APPLICATION | public void setAPPLICATION(String APPLICATION) {
this.APPLICATION = APPLICATION == null ? null : APPLICATION.trim();
} | [
"public void setApplication(java.lang.String application)\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.xml... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Mark a receipt as modified, so any changes are guaranteed to be saved when the file is next flushed. Implementing classes are free to optimize this process; e.g., they may determine that the receipt has not actually changed and does not need flushing. | public void setModified(Receipt r); | [
"public void markModified () throws java.io.IOException {\n // do nothing\n }",
"public static void saveReceipt()\r\n\t{\r\n\t\tPrintWriter listWriter = null;\r\n\t\tPrintWriter contentWriter = null;\r\n\t\tnewReceipt = getTimeStamp();\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tlistWriter = new PrintW... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add a new message to mailbox | public void addMessage(Message message){
actorThread.addNewMessage(message);
} | [
"public void addNewMessage(Message message){ \n \tsynchronized(mailbox){\n \t\tif(stopped) throw new NoSuchActorException();\n \t\tmailbox.add(message);\n \t\tmailbox.notifyAll();\n \t}\n }",
"public void addMessage(Message message);",
"public void addInboxMessage(Inbox... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creer un choix possible pour la question | void createChoix(String nom, boolean juste){
Choix c = new Choix(nom,juste);
} | [
"private void creatingNewQuestion() {\r\n AbstractStatement<?> s;\r\n ListQuestions lq = new ListQuestions(ThemesController.getThemeSelected());\r\n switch ((String) typeQuestion.getValue()) {\r\n case \"TrueFalse\":\r\n // just to be sure the answer corresponds to the... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the identity of the validator. | public String getValidatorID(); | [
"public String getIdentity() { \n\t\treturn getIdentityElement().getValue();\n\t}",
"public String getIdentity()\n {\n return identity;\n }",
"public String getIdentityValue() {\n return identityValue;\n }",
"String getIdentityId();",
"com.satoshilabs.trezor.lib.protobuf.TrezorType.I... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method setBaseAndHeight() compare ribs and if finds equal calculate and set Base and Height of triangle | private void calculateBaseAndHeight() {
if (ribs[0].equals(ribs[1])) {
base = ribs[2].getLength();
height = calculateHeight(ribs[0].getLength(),base);
} else if (ribs[1].equals(ribs[2])) {
base = ribs[0].getLength();
height = calculateHeight(ribs[1].getLe... | [
"private double triangleBase() {\n return cellWidth() / BASE_WIDTH;\n }",
"void setSideBaseHeight(double side, double base, double height) {\n this.base = base;\r\n this.side = side;\r\n this.height = height;\r\n }",
"private int getTriangleWidth( int triangleHeight )\r\n {\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter for property idActividadArtefacto. | public void setIdActividadArtefacto(Long idActividadArtefacto) {
this.idActividadArtefacto = idActividadArtefacto;
} | [
"public Long getIdActividadArtefacto() {\n return this.idActividadArtefacto;\n }",
"public static void setIdActivida(Long idActivida) {\r\n\t\tNotaActividad.idActivida = idActivida;\r\n\t}",
"public void setIdNotaActividad(Long idNotaActividad) {\r\n\t\tthis.idNotaActividad = idNotaActividad;\r\n\t}",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Service Interface for managing OptionalService. | public interface OptionalServiceService {
/**
* Save a optionalService.
*
* @param optionalService the entity to save
* @return the persisted entity
*/
OptionalService save(OptionalService optionalService);
/**
* Get all the optionalServices.
*
* @param pageable the... | [
"public interface AddOnServiceService {\n\n /**\n * Get add on service\n *\n * @param id\n * @return\n */\n Optional<AddOnService> get(Integer id);\n\n /**\n * Edit add on service\n *\n * @param addOnService\n * @return\n */\n AddOnService edit(AddOnService addOnS... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
method to decide if we need to insert extra (nonjoined) points to reflect fact that data wraps through 360 degs | private static boolean insertWrappingPoints(double lastSecondaryValue,
double thisVal, HiResDate lastTime, HiResDate currentTime,
Color thisColor, Series thisSeries, boolean connectToPrevious,
ColouredDataItem.OffsetProvider provider, VersatileSeriesAdder theAdder,
double clipMax)
{
// is thi... | [
"public void addSpecialPoint() {\n specialPoints++;\n }",
"public boolean hasPoints() {\n\t\treturn !divided && points.size() != 0;\n\t}",
"@Test\n public void testDontCreateCircuit() {\n ArrayList<Point> points = new ArrayList<Point>(Arrays.asList(view.mapPoints));\n Point firstPoint... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the campus attribute. | public Campus getCampus() {
Map<String, Object> criteria = new HashMap<String, Object>();
criteria.put(KRADPropertyConstants.CAMPUS_CODE, campusCode);
return campus = SpringContext.getBean(CampusService.class).getCampus(campusCode/*RICE_20_REFACTORME criteria */);
} | [
"public Campus getCampus() {\n\t\treturn campus;\n\t}",
"public String getCampusCode() {\n return campusCode;\n }",
"public List<CampusInfo> getCampuses() {\n ArrayList<CampusInfo> temp = new ArrayList<CampusInfo>();\n for (Campus c : campuses) {\n temp.add(c.getCampusInfo());... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "INSTRUCTION_FORMAT12x" $ANTLR start "INSTRUCTION_FORMAT20t" | public final void mINSTRUCTION_FORMAT20t() throws RecognitionException {
try {
int _type = INSTRUCTION_FORMAT20t;
int _channel = DEFAULT_TOKEN_CHANNEL;
// org/jf/smali/smaliLexer.g:438:2: ( 'goto/16' )
// org/jf/smali/smaliLexer.g:438:4: 'goto/16'
{
... | [
"public final void insn_format20t() throws RecognitionException {\n CommonTree INSTRUCTION_FORMAT20t116 = null;\n Label label_ref117 = null;\n\n try {\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:810:3: ( ^( I_STATEMENT_FORMAT20... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is used for visiting referenceValue. | void visitReferenceValue(ReferenceValue referenceValue); | [
"public abstract Value getReferenceValue();",
"T visitValueSetRef(ValueSetRef elm, C context);",
"void visitReference(Reference r);",
"Object visitReference(ReferenceNode node, Object state);",
"Object visitValue(ValueNode node, Object state);",
"public double getRefValue() {\n return refValue;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method initializes scrolledComposite | private void createScrolledComposite() {
GridData gridData = new GridData();
gridData.horizontalAlignment = GridData.CENTER;
gridData.grabExcessHorizontalSpace = true;
gridData.grabExcessVerticalSpace = true;
gridData.verticalAlignment = GridData.CENTER;
scrolledComposite = new ScrolledComposite(shell, SWT.... | [
"private void scrollbarInit() {\n\t\tscrollbar = new JScrollPane(motionNameDisplayer);\n\t\tscrollbar.setForeground(new Color(40, 40, 40));\n\t\tscrollbar.setPreferredSize(new Dimension(90, 120));\n\t\tadd(scrollbar);\n\t}",
"private void doBuildScroller() {\r\n\t\t\r\n\t}",
"private void createAndInitScrolling... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check elements in shadow DOM cannot be accessed | @Test(groups={"it"}, expectedExceptions = NoSuchElementException.class)
public void testAccessShadowElementDirectly() {
DriverTestPageShadowDom.divPass1Direct.getText();
} | [
"@Test(groups={\"it\"}, expectedExceptions = NoSuchElementException.class)\n\tpublic void testAccessMultipleSameSubShadowElementNotFound() {\n\t\tAssert.assertEquals(DriverTestPageShadowDom.divMultipleShadowElements.findElement(By.tagName(\"span\")).getText(), \"This is a DIV with the ID of pass71Shadow\");\n\t}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Is there an active block and is there any data in it to upload? | private boolean hasActiveBlockDataToUpload() {
return hasActiveBlock() && getActiveBlock().hasData();
} | [
"boolean hasBlockdetail();",
"private synchronized boolean hasActiveBlock() {\n return activeBlock != null;\n }",
"public boolean isFullBlock();",
"boolean hasBlock(int type);",
"private synchronized void uploadCurrentBlock() throws IOException {\n checkState(hasActiveBlock(), \"No active block\");\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fade focus distance to given target while rescaling images | public void startFadingFocusDistance(float target, int frameCount)
{
setFadingFocusDistance(true);
// state.fadingFocusDistanceStartFrame = getWorldState().frameCount;
// state.fadingFocusDistanceEndFrame = getWorldState().frameCount + 1; // Only one frame between start and end indicates continuous fading... | [
"public void fadeFocusDistance(float target, int frameCount)\n\t{\n\t\tsetFadingFocusDistance(true);\n\t\tstate.fadingFocusDistanceStartFrame = frameCount;\t\t\t\t\t\n\t\tstate.fadingFocusDistanceEndFrame = frameCount + state.fadingFocusDistanceLength;\t\n\t\tstate.fadingFocusDistanceStart = metadata.focusDistance;... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the attribute value for Color, using the alias name Color. | public String getColor() {
return (String)getAttributeInternal(COLOR);
} | [
"public String getColor() {\n return (String) getAttributeInternal(COLOR);\n }",
"public String getColorName() {\n\t\treturn colorNames[color];\n\t}",
"public String getColour() {\n return (String) getAttributeInternal(COLOUR);\n }",
"public String getColorNum() {\n return (String) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |