query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Gets all orderlines currently in the order. | @Override
public List<PurchaseOrderLine> getOrderlines() {
return orderLines;
} | [
"public static ArrayList<OrderLine> getOrderLines() {\n return Database.dbExport.exportOrderLines();\n }",
"public Set<CustomerOrderLine> getOrderLines() {\n return Collections.unmodifiableSet(orderLines);\n }",
"public List<OrderLinePojo> getAllOrderLines(OrderPojo order) {\n Criteri... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the 'field204' field | public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField204(java.lang.CharSequence value) {
validate(fields()[204], value);
this.field204 = value;
fieldSetFlags()[204] = true;
return this;
} | [
"public void setField204(java.lang.CharSequence value) {\n this.field204 = value;\n }",
"public com.dj.model.avro.LargeObjectAvro.Builder setVar204(java.lang.Integer value) {\n validate(fields()[205], value);\n this.var204 = value;\n fieldSetFlags()[205] = true;\n return this;\n }",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor for the class. Accepts an infix expression as a string | public InfixExpression(String s) throws IllegalArgumentException{
infix = s;
clean();
try {
if(isValid() == false) throw new IllegalArgumentException();
}
catch(Exception EmptyStackException) {
System.out.println("Invalid Infix Expression");
}
} | [
"public InfixExpression(String st, HashMap<Character, Integer> varTbl) {\r\n super(null, varTbl);\r\n this.infixExpression = st;\r\n operatorStack = new ArrayBasedStack<Operator>();\r\n\r\n }",
"public Expression(String pExpStr) {\n Queue<Token> tokenQueue = new Queue<>();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
xor method / Given a 32character hex string, return the corresponding 128bit string represented as an int array in which each element is either 0 or 1. | static int[] hexStringToBits(String hex) {
int[] bits = new int[128];
for (int i = 0; i < hex.length(); i++) {
int n = (int)hex.charAt(i);
for (int j = 0; j < 4; j++) {
bits[4 * i + j] = (n >> (3 - j)) & 1;
}
}
return bits;
} | [
"protected static int[] trans(String hex) {\n int[] ints = new int[nlen];\n \n for (int i=0; i<nlen; i++) {\n String s = hex.substring(i*8, (i+1)*8);\n ints[nlen-1-i] = new java.math.BigInteger(s, 16).intValue();\n }\n \n return ints;\n }",
"public void xor_nonce(byte[] text){\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the settings. The settings will be loaded if not initialized | public static Settings getSettings() {
if (settings == null) {
settings = loadSettings();
}
return settings;
} | [
"public static Settings getSettings() {\n if(settings == null) {\n settings = new Settings();\n }\n return settings;\n }",
"public ISettings getSettings() {\r\n\t\tif (this.settings == null) {\r\n\t\t\tthis.settings = this.getApplicationContext().getBean(\r\n\t\t\t\t\tISettings.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the submitter name of this email reminder. | @Override
public java.lang.String getSubmitterName() {
return _emailReminder.getSubmitterName();
} | [
"public String getSubmitterName(){\n\t\treturn submitterName;\n\t}",
"@AutoEscape\n\tpublic String getSubmitterName();",
"@Override\n\tpublic java.lang.String getSubmitterEmailId() {\n\t\treturn _emailReminder.getSubmitterEmailId();\n\t}",
"public String getSubmitter() {\n return submitter;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column sysuser.weixin | public void setWeixin(String weixin) {
this.weixin = weixin;
} | [
"public void setWStoreUser (String WStoreUser);",
"public void setMemweixincard(String memweixincard) {\r\n\t\tthis.memweixincard = memweixincard;\r\n\t}",
"public SecUser addWechatMiniappIdentity(RetailscmUserContext userContext, String secUserId, String openId, String appId, String unionId, DateTime lastLogi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Test with compilation units / Get compilation unit source on a file written in UTF8 charset using specific UTF8 encoding for file. Verify first that source is the same than file contents read using UTF8 encoding... Also verify that bytes array converted back to UTF8 is the same than the file bytes array. | public void test001() throws JavaModelException, CoreException, UnsupportedEncodingException {
// Set file encoding
String encoding = "UTF-8";
this.utf8File.setCharset(encoding, null);
// Get source and compare with file contents
this.utf8Source = getCompilationUnit(this.utf8File... | [
"public void test002() throws JavaModelException, CoreException, UnsupportedEncodingException {\n // Set project encoding\n String encoding = \"UTF-8\";\n this.encodingProject.setDefaultCharset(encoding, null);\n // Get source and compare with file contents\n this.utf8Source = get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Executes shell script from a given location | private static void executeShellScript(File file) {
L.info("Executing script " + file.getAbsolutePath());
Process p = null;
try {
String[] cmd = {"/bin/bash","-c"," ( cd "+ file.getParentFile().getAbsolutePath() + " && sh " + file.getAbsolutePath() + " ) "};
// System.out.print... | [
"private void runScript(String script) throws IOException, InterruptedException, RootToolsException, TimeoutException {\r\n\r\n// File tmpFolder = ctx.getDir(\"tmp\", Context.MODE_PRIVATE);\r\n//\r\n// File f = new File(tmpFolder, TEMP_SCRIPT);\r\n// f.setExecutable(true);\r\n// f.delete... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves a list of ScheduleTransaction objects by Ref Object Type. | public List<ScheduleTransactionInfo> getScheduleTransactionsByRefObject(@WebParam(name = "refObjectType") String refObjectType,
@WebParam(name = "refObjectId") String refObjectId,
... | [
"public List<String> getScheduleTransactionIdsByRefObject(@WebParam(name = \"refObjectType\") String refObjectType,\n @WebParam(name = \"refObjectId\") String refObjectId,\n @WebParam(name = \"con... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ number of applications: 2 for doubleflat, etc. / / Class methods / Method: int strtoMA(String at) Purpose: Convert string to accidental type number Parameters: Input: String at string to convert Output: Return: accidental type number | public static int strtoMA(String at)
{
int i;
for (i=0; i<AccidentalNames.length; i++)
if (at.equals(AccidentalNames[i]))
return i;
if (i==AccidentalNames.length)
i=AccidentalNames.length-1;
return i;
} | [
"public String AToMa(double a) {\n // ma = 1000*a\n double ma = a*1000;\n return check_after_decimal_point(ma);\n }",
"private double tranferStringToNum(String num){\r\n double number = 0;\r\n try{\r\n\tnumber = Double.parseDouble(num);\r\n }catch(Exception ex){\r\n\tnumber ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
given a string will return true if string is a header | static public boolean isHeader(String s)
{
return false;
} | [
"private boolean validateHeader(final String header) {\n return expectedHeader.equalsIgnoreCase(header.trim());\n }",
"public boolean isHeaderParsed();",
"static boolean validtriohdr(String h){\n for(int x =0;x<validtriohdrs.length;x++)\n if(h.equals(validtriohdrs[x]))\n retur... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Increase partitions for topics which have drifted from configuration. | public List<ConfiguredTopic> increasePartitions() {
List<ConfiguredTopic> toIncrease = topicsWithConfigDrift(Type.PARTITION_COUNT, configDriftSafetyFilters, true);
if (!toIncrease.isEmpty()) {
LOG.info("Increasing partitions for {} topics: {}", toIncrease.size(), toIncrease);
topicService.increasePa... | [
"default void onPartitionsChange(String topicName, int partitions) {\n\n }",
"@Override\n public Future<Void> increasePartitions(Reconciliation reconciliation, Topic topic) {\n try {\n String topicName = topic.getTopicName().toString();\n final NewPartitions newPartitions = NewP... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
records amount per page Get job list based on given user | public List<FfSubmitJob> getByUser(String userName, int pageNo) {
return sessionFactory.getCurrentSession().createQuery(
"from " + domainClass.getName() + " " +
"where userName = :userName " +
"order by to_date(startingTime,'DD-MON-YYYY HH24:MI:SS') desc")
.setString(... | [
"@GET(\"job/jobPaginationWithTime\")\n Call<List<Job>> getJobWithTime(@Query(\"sort\") String sort,\n @Query(\"pageNumber\") int pageNumber,\n @Query(\"pageSize\") int pageSize,\n @Query(\"accessTokenDb\") Strin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get db connection and query for details of address id to set properties in this class | private void setClassAddressInfo (int addressId) {
Connection dBase = MainApp.getDb().getConnection();
String queryString = "SELECT * FROM address WHERE addressId = " + addressId + ";";
int cityIdInt = -1;
int countryIdInt = -1;
try {
PreparedStatement psmt = dBase.... | [
"public Integer getAddressid() {\n return addressid;\n }",
"public void setAddressId(Integer addressId){\n this.addressId = addressId;\n }",
"Properties setURL(String url) throws SQLException {\n\t\tString host = null;\n\t\tString port = null;\n\t\tProperties props = null;\n\n\t\tt4addr_ = n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO regex String pattern = "(http(s?):/)(/[^/]+)+" + "/.(?:jpg|gif|png)"; return pictureUrl.matches(pattern); return true; | public static boolean validPictureUrl(String pictureUrl) {
return pictureUrl.matches("http(s?)://([\\w-]+\\.)+[\\w-]+(/[\\w- ./]*)+\\.(?:[gG][iI][fF]|[jJ][pP][gG]|[jJ][pP][eE][gG]|[pP][nN][gG]|[bB][mM][pP])");
} | [
"boolean hasPicurl();",
"public boolean isImageURL (final String imageURL){\r\n boolean isImage = imageURL.endsWith(\".png\") ||\r\n imageURL.endsWith(\".jpg\");\r\n return isImage;\r\n }",
"public static boolean isUrlImage(String url) {\r\n\t\tif (url.contains(\"png\") || url.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Munge up the SQL as desired. Responsible for figuring out ow to bind any arguments in to the resultant prepared statement. | RewrittenStatement rewrite(String sql, Binding params); | [
"public interface StatementRewriter\n{\n /**\n * Munge up the SQL as desired. Responsible for figuring out ow to bind any\n * arguments in to the resultant prepared statement.\n *\n * @param sql The SQL to rewrite\n * @param params contains the arguments which have been bound to this statemen... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method Calculate Loan Payment | public static void calculateLoanPayment() {
//get values from text fields
double interest =
Double.parseDouble(tfAnnualInterestRate.getText());
int year = Integer.parseInt(tfNumberOfYears.getText());
double loanAmount =
Double.parseDouble(tfLoanAmount.getText());
//crate a loan object
Loan loan... | [
"public void calculatePayment() {\n\t \n }",
"private void calcPayment() {\n\t\t// Calculate value of Term\n\t\tterm = Math.pow((1 + interestRate / 12.0), 12.0 * loanYears);\n\n\t\t// Calculate monthly payment\n\t\tpayment = (loanAmount * interestRate / 12.0 * term) / (term - 1);\n\t}",
"public void calcula... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This is a wrapper around the new stopForeground method, using the older APIs if it is not available. | void stopForegroundCompat(int id) {
if (mReflectFlg) {
// If we have the new stopForeground API, then use it.
if (mStopForeground != null) {
mStopForegroundArgs[0] = Boolean.TRUE;
invokeMethod(mStopForeground, mStopForegroundArgs);
re... | [
"void stopForegroundWrapper() {\n\n if (stopForeground != null) {\n try {\n stopForeground.invoke(this, new Object[]{Boolean.TRUE});\n // We don't want to clear notification bar.\n } catch (InvocationTargetException e) {\n // Should not happe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the summary labels for all the inputs given by the user | public void setSummary() {
String dataset = datasetInfo.getSelectedFile().getAbsolutePath();
datasetLabel.setText("<html><center><font size='4' color='#9e1503'>" + dataset + "</font></center></html>");
float putNumber = privacyInfo.getPUTNumber();
String privacyExceptions = privacyInfo.getPrivacyExceptions()... | [
"void setSummary(java.lang.String summary);",
"LabelSummary getLabelSummary();",
"public void updateLabels() {\n idTag.setText(\"Enter Book ID for item #\"+ String.valueOf(orderCounter+1) + \":\");\n quantityTag.setText(\"Enter quantity for item #\"+String.valueOf(orderCounter+1));\n itemIn... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the assessment for the user. | public void setAssesment(Assessment assesment) {
this.assessment = assesment;
} | [
"private void setValues() {\n //Calls for new assessment\n Assessment assessment = new Assessment();\n //Updates the local db assessmentDao with courseID and assessment ID\n assessment = db.assessmentDao().getAssessment(courseID, assessmentID);\n //Gets the assessment details name... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Validates a rule against the nodes (elements of each flow of the Mule App). | public static void validateRuleAgainstNodes(List<Element> nodes, Rule rule) {
List<Element> resultNodes = nodes.stream().filter(element -> element.getNamespacePrefix().equals(rule.getNode().getNamespace()) &&
element.getName().equals(rule.getNode().getName())).collect(Collectors.toList());
... | [
"private static void validateInclusiveRule(Rule rule, List<Element> nodes) {\n if(nodes.size() > 0) {\n if (rule.getAttributes().isEmpty()) {\n buildNoDetailsMessage(rule, PASS);\n } else {\n rule.getAttributes().forEach(attr -> {\n nodes... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests failing job when unhealthy due to class coverage | @Test
public void testClassCoverageFail() throws Exception {
Jenkins jenkins = jenkinsRule.jenkins;
WorkflowJob project = jenkins.createProject(WorkflowJob.class, "cob-test");
project.setDefinition(new CpsFlowDefinition(new ScriptBuilder()
.setClassCoverage("80,101,0").getSc... | [
"@Test\n public void testLineCoverageUnhealthyNoFail() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(\n new ScriptBuilder().setFailUnhe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Takes in a file path as a string as an argument and returns the "tags" assigned by Clarifai in the format of an array | public List<RecognitionResult> getTheTags(String filePath){
ClarifaiClient clarifai = new ClarifaiClient("ZRNHMLnOHeCHCeoLXV9PsdJqHI8hMZ967l181QVm", "3xIo8cayHGavrmNgWz2BJ8q5007OBSckj2U59P95");
List<RecognitionResult> results =
clarifai.recognize(new RecognitionRequest(new Fil... | [
"private static void readTags() {\n Set<String> tagsSet = new TreeSet<>();\n for (Picture pic : pictures) {\n tagsSet.addAll(Arrays.asList(pic.getTags()));\n }\n tags = tagsSet.toArray(new String[0]);\n }",
"public ArrayList<TagCategory> loadTaglist() {\n\t\tFile src = ne... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the list of authorized group | private List<Group> getAuthorizedGroups( )
{
Collection<Group> allGroupList = GroupHome.findAll( getPlugin( ) );
List<Group> groupList = new ArrayList<>( );
for ( Group group : allGroupList )
{
List<String> groupRoleKeyList = GroupRoleHome.findGroupRoles( group.ge... | [
"List<String> getGroups();",
"public static List<Group> getGroups() {\n try {\n String url = BASE_URL + \"groups\";\n return extractGroups(sendAuthenticated(new HttpGet(url)));\n } catch (Exception e) {\n e.printStackTrace();\n }\n return new ArrayList<>();\n }",
"List<Group> getGrou... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Validate product require attribute. | public static void validate(List<AttributeDefinition>
attributeDefinitions,
ProductDraft productDraft) {
List<String> requireAttributeNames = attributeDefinitions.stream()
.filter(
attributeDefinition -> attr... | [
"private void checkProduct(Product product) {\n Assert.notNull(product.getId(), ErrorEnum.ID_NOT_NULL.getMessage()); //msg: \"ID can not be empty\"\n\n Assert.isTrue(BigDecimal.ZERO.compareTo(product.getRewardRate()) < 0 && BigDecimal.valueOf(30).compareTo(product.getRewardRate()) >= 0, ErrorEnum.REWA... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the extended properties. | public void setExtendedProperties( Map<String, String> extendedProperties )
{
this.extendedProperties = extendedProperties;
} | [
"public void setExtendedProperty( String key, String value )\n {\n extendedProperties.put( key, value );\n }",
"protected void extendFromProvided() {\n if(providedProperties != null){\n this.properties.putAll(providedProperties);\n }\n }",
"Object extendedProperties();",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column t_discuss.discuss_id | public Integer getDiscussId() {
return discussId;
} | [
"public Integer getDiscussContentId() {\n return discussContentId;\n }",
"ProductDiscuss selectByPrimaryKey(Integer productDiscussId);",
"public void setDiscussId(Integer discussId) {\n this.discussId = discussId;\n }",
"public Long getDiscourseId() { return discourseId; }",
"public Stri... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleTupleExp" $ANTLR start "entryRuleTuplePart" InternalDOcl.g:3017:1: entryRuleTuplePart returns [EObject current=null] : iv_ruleTuplePart= ruleTuplePart EOF ; | public final EObject entryRuleTuplePart() throws RecognitionException {
EObject current = null;
EObject iv_ruleTuplePart = null;
try {
// InternalDOcl.g:3017:50: (iv_ruleTuplePart= ruleTuplePart EOF )
// InternalDOcl.g:3018:2: iv_ruleTuplePart= ruleTuplePart EOF
... | [
"public final void entryRuleTuplePart() throws RecognitionException {\n try {\n // InternalOCLlite.g:1254:1: ( ruleTuplePart EOF )\n // InternalOCLlite.g:1255:1: ruleTuplePart EOF\n {\n before(grammarAccess.getTuplePartRule()); \n pushFollow(FOLLOW_1);\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates and writes NetworkEvent with a Player object correspondent to this client, telling the client to update their local copy with the new version, and repopulate the inventory panel. | public synchronized void updateInvent() {
try {
output.writeObject(new NetworkEvent(
gameState.parsePlayer(user),
NetworkEvent.EventType.UPDATE_INVENT));
output.reset();
output.flush();
} catch (IOException e) {
console.displayError("Failed to write update to client: "
... | [
"@EventHandler \r\n\tpublic void onPlayerChangeWorldSaveInv(PlayerChangedWorldEvent e){\r\n\t\ttry {\r\n\t\tPlayer player = e.getPlayer();\r\n\t\t\r\n\t\tif (ConfigFile.getCustomConfig().getBoolean(\"Per-World.inventory\") == false){ return; }\r\n\t\t\r\n\t\tif (playerDataFile.containsKey(player) == false){\r\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Build from the obj file | private void build() {
if(built) return;
for(String line : objFile.split("\n"))
parseLine(line);
built = true;
} | [
"public OBJBuilder(String obj) {\r\n\t\tthis.objFile = obj;\r\n\t}",
"public OBJBuilder(InputStream in) {\r\n\t\tif(in == null)\r\n\t\t\tthrow new NullPointerException(\"InputStream cannot be null\");\r\n\r\n\t\ttry {\r\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(in));\r\n\t\t\tStringB... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
convert from local time to string with format HH:mm | public static String toHHmm(LocalTime localTime) {
if (null != localTime) {
return localTime.format(DateTimeFormatter.ofPattern(Constant.HH_MM));
}
return "";
} | [
"public String dateFormatter(LocalDateTime time){\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"HH:mm\");\n return time.format(formatter);\n }",
"public static String twelveHrTime(LocalTime lt) {\n DateTimeFormatter formatTwelveHrTime = DateTimeFormatter.ofPattern(\"hh:mm a... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get row and column index from the JLabel how number example: 0 returns 0, 0; | public Point getIndexFromLabel(int numLabel) {
int row = numLabel / GameSize;
int col = numLabel % GameSize;
return new Point(row, col);
} | [
"private int getIdx(MouseEvent e) {\n Point p = e.getPoint();\n p.translate(-BORDER_SIZE, -BORDER_SIZE);\n int x = p.x / CELL_SIZE;\n int y = p.y / CELL_SIZE;\n if (0 <= x && x < GUI.SIZE[1] && 0 <= y && y < GUI.SIZE[1]) {\n return GUI.SIZE[1] * ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
tournament replace randomly selects tSize individuals and replace the least fit from that selection | private void TournamentReplace(ArrayList<Individual> individuals) {
//get tournament size
int tSize = Parameters.replacementTSize;
for(int i=0; i<individuals.size(); i++)
{
//make list of candidates
ArrayList<Individual> replaceCandidates = new ArrayList<Individual>();
//select tSize number of ... | [
"private void tournament_selection() {\r\n\r\n individual[] temp_pop = new individual[this.pop_size];\r\n\r\n for (int i = 0; i < this.pop_size; i++) {\r\n\r\n // pick 2 random ints to for indices of parents\r\n int parent1 = new Random().nextInt(this.pop_size);\r\n in... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to fill chess board with cells. | public void initBoard() {
for (int row = 0; row < this.board.length; row++) {
for (int column = 0; column < this.board.length; column++) {
this.board[row][column] = new Cell();
}
}
fillFiguresOnBoard(white);
fillFiguresOnBoard(white);
} | [
"public void fillTheBoard() {\n for (int i = MIN; i <= MAX; i++) {\n for (int j = MIN; j <= MAX; j++) {\n this.getCells()[i][j] = new Tile(i, j, false);\n }\n }\n }",
"private void fillBoardWithCells(){\n double posx = MyValues.HORIZONTAL_VALUE*0.5*MyVa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Lists summaries of the operations. | public java.util.List<OperationSummary> getOperations() {
if (operations == null) {
operations = new com.amazonaws.internal.SdkInternalList<OperationSummary>();
}
return operations;
} | [
"void applySummary(Operation operation, Method method);",
"public List<OperationHolder> getAllOperations();",
"public static java.util.Collection getOperationDescs() {\n return _myOperationsList;\n }",
"public String getSummary();",
"public void getHistory() {\r\n\t\tthis.usersOperations.forEach(o... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ If user logged out on any one of the tab, this method will be called to redirect to landing page on other tabs and Login pop up will be invoked. | private void redirectToLandingPage(){
appInjector.getAppService().getLoggedInUser(new SimpleAsyncCallback<UserDo>() {
@Override
public void onSuccess(UserDo loggedInUser) {
AppClientFactory.setLoggedInUser(loggedInUser);
UcCBundle.INSTANCE.css().ensureInjected();
HomeCBundle.INSTANCE.css().ensureInj... | [
"public void redirectToHomePageNotLoggedIn() {\r\n\t\t\r\n\t\twebAppDriver.get(baseUrl);//+\"?optimizely_x8236533790=0\"\r\n\t\t/*try {\r\n\t\t\twebAppDriver.verifyElementTextContains(By.id(linkLogoutId), \"Logout\", true);\r\n\t\t\tloginAction.clickOnLogOut();\r\n\t\t} catch (Exception e) {\r\n\t\t\t// this is jus... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
to check if a point contains an event and display it | private static void check_event(int x,int y, int distance)
{
int number;
float price;
if(x<21 && y<21 && x>-1 && y>-1)
{
if(world[x][y]!=null) //condition to check if a point contains an event
{
number=world[x][y].getnumber();
price=world[x][y].getprice();
System.out.println("Event "... | [
"boolean hasDrawEllipseEvent();",
"boolean isPointVisible(Point point);",
"private static void find_events(int x,int y)\n\t{\n\t\tint x1;\n\t\tint y1;\n\t\t\n\t\tcheck_event(x,y,0); //function call to check if the point contains an event\n\t\t\n\t\t//loop to spiral around the user inputed point\n\t\tfor(int d=... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add a new head to the pane (which consists in adding it to the strings displayed next to each transition and to the settings of the transitions). The head is added to the given tape and has the given color. | void addHead(Tape tape, Color color) {
for(TransitionGroup transitionGroup : transitionToTransitionGroup.values())
transitionGroup.addHead(tape, color);
this.transitionSettingsRectangle.addHead(tape, color);
} | [
"void editHeadColor(Tape tape, int head, Color color) {\n for(TransitionGroup transitionGroup : transitionToTransitionGroup.values())\n transitionGroup.editHeadColor(tape, head, color);\n this.transitionSettingsRectangle.editHeadColor(tape, head, color);\n }",
"private void addNewHead(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the c banca of this banche appoggio. | @Override
public void setCBanca(java.lang.String cBanca) {
_bancheAppoggio.setCBanca(cBanca);
} | [
"public void setCailiao(Byte cailiao) {\n this.cailiao = cailiao;\n }",
"@Override\n\tpublic void setCodiceBanca(java.lang.String codiceBanca) {\n\t\t_bancheAppoggio.setCodiceBanca(codiceBanca);\n\t}",
"public void setCveAmbito(Integer cveAmbito) {\r\n\t\tthis.cveAmbito = cveAmbito;\r\n\t}",
"public... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
V5 database is identical to V4 except for the RocksDB configuration | private Database createV5Database() {
try {
final V5DatabaseMetadata metaData =
V5DatabaseMetadata.init(getMetadataFile(), V5DatabaseMetadata.v5Defaults());
DatabaseNetwork.init(getNetworkFile(), Constants.GENESIS_FORK_VERSION, eth1Address);
return RocksDbDatabase.createV4(
met... | [
"yandex.cloud.api.mdb.mongodb.v1.DatabaseOuterClass.DatabaseSpec getDatabaseSpec();",
"@Test\n public void test_db_versions() throws Exception {\n DatabaseMetaData metadata = newMetadata(11, 0, \"12.1.0.1.0\");\n underTest.init(metadata);\n // oracle 11.1 is noit\n metadata = newMet... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts the Drools status to this TaskStatus. | public static TaskStatus getTaskStatus(Status status) {
return conversionMap.get(status);
} | [
"public TaskStatus getStatus() {\n\t\treturn status;\n\t}",
"TaskStatus getStatus();",
"public String getTaskstatus() {\n return taskstatus;\n }",
"public void setStatus(TaskStatus status) {\n\t\tthis.status = status;\n\t}",
"public void setTaskStatus(Byte taskStatus) {\n this.taskStatus = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get all the planoAuditorias with eager load of manytomany relationships. | public Page<PlanoAuditoria> findAllWithEagerRelationships(Pageable pageable) {
return planoAuditoriaRepository.findAllWithEagerRelationships(pageable);
} | [
"@Transactional(readOnly = true)\n public Page<PlanoAuditoria> findAll(Pageable pageable) {\n log.debug(\"Request to get all PlanoAuditorias\");\n return planoAuditoriaRepository.findAll(pageable);\n }",
"@OneToMany(mappedBy=\"parametro\")\r\n\tpublic List<ParametroAuditoria> getParametroAudit... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the ipOfTrustSubnetForUdr property: IP of trust subnet for UDR. | public IpAddress ipOfTrustSubnetForUdr() {
return this.ipOfTrustSubnetForUdr;
} | [
"public VwanConfiguration withIpOfTrustSubnetForUdr(IpAddress ipOfTrustSubnetForUdr) {\n this.ipOfTrustSubnetForUdr = ipOfTrustSubnetForUdr;\n return this;\n }",
"public IpAddressSpace trustSubnet() {\n return this.trustSubnet;\n }",
"public String virtualNetworkSubnetId() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Factory for creating output streams. | public interface OutputStreamFactory {
/**
* Create an output stream for file location.
* String that represents file location should be relative path, '/' is a delimiter.
*
* @param location sting that contains relative file location
*
* @return new stream instance
*/
Output... | [
"public abstract OutputStream createOutputStream() throws IOException, FileCreationException;",
"private void setupOutputStreams() {\n\t\tDataSink out_sink = new IdentifiedIODataSink(this.outgoing, this);\n\t\t\n\t\t/**\n\t\t * We share a reference to the raw streams (in PrintWriter form) to\n\t\t * allow them to... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get a reference to the alien army | public AlienArmy getAlienArmy() {
return army;
} | [
"public Army getArmy() {\r\n\t\treturn army;\r\n\t}",
"public Army getArmy()\n {\n return army;\n }",
"public Allele getRefAllele() {return refAllele;}",
"public AIMain getAIMain() {\n return aiMain;\n }",
"java.lang.String getReferenceAllele();",
"public URI getAniteUri()\r\n\t{\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
string channelToken = 2; | java.lang.String getChannelToken(); | [
"String getChannelId();",
"int getChannel();",
"java.lang.String getChannel();",
"public int getChannelId( ) {\r\n return channelId;\r\n }",
"String getChannelName();",
"public int getChannel()\r\n\t{\r\n\t\treturn channel;\r\n\t}",
"public String getChannelId()\n {\n return channelI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor that initializes all the fields of PoetryWriter. | public PoetryWriter() {
mainList = null;
previousWord = null;
total = 0;
} | [
"protected void initWriting() {}",
"public TeeWriter() {\r\n ; // nothing to do\r\n }",
"public PEMWriter() {\r\n }",
"public HoTTWriter() {\n this(new ByteArrayOutputStream());\n }",
"public XMPPWrite() {\n loadProperties();\n }",
"public SimpleXMLFileIndexingWriter() {\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Takes two arrays and zips them together into an array of Pairs. | public static <T1,T2> ArrayList<Pair<T1,T2>> zipArrays(ArrayList<T1> first, ArrayList<T2> second) {
if (first.size() == second.size()) {
ArrayList<Pair<T1,T2>> output = new ArrayList<>(first.size());
for (int i = 0; i < first.size(); i++) {
Pair<T1,T2> pair = new Pair<>(... | [
"public static <T1, T2> ArrayList<Pair<T1, T2>> zip(T1[] array1, T2[] array2){\n ArrayList<Pair<T1, T2>> pairs = new ArrayList<>();\n\n // Iterate over the first list\n for(int i = 0; i < array1.length && i < array2.length; i++) {\n // Bind it to the second array\n pairs.a... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the list of children that have been added to the group after it was loaded from the database. | public List<GroupMemberDTO> getNewChildren() {
return newChildren;
} | [
"public List<GroupBean> getChildren() {\n\t\treturn children;\n\t}",
"public Collection<ChildType> getChildren();",
"public synchronized List<Integer> getChildrenDependency() {\n List<Integer> ret = new ArrayList<Integer>(mChildrenDependencies.size());\n ret.addAll(mChildrenDependencies);\n return ret;... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
building the url with parameter for api request | public void buildURL() {
//get User Input
titleSearch = findViewById(R.id.text_input);
String userInput = titleSearch.getText().toString();
//build URl
replacedURL = "s=" + userInput;
//replace space with +
replacedURL = replacedURL.replace(" ", "+");
//... | [
"protected String makeUrl() {\n\n String result = \"https://api.vk.com/method/\" + this.method + \"?\";\n\n Iterator it = this.params.entrySet().iterator();\n\n while (it.hasNext()) {\n Map.Entry item = (Map.Entry) it.next();\n result += item.getKey() + \"=\" + item.getVal... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the pendingReason value for this DoDirectPaymentResponseType. | public eBLBaseComponents.apis.ebay.PendingStatusCodeType getPendingReason() {
return pendingReason;
} | [
"public void setPendingReason(eBLBaseComponents.apis.ebay.PendingStatusCodeType pendingReason) {\r\n this.pendingReason = pendingReason;\r\n }",
"public PaymentStatusReason getStatusReason() {\n return paymentStatusReason;\n }",
"public String getRejectReason() {\n return reje... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of setValueToBean method, of class ReflectionUtil. | @Test
public void testSetValueToBean() {
System.out.println("setValueToBean");
BeanTestA obj = new BeanTestA();
String propertyName = "prop1.beanTestC.prop";
Object value = 34;
ReflectionUtil.setValueToBean(obj, propertyName, value);
assertEquals(value,obj.getProp1().... | [
"public void setField(Object bean, T value) throws IllegalAccessException, InvocationTargetException{\n assignment.invoke(bean, value);\n }",
"@Test\n public void testGetValueFromBean() {\n System.out.println(\"getValueFromBean\");\n BeanTestA obj = new BeanTestA();\n obj.getProp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the attribute value for ProjectName, using the alias name ProjectName | public String getProjectName() {
return (String)getAttributeInternal(PROJECTNAME);
} | [
"public String getProjectId() {\r\n return (String) getAttributeInternal(PROJECTID);\r\n }",
"public String getProjectName() {\n return project_name;\n }",
"java.lang.String getProjectName();",
"public String getProjectName() {\n if (projectName == null) {\n projectName =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the class from a jar resource. | protected Resource getClassFromJars(final String path) {
// 1) find a class from a root of the jar file.
Resource resource = getFileFromJars(path);
if (resource != null) {
return resource;
}
// 2) find a class from META-INF/resources/META-INF/classes in the jar file... | [
"Class<?> getResourceClass();",
"String asClassName(String resourceName);",
"private Class<?> loadClassFromJar(String jarfileName, String className,\n String classNameAsFile) {\n Class<?> theClass = null;\n\n // First, try to open the Jar file\n JarFile theJar = null;\n tr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to read java data objects from the disk and determine the serial indices for lightlight reactions. Returns an array that has the serial indices in the order that they will be in when deserialized for the actual calculation. Necessary to get lightlight reactions to be stored properly when reactions are read from ... | int[] findSerialArray (int Z, int N){
int m = 0;
int mm = 0;
int temparray[] = null;
String file = "data/iso" + Z + "_" + N + ".ser";
try {
// Wrap input file stream in an object input stream
FileInputStream fileIn = new FileInputStream(file);
Ob... | [
"public int[] readIntArray(final String objectPath);",
"public ClickerCounterModel[] readObjectFromFile() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\ttry {\n\t\t\tFileInputStream inputStream = openFileInput(filename);\n\t\t\tInputStreamReader isr = new InputStreamReader(inputStream);\n\t\t\tBufferedReader... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tries to claim a container if it has a valid price, otherwise the container will be invalidated | private void tryClaim(Container container, Player player) {
// by setting them INVALID or by claiming them
String toParse = container.getCustomName().substring(11);
int n = 0;
try {
n = Integer.parseInt(toParse);
} catch (NumberFormatException ex) {
markInvalid(container);
return;
}
if ... | [
"@Test\n void refillingContainerTest(){\n Container container = new Container();\n container.fillContainer(Resource.SHIELD);\n container.takeResource();\n container.fillContainer(Resource.COIN);\n assertEquals(Resource.COIN,container.takeResource());\n }",
"void checkReser... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__DefaultObservedElementTrigger__Group__1__Impl" $ANTLR start "rule__OpcUaDeviceClient__Group__0" InternalComponentDefinition.g:4944:1: rule__OpcUaDeviceClient__Group__0 : rule__OpcUaDeviceClient__Group__0__Impl rule__OpcUaDeviceClient__Group__1 ; | public final void rule__OpcUaDeviceClient__Group__0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalComponentDefinition.g:4948:1: ( rule__OpcUaDeviceClient__Group__0__Impl rule__OpcUaDeviceClient__Group__1 )
// InternalComponentDefin... | [
"public final void rule__OpcUaDeviceClient__Group_2_0__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalComponentDefinition.g:5056:1: ( rule__OpcUaDeviceClient__Group_2_0__0__Impl rule__OpcUaDeviceClient__Group_2_0__1 )\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Normalize an input buffer of Telugu text | int normalize(char s[], int len) {
for (int i = 0; i < len; i++) {
switch (s[i]) {
// candrabindu (ఀ and ఁ) -> bindu (ం)
case '\u0C00': // ఀ
case '\u0C01': // ఁ
s[i] = '\u0C02'; // ం
break;
// delete visarga (ః)
case '\u0C03':
len = de... | [
"private void normalize()\n {\n if (m_unnormalized_ == null) {\n m_unnormalized_ = new StringBuilder();\n m_n2Buffer_ = new Normalizer2Impl.ReorderingBuffer(m_nfcImpl_, m_buffer_, 10);\n } else {\n m_unnormalized_.setLength(0);\n m_n2Buffer_.remove();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Funcion para la insercion en la base de datos de una carta tipo VitalTransfusion | private String insertarCartaVitalTransfusion() {
int[] valoresEnemigo = {
// this.dañoEnemigo=valoresEnemigo[0];
3,
// this.curaEnemigo=valoresEnemigo[1];
0,
// this.cartasEnemigo=valoresEnemigo[2];
0,
// this.descarteEnemigo=va... | [
"public void insertCart(Cart cart) throws UserApplicationException;",
"public int addItemProdCatalog(Product prod)\n {\n //insert into prodcatalog (upc, description, unitprice) values ('5', 'Unleaded 5', '52.29')\n String query=\"insert into prodcatalog (upc, description, unitprice) values (\";\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Purpose: Locate a single Label within the frame. param Current_layout_manager, Label_name, Label_caption, X_position, Y_Position (within the Frame) returns The Label. Discussion: Method demonstrating low coupling and high cohesion for adding individual labels: reduces overall code, especially in the LocateLabels method... | public Label LocateALabel(SpringLayout myLabelLayout, Label myLabel, String LabelCaption, int x, int y)
{
// Instantiate the Label
myLabel = new Label(LabelCaption);
// Add the Label to the screen
add(myLabel);
// Set the position of the Label (From left hand side of the frame (West), and from ... | [
"public void LocateLabels(SpringLayout myLabelLayout)\n {\n\t// Each line calls the LocateALabel method to establish each Label\n lblPCName = LocateALabel(myLabelLayout, lblPCName, \"PC Name\", 30, 25);\n lblPCID = LocateALabel(myLabelLayout, lblPCID, \"PC ID\", 30, 50);\n lblIP = LocateALab... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add in method for infoAll()TBD | private void infoAll() {
} | [
"List<Article_Info> getInfoAll();",
"abstract void displaySpecialInfo();",
"public void getInfo() {\n\t\tSystem.out.println(\"My name is \"+ name+ \" and my last name is \"+ lastName);\n\t\t\n\t\tgetInfo1();// we can access static method within non static \n\t\t\n\t}",
"@Override\n public String toString()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Remove all errors from the input fields | private void clearErrors() {
cvvTil.setError(null);
cardExpiryTil.setError(null);
cardNoTil.setError(null);
cvvTil.setErrorEnabled(false);
cardExpiryTil.setErrorEnabled(false);
cardNoTil.setErrorEnabled(false);
} | [
"public void clearErrors();",
"void clearErrors();",
"private void clearOldErrorsFromViews() {\n clearGrid(nonFieldErrorGrid);\n clearGrid(fieldErrorGrid);\n showErrorBox(nonFieldErrorBox);\n showErrorBox(fieldErrorBox);\n }",
"private void clearErrors()\n {\n Constrai... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests a scenario in which a zero amount is deposited. A zero deposit will process successfully and the account balance will not be modified. | @Test
public void testDepositZeroAmount() {
Assert.assertTrue(this.bankAccount.deposit(0));
Assert.assertEquals(100, this.bankAccount.getAccountBalance(), 0.001);
} | [
"@Test\r\n\r\n\tpublic void testWithdrawZeroAmount(){\r\n\r\n\t\tAssert.assertTrue(this.bankAccount.withdraw(0));\r\n\r\n\t\tAssert.assertEquals(100, this.bankAccount.getAccountBalance(),0.001);\r\n\r\n\t\t\r\n\r\n\t}",
"@Test\r\n\r\n\tpublic void testDepositPositiveAmount() {\r\n\r\n\t\tAssert.assertTrue(this.ba... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Ratio of rows with null value against total scanned rows. double null_ratio = 2; | double getNullRatio(); | [
"@java.lang.Override\n public double getNullRatio() {\n return nullRatio_;\n }",
"@java.lang.Override\n public double getNullRatio() {\n return nullRatio_;\n }",
"public double emptyRowProportion() {\n double count = 0;\n for (int i = 0; i < this.numRows... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Performs the write action on sc The convention is that buff is in writemode before calling doWrite and is in writemode after calling doWrite | private void doWrite() throws IOException {
bb.flip();
sc.write(bb);
bb.compact();
updateInterestOps();
} | [
"public void doWrite() throws IOException {\n\t\tbbout.flip();\n\t\tsc.write(bbout);\n\t\tbbout.compact();\n\t\tprocessOut();\n\t\tupdateInterestOps();\n\t}",
"public void doWrite() throws IOException {\n bbout.flip();\n sc.write(bbout);\n bbout.compact();\n processOut();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the harvesterStatus attribute of the HarvesterAdminForm object | public String getHarvesterStatus() {
if (harvesterStatus == null) {
harvesterStatus = "ENABLED";
}
return harvesterStatus;
} | [
"public void setHarvesterStatus(String val) {\n\n\t\tharvesterStatus = val;\n\n\t}",
"public Integer getAdminStatus() {\n return adminStatus;\n }",
"AdminStatus getAdminStatus();",
"public Integer getTrainerStatus() {\r\n return trainerStatus;\r\n }",
"public StatusValidation getStatus()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Modify Race contestant, with help of id. Unique to each contestant. | public RaceContestant modifyContestant(RaceContestant contestant) {
RaceContestant modify = null;
boolean validCategory = false;
for (int i = 0; !validCategory && i < mCategories.length; i++) {
validCategory = mCategories[i].equals(contestant.getCategory());
}
if (mID... | [
"public Race(int newId)\n\t{\n\t\tid = newId;\n\t}",
"public void updateContest(TCSubject tcSubject, StudioCompetition contest) {}",
"ConstructorStandings setRaceId(Integer raceId);",
"public void setRaceID(int value) {\n this.raceID = value;\n }",
"public RaceContestant getRaceContestant(int id) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a List of images from json | public static List<Image> toList(String json) {
List<Image> images = new ArrayList<>();
ObjectMapper mapper = new ObjectMapper();
SimpleModule module = new SimpleModule();
module.addDeserializer(Image.class, new ImageDeserializer());
mapper.registerModule(module);
try {
... | [
"private List<Image> parseJSON(String Json) {\n List<Image> mImages = new ArrayList<>();\n try {\n JSONObject main = new JSONObject(Json);\n JSONObject photos = main.getJSONObject(\"photos\");\n JSONArray array = photos.getJSONArray(\"photo\");\n for (int i ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets ComboBox with User types information. | public JComboBox getTypeComboBox() {
return typeComboBox;
} | [
"public JComboBox<String> getTypeBox()\n {\n return typeBox;\n }",
"private void loadTypesCombo() {\r\n try {\r\n String query = \"SELECT distinct type FROM tms_hirevehicle\";\r\n System.out.println(query);\r\n ResultSet rs = DB.getDbCon().query(query);\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generated by ComTest BEGIN testLisaaNimi50 | @Test
public void testLisaaNimi50() throws alkioException { // Nimet: 50
Nimi n1 = new Nimi(); Nimi n2 = new Nimi();
Nimet nimet = new Nimet();
assertEquals("From: Nimet line: 54", 0, nimet.getLkm());
nimet.lisaaNimi(n1); assertEquals("From: Nimet line: 55", 1, nimet.getLkm());
nimet.lisaa... | [
"@Test\n public void testOnkoMuokattu150() throws SailoException { // Leffarekisteri: 150\n Leffarekisteri testi = new Leffarekisteri(); \n assertEquals(\"From: Leffarekisteri line: 153\", false, testi.onkoMuokattu()); \n Leffa testi1 = new Leffa(); \n testi.tallenna(testi1); \n assertEquals(\"Fr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the 'RND_CODE' field. | public void setRNDCODE(java.lang.CharSequence value) {
this.RND_CODE = value;
} | [
"public org.LNDCDC_NCS_TCS.SHOWS.apache.nifi.LNDCDC_NCS_TCS_SHOWS.Builder setRNDCODE(java.lang.CharSequence value) {\n validate(fields()[14], value);\n this.RND_CODE = value;\n fieldSetFlags()[14] = true;\n return this;\n }",
"public java.lang.CharSequence getRNDCODE() {\n return RND_COD... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the TensorFlow Ops | public Ops getTF() {
return tf;
} | [
"java.lang.String getOp();",
"String getOp();",
"boolean getTensorOpsEnabled();",
"private ISeq<Op<Double>> getOperations() {\n\t\tISeq<Op<Double>> operations = ISeq.of(MathOp.ADD, MathOp.MUL, MathOp.POW, MathOp.SUB, MathOp.DIV);\n\t\tif (this.mode == OptimizationMode.LogExp) {\n\t\t\toperations = operations.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The stage of the jobtargetgroup definition allowing to specify Members. | interface WithMembers {
/**
* Specifies members.
* @param members Members of the target group
* @return the next definition stage
*/
WithCreate withMembers(List<JobTarget> members);
} | [
"interface UpdateStages {\n /**\n * The stage of the jobtargetgroup update allowing to specify Members.\n */\n interface WithMembers {\n /**\n * Specifies members.\n * @param members Members of the target group\n * @return the next update ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add any extra attributes to the manifest. | private void appendExtraAttributes( final Attributes attributes )
{
final Iterator iterator = m_extraAttributes.iterator();
while( iterator.hasNext() )
{
final ExtraAttribute attribute =
(ExtraAttribute)iterator.next();
attributes.putValue( attribute.g... | [
"public static void append(\n @NotNull(message = \"input stream can't be null\")\n final InputStream stream) throws IOException {\n final long start = System.currentTimeMillis();\n final Map<String, String> attrs = Manifests.load(stream);\n Manifests.attributes.putAll(attrs);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The base type representing a collision shape in the physics engine. | public interface CollisionShape {
/**
* Returns the axis-aligned bounding box ({@link AABBfc}) of the transformed shape.
*
* @return The {@link AABBf} bounding the shape.
*/
AABBf getAABB(Vector3fc origin, Quaternionfc rotation, float scale);
/**
* Returns an identical shape rotate... | [
"public Collidable collisionObject() {\r\n return this.collisionShape;\r\n }",
"Shape getBaseShape();",
"CollisionRule getCollisionRule();",
"abstract ShapeType getShapeType();",
"ShapeType getShapeType();",
"protocol.Message.Fence.Shape getShape();",
"Rectangle getCollisionRectangle();",
"p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This Method is to load Objects from the Object Property file | public void loadObjects() throws FileNotFoundException, IOException {
prop = new Properties();
prop.load(new FileInputStream(new File("./object/object.properties")));
} | [
"public void importFile() throws Exception {\r\n\r\n propertyObjects = new ArrayList<Property>();\r\n try {\r\n File file = new File(FILE_NAME);\r\n if (file.exists()) {\r\n // while(file.) {\r\n try (FileInputStream fiStream = new FileInputStream(file);\r\n ObjectInputStrea... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates the provided fields in the product record referenced by a productid | Product update(Product product, long id); | [
"void updateOfProductById(long id);",
"int updateProduct(int id, Product product);",
"Product updateProductById(Long id);",
"public void updateProduct(Product product);",
"Product updateProductInStore(Product product);",
"void updateProduct(Product product, String name, String currency, double price);",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new instance of Mutation object. | public static Mutation create() {
return new Mutation(false);
} | [
"@BetaApi\n public static Mutation createUnsafe() {\n return new Mutation(true);\n }",
"private Mutation mutationFromTuple(Tuple t) throws IOException\n {\n Mutation mutation = new Mutation();\n if (t.get(1) == null)\n {\n if (allow_deletes)\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the claim key for an object id | public String getClaimkey(String id) {
Object obj = this.claimKeyHashMap.get(id);
if ((obj != null) && (obj instanceof String)) {
return (String) obj;
}
return null;
} | [
"java.lang.String getClaimId();",
"String getKey(Object entity);",
"java.lang.String getObjectID();",
"java.lang.String getSubjectKeyID();",
"public String getClaimFileName(int claimId){\n\t\treturn \"claim\"+Integer.toString(claimId);\n\t}",
"public K accessKey(T obj);",
"private PSKey getComponentKey(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Runs the MapReduce job "trec baseline runs" | public static void main(String[] args) throws Exception {
if (args.length!=3 && args.length!=4) {
System.out.printf( "Usage: %s [inputFormat] inputFiles topicFile outputFile\n", TrecRun.class.getSimpleName());
System.out.println(" inputFormat: either WARC or KEYVAL; default WARC");
... | [
"static void runBaseline()\n{\n\tsimulate(it, numServers, 0, propTCP, numTrials);\n}",
"public static void main(String[] args) {\n \n lpt(4, true); // print all processing events\n /*\n job9 runtime 9 assigned to processor 0 at time 0\n job8 runtime 8 assigned to processor 1 at time 0\n job7 run... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Indented version of toString which returns the common and meta JSON data | public String toString(int indent) {
String jsonString = commonData.toString(indent);
jsonString = jsonString.substring(0,jsonString.length()-2);
String revJSON = metaData.toString(indent);
if (!"".equals(revJSON)) {
revJSON = revJSON.substring(1);
jsonString = jsonString + "," +revJSON;
} ... | [
"public String toString() {\r\n\t\tString jsonString = commonData.toString();\r\n\t\tjsonString = jsonString.substring(0,jsonString.length()-1);\r\n\t\t\r\n\t\tString revJSON = metaData.toString();\r\n\t\tif (!\"\".equals(revJSON)) {\r\n\t\t\trevJSON = revJSON.substring(1);\r\n\t\t\tjsonString = jsonString + \",\" ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the inventory item's cost. | @Transactional
public void setItemCost(String inventoryID, float cost)
{
Inventory inv = getInvUpdate(inventoryID);
if (inv != null)
{
inv.setCost(cost);
}
} | [
"public void setItemCost(String inventoryID, float cost);",
"void setCost(double cost);",
"public void setCost(double cost)\n\t{\n\t\tthis.cost=cost;\t\n\t}",
"public void setItemPrice(String inventoryID, float price);",
"double setCost(double cost);",
"public void setRepairCost(int cost);",
"private vo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Place the rectangle containing the settings of the state groups above the given widget and animate it to maximize it. | void openStateSettingsRectangle(StateGroup stateGroup){
stateSettingsRectangle.setCurrentState(null);
stateSettingsRectangle.setLayoutX(stateGroup.getLayoutX());
stateSettingsRectangle.setLayoutY(stateGroup.getLayoutY() - TuringMachineDrawer.STATE_RADIUS
* TuringMachineDrawer.STA... | [
"void closeStateSettingsRectangle(boolean animate){\n stateSettingsRectangle.minimize(animate);\n }",
"void openTransitionSettingsRectangle(TransitionGroup transitionGroup){\n transitionSettingsRectangle.setCurrentTransitionGroup(null);\n transitionSettingsRectangle.setLayoutX(transitionGr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Person wants to leave in a floor and waits for the lift to stop | public void requestStop(int floor) {
//System.out.println("Someone wants to get off at floor " + floor);
synchronized (this) {
toStop[floor] = true;
notifyAll();
}
controller.arriveInLift(floor);
} | [
"private void elevatorStop(int floor, Boolean unload){\n \n if(unload){\n destinedPassengers[ floor ] = 0;\n } else {\n \n while(building.floor(floor).passengersWaiting() > 0){\n try {\n boardPassenger(1);\n } cat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the userId that the governance engine should use when calling the metadata server. (Null means use the Engine Host's userId.) | public String getEngineUserId()
{
return engineUserId;
} | [
"public String getuserId() {\n return (String)ensureVariableManager().getVariableValue(\"userId\");\n }",
"@Override\n\tpublic long getUserId() {\n\t\treturn _scienceAppManager.getUserId();\n\t}",
"@Override\n\tpublic long getUserId() {\n\t\treturn _scienceApp.getUserId();\n\t}",
"public long getUse... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
if the Graph already existed, clicking OK/Apply should cause it to be removed from the GraphCanvasManager | public void delete()
{
if (theGraph != null)
deletedGraphs.add(theGraph);
// remove this GraphDisplay from the dialog
graphDisplays.remove(this);
updateGraphsPanel();
this.destroy();
} | [
"public void RemoveAllGraphs() {\n EquationCardLayout.removeAll();\n lineGraphs.clear();\n CurrentEQ = \"\";\n EQNum = 0;\n AddNewGraph();\n Canvas.removeAll();\n Canvas.repaint();\n }",
"@FXML\n\tpublic void SaveGraph(ActionEvent e) {\n\t\tgraph.node= false;\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
headMap Return the portion of the B+Tree map where fromKey <= key. | public SortedMap <K,V> tailMap (K fromKey)
{
Node currentNode=root;//current location
while (!currentNode.isLeaf){//while it is not the leaf
boolean gotIt=false;
for (int i=0; i<currentNode.nKeys; i++){
if (fromKey.compareTo(currentNode.key[i]) >= 0){
currentNode=(Node)currentNode.ref[i... | [
"public SortedMap headMap(Object toKey) {\n return new ImmutableSortedMap(map.headMap(toKey));\n }",
"@Test\n\tpublic void testHeadMap_1()\n\t\tthrows Exception {\n\t\tPatriciaTrie fixture = new PatriciaTrie();\n\t\tfixture.incrementSize();\n\t\tfixture.modCount = 1;\n\n\t\tSortedMap<Object, Object> result = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Indents a block of text. You provide the block of text as a String and the indent object and it returns another String with each line properly indented. | public static String indentBlock(String block, Indent indent)
{
StringBuilder sb = new StringBuilder();
BufferedReader br = new BufferedReader(new StringReader(block));
String line;
try
{
while((line = br.readLine()) != null)
sb.append(indent).append(line).append('\n');
}
ca... | [
"public static String indentBlock(String codeBlock, String minIndent) {\n minIndent = minIndent.replaceAll(\"\\t\", \" \");\n String lines[] = codeBlock.split(\"\\n\");\n Pattern whitespacePrefix = Pattern.compile(\"^([ \\t]*)(.*)$\", Pattern.MULTILINE);\n Matcher m = whitespacePrefix... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the paint that will be used to draw the text. | public void setPaint(@NonNull TextPaint paint) {
mPaint = paint;
mNeedUpdateLayout = true;
} | [
"public void setPaint(Paint paint) {\n this.paint = paint;\n }",
"public void setPaint(Paint paint)\n {\n this.paint = paint;\n }",
"public void setTextBackgroundPaint(Paint paint)\n\t{\n\t\tthis.textBackgroundPaint = paint;\n\t}",
"@Override\n\tpublic void setPaint(GPaint paint) {\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the Fudge context. | protected FudgeContext getFudgeContext() {
return _fudgeContext;
} | [
"public FudgeContext getFudgeContext() {\n return _fudgeContext;\n }",
"public Context getContext();",
"public Context context() {\n return ctx;\n }",
"public Context getContext() {\n return context;\n }",
"public cl_context getContext() {\n\t\treturn context;\n\t}",
"public cl_context g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an started component module. | StartedModule<?> getComponent(UUID id); | [
"private com.tangosol.coherence.Component get_Module()\n {\n return this.get_Parent();\n }",
"private com.tangosol.coherence.Component get_Module()\n {\n return this.get_Parent().get_Parent();\n }",
"public Module GetActiveModule()\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GIVEN that we've provisioned a device owner with skip user setup true | @SmallTest
public void testInitiallyDone_DeviceOwnerSkipUserSetup() {
final ProvisioningParams params = createProvisioningParams(ACTION_PROVISION_MANAGED_DEVICE,
true);
when(mSettingsFacade.isUserSetupCompleted(mContext)).thenReturn(false);
// WHEN calling markUserProvisioni... | [
"@SmallTest\n public void testInitiallyDone_DeviceOwnerDontSkipUserSetup() {\n final ProvisioningParams params = createProvisioningParams(ACTION_PROVISION_MANAGED_DEVICE,\n false);\n when(mSettingsFacade.isUserSetupCompleted(mContext)).thenReturn(false);\n\n // WHEN calling ma... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleConstDec" $ANTLR start "entryRuleVarDec" InternalDsl.g:1848:1: entryRuleVarDec returns [EObject current=null] : iv_ruleVarDec= ruleVarDec EOF ; | public final EObject entryRuleVarDec() throws RecognitionException {
EObject current = null;
EObject iv_ruleVarDec = null;
try {
// InternalDsl.g:1848:47: (iv_ruleVarDec= ruleVarDec EOF )
// InternalDsl.g:1849:2: iv_ruleVarDec= ruleVarDec EOF
{
... | [
"public final void entryRuleVarDec() throws RecognitionException {\n try {\n // InternalDsl.g:605:1: ( ruleVarDec EOF )\n // InternalDsl.g:606:1: ruleVarDec EOF\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getVarDecRule()); \n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor for TcUnidadEdoDTO class. | public TcUnidadEdoDTO(java.lang.Integer idEdo, java.lang.String idUnidad, java.lang.Integer uniEdoCiclo,
java.util.Date fecModifico, java.lang.String usuario) {
this.idEdo = idEdo;
this.idUnidad = idUnidad;
this.uniEdoCiclo = uniEdoCiclo;
this.fecModifico = fec... | [
"public TcUnidadEdoDTO() {\n }",
"public TdExpDatosNacimientoDTO() { }",
"public TdExpDatosNacimientoDTO( java.lang.Integer dnaSecuencia, java.lang.String idDocto, java.lang.String rfcEmpleado, int idExpRechazo, java.lang.String dnaDoctoRef, java.util.Date dnaFecNacimiento, java.lang.String dnaNombreEmpleado... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Merges the contents of a Wad file into a buffer. Symbol is caseinsensitive. | public Response mergeWad(String symbol, File wadFile) throws IOException
{
if (!wadFile.exists() || wadFile.isDirectory())
return Response.BAD_FILE;
if (!Wad.isWAD(wadFile))
return Response.BAD_WAD;
Wad buffer;
if ((buffer = currentWads.get(symbol)) == null)
return Response.BAD_SYMBOL;
... | [
"public Response mergeFile(String symbol, File inFile, String entryName) throws IOException\r\n\t{\r\n\t\tif (!inFile.exists() || inFile.isDirectory())\r\n\t\t\treturn Response.BAD_FILE;\r\n\r\n\t\tWad buffer;\r\n\t\tif ((buffer = currentWads.get(symbol)) == null)\r\n\t\t\treturn Response.BAD_SYMBOL;\r\n\r\n\t\tret... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
SiteViewSearchPath root path constructor | public SiteViewSearchPath(String locatorName)
{
this(locatorName, Folder.PATH_SEPARATOR, false, false, 0);
} | [
"public SiteViewSearchPath(String locatorName, String searchPath)\n {\n this(locatorName, searchPath, searchPath.matches(USER_PATH_PATTERN), principalSearchPath(searchPath), searchPathDepth(searchPath));\n }",
"public HttpServerPane(SitePane aSitePane)\n{\n _sitePane = aSitePane;\n \n WebSit... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Affecte aux etudiants tete en l'air les options pour egaliser les effectifs de l'affectation. | void affect() {
for (int d = 0; d < nbDays; d++) {
ArrayList<Option> notFull = new ArrayList<>();
for (Option o : options.get(d)) {
if (!o.isFull()) {
notFull.add(o);
}
}
affectOneDay(notFull, scatterbrainStudent);
}
} | [
"@Command\n\t@NotifyChange(\"datosMovimientosPendientes\")\n\tpublic void habilitarMontos() {\n\t\tfor (CtaCteEmpresaDetalleImputacion item : this.movimientosPendientes) {\n\t\t\tif (this.selectedMovs.contains(item) == true) {\n\t\t\t\titem.setSelected(true);\n\t\t\t} else {\n\t\t\t\titem.setMontoGs(0);\n\t\t\t\tit... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
sets hourlyWage attribute with double in textfield | private void setHourlyWage() {
this.hourlyWage = checkToDouble(hourlyWageTextField.getText());
} | [
"public void setHourlyWage(int hourlyWage){\n this.hourlyWage = hourlyWage;\r\n }",
"public void setWage(double w){ // begin setter\n \n wage = w; // set new wage\n \n }",
"public double getWage(){ // begin g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set states and/or makes an action of/on weapon Example: _done = _vehicle setWeaponState [true, , 0] | public native static boolean setWeaponState(GameObject oper1, java.util.List oper2); | [
"void setWeapon(Weapon weapon);",
"private void switchWeapon() {\n if (ePressed) {\n if (eStatus == 0) {\n if (weaponIndex < weaponName.length - 1) {\n weaponIndex++;\n } else {\n weaponIndex = 0;\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |