query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
TODO memoize in lazy memoized supplier? | @Override
public SingleOutputStreamOperator<Out> get() {
Preconditions.checkState(ttl != null && ttl.toMilliseconds()> 0,
"ttlMillis should be non null and greater than 0, %s found", ttl.toMilliseconds());
// TODO other preconditions
DataStream<Either<In, Key... | [
"<T> Supplier<T> memoize(Supplier<T> s) {\n return new Supplier<T>() {\n T v;\n int initializedInRound = -1;\n\n @Override\n public T get() {\n int r = round.get();\n if (initializedInRound != r) {\n v = s.get();\n initializedInRound = r;\n }\n re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get install task state | public void getInstallState(View view) {
Log.d(TAG, "begin to get session state for: " + sessionId);
FeatureTask<InstallState> task = mFeatureInstallManager.getInstallState(sessionId);
task.addOnListener(new OnFeatureCompleteListener<InstallState>() {
@Override
public voi... | [
"InstallationStatus getInstallationStatus();",
"public Map<String, String> getTaskStatus();",
"boolean getTask();",
"public static StatusUtil.Status getInitStatus(DownloadTask task) {\n return StatusUtil.getStatus(task);\n }",
"public String getTaskState(Task task){\n if(task.getStatus() ==... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
An expectation for checking the title of a page. | public static ExpectedCondition<Boolean> titleIs(final String title) {
return new ExpectedCondition<Boolean>() {
public Boolean apply(WebDriver driver) {
return title.equals(driver.getTitle());
}
@Override
public String toString() {
... | [
"@When(\"^I verify the expected the title as Google$\")\n public void verifyTitle(){\n Reusable_Methods.verifyPageTitle(driver,\"Google\");\n }",
"@Test\n\tpublic void verifyPagemainPAgeTitle() {\n\t\tString actualTitle = driver.getTitle();\n\t\tString expectedTitle = \"Title of Page\";\n\t\t//use as... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Run the update immediately in current thread and return whatever returned by the update. This is mainly used in notify processors. | public <T> T updateImmediately(RxUpdate<T> update) {
update.setNotifySubject(mUpdateNotify);
return mDb.run(update);
} | [
"protected void updateThreaded() {\n\t\tif(currentRecalculator != null) {\n\t\t\tcurrentRecalculator.cancel(true);\n\t\t}\n\t\tcurrentRecalculator = new Recalculator();\n\t\tcurrentRecalculator.execute();\n\t}",
"public void run() {\r\n\t\tupdate();\r\n\t\thandler.sendEmptyMessage(0);\r\n\t}",
"@Override\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Zero argument constructor required by Hibernate. | public Page() {} | [
"public SessionImpl() {\n \t// No-arguments constructor\n }",
"public HibernateOperation() {\r\n\t}",
"public SomeObject() {\n // This empty default constructor should be kept for internal use from\n // Hibernate Search.\n }",
"protected AidaEntity() {/* intentionally empty block */}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the item for this button | public void setItem(ItemStack item, boolean updateMetaData, boolean updateAnimationFrames) {
ItemMeta lastMeta = this.getItem().getItemMeta().clone();
if (animated) {
if (buttonAnimationManager != null) {
buttonAnimationManager.updateButtonMetaData(item);
if (... | [
"public void setItem(Object item){\n this.item = item;\n }",
"public void setItem(Item item){\n this.item = item;\n }",
"public void setItem(Item item) {\n this.item = item; \n }",
"public void setItem(T item)\r\n\t{\r\n\t\tthis.item = item;\r\n\t}",
"void setItem( final ItemSt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by Apache iBATIS ibator. This method returns the value of the database column DY_H_BSC_TCH_QOS.F2 | public Float getF2() {
return f2;
} | [
"public java.lang.Double getCapMan__Forecast_EBITDA_Q2__c() {\n return capMan__Forecast_EBITDA_Q2__c;\n }",
"public T getQ2() {\n return q2;\n }",
"public float get_Quiz_2(){\r\n\t\treturn Quiz_2;\r\n\t}",
"public Float getBhCsxLevel2() {\r\n return bhCsxLevel2;\r\n }",
"public... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Any pending frames can never be written, clear and write errors for any pending frames. | @Override
public void streamInactive(Http2Stream stream) {
state(stream).clear();
} | [
"public void clearErrors() { errorCount = 0; }",
"public void clearErr() {\r\n lErrStack.clear();\r\n }",
"public void flush() {\n availableInputBuffers.clear();\n availableOutputBuffers.clear();\n bufferInfos.clear();\n formats.clear();\n mediaCodecException = null;\n }",
"@Override\n\tpu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Only available to the sender. | public void setBccRecipients(ArrayList<SFEncryptedEmailRecipient> bccrecipients) {
this.BccRecipients = bccrecipients;
} | [
"public String getSender(){ return sender; }",
"Reference getSender();",
"Resource getSender();",
"protected void onPrivateMessage(User sender, String message) {\r\n }",
"@Override\n\tpublic void setSender(String s) {\n\n\t}",
"public String getSender() {\n return sender;\n }",
"public St... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the maximum number of Course the Student can take in a Semester | public void SetMaxCoursesPerSemester(int max)
{
this.maxCoursesPerSemester = max;
} | [
"public void setMaxNumberOfStudents(int maxStudents) {\n if(maxStudents >= 10 && maxStudents <= 50) {\n this.maxStudents = maxStudents;\n } else {\n throw new IllegalArgumentException(\"The maximum number of students\"\n + \" must be between 10 and 50\");\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the number of this line. This value is mutable. | public int getNumber() {
return number;
} | [
"public int getNumberOfLine()\n\t{\n\t\treturn this.lineNumber;\n\t}",
"public int lineNumber() {\n return lineNo;\n }",
"public int getLineNumber() {\n\t\n\t\treturn line;\n\t}",
"public final int lineNumber()\r\n {\r\n return lineno;\r\n }",
"public long getLineNumber() {\n ret... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Empties out the schedule but does not reset the time or steps. If you're looking for a way to kill your simulation from a Steppable, use SimState.kill() instead. Note that any agents presently at THIS TIME STEP will STILL be stepped including possibly reinserting themselves in the schedule. | public void clear()
{
synchronized(lock)
{
queue = createHeap(); // let 'em GC -- must be inside the lock so scheduleOnce doesn't try to add more
}
} | [
"void resetSimulationTime();",
"public void reset()\n {\n // now reschedule myself\n// try { stopper = simulation.scheduleRepeatingImmediatelyAfter(this); }\n// catch (IllegalArgumentException e) { } // if the simulation is over, we can't schedule. Don't worry about it.\n\n cle... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Simple test for pruning and sprouting | public static void main(String[] args) {
HashSet<String> selections = new HashSet<String>();
HashSet<String> allPoints = new HashSet<String>();
allPoints.add("x.x.x.x");
allPoints.add("x.x.x.y");
allPoints.add("x.x.x.z");
allPoints.add("x.x.y.a");
allPoints.add("x.x.y.b");
allPoints.add(... | [
"@Suppress // Failing.\n public void testPruning() {\n // first we'll make 50 queries named \"group1 x\"\n final int GROUP_1_COUNT = 50;\n final String GROUP_1_QUERY = \"group1 \";\n final String GROUP_1_LINE2 = \"line2 \";\n writeEntries(GROUP_1_COUNT, GROUP_1_QUERY, GROUP_1_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | public List<GoodsSku> getSj(String cartId) {
return null;
} | [
"@Override\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void extornar() {\n \n }",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void wydaj() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public void onTextChanged(CharSequence arg0, int arg1, int arg2, int arg3) {
} | [
"@Override\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void extornar() {\n \n }",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void wydaj() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tree to list, preorder traverse | public void tree_to_list(TreeNode root){
if(root == null){
return;
}
result.add(root.value);
tree_to_list(root.left);
tree_to_list(root.right);
} | [
"List<E> preOrder(){\n List<E> list = new ArrayList<E>();\n preOrderTraverse(root, list);\n return list;\n }",
"public static List preOrder(TreeNode root) {\n\n ArrayList<Object> list = new ArrayList<Object>();\n\n if (root == null)\n return list;\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Double Tap does nothing | @Override
public boolean onDoubleTap(MotionEvent event) {
Log.d(DEBUG_TAG, "onDoubleTap: " + event.toString());
return true;
} | [
"@Override\n\tprotected void onTap() {\t\t\n\t\tlarry.doAction(); // Accelerate Larry\n\t}",
"@Override\r\n\t\t\tpublic boolean onDoubleTap(MotionEvent e) {\n\t\t\t\treturn false;\r\n\t\t\t}",
"@Override\n\tpublic boolean onDoubleTap(MotionEvent e){\n\t\treturn(true);\n\t}",
"@Override\n\tpublic boolean onDou... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Close the open connection. | private void closeConnection() {
netIOHandler.flush();
connectionClosing = true;
} | [
"public void close() {\n\n connection.close();\n }",
"public void closeConnection() {\n connection.disconnect();\n }",
"protected void close() {\n\t\tconnection.close();\n\t}",
"@Override\n\tpublic void close() throws IOException {\n\t\tif(conn!=null){\n\t\t\tconn.disconnect();\n\t\t}\n\t}... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a new object of class 'Seleccion Automatica'. | SeleccionAutomatica createSeleccionAutomatica(); | [
"public Selection createSelection()\r\n\t{\r\n\t\t//System.out.println(\"Create Selection\");\r\n\t\treturn new RankSelection();\r\n\t}",
"public void mostrarSedeSeleccionada() {\n\t}",
"public void autoSelectInit() {\n\t\t\tautoChooser = new SendableChooser<Command>();\n\t\t\tautoChooser.addDefault(\"Drive St... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds an order to the order book. The order must not already exist in the order book. | public void addOrder(Order p) {
orders.add(p);
} | [
"public void addOrder(ThingsToOrder order) {\n\t\tthis.wallet.add(order);\n\t}",
"@Override\n\tpublic void addOrder(Orders order) {\n\t\tSession session = sessionFactory.openSession();\n\t\tTransaction tx = session.beginTransaction();\n\t\tsession.save(order);\n\t\ttx.commit();\n\t\tsession.close();\n\t}",
"pub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the "deployments" element | public void setDeployments(org.biocatalogue.x2009.xml.rest.Service.Deployments deployments)
{
synchronized (monitor())
{
check_orphaned();
org.biocatalogue.x2009.xml.rest.Service.Deployments target = null;
target = (org.biocatalogue.x2009.xml.rest.Service.De... | [
"void setDeploymentStatus(int status);",
"@SuppressFBWarnings(value = \"EI_EXPOSE_REP2\", justification = \"The given parameters aren't modified\")\n public void setAllowedDeploymentEnvironmentNames(final Set<String> allowedDeploymentEnvironmentNames) {\n this.allowedDeploymentEnvironmentNames = allowed... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ if (properties != null) return properties; | public Properties createPropertyFileReader(String fileName) {
inputFileName = fileName;
properties = new Properties();
//StringBuilder filePath = new StringBuilder("D:\\PriceIntegrity\\src-facade\\src\\main\\java\\com\\tesco\\priceintegrity\\common\\resources");
//filePath.append("\\").... | [
"Object getProperties();",
"public Properties getProperties() {\n\t\treturn null;\r\n\t}",
"public Property[] getProperties() {\n\t\treturn null;\n\t}",
"private Properties getProperties() {\n\t\treturn properties;\n\t}",
"protected final T getProperties() {\n\t\treturn this.properties;\n\t}",
"Properties... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
.POGOProtos.Rpc.FortType fort_type = 9; | POGOProtos.Rpc.FortType getFortType(); | [
"com.zyd.common.proto.client.RpcProtocol.RpcType getType();",
"POGOProtos.Rpc.BuddyPokemonProto getBuddyPokemonProto();",
"POGOProtos.Rpc.HoloPokemonId getPokemonType();",
"com.hr.netty.proto.DataInfo.Person getPerson();",
"cruz.agents.ProtoMessage.BandanaRequest.Type getType();",
"POGOProtos.Rpc.PokemonP... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @SuppressWarnings("unchecked")
@Override
public List<Exam> findAllExams() throws IllegalArgumentException {
List<Exam> userList = (List<Exam>) getHibernateTemplate().find("from Exam order by examId");
if (userList == null || userList.size() == 0)
{
throw new IllegalArgumentException("Exam List doesnt exists"... | [
"@Override\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void extornar() {\n \n }",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void wydaj() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
required string conf = 4; | public boolean hasConf() {
return ((bitField0_ & 0x00000008) == 0x00000008);
} | [
"@Meta.AD(required = false, deflt = \"hello\", id = CONFIG_PROP_EXAMPLE_CONFIG_VALUE_STRING, \n name = \"Example Config String Value\")\n String exampleConfigValueString();",
"@Meta.AD(required = false, deflt = \"goodbye\", id = CONFIG_PROP_EXAMPLE_CONFIG_STRING_VALUE_AGAIN,\n name = \"An... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Loads a trust store. | public static KeyStore loadTrustStore(OpenIDProperties props)
throws GeneralSecurityException, IOException {
var myTrustStore = KeyStore.getInstance(props.getTruststoreType());
try (var myCerts = props.getTruststorePath().getInputStream()) {
myTrustStore.load(myCerts,
props.getTruststorePassword().toChar... | [
"private static KeyStore loadTruststore(){\n\n KeyStore truststore = null;\n try\n {\n CertificateFactory cFactory = CertificateFactory.getInstance(\"X.509\");\n\n InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(\"cacert.pem\");\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
event=[Event] ('(' anything=Anything ')' | '.' anything=Anything) | public Group getGroup_1_0() { return cGroup_1_0; } | [
"String getEventexpr();",
"java.lang.String getEvent2();",
"java.lang.String getEvent1();",
"@Test\n public void test3xTrue_OneEvent() {\n System.out.println(\"3xTrue, one event processed\");\n AddEventTrigger trigger = null;\n EventExpression expr1 = new TrueEventExpression();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if the information we have available guarantees that the compaction is producing data in "level+1" for which no data exists in levels greater than "level+1". | public boolean isBaseLevelForKey(String userKey) {
// Maybe use binary search to find right entry instead of linear search?
char[] userKeyChar = userKey.toCharArray();
Comparator userComparator = inputVersion.internalKeyComparator.getUserComparator();
for (int lvl = this.level + 2; lvl <... | [
"public boolean nextLevelExists() {\n\t\tif (levelNo < 3) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"boolean hasNextLevel();",
"public boolean isFull(){\n\t\treturn (keys.size() >= (orderM -1));\n\t}",
"public boolean nextLevelIfNeccessary(){\r\n\t\tdouble check = (level/10)*100+100*level;//Initi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates and prints a new Warning message (if warnings are enabled) | public void printWarning(String message, String callingOperation, Integer level)
{
/* Print warnings only if:
* - warnings are enabled
* - or (if warnings are disabled) if the disabledLevel for warnings is less than the level of the provided warning
*/
if(!warningsDisabled || disabledLevelWarning < ... | [
"public static void atWarning()\n {\n System.out.println(\"????????????????????????-- -- - ---- Warning\");\n }",
"public void printWarning(String msg) {\n\n\t}",
"private void warning(String msg) {\n System.out.println(msg);\n }",
"@Override\n\t\t\t\t\tpublic void warning(String messag... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This post method allows users to login to their accounts | @POST
@Path("/login")
public Response login(UserDTO userDTO) {
String username = userDTO.getUsername();
String password = userDTO.getPassword();
EntityManager em = PersistenceManager.instance().createEntityManager();
try {
em.getTransaction().begin();
Use... | [
"@PostMapping(\"/login\")\r\n\tpublic ResponseEntity<?> login() {\r\n\t\tcustomerService.signIn();\r\n\t\treturn new ResponseEntity<>(\"signIn\", HttpStatus.ACCEPTED);\r\n\t}",
"@Override\n\tprotected void postLoginUser(final DynamoHttpServletRequest request,\n\t\t\tfinal DynamoHttpServletResponse response) throw... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ access modifiers changed from: protected | public void rebuildInstanceData() {
super.rebuildInstanceData();
this.sessionToken = (String) get(SESSION_TOKEN_KEY);
this.username = (String) get("username");
processAuthData(null);
this.email = (String) get("email");
this.mobilePhoneNumber = (String) get(SMS_PHONE_NUMBE... | [
"@Override\n }",
"protected void method_5557() {}",
"@Override\n public void extornar() {\n \n }",
"@Override\r\n public void publicando() {\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"pro... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This is an method where vehicle picks a service bay from the front of the list by looking for empty one. | @Override
public void pickServiceBay(Garage garage) throws NoAvailableBayException {
int i = 0;
for (; i < garage.getSize(); i++) {
ServiceBay sb = garage.getBayAt(i);
try {
sb.occupy(this);
break;
} catch (BayOccupiedException e) {
// skip this line.
} catch (BayCarMismatchException e) {
... | [
"private void selectCleanService() {\n\t\tif (OtherUtils.isNotEmpty(clearingServiceList)) {\n\t\t\tBundle bundle = new Bundle();\n\t\t\tIntent intent = new Intent(this, SelectCleanServiceActivity.class);\n\t\t\tbundle.putString(\"data\", clearingServiceList);\n\t\t\tintent.putExtras(bundle);\n\t\t\tstartActivityFor... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the episode where groupId = &63; and episodeId = &63; or returns null if it could not be found, optionally using the finder cache. | public hu.webtown.liferay.portlet.model.Episode fetchByG_E(long groupId,
long episodeId, boolean retrieveFromCache)
throws com.liferay.portal.kernel.exception.SystemException; | [
"public static hu.webtown.liferay.portlet.model.Episode getEpisode(\n\t\tlong episodeId)\n\t\tthrows com.liferay.portal.kernel.exception.PortalException,\n\t\t\tcom.liferay.portal.kernel.exception.SystemException {\n\t\treturn getService().getEpisode(episodeId);\n\t}",
"@GetMapping(\"/episodes/{id}\")\n @Timed... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
See the comment in RdepsUnboundedVisitorgetUniqueValues. | @Override
protected ImmutableList<DepAndRdepAtDepth> getUniqueValues(
Iterable<DepAndRdepAtDepth> depAndRdepAtDepths) throws QueryException {
return depAndRdepAtDepthUniquifier.unique(
Iterables.filter(
depAndRdepAtDepths,
depAndRdepAtDepth ->
validRdepMinDept... | [
"@Override\r\n\tpublic String getDistinctValues() {\n\t\treturn null;\r\n\t}",
"public ReadSet<V> unique();",
"@Test\n public void test_uniqueArray() throws Exception {\n int[] emptyArray = new int[0];\n assertArrayEquals(new int[0], UniqueArray.unique(emptyArray));\n\n // \"One value sh... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves the currently configured RegistrationPropertyValidator. | public RegistrationPropertyValidator getValidator()
{
return validator;
} | [
"public static Validator getValidator() {\n ValidatorFactory factory = Validation.buildDefaultValidatorFactory();\n Validator validator = factory.getValidator();\n\n return validator;\n }",
"public ConfigurationValidator getConfigurationValidator()\n {\n return configurationVal... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method corresponds to the database table base_import_tests_models_char_noreadonly | int insertSelective(BaseImportTestsModelsCharNoreadonlyEntity record); | [
"@Test(enabled = false)\n @Override\n public void testDefaultColumns() throws Exception {\n // Ignored\n }",
"@Override\n public boolean isMapped() {\n return false;\n }",
"public static interface ColumnWithExcessiveLength extends Entity {\n @StringLength(TypeQualifiers.MAX... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise | public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case PLATFORM_ARGS:
return isSetPlatformArgs();
case OPTION:
return isSetOption();
case PAGE_INDEX:
return isSetPageIndex();
case... | [
"public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case ID:\n return isSetId();\n case DATA:\n return isSetData();\n }\n throw new IllegalStateException();\n }",
"public boolean... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The SDVariable that is the output of this "function" is just a dummy variable anyway... Usually 2 outputs... seems like first one is dummy, second one is a float?? TODO work out exactly what this second output is for (it's used in TensorArrayWrite for example... | @Override
public List<DataType> calculateOutputDataTypes(List<DataType> inputDataType) {
return Arrays.asList(DataType.BOOL, DataType.FLOAT);
} | [
"@Override\n public double getvar( double tf, double df, double idf, double DL, double avgDL, int DocNum, double CL, int CTF, double a )\n {\n return 0;\n }",
"double getVarDouble();",
"public double getConvertedValue(){\r\n return outputValue;\r\n }",
"public double getlandValueSD(){\n\t\tret... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the number of tokens currently in the module. | public int tokenCount() {return tokenCount;} | [
"public int getNumberOfTokens() {\n return tokens.size();\r\n }",
"public int getTotalNumTokens()\r\n {\r\n return totalNumberOfTokens;\r\n }",
"public int getTokensCount() {\n if (tokensBuilder_ == null) {\n return tokens_.size();\n } else {\n return t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Display the Shots madde By Home Team | public void displayShotHome(int shot) {
TextView shotView = (TextView) findViewById(R.id.home_shots);
shotView.setText(String.valueOf(shot));
} | [
"public void showTeams(){\n\t\thomeTeam.showPlayers();\n\t\tawayTeam.showPlayers();\t\n\t}",
"private void listGames() {\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tXkeyResult result = XkeyGamesUtils.listGames();\r\n\t\t\tsendMessage(UPDATE_FINISHED);\r\n\t\t\tif (result.isShowError()){\r\n\t\t\t\tSHOW_ERROR = true;\r\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Registers the given runnable to be executed during the kill operation of this instance. | public void registerClosingOperation(Runnable closingOp); | [
"public void postRunnable(Runnable runnable) {\n if (mercuryAPIThreadHandler != null) {\n mercuryAPIThreadHandler.post(runnable);\n }\n }",
"public static void PostRunnable(Runnable runnable) {\r\n\t\tGameTickGenerator.getInstance().postRunnable(runnable);\r\n\t}",
"public void post... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | public static void main(String[] args) {
int a=2;
int b=3;
int c=a+b;
System.out.println("sum:"+c);
} | [
"@Override\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void extornar() {\n \n }",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void wydaj() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__SendData__Group__3" $ANTLR start "rule__SendData__Group__3__Impl" InternalStubbrLang.g:16698:1: rule__SendData__Group__3__Impl : ( ( rule__SendData__Group_3__0 ) ) ; | public final void rule__SendData__Group__3__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalStubbrLang.g:16702:1: ( ( ( rule__SendData__Group_3__0 ) ) )
// InternalStubbrLang.g:16703:1: ( ( rule__SendData__Group_3__0 ) )
... | [
"public final void rule__ProtocolAndDataFormat__Group__3__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOperationDsl.g:6682:1: ( ( ( rule__ProtocolAndDataFormat__Group_3__0 )? ) )\n // InternalOperationDsl.g:6683:1:... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Includes or excludes the parameter into fitting | public void fitParameter(String key, boolean incl) {
if (key.equals(SIGMA)) {
sigma_incl = incl;
} else if (key.equals(AMP)) {
amp_incl = incl;
} else if (key.equals(CENTER)) {
center_incl = incl;
} else if (key.equals(PEDESTAL)) {
pedestal_incl = incl;
}
} | [
"private boolean filterParameterAnnotations(DexAnnotation annotation) {\n if (annotationsToRetain.contains(annotation)) {\n return true;\n }\n switch (annotation.visibility) {\n case DexAnnotation.VISIBILITY_SYSTEM:\n return false;\n case DexAnnotation.VISIBILITY_RUNTIME:\n if ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This is the main of the program, in here we build the frame to hold all the zoo. | public static void main(String []args)
{
JFrame frame = new JFrame("Zoo");
frame.setSize(799,599);
ZooPanel pan = ZooPanel.getInstance();
JMenu File, Background, Help;
JMenuBar menuBar;
JMenuItem Exit1, Image, Green, None, Help1;
File = new JMenu("File");
Background = new JMenu("Background");
... | [
"public MainFrame() {\n initComponents();\n CurrentTimeDate();\n }",
"public static void main(String[] args)\n {\n\n\n Frame f = new Frame();\n f.addWindowListener(new java.awt.event.WindowAdapter()\n {\n public void windowClosing(java.awt.event.WindowEvent e)\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Runs the simulation. NOTE: This may take some time | public void run() {
while(numVehicles>0) {
}
} | [
"public void run() throws EndSimulationException ;",
"public void runSimulation() {\n\n\t\twhile (today <= MAX_SIMULATION_LENGTH && frobCount != 0) {\n\t\t\trunDay();\n\t\t}\n\n\t\tif (frobCount == 0) {\n\t\t\tSystem.out.println(\" \" + today);\n\t\t\treturn;\n\t\t} else if (today >= MAX_SIMULATION_LENGTH && fr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
calculates the size of the bitmap that we need to use for the logo. | public static int calculateInSampleSize(BitmapFactory.Options options, int reqWidth, int reqHeight)
{
// Raw height and width of image
final int height = options.outHeight;
final int width = options.outWidth;
int inSampleSize = 1;
if (height > reqHeight || width > reqWidth) ... | [
"private int getImageSize()\n\t{\n\t\tint sum = 0;\n\t\t\n\t\t//go through all the pixels\n\t\tfor(int i = 0;i < pixels.size();i++)\n\t\t{\n\t\t\t//add the sum of each of the pixels\n\t\t\tsum += pixels.get(i).length();\n\t\t}\n\t\t\n\t\t//divide by eight to get it into bytes\n\t\treturn sum / 8;\n\t}",
"public I... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated .CInventory_ModifyItems_Request.ItemPropertyUpdate updates = 3; | public Builder addUpdates(SteamMsgInventory.CInventory_ModifyItems_Request.ItemPropertyUpdate value) {
if (updatesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureUpdatesIsMutable();
updates_.add(value);
onChanged();... | [
"@Override\r\n\tpublic void update(Items items) {\n\t\t\r\n\t}",
"@Test\r\n public void testUpdateItem() throws Exception {\r\n VendingMachineDto item = new VendingMachineDto();\r\n item.setNumOfItems(5);\r\n service.updateItem(item);\r\n assertEquals(4, item.getNumOfItems());\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the total average time for a person from start to finish | public double getTotalAvgPersonTime(){
double sum = 0;
for(int i = 0; i < allAvgTimes.size(); ++i) {
sum = sum + allAvgTimes.get(i);
}
totalAvgPersonTime = (sum / numOfPeople) / 1000;
return totalAvgPersonTime;
} | [
"public double averageTime() {\n return totalTime / totalCars;\n }",
"public double averageProcessTime() {\n\t\tif (numCompleted == 0)\n\t\t\treturn 0;\n\t\treturn (double) totalProcessTime / numCompleted;\n\t}",
"private int avgTreatmentTime() {\n\n\t\t\tif(numbOfVisitedObjects == 0) return 0; //in c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setters and getters Gets the height of a shape. | public double getHeight()
{
return height;
} | [
"public float getHeight()\n {\n return this.getShape().getHeight();\n }",
"@objid (\"a58535c1-2e12-4600-b9a1-fd576dad1201\")\n public double getHeight() {\n return this.height;\n }",
"@JsProperty double getHeight();",
"public double getHeight() throws ShapeIncompleteException{\r\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Opens connection to JMS,so that messages can be send and received. | public void start() {
gtw.start();
} | [
"public void openConnection() {\r\n// \tproducer = new Producer();\r\n// producer.create(\"jms-client-producer\", \"AMHS\");\r\n LOGGER.info(\"Open Connections to ActiveMQ -- AIXM/FIXM/WXXM\");\r\n LOGGER.debug(\"Debug: Open Connections to ActiveMQ -- AIXM/FIXM/WXXM\");\r\n try {\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Implementing interface methods | public void activeCity ()
{
setStrenght (this.strenght - 5);
setSpeed (this.speed - 5);
setConstitution (this.constitution - 5);
setDexterity (this.dexterity - 5);
} | [
"interface Interface{}",
"@Override\n }",
"@Override\r\n public void publicando() {\n }",
"public interface InterfaceCenterOperations \n{\n String createTRecord (String mi, String fn, String ln, String ad, String ph, String sp, String lo);\n String createSRecord (String mi, String fn, Strin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Remove all corpses in a certain world | public static void removeAllCorpses(World world){
Util.removeAllCorpses(world);
} | [
"public static void clearWorld() {\n\t\tfor (Iterator<Critter> it = population.iterator(); it.hasNext(); ) {\n\t\t it.next();\n\t\t it.remove();\n\t\t}\n\t}",
"public static void clearWorld() {\r\n // Remove critters from collection\r\n collection.clear();\r\n // Clear the board\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the Spring bean ID for this bean. | @Override
public java.lang.String getBeanIdentifier() {
return _tempAttachmentDeclarationHealthLocalService.getBeanIdentifier();
} | [
"public java.lang.String getBeanIdentifier() {\n\t\treturn _llStatLocalService.getBeanIdentifier();\n\t}",
"public java.lang.String getBeanIdentifier() {\n return _fooService.getBeanIdentifier();\n }",
"@Override\n\tpublic java.lang.String getBeanIdentifier() {\n\t\treturn _baoCaoDLITongHopLocalServic... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__XMemberFeatureCall__MemberCallArgumentsAssignment_1_1_3_1_0" $ANTLR start "rule__XMemberFeatureCall__MemberCallArgumentsAssignment_1_1_3_1_1_0" InternalCreate.g:22404:1: rule__XMemberFeatureCall__MemberCallArgumentsAssignment_1_1_3_1_1_0 : ( ruleXExpression ) ; | public final void rule__XMemberFeatureCall__MemberCallArgumentsAssignment_1_1_3_1_1_0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalCreate.g:22408:1: ( ( ruleXExpression ) )
// InternalCreate.g:22409:2: ( ruleXExpression )
... | [
"public final void rule__XMemberFeatureCall__MemberCallArgumentsAssignment_1_1_3_1_1_0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOcelet.g:22061:1: ( ( ruleXExpression ) )\n // InternalOcelet.g:22062:2: ( ruleXExpress... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
todo Do something to update progress... | @Override
public void onProgress(long complete, long target) {
} | [
"public void progressMade();",
"void progressUpdate(float progress);",
"protected void progress(){\n }",
"@Override\r\n \tpublic void updateProgress(String id,int current, int total) {\n \t\t\r\n \t}",
"private void _updateProgress() {\n\t\tint lastPercent = m_percentComplete;\n\t\tm_processedDataSets++;... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Make the menu invisible and make the about text visible. | @Override
public void onClick(View view) {
menuLayout.setVisibility(View.INVISIBLE);
aboutLayout.setVisibility(View.VISIBLE);
} | [
"@Override\r\n public void notTitleScreen(){\r\n gui.titlePanel.setVisible(false);\r\n gui.startButtonPanel.setVisible(false);\r\n \r\n gui.mainTextPanel.setVisible(true);\r\n gui.selectionButtonPanel.setVisible(true);\r\n gui.resetButtonPanel.setVisible(true);\r\n }"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Provides a list of all registered descriptors of this type. | public static ExtensionList<IndicationDescriptor> getAll() {
return Hudson.getInstance().getExtensionList(IndicationDescriptor.class);
} | [
"public Set<D> getDescriptors() {\n return descriptors;\n }",
"public List<String> getDescriptorIDs() {\n //Collect all descriptors\n List<String> ret=new ArrayList<String>();\n for (Descriptor desc: getFullDescriptors()){\n ret.add(desc.getId());\n }\n\n re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
return string of GeometricObject | public String toString() {
return "color: " + color + " filled: " + filled;
} | [
"public String toString(){\n\n return \"Triangle Object's Name: \" + this.getShapeName() + \"\\n\"\n + \"Vertices: \" + this.getP1() + \";\" + \" \" \n + this.getP2() + \";\" + \" \" + this.getP3() + \"\\n\";\n }",
"public String toString() {\r\n\t\treturn StringUtil.formatObjectToString... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculates the exact Position according to Speed and FPS | private float[] calcNextPos(int PPS, long FPS) {
float newPos[] = new float[2];
/*
* Calculate new x-position new x-pos = x + cos(dir * pi / 180) * PPS / FPS ==> maximum: x + 5 dir * pi / 180 converts the angle from degree
* to radial norm multiplication with (PPS / FPS) sets the direction in relation with ... | [
"private void setPosition() {\n if (Integer.signum((int)hspeed) == -1) {\n hspeed = -speed;\n if (x < -8) {\n hspeed = Math.abs(hspeed);\n }\n } else {\n hspeed = speed;\n if ((x + 64) > frameWidth) {\n hspeed = -Math... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method provides centralized object mapper configuration. DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES Enables failure in case the payloads have unknown properties JsonParser.Feature.STRICT_DUPLICATE_DETECTION Enables failure if duplicate properties | @Bean(name = "objectMapper")
public ObjectMapper objectMapper() {
ObjectMapper objectMapper = new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,
true);
DateFormat df = new SimpleDateFormat(Constants.UTC_DATE_FORMAT);
df.setTimeZone(TimeZone.getTimeZo... | [
"@Test\n\tpublic void givenJsonHasUnknownValuesButJsonIgnoreUnknowns_whenDeserializing_thenCorrect() {\n\t\tStringBuilder jsonBuilder = new StringBuilder();\n\t\tjsonBuilder.append(\"{\");\n\t\tjsonBuilder.append(\"\\\"stringValue\\\" : \\\"a\\\", \");\n\t\tjsonBuilder.append(\"\\\"intValue\\\" : 1, \");\n\t\tjsonB... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get user home directory | String getHomeDirectory(); | [
"private String getUserHomeDirectory()\n {\n \n return FileConstants.HOME_DIR_NAME;\n }",
"public File getUserHome();",
"public static String getUserHome() {\n\n return System.getProperty( \"user.home\" );\n }",
"protected static String getHomeFolder() {\n String unixFolder = Syst... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new instance of Simulator and runs the simulation. | public static void main(String[] args) {
// Create a new Simulator object and run it.
System.out.println("DustSucker 2000 Simulator by Anton Forsberg\n");
System.out.println("This software simulates the movement of a vacuum cleaner. It will perform the movements you entered in the room you specified and print out... | [
"public static void start() {\n Simulator.getDefaultSimulator().start();\n }",
"public Simulator() {\r\n\t\tinit();\r\n\t}",
"public static Simulator Instance() {\n\t\tif (instance == null) instance = new Simulator();\n\t\treturn instance;\n\t}",
"public int simulate() {\n CallbackRegistry.call... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Opens a new window. | public void openMainWindow() throws IOException {
FXMLLoader loader = new FXMLLoader(getClass().getResource("MainWindow.fxml"));
Stage mainWindow = loader.load();
mainWindow.show();
Main.incrementMainWindowCount();
} | [
"public void show() {\n window.open();\n }",
"private void openWindow() {\r\n window = createWindow();\r\n graphics = createGraphics();\r\n \r\n window.init(() -> onWindowRefreshRequired());\r\n window.setVsync(true);\r\n window.show();\r\n window.setTi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Update the personal best if the current evaluation is better. | void updatePersonalBest () {
double eval = eval();
if (eval < bestEval) {
bestPosition = position.clone();
bestEval = eval;
}
} | [
"public void evaluate() {\n\t\tfEvaluator.evaluate(fPopulation);\n\t\tfPopulation.sort(fComparator);\n\t\tfBestEvaluationValue = fPopulation.getIndividual(0).getEvaluationValue();\n\t}",
"public void updateEvaluation() {\r\n\t\tsetEvaluated(true);\r\n\t\tif (hourApplication.size() < 24) {\r\n\t\t\tsetEvaluated(fa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
If there is another value, get the value at the index and then increment the index variable by 1. | @Override
// Method that returns the next value in the ring.
public E next() throws NoSuchElementException
{
if (hasNext())
{
return get(index++);
}
// Otherwise, throw a NoSuchElementException.
... | [
"public int get(int index) {\n return values.get(index+1);\n }",
"private int plusOne(int index) {\n\t\t if ((index == size - 1) && (items[0] == null)) {\n\t\t\t return 0;\n\t\t }\n\n\t\t return index + 1;\n\t }",
"private int plusOne(int index) {\n return (index - 1 + items.length) % items.len... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated .Diadoc.Api.Proto.Events.MetadataItem Metadata = 5; | public Builder setMetadata(
int index, Diadoc.Api.Proto.Events.DiadocMessage_PostApiProtos.MetadataItem.Builder builderForValue) {
if (metadataBuilder_ == null) {
ensureMetadataIsMutable();
metadata_.set(index, builderForValue.build());
onChanged();
} else {
... | [
"com.google.analytics.data.v1beta.ResponseMetaDataOrBuilder getMetadataOrBuilder();",
"io.envoyproxy.envoy.type.tracing.v3.CustomTag.MetadataOrBuilder getMetadataOrBuilder();",
"@java.lang.Override\n public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() {\n return metadata_ == null ? com.google.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GENLAST:event_mnuSnapshotActionPerformed An about dialog of what the project is and the developers | private void mnuAboutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnuAboutActionPerformed
displayMessage("About",
"Assignment 3 for Distributed and Mobile Systems\nAUT University\n\n" +
"Developers:\nMark Burton\nKerry Powell\n\n");
} | [
"public void jMenuHelpAbout_actionPerformed(ActionEvent e) {\r\n ArrayList contributors = new ArrayList();\r\n ArrayList libraries = new ArrayList();\r\n Contributor c;\r\n Library l;\r\n c = new Contributor(\"Cesar Serrano\", \"cesareo@hotmail.com\");\r\n contributors.add(c);\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
As the name suggests, clear wipes the internals and reorders everything in the canonical order. | @Override
public void clear() {
writeline("/home/ubuntu/results/coverage/MillerUpdatingRegression/MillerUpdatingRegression_5_10.coverage", "af375a2e-8bbf-4196-8242-d53e41904402");
Arrays.fill(this.d, 0.0);
writeline("/home/ubuntu/results/coverage/MillerUpdatingRegression/MillerUpdatingRegres... | [
"private void clear()\n {\n\toriginalList.empty();\n\treversedList.empty();\n }",
"public void clear(){\n\t\tclear(false);\n\t}",
"@Override\n\tpublic void clear() {\n\t\timpl.clear();\n\t}",
"@Override\r\n \t\tpublic void clear() {\n \t\t}",
"public void reset() {\n\t\tclear();\n\t\t\n\t}",
"void c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Secondary link to third party databases to leverage rich product attributes. | @ApiModelProperty(example = "null", value = "Secondary link to third party databases to leverage rich product attributes.")
public String getUpcA() {
return upcA;
} | [
"public String getDatabaseProductName();",
"Product getProductById(Long productId, boolean withAttribute);",
"String getDatastoreProductName();",
"public String getProduct();",
"public Product getDetailProduct(String ID_Product);",
"boolean hasProductCustomAttribute();",
"public String getProductOwner()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a local participant. | public LocalOpponent(ChessColor color, LocalParticipantController localParticipantController) {
super("Guest", color, GuestAvatarStyle.getInstance(), localParticipantController);
} | [
"CParticipantRef createCParticipantRef();",
"private Participant createParticipant(ParticipantDTO participantDTO)\n\t{\n\t\tParticipant participant = new Participant();\n\n\t\tif (participantDTO.participantIdExists())\n\t\t{\n\t\t\tparticipant.setParticipantId(participantDTO.getParticipantId());\n\t\t}\n\t\tparti... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Responsible for copying labels between ConfluenceEntityObjects. | public interface LabelCopier {
/**
* Copies labels from one space to another. Copying personal labels is optional.
*
* @param originalSpace from which to copy labels.
* @param newSpace to which the labels should be copied.
* @param copyPersonalLabels true if personal labels,... | [
"public void applyClassLabelToSource (\r\n\t\t\tString className,\r\n\t\t\tString classLabel\r\n\t\t\t) {\r\n\t\t// fetch the current source image and class images\r\n\t\tif (this.sourceImage==null || this.trainingSamples.size()==0) return;\r\n\t\t// get the image stack and slice labels(clone) of the class specifie... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Registers the supplied listener for relationship change events. Listener will be notified of any requests that add, remove or modify relationships. | public void addRelationshipChangeListener(
IPSRelationshipChangeListener listener)
{
if (listener == null)
throw new IllegalArgumentException("listener may not be null");
m_relationshipChangeListeners.add(listener);
} | [
"public void addListener( Schema schema, SchemaListener listener )\n {\n if ( !schemaListeners.containsValue( schema, listener ) )\n {\n schemaListeners.put( schema, listener );\n }\n }",
"public void notify(LemEventListener listener) {\n\tlistener.relationshipDeletion(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the current hand to the hand given in the parameter | public void setHand(Hand hand) {
this.hand = hand;
} | [
"public void setHand(AIHand hand) \r\n {\r\n this.hand = hand;\r\n }",
"public void setHand(LinkedList<Domino> hand) {\r\n this.hand = hand;\r\n }",
"public void setHandback(Object handback)\r\n/* 41: */ {\r\n/* 42: 91 */ this.handback = handback;\r\n/* 43: */ }",
"public v... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Delete a activity by id | @ApiOperation(value = "Delete a activity field")
@ApiImplicitParam(name = TOKEN, value = TOKEN_DESC, paramType = HEADER_FIELD, required = true, dataType = STRING_FIELD)
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Success response", response = ResponseDTO.class),
@ApiRespo... | [
"public void delete(Serializable id) {\n\t\tactivityDao.delete(id);\r\n\t\t\r\n\t}",
"@Override\n\tpublic void delete(long activityId) {\n\t\tactivityRepository.deleteById(activityId);\n\t}",
"public boolean deleteActivityObjectives(int activityId);",
"public int deleteActivityById(int id) throws DataAccessEx... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional string voip_token = 6; WebRTC token | public java.lang.String getVoipToken() {
java.lang.Object ref = voipToken_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
... | [
"java.lang.String getDeviceTokenVoip();",
"public Builder setDeviceTokenVoip(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n deviceTokenVoip_ = value;\n onChanged();\n return this;\n }",
"pub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method returning the number of rejected cars | public int getNumRejectedCars() {
return numRejectedCars;
} | [
"private int getNumOfCars(CrimeEvent e) {\n\t\tint Severity = e.getSeverity();\r\n\t\tif (Severity ==3) return 1;\r\n\t\tif (Severity ==4) return 2;\r\n\t\tif (Severity ==5) return 3;\r\n\t\telse return 0;\r\n\t}",
"public int quantityOfCrossedCars(){\n int counter = 0;\n for (Transport transport: v... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called when the activity is first created. | @Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (savedInstanceState !=null) {
Log.d("TRQ", "Creo MyActivity: " + savedInstanceState.toString());
} else {
Log.d("TRQ", "Creo MyActivity: ");
}
ActionBa... | [
"protected void onCreate() {}",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t\tinitData();\n\t\n\t}",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tULog.i(this, \"onCreate() \");\n\t\tinitData();\n\t}",
"@Override\n public void onCreate () {\n super.onC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if field path is set (has been assigned a value) and false otherwise | public boolean isSetPath() {
return this.path != null;
} | [
"public boolean isSetPath()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(PATH$6) != null;\n }\n }",
"public boolean isSetPath()\n {\n synchronized (monitor())\n {\n check_orphaned();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GeoTools Quickstart demo application. Prompts the user for a shapefile and displays its contents on the screen in a map frame | public static void main(String[] args) throws Exception {
OptionParser parser = new OptionParser();
parser.accepts("verbose");
parser.accepts("from").withRequiredArg().ofType(String.class);
parser.accepts("to").withRequiredArg().ofType(String.class).required();
parser.accepts("fi... | [
"void openMapsFacet();",
"public static void main(String[] args) throws Exception {\n // display a data store file chooser dialog for shapefiles\n \n \n File origfile = JFileDataStoreChooser.showOpenFile(\"shp\", null);\n if (origfile == null) {\n return;\n }\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
getting all VocabBooks info | public HashMap<Long, String[]> getAllVocabBooksInfo() {
HashMap<Long, String[]> vocabBookInfoList = new HashMap<Long, String[]>();
String selectQuery = "SELECT * FROM " + TABLE_VOCAB_BOOKS;
Log.e(LOG, selectQuery);
SQLiteDatabase db = this.getReadableDatabase();
Cursor c = db.rawQuery(selectQuery, null);
... | [
"private static void getBbooks() {\n\t\toutput(\"\");\r\n\t\tfor (book book : lib.getBooks()) {\r\n\t\t\toutput(book + \"\\n\");\r\n\t\t}\t\t\r\n\t}",
"public List<Book> getAllBooks() {\n List<Book> books = new ArrayList<>();\n HashMap<String, Book> b = dataAccess.readBooksMap();\n // handlin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The ID of the detector that configures the delegated administrator. | public String getDetectorId() {
return this.detectorId;
} | [
"@Override\n public long getAdditionalId() {\n return _configurationAttribute.getAdditionalId();\n }",
"@Override\n\tpublic String getId() {\n\t\treturn config.name();\n\t}",
"@ApiModelProperty(required = true, value = \"Authentication service's administrator unique identifier.\")\n @NotNull\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
From base interface: public void report(String message, String errorType, Object relatedInformation, Location location) Reporting method called with reference to object that defines exact problem being encountered. Implementor is free to quietly handle the problem, or to throw an exception to cause abnormal termination... | public void report(XMLValidationProblem problem) throws XMLStreamException; | [
"@Override\r\n public void reportException(Throwable exception) {\n }",
"public void report() {\n // TODO: optional code goes here\n }",
"protected void notifyNotWellFormed() throws XPathException {\n XPathException err = new XPathException(\"The result tree cannot be supplied to the Cont... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Changes the x of an object. | public boolean setX (int id, double x) {
Thing t = animatorCanvas.getThing(id);
if (t == null) {
return false;
}
t.setX(x);
animatorCanvas.dynamics.resetDynamicsVariables();
if (t == animatorCanvas.dragThing) {
animatorCanvas.this_mouseReleased(nu... | [
"private void setX(int x) {\r\n\t\tthis.x = x;\r\n\t}",
"public void setX(int x) {\r\n \tthis.x = x;\r\n }",
"@Override\n\tpublic void setX(int x)\n\t{\n\t\t_x = x;\n\t}",
"public void setX(int x) {\n \t\tthis.x = x;\n \t}",
"public void setX(Number x) {\n this.x = x;\n }",
"public void se... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
make scientific calculator panel. The method makes scientific calculator panel for scientific tab. | private void makeScientificPanel() {
scientific = new JPanel();
scientific.setLayout(new BorderLayout());
//textarea
JTextArea display = new JTextArea(2, 5);
display.setEditable(true);
display.setFont(new Font("Arial", Font.BOLD, 36));
Border border = BorderFacto... | [
"private void scientificPanel() {\n sciPanel = new HashMap<>();\n SciHandler sciHandler = new SciHandler();\n scientificCalc = new JPanel();\n scientificCalc.setLayout(new BorderLayout());\n\n JTextArea display = new JTextArea(2, 5);\n display.setEditable(false);\n d... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
I think we have to do this stupidly, so _even though_ we could discount some of the recursion based on excessive weight, we have to do it anyway for the brute force method :/ | public int solveRec(int index, int valueSoFar, int weightSoFar){
//if index is beyond the range of things, work out in the decision tree
//branch was a valid path wrt the weight restriction, returning the value so far
//if valid, or 0 otherwise
clicker++;
if(index == things.size()){
clicker++;
return (w... | [
"double get_V(ArrayList<Integer> branch, Scientist sci) { // k = how many chunks of effort\n\t\tdouble avail_eff = sci.avail_effort;\n\t\tfor (int idea_idx : branch) {\n\t\t\tif (sci.ideas_k_paid_tot.get(idea_idx) == 0) { // idea hasn't been learned, so we deduct from avail_eff\n\t\t\t\tavail_eff -= sci.perceived_r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
must find FAREST point of d1 | public int compareFarestAndFarest(Polygon p1, Polygon p2) {
double dist1 = 0;
double tmp1;
for(int i1=0; i1<p1.size(); i1++){
Coord3d point = p1.get(i1).xyz;
if(transform!=null)
point = transform.compute( point );
tmp1 = point.distance(camera.getEye());
if(tmp1 > dist1)
dist1 = tm... | [
"public Point2D nearest(Point2D p){\n if (p == null)return null;\n Point2D a = st.max();\n double n = a.distanceSquaredTo(p);\n if( n == 0){\n a = st.min();\n n = a.distanceSquaredTo(p);\n }\n for (Point2D s : points()){\n if( n > s.distanc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Build a dictionary through a list of words | public void buildDict(String[] dict) {
for(String st : dict){
if(map.containsKey(st.length())){
map.get(st.length()).add(st);
}else{
map.put(st.length(), new ArrayList<>());
map.get(st.length()).add(st);
}
}
} | [
"private Map<String, List<String>> buildDictionary(String[] words, Map<String, List<String>> dict) {\n for (int i = 0; i < (words.length - prefixLength); ++i) {\n StringBuilder key = new StringBuilder(words[i]);\n for (int j = i + 1; j < i + prefixLength; ++j) {\n key.app... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test case number: 26 /Coverage entropy=0.9502705392332347 | @Test(timeout = 4000)
public void test026() throws Throwable {
FileUtil fileUtil0 = new FileUtil();
ArrayList<Object> arrayList0 = new ArrayList<Object>();
arrayList0.add((Object) "3JWW0B%9fs7jlmuj!");
File file0 = fileUtil0.getAccessories("3JWW0B%9fs7jlmuj!", arrayList0);
assertNull... | [
"@Test(timeout = 4000)\n public void test147() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n String string0 = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
System.out.printf(" cnt = %d partition = %d, offset = %d, key = %s, value = %s\n", cnt, record.partition(), record.offset(), record.key(), record.value()); | @Override
public void checkRecord(ConsumerRecord<String, String> record, Key key, int cnt) {
assertEquals(dataSet[cnt], record.value());
assertEquals("gate1", key.getExtTs().getGateId());
assertEquals("127.0.0.1", key.getPartitionKey());
assertEquals(null, key.getVerb());
assertEquals(null, key.... | [
"int insert(TbPartitionKeys record);",
"private static void prettyPrintLine(String key, String val, String unit){\n\n for(int i = 0; i < SPACES - key.length(); i++){\n System.out.print(\" \");\n }\n\n System.out.println(key + \": \" + val + \" \" + unit);\n\n }",
"int insert(K... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
CardLayout cl = new CardLayout(); JPanel panel=new JPanel(); Instanciation d'un objet JPanel | public fenetre() {
this.setTitle("Jeu Othello"); // nom du fenetre
this.setSize(700, 700); // size du fenetre
this.setLocationRelativeTo(null); // position du fenetre
this.setDefaultCloseOperation(JFrame.EXIT_ON_CL... | [
"public GraphicalInterface(CardLayoutJeu cl){\n\t\tfenetre = new JFrame();\n\t\tfenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\t//Création du JPanel englobant\n\t\tthis.panel = cl;\n\t\t\n\t\t//Ajout du JPanel à la fenêtre\n\t\tfenetre.setContentPane(this.panel);\n\t\t\n\t\tfenetre.pack();\n\t\tf... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds comma to the string, If the string length is more than 3 then loop from last index to first. and add comma at every third interval else return the exact string | private String addCommasToNumericString(String numStr) {
String newStr = "";
int strLen = numStr.length();
int counter = 0;
if(strLen > 3) {
for (int i = strLen-1; i >= 0; i--) {
String tempChar = numStr.charAt(i)+"";
counter++;
if(counter % 3 == 0 && i != 0) {
tempC... | [
"private int getIndexOfThirdComma(String passedDownString) {\n int retValue = 0;\n int commaCounter = 0;\n \n for (int i = 0; i < passedDownString.length(); i++) {\n if (passedDownString.charAt(i) == ',')\n commaCounter++;\n \n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new form UploadAttachment | public UploadAttachmentDialog(JDialog parent, boolean modal, JackRabbitHandler jrh) {
super(parent, modal);
this.jrh = jrh;
initComponents();
this.setLocationRelativeTo(null);
} | [
"public Integer create(Attachment newInstance) throws ServiceException;",
"public void addAttachment(Attachment attachment);",
"@Override\n public FileAttachment create(long f_id) {\n FileAttachment fileAttachment = new FileAttachmentImpl();\n\n fileAttachment.setNew(true);\n fileAttachm... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This constructor takes the request message and splits it by spaces. It further splits the uri by "/". | public Parser(String request) throws ImproperRequestForm
{
fullRequest = request.split("\\s");
if(fullRequest.length < 3)
{
throw new ImproperRequestForm("missing header field(s).");
}
uri = fullRequest[1].split("/");
} | [
"protected HttpRequest parseRequest(String request) {\r\n\t\tString[] splited = request.split(\"[ \\n]\"); // Enleve les espaces et les retours a la ligne\r\n\t\tHttpRequest http = new HttpRequest();\r\n\t\thttp.requestType = splited[0];\r\n\t\thttp.ressourceRequested = splited[1];\r\n\t\thttp.protocolVersion = spl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__EDouble__Group_4__2__Impl" $ANTLR start "rule__EnumerationElement__Group__0" InternalTaskDefinition.g:2230:1: rule__EnumerationElement__Group__0 : rule__EnumerationElement__Group__0__Impl rule__EnumerationElement__Group__1 ; | public final void rule__EnumerationElement__Group__0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalTaskDefinition.g:2234:1: ( rule__EnumerationElement__Group__0__Impl rule__EnumerationElement__Group__1 )
// InternalTaskDefinition.g... | [
"public final void rule__Enumeration__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalTechnologyDsl.g:9322:1: ( rule__Enumeration__Group__0__Impl rule__Enumeration__Group__1 )\n // InternalTechnologyDsl.g:9323:2: ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
takes in current frame and updates pixel values accordingly | public void updatePixelStates(int frame) {
int pixelValues[][] = new int[displayHeight][displayWidth];
int rowPos = 0;
int colPos = 0;
colPos = frame/displayWidth;
rowPos = frame;
if(rowPos >= displayWidth)
rowPos = frame % displayWidth;
for(int i = 0; i < displayHeight; i++) {
... | [
"private void updateFrame() {\n Range rx = new Range(40, this.getWidth() - 40);\n Range ry = new Range(this.getHeight() - 40, 40);\n Range2D frame = new Range2D(rx, ry);\n directed_weighted_graph g = _ar.get_graph();\n _w2f = Arena.w2f(g, frame);\n }",
"public abstract void p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Validate the lineage of all nodes under this root | private void validateLineage(JexlNode root) {
// do not fail hard
if (validateLineage && !JexlASTHelper.validateLineage(root, false)) {
isValid = false;
reasons.add("Lineage");
}
} | [
"public void validate() {\n if(root != null) root.validate();\n }",
"@Override\n public void validate() {\n if (!isValid()) {\n super.validate();\n for (int i = 0, n = children.size(); i < n; i++) {\n idx3d_Node child = children.get(i);\n chi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handles the conversion of letters to numbers & numbers to letters by looking up the input char in the test strings and adding the corresponding char to the return string | public static StringBuilder convert(String input) {
String test = "A0 B1 C2 D3 E4 F5 G6 H7 I8 J9 a0 b1 c2 d3 e4 f5 g6 h7 i8 j9";
String test2 = "0A 1B 2C 3D 4E 5F 6G 7H 8I 9J";
StringBuilder sb = new StringBuilder("");
while (1 == 1) {
int testlength = test.length();
int test2length = test2.length... | [
"@Test\n public void testLettersToNumbers() {\n testLettersToNumbersCall(\"ABNA\", \"10112310\");\n testLettersToNumbersCall(\"AB\", \"1011\");\n testLettersToNumbersCall(\"ZZ\", \"3535\");\n testLettersToNumbersCall(\"pp\", \"2525\");\n testLettersToNumbersCall(\"As\", \"1028\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Linear mapping between two intervals | public static double linearMapping(double x, double a, double b, double c, double d) {
return (x - a) / (b - a) * (d - c) + c;
} | [
"public static int map(int value, int low1, int high1, int low2, int high2) {\n \t\tint result = (int)((double)(value-low1)/(double)(high1-low1)*(double)(high2-low2))+low2;\n \t\treturn constrain(result, low2, high2);\n \t}",
"private double map(double x, double in_min, double in_max, double out_min, double out_m... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | public void addContext(ContextBodyNode i) {
} | [
"@Override\n }",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void extornar() {\n \n }",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void wydaj() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |