query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Return the bounding rectangle of this line. | public Rectangle getBounds() {
int xmin = (int) Math.round(Math.min(x1d, x2d));
int ymin = (int) Math.round(Math.min(y1d, y2d));
int w = (int) Math.round(Math.abs(x2d - x1d));
int h = (int) Math.round(Math.abs(y2d - y1d));
return new Rectangle(xmin, ymin, w, h);
} | [
"public Rectangle boundingBox() {\n return new Rectangle(adjustX(path.curPosition().x), adjustY(path.curPosition().y)\n , playerSideLength + 1, playerSideLength + 1);\n }",
"public Rectangle getBoundingRectangle()\n {\n return new Rectangle(x, y, image.getWidth(), image.getHeigh... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
////////////////////////////////////////////////////////////////////////////////////////////// CONSTRUCTORS // ////////////////////////////////////////////////////////////////////////////////////////////// | public SmartWallet(){
accounts = new ArrayList<>();
incomeCategories = new ArrayList<>();
expenseCategories = new ArrayList<>();
currency = Currency.EURO;
} | [
"@Override\n }",
"@Override\n public void extornar() {\n \n }",
"@Override\n \tpublic void init() {\n \n \t}",
"@Override\n protected void init()\n {\n\n }",
"@Override\r\n\tpublic void init() {\n\t \r\n\t}",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convert the given object to string with each line indented by 4 spaces (except the first line). | private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
} | [
"private String toIndentedString(Object o)\n/* */ {\n/* 607 */ if (o == null) {\n/* 608 */ return \"null\";\n/* */ }\n/* 610 */ return o.toString().replace(\"\\n\", \"\\n \");\n/* */ }",
"private String toIndentedString(Object o)\n/* */ {\n/* 164 */ if (o == null) {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test case number: 44 /Coverage entropy=1.5498260458782016 | @Test(timeout = 4000)
public void test044() throws Throwable {
XmlEntityRef xmlEntityRef0 = new XmlEntityRef((String) null);
// Undeclared exception!
try {
xmlEntityRef0.param((CharSequence) null, (CharSequence) null);
fail("Expecting exception: NullPointerException");
... | [
"@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"
]
]
}
} |
Retrieves the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal with full precision. | BigDecimal getBigDecimal(String columnName); | [
"BigDecimal getBigDecimal(String columnName) throws SQLException;",
"public java.math.BigDecimal readBigDecimal() throws SQLException {\n return (java.math.BigDecimal) getNextAttribute();\n }",
"BigDecimal getBigDecimal(int columnIndex, int scale)\n throws SQLException;",
"public BigDecimal get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public boolean isChildSelectable(int groupPosition, int childPosition) {
return true;
} | [
"@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"
]
]
}
} |
////////////////////////////////////////////////////////////////////////// private method ////////////////////////////////////////////////////////////////////////// replace fragment setting | private void replaceSetting() {
SettingFragment settingFragment = SettingFragment.getInstance();
replaceFragment(mFrameLayout.getId(), settingFragment);
} | [
"private void setFrag( Fragment f ){\n getFragmentManager().beginTransaction().replace( R.id.fragment, f ).commit();\n }",
"public void setFragment( boolean val ) {\n isFragment = val;\n }",
"private void SetFragment(Fragment fragment){\n FragmentTransaction ft = getSupportFragmentManager().beg... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This behavior encapsulates the work of the delegate components | public void displayMessage() {
String message = input.getMessage();
output.outputMessage(message);
} | [
"@Override public void componentShown(ComponentEvent e) { }",
"Component sender();",
"@Override\n public void store() {\n // Implemented by parent panel\n }",
"interface Delegate {\n\t\tvoid fileMoveUp(FileProxy proxy,StandardizedRoleProxy standardizedRoleProxy);\n\t\tvoid fileMoveDown(FileProxy ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public Stock getStockById(String empId) {
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"
]
]
}
} |
Run the int getMapx() method test. | @Test
public void testGetMapx_1()
throws Exception {
AiTask fixture = new AiTask(1, 1);
fixture.setType(AiTask.TaskType.ATTACK_UNIT);
fixture.setTargetIndex(1);
fixture.setPriority(1);
fixture.setAssignedIndex(1);
int result = fixture.getMapx();
// add additional test code here
assertEq... | [
"@Test\n\tpublic void testMapGetTileXFromCode() {\n\t\tGameController.startNewGame();\n\t\tMap testMap = GameController.getMap();\n\t\tint x = testMap.getTileCoordinateX(\"CL\");\n\t\tassertEquals(x, 0);\n\t}",
"public int getMapX() {\n return mapX;\n }",
"public int getMapCollisionXPoint();",
"@Test\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new form JPanel_verEntradaSalidaMercaderia | public Pan_VerEntradaSalida(int pCallType) {
initComponents();
setTittle(pCallType);
} | [
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanelCadastro = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
JFrame frame = new ConfirmationBO(); frame.show(); | public static void main(String [] args)
{
} | [
"public NewJFrame() {\n initComponents();\n result1.setVisible(false);\n }",
"public H_confirm() {\n initComponents();\n }",
"private JFrame createFrame() {\r\n\r\n\t\tframe = new JFrame(\"Jerboa \"+Parameters.VERSION);\r\n\t\tframe.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
write your code here | public static void main(String[] args) {
System.out.println("hello");
//create an object to class..
Main m =new Main();
size s =size.MEDIUM;
System.out.println(s);
Crust.cr c = Crust.cr.thick;
m.crust_type.add(c);
for(Crust.cr cc : m.crust_type) {
... | [
"void stuffForYouToDo() {\n\t\t// Write your code here...\n\t\t\n\t\t\n\t\t\n\t}",
"@Override\r\n\t\t\t\tvoid eval() {\r\n\r\n\t\t\t\t\t// YOUR CODE IN THIS SPACE\r\n\t\t\t\t}",
"private static void EX5() {\n\t\t\r\n\t}",
"@Override\n\tpublic void dosomethiing3() {\n\n\t}",
"@Override\n }",
"pu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the client VM identification. | public String getClientId() {
return clientId;
} | [
"@DISPID(1030) //= 0x406. The runtime will prefer the VTID if present\r\n @VTID(126)\r\n java.lang.String clientName();",
"public String getClientID() {\n Object ref = clientID_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
add some students to roster make Person p1, p2, p3, p4, p5 make Students s1, s2, s3, s4, s5 using the Persons roster.add(s1); etc. | public static void setupRosterAndRecords() {
Person p1 = new Person("Leo", "Messi");
Person p2 = new Person("Luis", "Suarez");
Person p3 = new Person("Gerard", "Pique");
Person p4 = new Person("Sergio", "Busquets");
Person p5 = new Person("Sergio", "Roberto");
Student s1 = new Student(p1, "CS", "SUNY");
... | [
"public void addStudents(student student1) {\r\n students.add(student1);\r\n }",
"public void tenStudent(){\n for (int i = 0; i < 10; i++) {\n students.add(new Student());\n }\n }",
"static List<User> generateStudents(int n) {\n\t\tArrayList<User> res = new ArrayList<>();\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to kill a random Uruk Hai, Captain not included | public void killRandomUrukHai() {
boolean kill = false;
while(kill == false){
UrukHai urukHai = getUrukHaiArmy().get(new Random().nextInt(getUrukHaiArmy().size()));
if(urukHai.isCaptain()) {
kill = false;
} else {
urukHai.setAlive(false... | [
"public void kill() {\n setHealth(0);\n remove();\n }",
"Completable scriptKill();",
"private void chooseWhoWillBeKilled(){\n int random = (int)Math.floor(Math.random()*killableCharacters.size());\n while (killableCharacters.get(random).getIsInPrison()){\n random = (int... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TextureTegion[] transformto1D method chande 2D Array to 1D | private TextureRegion[] transformTo1D( TextureRegion [][] tmp, int cols, int rows) {
TextureRegion [] frames = new TextureRegion[cols * rows];
int index = 0;
for (int i = 0; i < rows; i++) {
for (int j = 0; j < cols; j++) {
frames[index++] = tmp[i][j];
}
... | [
"public void convertTo1D(int [][] pixels2D){\n\t\tint index = 0;\n\t\tfor (int row=0; row<HEIGHT; row++){\n\t\t\tfor(int column=0; column<WIDTH; column++){\n\t\t\t\tpixels[index] = pixels2D[row][column];\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"Object copyTo1DJavaArray();",
"@SuppressWarnings(\"unchecked... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
path = convertS3toS3N(path); Fix for S3 kind of URL | @Override
public void importFiles(String path, String pattern, ArrayList<String> files, ArrayList<String> keys, ArrayList<String> fails, ArrayList<String> dels) {
if (isBareS3NBucketWithoutTrailingSlash(path)) {
path += "/";
}
Log.info("ImportHDFS processing (" + path + ")");
// List of process... | [
"public void setS3Path(S3Path s3Path) {\n this.s3Path = s3Path;\n }",
"private String streamS3(MultipartFile mpfile) throws IOException {\n byte[] bytes = mpfile.getBytes();\n AmazonS3 amazonS3 = buildCredetionals();\n try {\n String objectname = System.currentTimeMillis(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional int32 rank = 2; optional int32 rank = 2; | boolean hasRank(); | [
"public int getRank(){ //1-13\n return rank;\n }",
"public abstract int rank();",
"public int Get_rank()\n\t{\n\t\treturn (rank);\n\t}",
"public double getRank()\n {\n return rank;\n }",
"float getMaxRank();",
"public int getrank(){\r\n return this.rank;\r\n }",
"public ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
construct a webserver serving directory f on port p | public WebServer(File f, int p)
{
// save a copy of the port in an instance variable
port = p;
// create a FileServer to delegate to
fileServer = new FileServer(f, p);
// begin serving on the specified port
beginServing();
} | [
"public WebServer(File root, int port) {\n this.root = root;\n this.port = port;\n }",
"public MyHTTPServer(File rootDirectory, int port) throws IOException{\n\n\t\t\tif(!rootDirectory.isDirectory()){ /// if rootDirectory is not a directory throw an exception\n\t\t\t\tthrow new IOException(rootDi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Created by yzx on 2018/1/23. Description | public interface MusicAddressContract {
interface View{
/**
* 获取音乐Id
* @param id
*/
void getMusicAddress(String id);
}
interface Presenter{
/**
* 获取音乐Id
* @param id
*/
void getMusicAddress(String id);
}
interface... | [
"@Override\n protected String getDescription() {\n return DESCRIPTION;\n }",
"@Override\n public final String getDescription(){return descr;}",
"public String getDescription() { return description; }",
"@Override\r\n\tString getDescription() {\n\t\treturn description ;\r\n\t}",
"@Override\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Shows a toast to the user can be called from any thread, toast will be displayed using the UIthread. The important thing about the delayed aspect of the UIthread code used by this method is that it may actually run after the associated activity has been destroyed so it can not keep a reference to the activity. Calling ... | public static void toastOnUiThread(Activity activity, final int resId) {
toastOnUiThread(activity, activity.getString(resId));
} | [
"public void showToast() {\n\t\thandler.post(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tToast.makeText(getApplicationContext(), mes, Toast.LENGTH_LONG)\n\t\t\t\t\t\t.show();\n\t\t\t}\n\t\t});\n\n\t}",
"@AnyThread\n public static void toast(@Nullable Context context, @NonNull String message) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__TExportedInterface__OperationAssignment_8_1" $ANTLR start "rule__TExportedOperation__NameAssignment_4" ../eu.artist.tosca.dsl.ui/srcgen/eu/artist/tosca/dsl/ui/contentassist/antlr/internal/InternalToscaDSL.g:41820:1: rule__TExportedOperation__NameAssignment_4 : ( ruleNCName ) ; | public final void rule__TExportedOperation__NameAssignment_4() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../eu.artist.tosca.dsl.ui/src-gen/eu/artist/tosca/dsl/ui/contentassist/antlr/internal/InternalToscaDSL.g:41824:1: ( ( ruleNCName ) )
... | [
"public final void rule__Import__NameAssignment_5() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOperationDsl.g:21883:1: ( ( RULE_ID ) )\n // InternalOperationDsl.g:21884:2: ( RULE_ID )\n {\n // Inte... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method returns true if hash table is empty otherwise false | @Override
public boolean isEmpty() {
return size == 0;
} | [
"public synchronized boolean fempty( ) \n\t{\n\t\treturn table.isEmpty( ); \n\t}",
"private boolean isToofull(){\r\n\t //compute total number of indexes that are not null in hash table\r\n\t\tdouble numLoaded = 0;\r\n\t\tfor(int i = 0; i < tableSize; i++){\r\n\t\t\tif(table[i] != null){\r\n\t\t\t\tnumLoaded++... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional .de.tubs.androidlab.instameet.server.protobuf.CreateAppointment createAppointment = 5; | public de.tubs.androidlab.instameet.server.protobuf.Messages.CreateAppointmentOrBuilder getCreateAppointmentOrBuilder() {
return createAppointment_;
} | [
"Meeting createMeeting();",
"private void createNewAppointment() {\n String date = dateField.datePicker.getText();\n String time = dateField.timePicker.getText();\n String reason = reasonField.getText();\n\n vetPortal.getVetDatabase().open();\n Boolean createTF = vetPortal.creat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
set if violator was in a work zone | public void setWorkZone(boolean workZone)
{
this.workZone = workZone;
} | [
"public void setDelegateBy(Worker w) {\n if (getSuperior().getMyWorkers().contains(w)) {\n if (getColleagues().contains(w) && w.isOnVacation()) { \n this.w = w; \n }\n }\n }",
"public void setVacation() {\n workStatus = true;\n }",
"pu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the value of the fragment attribute. | public String getFragment() {
return fragment;
} | [
"String getFragValue(String fragName);",
"public Fragment getFragment() {\n return fragment;\n }",
"@Override\r\n public String getFragment() {\r\n if(this.rawUrl == null) {\r\n return \"\";\r\n }\r\n this.fragment = this.rawUrl.split(\"#\")[1];\r\n\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
remove element from array at index | public void remove(int index) throws Exception{
if(index > this.size-1 || index < 0){
throw new Exception("ArrayIndexOutOfBound");
}
for(int i=index; i<size-1; i++){
a[i]=a[i+1];
}
this.size--;
//if size is less than half of the array length then reduce the size to half;
if(size < length/2){
reduce... | [
"@NotNull\n public static <T> T[] remove ( @NotNull final T[] array, final int index )\n {\n final T[] newArray = createArray ( array, array.length - 1 );\n int mod = 0;\n for ( int i = 0; i < array.length; i++ )\n {\n if ( i == index )\n {\n mo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get all the customOrders. | Page<CustomOrder> findAll(Pageable pageable); | [
"@Override\n\tpublic List<OrdersBean> getAllOrders() {\n\t\treturn null;\n\t}",
"public abstract List<Order> getAllOrders();",
"@Override\n\tpublic List<Orders> get_orders() {\n\t\treturn OrdersMapper.get_orders();\n\t}",
"@Override\n\tpublic List<Orders> getOrders() {\n\t\treturn sessionfactory.getCurrentSes... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
JSONObject jsonObj = new JSONObject(formwfgetJson); | @ApiOperation(value = "查询表单以及流程配置信息", notes = "查询表单以及流程配置信息")
@RequestMapping(value = "/getForm1wf", method = { RequestMethod.GET, RequestMethod.POST })
@ResponseBody
public HbmentAjaxIo getForm1wf(@ApiParam("id") @RequestParam int id) throws JSONException, SQLException { JSONObject jsonObj = new JSONObject(formwfge... | [
"public JSONObject toJSONObject();",
"JSONObject data();",
"public JsonObject getFormBodyAsJsonObject();",
"public static JSONObject buildJSobjectFromString(String data){\n JSONObject jsonObject=null;\n try {\n jsonObject = new JSONObject(data);\n }catch (Throwable t){\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Proposes a superblock to SyscoinClaimManager in order to keep the Sysethereum contracts updated. | @SuppressWarnings("UnusedReturnValue")
public boolean sendStoreSuperblock(Superblock superblock, String account) throws Exception {
BigInteger processCounter = claimContractApi.getProcessCounter();
if(processCounter.compareTo(BigInteger.TEN) == 0){
logger.info("Superblock {} not sent bec... | [
"public synchronized void format(int numInodes)\r\n {\r\n byte[] superBData = new byte[Disk.blockSize];\r\n this.totalBlocks = 1000;\r\n this.totalInodes = numInodes;\r\n \r\n \r\n this.freeList = ((this.totalInodes * 32) / Disk.blockSize) + 2;\r\n \r\n // ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Moves the player down one tile in the world, if the movement is allowed. | public boolean moveDown() {
if (canMove(0, -1)) {
move(0, -1);
return true;
}
return false;
} | [
"public void moveDown() {\n\t\tTile down = tiles[startx + 5][starty + 5];\n\t\tif (!isPassable(down.tileType) && isMineable(down.tileType) && Math.abs(deltaX) < 0.5\n\t\t\t\t&& Math.abs(deltaY) < 0.1) {\n\t\t\tdigTile = down;\n\t\t\tdiggingDirection = 3;\n\t\t\tdigging = dig(digTile, diggingDirection);\n\t\t\tship.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns Response containing datatype, captured string and index upto which data was read | public static Response parse(String str) {
Map<String, String> configMap = generateDefaultConfig();
return getResponse(str, configMap);
} | [
"com.google.protobuf.ByteString getResponse(int index);",
"private void handleResponse( byte[] data, int numRead) throws IOException {\n\n\t\tint i = 0 ;\n\t\t//System.out.println(\"read \" + numRead);\n\t\tdo {\n\n\t\t\t//System.out.println(\"start \" + i);\n\n\t\t\tbyte type = (byte) ((data[i] & 0xff) >> 4);\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Ontology term identifier the CURIE for an ontology term. It differs from the standard GA4GH schema's :ref:`id ` in that it is a CURIE pointing to an information resource outside of the scope of the schema or its resource implementation. | @ApiModelProperty(value = "Ontology term identifier - the CURIE for an ontology term. It differs from the standard GA4GH schema's :ref:`id ` in that it is a CURIE pointing to an information resource outside of the scope of the schema or its resource implementation.")
public String getTermURI() {
return termU... | [
"@ApiModelProperty(value = \"CURIE-encoded identifier of concept \")\n public String getId() {\n return id;\n }",
"@Override\n public String toStringID() {\n return owl2Datatype.getIRI().toString();\n }",
"public String getReferencedTerminologyId();",
"@RdfProperty(\"http://www.coadunation.n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the specified service object for a service. | public Object getService(ServiceReference sref)
{
return osgicontainer.getService(sref);
} | [
"public Object getService(String service);",
"<T> T getService(Class<T> serviceClass, String serviceName);",
"public static Service getServiceById(String serviceId){\n\t\tfor(Service service : services){\n\t\t\tif(service.getServiceId().equals(serviceId)){\n\t\t\t\treturn service; \n\t\t\t}\n\t\t}\n\t\treturn n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to click loggOff button | public static void clickLogOff() {
homeSearchPage.identifyLogOffbutton().click();
logger.info("Clicked on LogOff button");
} | [
"public void clickLogoutBtn() {\r\n logoutBtn().click();\r\n }",
"public void logoff()\r\n\t{\r\n\t\twait.until(ExpectedConditions.visibilityOf(logoff_expand));\r\n\t\t\r\n\t\tTestBase.javaScriptClickbyElement(driver, logoff_expand);\r\n\t\t//logoff_expand.click();\r\n\t\twait.until(ExpectedConditions.v... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Attaches label to new corner. | void setCorner(Corner corner); | [
"abstract Label reattachPoint();",
"CanvasFigure makeLabel(Point2D.Double pos, String text, Paint color, Font font);",
"private final void updateLabelLocation() {\r\n textLabel.setPosition(model.getX() + model.getNameXOffset(), model.getY() + model.getNameYOffset());\r\n }",
"private void setupLabel... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
allow one unit to attack another | void takeDamage( double damage); | [
"void attackedByArcherUnit(ArcherUnit archerUnit);",
"public void setAttackingUnit(Unit unit)\n\t{\n\t\tattackingUnit = unit;\n\t}",
"public void attack(Unit unit)\r\n\t{\r\n\t\tunit.getAttackType().attack(unit, game.getSide(owner), game.getSide(owner.otherPlayer()));\r\n\t\tresetCountdown(unit);\r\n\t\tupdate(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
string password = 4; | public com.google.protobuf.ByteString
getPasswordBytes() {
java.lang.Object ref = password_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
... | [
"private String getPassWord(String m)\n{\n String l=m.substring(0,1);// first char provides the length of password\n int length=Integer.parseInt(l);// next length characters will be password\n return m.substring(1,(0+length+1));// the password is those many characters\n}",
"public String getUser... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ access modifiers changed from: private / access modifiers changed from: public | private native boolean nativeInputDataChannelDeleteBackward(long j, int i); | [
"@Override\n }",
"protected void method_5557() {}",
"@Override\r\n public void publicando() {\n }",
"private Propriedades() {\r\n\t}",
"@Override\n public void extornar() {\n \n }",
"private InternalReflect() {\n\t\t\t// do nothing\n\t\t}",
"protected void method_2117() {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The region the interface should be deployed to. | @javax.annotation.Nullable
@ApiModelProperty(example = "ashburn-va", value = "The region the interface should be deployed to.")
@JsonProperty(JSON_PROPERTY_REGION_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getRegionCode() {
return regionCode;
} | [
"public static String getRegion() {\r\n\t\treturn region;\r\n\t}",
"public java.lang.String getRegion() {\n return region;\n }",
"public Region getApplicableRegion() {\n\t\treturn region;\n\t}",
"public Region getRegion() {\r\n\t\treturn region;\r\n\t}",
"public String getCurrentRegion() {\r\n re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
static method to create the object Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable If this object is not an element, it is a complex type and the reader is at the event just after the outer start element Postcondition: If t... | public static TabType parse(javax.xml.stream.XMLStreamReader reader)
throws java.lang.Exception {
TabType object = null;
// initialize a hash map to keep values
java.util.Map attributeMap = new java.util.HashMap();
java.util.List extraAttr... | [
"public static RetstartE parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n RetstartE object =\n new RetstartE();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.Strin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
create value expression for getting a value by field name | public ValueExpression(String fieldName) {
this.setFieldName(fieldName);
} | [
"XExpression getValueExpression();",
"public JRExpression getValueExpression();",
"VALUE getFieldDynamic(String key, VALUE container);",
"String getValue(String attributeName);",
"public Object getValue(String name) ;",
"NewExpression getValue1();",
"Builder<R> field(String fieldName);",
"public Expre... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Confirm previousIndex after adding a element | @Test
public void testAddElementWithPreviousIndex() throws Exception {
ListIterator<CvParam> it = cvList.listIterator();
CvParam cv = new CvParam();
cv.setAccession("addedCV1");
it.add(cv);
assertEquals(-1, it.previousIndex());
} | [
"@Override\n\t\t\t\t\t\tpublic int previousIndex() {\n\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t}",
"public int previousIndex(){\n return index -1;\n }",
"@Override\n public int previousIndex() {\n if (hasPrevious())\n return index - 1;\n else\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Finds available schedules that meet the specified criteria. You can search for an available schedule no more than 3 months in advance. You must meet the minimum required duration of 1,200 hours per year. For example, the minimum daily schedule is 4 hours, the minimum weekly schedule is 24 hours, and the minimum monthly... | @Override
public DescribeScheduledInstanceAvailabilityResult describeScheduledInstanceAvailability(DescribeScheduledInstanceAvailabilityRequest request) {
request = beforeClientExecution(request);
return executeDescribeScheduledInstanceAvailability(request);
} | [
"public interface Scheduling {\n public List<Contract> makeSchedule( FindWorkCriteria findWorks,\n FindOperationCriteria findOperations,\n FindWorkerCriteria findWorkers );\n}",
"com.google.cloud.gaming.v1alpha.Schedule getSchedules(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column biz_user.update_by | public String getUpdateBy() {
return updateBy;
} | [
"public BigDecimal getUpdateBy() {\n\t\treturn updateBy;\n\t}",
"@AutoEscape\n\tpublic String getUpdated_By();",
"public UserInfo updatedBy() {\n return this.innerProperties() == null ? null : this.innerProperties().updatedBy();\n }",
"public UserEntity getUpdatedBy()\r\n\t{\r\n\t\treturn updatedBy;... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Loads bundlers from the METAINF/services direct | @Override
public void loadBundlersFromServices(ClassLoader cl) {
ServiceLoader<Bundler> loader = ServiceLoader.load(Bundler.class, cl);
for (Bundler aLoader : loader) {
bundlers.add(aLoader);
}
} | [
"private void loadSystemBundles()\n\t{\n\t\tIPluginModelBase[] externalModels = PluginRegistry.getExternalModels();\n\t\tList<PluginModelBaseWrapper> lModels = new ArrayList<PluginModelBaseWrapper>();\n\t\tif (externalModels != null && externalModels.length > 0)\n\t\t{\n\t\t\tmodels = new PluginModelBaseWrapper[ext... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves the double value of the datum contained in the specified location. If the specified location does not contain a double value or empty, default value is returned. | public double getDouble(int location, double defaultVal) {
String val = getString(location).trim();
try {
defaultVal = nf.parse(val).doubleValue();
}
catch (ParseException e) {
try {
defaultVal = Double.valueOf(val).doubleValue();
}
... | [
"public double readDouble(String where) {\n if (!contains(where)) {\n return DEFAULT_DOUBLE_VALUE;\n }\n return Double.longBitsToDouble(readLong(where));\n }",
"double getDoubleValue(Object value);",
"public Double getDouble(String key) throws UsageException {\n String valu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Camera flash controller interface. | public interface FlashController extends Component
{
/**
* Property to get or set flash mode for primary camera.
*/
PropertyKey<FlashMode> PROP_FLASH_MODE = new PropertyKey<>("FlashMode", FlashMode.class, FlashController.class, PropertyKey.FLAG_NOT_NULL, FlashMode.OFF);
/**
* Read-only property to check whethe... | [
"private void flashAc() {\n \tif (camera == null || params == null) {\n\t\t\treturn;\n\t\t}\n\t\t// play sound\ntry {\n\t\n\n\t\tparamsCam = camera.getParameters();\n\t\tparamsCam.setFlashMode(Parameters.FLASH_MODE_TORCH);\n\t\tcamera.setParameters(paramsCam);\n\t\tcamera.startPreview();\n\t\tflashAcikMi = true;... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
protected void startResultActivity(String result) {
Intent intent = new Intent(this, ResultActivity.class);
intent.putExtra(ResultActivity.RESULT, result);
startActivity(intent);
} | [
"@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"
]
]
}
} |
Open admin GUI vote sites. | public void openAdminGUIVoteSites(Player player) {
BInventory inv = new BInventory("VoteSites");
int count = 0;
for (VoteSite voteSite : plugin.voteSites) {
ArrayList<String> lore = new ArrayList<String>();
lore.add("Priority: " + voteSite.getPriority());
lore.add("ServiceSite: " + voteSite.getServ... | [
"public void doManageSites() {\r\n EditSitePane edit = new EditSitePane(imanager);\r\n edit.showInDialog(this);\r\n }",
"public static void main(String[] args) {\n VotingMachine vm=new VotingMachine();\r\n vm.voting();\r\n\t}",
"public void openAdminPageUI() {\n new AdminPa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated string RepeatedStringField = 8; | public java.util.List<java.lang.String> getRepeatedStringFieldList() {
return java.util.Collections.unmodifiableList(result.repeatedStringField_);
} | [
"public Builder addRepeated(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureRepeatedIsMutable();\n repeated_.add(value);\n onChanged();\n return this;\n }",
"@Validate\r\n public static String repeat(@NotNull final... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates TaskView scaling and translation required to support variable width. | private void updateTaskSize() {
updateTaskSize(false);
} | [
"@Override\n public void updateScale(float verticalDragOffset) {\n layoutParams.width = (int) (getOriginalWidth() * (1 - verticalDragOffset / getXScaleFactor()));\n layoutParams.height = (int) (getOriginalHeight() * (1 - verticalDragOffset / getYScaleFactor()));\n\n getView().setLayoutParams... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public Integer findIdNivelByPuntaje(int puntaje) {
return nivelMapper.findIdNivelByPuntaje(puntaje);
} | [
"@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"
]
]
}
} |
Connect to DistributedEtalis instance 1. | public static void main(String[] args) throws RemoteException,
NotBoundException, Exception {
PAComponentRepresentative root1 = Fractive.lookup(URIBuilder.buildURI(args[0], args[1], "rmi", 1099).toString());
testApiI1 = ((eu.play_project.dcep.distributedetalis.api.DistributedEtalisTestApi) root1.getFcInterfac... | [
"public void connectHost() throws Exception {\r\n con = new Connections();\r\n ipcon = new IPConnection();\r\n p = new MQTTParameters();\r\n tinkerforg = new BrickletTemperature(UID, ipcon);\r\n ////////////////// EDIT HERE > IP ///////////////////\r\n ipcon.connect(con.get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__MoveRight__Group__0" $ANTLR start "rule__MoveRight__Group__0__Impl" InternalBoundingBox.g:488:1: rule__MoveRight__Group__0__Impl : ( 'right' ) ; | public final void rule__MoveRight__Group__0__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalBoundingBox.g:492:1: ( ( 'right' ) )
// InternalBoundingBox.g:493:1: ( 'right' )
{
// InternalBoundingBox.g:493... | [
"public final void rule__TurnoutEndLocation__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalRailLinesMap.g:1121:1: ( rule__TurnoutEndLocation__Group__2__Impl )\n // InternalRailLinesMap.g:1122:2: rule__TurnoutEnd... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public boolean findPaperProxyByName(String paperproxy_name) {
if (paperProxyMapper.findByName(paperproxy_name) != null) {
return true;
}
return false;
} | [
"@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"
]
]
}
} |
Run the byte hw1_1000000LOC2method2(short,float,String) method test. | @Test
public void testHw1_1000000LOC2method2_1()
throws Exception {
short var0 = (short) 1;
float var1 = 1.0f;
String var2 = "";
byte result = hw1_1000000LOC2.hw1_1000000LOC2method2(var0, var1, var2);
// add additional test code here
// An unexpected exception was thrown in user code while executing th... | [
"@Test\n\tpublic void testHw1_1000LOC2method0_1()\n\t\tthrows Exception {\n\t\thw1_1000LOC2 fixture = new hw1_1000LOC2();\n\t\tfixture.f3 = 1.0;\n\t\tfixture.f2 = new long[] {};\n\t\tfixture.f0 = 1.0;\n\t\tfloat var0 = 1.0f;\n\t\tbyte var1 = (byte) 1;\n\t\thw1_1000LOC15 var2 = new hw1_1000LOC15();\n\t\tdouble var3 ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the surfaceRoughness property. | public float getSurfaceRoughness() {
return surfaceRoughness;
} | [
"public Surface getRhoSurface() {\n return rhoSurface;\n }",
"public double getSurfaceArea()\n {\n return getArea() / 2;\n }",
"public double getSurfaceArea()\n {\n return 2 * Math.PI * radius * (height + radius);\n }",
"public double getSurfaceArea(){\n\treturn ((_height * _leng... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the value of the 'Name' attribute. If the meaning of the 'Name' attribute isn't clear, there really should be more of a description here... | String getName(); | [
"@Override\n\tpublic String getName() {\n\t\treturn _name.getAttribute();\n\t}",
"public String getNameAttribute() {\n\t\treturn getAttribute(\"name\");\n\t}",
"public String getName()\n {\n return (String)(name.value);\n }",
"public String getName()\n {\n return this.elem.getAt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Se utiliza el producto | synchronized public String ConsumirRuedas(){
String Ruedas = ARuedas[PLlena]; //Se obtiene el objeto en la posicion llena
ARuedas[PLlena] = null;
PLlena = (PLlena+1)%ARuedas.length; //Mueve el apuntador a la proxima posicion que tenga algo (llena)
return Rue... | [
"public IngresarProductos() {\n initComponents();\n bloqueartextosIniciar();\n bloquearbotonesGuardar();\n }",
"public void obtenerProductos();",
"public static void asuntoproductos(){\n cerrar(); //HASTA ACA ESTÁ BIEN\n ControlProducto cpp = new ControlProducto(prod); ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional uint32 role = 3; | public Builder clearRole() {
bitField0_ = (bitField0_ & ~0x00000004);
role_ = 0;
onChanged();
return this;
} | [
"public int getRole()\r\n {\r\n return this.role;\r\n }",
"public interface UserRole {\n int BUYER = 0;\n int SELLER = 1;\n}",
"public String getRole() { return role; }",
"public int getRole() {\n return role_;\n }",
"public void setRole(Role role){ this.role = role; }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | public static void main(String[] args) {
Humano humano = new Humano(1, "juan");
System.out.println(humano.Greting("buenos días"));
} | [
"@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 int getHttpMode() {
return 0;
} | [
"@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"
]
]
}
} |
Test of directedKGraph method, of class GraphUtils. | @DisplayName("Test if the generated graph is a directed k-graph")
@Test
public void testDirectedKGraph() {
// Disabled
// int shape = 100;
// Graph result = GraphUtils.directedKGraph(shape, 6);
// Assertions.assertEquals(GraphType.KGRAPH, result.getType());
// Assertions.asse... | [
"@Test\n\tpublic void testSmallGraph() {\n\t\tDiGraphNode<Integer> x = new DiGraphNode<Integer>(1); \n\t\tDiGraphNode<Integer> y = new DiGraphNode<Integer>(2);\n\t\t\n\t\tassertFalse(x.pathTo(y));\n\t}",
"@Test\n void testOneNodeGraph(){\n directed_weighted_graph g = new DWGraph_DS();\n node_data... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get user phone number | private String getUserPhone() {
SharedPreferences personPref = getSharedPreferences(NAME_PREF_FILE, MODE_PRIVATE);
return personPref.getString(USER_NUMBER, "");
} | [
"public String getUserPhoneNumber() {\n\t\treturn phoneNumber;\n\t}",
"public String getPhoneNum() {\n TelephonyManager tMgr = (TelephonyManager) getContext().getSystemService(Context.TELEPHONY_SERVICE);\n if (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.READ_SMS) != PackageM... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test ensuring that if an async exception is caught for one of the flushed requests on checkpoint, it should be rethrown; we set a timeout because the test will not finish if the logic is broken. Note that this test does not test the snapshot method is blocked correctly when there are pending records. The test for that ... | @SuppressWarnings("unchecked")
@Test(timeout = 5000)
public void testAsyncErrorRethrownOnCheckpointAfterFlush() throws Throwable {
final DummyFlinkKafkaProducer<String> producer =
new DummyFlinkKafkaProducer<>(
FakeStandardProducerConfig.get(),
... | [
"@Test(expected = AssertionError.class, timeout=5000)\n\tpublic void testAtLeastOnceProducerFailsIfFlushingDisabled() throws Throwable {\n\t\trunAtLeastOnceTest(false);\n\t}",
"@Test(timeOut = 10_000)\n public void testTimestampOraclePanicsWhenTheStorageHasProblems() throws Exception {\n timestampOracle... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return an array of Integer[], containing the line number(s) where the keyword was found in the specified file(identified by it's id) If a keyword is on the same line twice, that line number will be in the array twice | public Integer[] getResultsForId(String id)
{
if(results.get(id) == null)
return new Integer[0];
return (Integer[])((Vector)results.get(id)).toArray(new Integer[0]);
} | [
"void readIdList(){\n String fineName = \"_id.txt\"; \n try {\n \t BufferedReader in = new BufferedReader(new FileReader(fineName));\n \t String str;\n \t g_nArticles=0;\n \t while ((str = in.readLine()) != null){\n \t \tmapId2Theta.put(str,new double[100]);\n \t ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO description this controller return list account of group by groupId | @GetMapping(value = Constants.Url.GroupAccountUrl.GET_LIST_ACC_OF_GROUP_NO_PAGING)
public ResponseEntity<?> getListAccountOfGroup(
@RequestParam(name = Constants.Param.ID, defaultValue = Constants.Common.EMPTY_STRING) int groupId) {
// validate param not exists
if (!groupService.checkGroupExists(groupI... | [
"public JsonArray getUsersByGroupId(String groupId) {\n JsonArray result = null;\n String apiGroupUsers = API_BASE_URL + \"groups/\" + groupId +\"/users\";\n try {\n result = Ion.with(App.getContext())\n .load(apiGroupUsers)\n .addHeader(\"Author... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the 'LinkHref' field. | public void setLinkHref(java.lang.String value) {
this.LinkHref = value;
} | [
"@objid (\"3a9d17a1-4b2f-413c-8b2b-769c8e228aa4\")\n void setHyperLink(MRef ref);",
"public void setHRef(String href) {\r\n addAttribute(\"HREF\", href);\r\n }",
"public void setLink(java.lang.String link)\n {\n synchronized (monitor())\n {\n check_orphaned();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the default service scopes. | public static List<String> getDefaultServiceScopes() {
return DEFAULT_SERVICE_SCOPES;
} | [
"public static List<String> getDefaultServiceScopes() {\n return GlobalForwardingRuleStubSettings.getDefaultServiceScopes();\n }",
"public String getScopes() {\n return String.join(\" \", SCOPES);\n }",
"public List<String> googleOAuthScopes() {\n return this.innerProperties() == null ? null : th... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
///////////////////////////////////////////////////// /INFORMATION EXTRACTORS FOR ANNOTATION //////////////////////////////////////////////////// / MM : works | public int getSumMM(SAMRecord fw,SAMRecord rw) {
return calcMM(fw)+calcMM(rw);
} | [
"ParserInfo info();",
"String getTextinformation();",
"public TextInfo getTextInfo();",
"@MA1.MA1_1.MA1_1_1.MA1_1_1_1.MA1_1_1_1_1.MA1_1_1_1_1_1.MA1_1_1_1_1_1_1.iiii public void test_9() {\n @MA1.MA1_1.MA1_1_1.MA1_1_1_1.MA1_1_1_1_1.MA1_1_1_1_1_1.MA1_1_1_1_1_1_1.iiii(blackMarker = @MA1.MA1_1.MA1_1_1.MA1... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
end print this is the transpose part. Essentially you will be flipping the width and height values | public static int[][] transposeMatrix(int[][] array, int oldWidth, int oldHeight){
int[][] transposeArray = new int[oldHeight][oldWidth]; //create a new array call transposed array
for (int i=0; i< oldHeight; i++){ //same format
for(int j=0; j<oldWidth; ... | [
"public void transpose() {\n float t;\n for (int i = 0; i < 4; i++) {\n for (int j = 0; j < i; j++) {\n t = get(i, j);\n set(i, j, get(j, i));\n set(j, i, t);\n }\n }\n }",
"public void transpose() {\r\n\t\tfor(int i=0;i<dimension-1;i++) {\r\n\t\t\tfor(int j=i+1;j<dimensio... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function: getTolRainfall() Author: Yanlin Li Description: get total rainfall for the list Parameters: | public float getTolRainfall()
{
if(this.size == 0)
{
System.out.println("WeatherList is empty, please enter some data");
return -1f;
}
return tolRainfall;
} | [
"public int setRainfall(Float rainfall) {\n try {\n setRainfall(rainfall.floatValue());\n } catch (Exception e) {\n setRainfallError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return rainfallError;\n }",
"public int setRainfall(String rainfall) {\n try {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the base year to be used by in the simulation. | public int setModelBaseYear(int whichBaseYear)
{
this.whichBaseYear=whichBaseYear;
return this.whichBaseYear;
} | [
"public void setYear(int year) {\n super.setYear(year);\n updateConstants();\n }",
"public void setYear(int y);",
"public void setYear(int y){\r\n year = y;\r\n }",
"public com.alibaba.dts.formats.avro.DateTime.Builder setYear(java.lang.Integer value) {\n validate(fields()[0], value);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
end Vishal Yevale mayuri edhara :: for getting the GiftCardBalance | public static Object getGCSwipeResponse(IRepositoryManager theMgr){
String error_message = "All the Ajb Servers are down at the moment";
Object giftCardSwipeRequest = null;
Object giftCardSwipeResponse = null;
AJBGiftCardFormatter giftCardFormatter = new AJBGiftCardFormatter();
giftCardSwipeRequest =... | [
"int getCurrentBalance();",
"double getCrtbalance();",
"double getDbtbalance();",
"public int getBalance() \n {\n return balance;\n }",
"double getBalance(int accId);",
"public static double getbalance(){ \r\n return balance; ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column business.biz_english_name | public void setBizEnglishName(String bizEnglishName) {
this.bizEnglishName = bizEnglishName;
} | [
"void setBusinessName(au.gov.asic.types.DistinguishedNameType businessName);",
"public Builder setBusinessName(\n java.lang.String value) {\n if (value == null) { throw new NullPointerException(); }\n businessName_ = value;\n bitField0_ |= 0x00000001;\n onChanged();\n return this;\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new form StatisticsPanel | public StatisticsPanel(LinesMap lines, Parser parser) {
//Initialize components
initComponents();
//Create a new processor
this.processor=new Processor();
//Add the lines to the processor
this.processor.setLines(lines);
//Set the parser
this.parser=pars... | [
"private void makeStatPanel() {\n Alert alert = new Alert(AlertType.INFORMATION);\n alert.setTitle(\"Statistics Panel\");\n alert.setHeaderText(\"Loading...\");\n alert.setContentText(\"The Statistics are being processed. \" +\n \"\\nPlease be patient.\" +\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method initializes jButton | private JButton getLoadPropertiesButton() {
if (loadPropertiesButton == null) {
loadPropertiesButton = new JButton();
loadPropertiesButton.setText("Load/Create Configuration");
loadPropertiesButton.setToolTipText("Click to load the specified Codegen configuration properti... | [
"private void initJButtons() {\n\t\tstart = new JButton(\"Start\");\n\t\tstart.setFont(font);\n\t\tstart.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\ttry {\n\t\t\t\t\tstartButtonEvent(evt);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t// TODO Auto... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Nils the "ActivityDescriptionText" element | public void setNilActivityDescriptionText()
{
synchronized (monitor())
{
check_orphaned();
gov.niem.niem.niem_core._2_0.TextType target = null;
target = (gov.niem.niem.niem_core._2_0.TextType)get_store().find_element_user(ACTIVITYDESCRIPTIONTEXT$0, 0);
... | [
"public void clearDescription() {\n RawMessageTextPane.setDocument(new SyntaxDocument());\n RawMessageTextPane.setText(\"Select a message to view the raw message.\");\n TransformedMessageTextPane.setDocument(new SyntaxDocument());\n TransformedMessageTextPane.setText(\"Select a message t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
private function that inserts a row into a table that links pills and alarms | private long createPillAlarmLink(long pill_id, long alarm_id) {
SQLiteDatabase db = this.getWritableDatabase();
ContentValues values = new ContentValues();
values.put(TABLE_PILLS_ALARMS_LINKS.COL_PILL_TABLE_ID , pill_id);
values.put(TABLE_PILLS_ALARMS_LINKS.COL_Alarm_TABLE_ID , alarm_id... | [
"public void insertRow() {}",
"void insert(IrpSchedule record) throws SQLException;",
"void insertRow() throws SQLException;",
"@Override\r\n\tpublic void insertRow() {\n\t\t\r\n\t}",
"int insert(TradeDailyAchievement record);",
"int insert(PointLotteryActivityRecordDO record);",
"@Override\n\tpublic vo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Delete a specific Published band | public int deleteByProductNameLayerId(String sProductName, String sLayerId) {
try {
DeleteResult oDeleteResult = getCollection(m_sThisCollection).deleteOne(Filters.and(Filters.eq("productName", sProductName), Filters.eq("layerId", sLayerId)));
if (oDeleteResult != null)
... | [
"@Override\n\tpublic void deleteAlbum(Album album) {\n\t\tList<ServerObjectClass> servers = this.findServer(album.getName());\n\t\tServerObjectClass s = servers.get(random.nextInt(servers.size()));\n\t\tif(s!= null){\n\t\t\tif(s.getServer().deleteAlbum(album.getName())){\n\t\t\t\t//System.out.println(\"Deleting\");... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Default constructor. Builds a new board of size NxN. | public Board() {
this.board = new int[N][N];
} | [
"public Board() {\n this(DEFAULT_BOARD_SIZE);\n }",
"public Board(int size) {\r\n\t\tboard = new PuzzlePiece[size][size];\r\n\t}",
"public Board () {\r\n\t\t// Initialize the rows of the board grid using rows\r\n\t\tfor(int row = 0; row < NUM_ROWS; row++) { \r\n\t\t\tfor(int column = 0; column < NUM_COLS; c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Created by wanghuidong on 2018/5/8. | @Component(value = "workFlowMapper")
public interface WorkFLowMapper {
void save(WorkFlow workFlow);
} | [
"@Override\n public void extornar() {\n \n }",
"@Override\n }",
"@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"private static void EX5() {\n\t\t\r\n\t}",
"@Override\n public int utilite() {\n ret... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Define o valor da propriedade cumw50. | public void setCumw50(boolean value) {
this.cumw50 = value;
} | [
"public void setCumulative_fund(int c_fund) {\r\n this.cumulative_fund = c_fund;\r\n }",
"public int getValue050() {\n return value050_;\n }",
"private void precioConsumo() {\r\n\t\tswitch (this.consumoEnergetico) {\r\n\t\t\r\n\t\tcase 'A':\r\n\t\t\tthis.precioFinal +=100d;\r\n\t\t\tbreak;\r\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / | public <T> T[] toArray(T[] paramArrayOfT) {
/* 176 */ int i = size();
/* */
/* */
/* 179 */ T[] arrayOfT = (T[])((paramArrayOfT.length >= i) ? (Object)paramArrayOfT : Array.newInstance(paramArrayOfT.getClass().getComponentType(), i));
/* 180 */ Iterator<E> iterator = iterator();
/* */ ... | [
"private static void EX5() {\n\t\t\r\n\t}",
"protected void method_5557() {}",
"protected int snapBits(){return 9;}",
"public int getSize() { return 3+length;}",
"void mo8166KB();",
"@Override\n public long fbeSize() { return 4; }",
"@Override\nint nooftyres() {\nreturn 0;\n}",
"int getSize() {\r\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Esse metodo retorna um usuario do banco de usuarios | public Usuario pegaUsuario(String loginUsuario)throws SteamException{
if(containUsuario(loginUsuario)){
return usuarios.get(loginUsuario);
}else{
throw new LogicaException("Usuario nao existe");
}
} | [
"Utilisateur findUser(int id);",
"@Override\n\tpublic usuario getUser(String email) {\n\t\tgetConnection();\n\t\treturn usuarioPer.getUser(email);\n\t}",
"public Usuario obtenerPorUsuario(String usuario) throws ExcepcionFlujo;",
"@Override\n\tpublic Usuario getUserById(int id) {\n\t\treturn userRepository.fin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by Abator for iBATIS. This method returns the value of the database column edu_sys_dictionary.dictionary_code | public String getDictionaryCode() {
return dictionaryCode;
} | [
"public String getCode() {\n\t\treturn accessDao.getCode();\r\n\t}",
"private String getCodeFromDB() {\n //TODO\n String code = \"\";\n\n return code;\n }",
"public String getCode() {\r\n return (String)getAttributeInternal(CODE);\r\n }",
"SysDictData selectByPrimaryKey(Integ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column t_book.use_customize_list_title | public void setUseCustomizeListTitle(Byte useCustomizeListTitle) {
this.useCustomizeListTitle = useCustomizeListTitle;
} | [
"public void setListTitle(String listTitle)\n\t {\n\t\t this.listTitle = listTitle;\n\t }",
"void setTitleStyle(org.openxmlformats.schemas.drawingml.x2006.main.CTTextListStyle titleStyle);",
"private void initXWTitle() {\n\t\tif (boolean1) {\n\t\t\txwTitle = new ArrayList<String>();\n\t\t\txwTitle.add(\"订... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml. | @Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
Toast.makeText(this, "setting", Toast.LENGTH_SHORT).show();
return true;
}
... | [
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch(item.getItemId()){\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home\n Intent intent = new Intent(this, MainMenuCard.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets whether the control is disabled | public void setDisabled(boolean disabled) {
this.disabled = disabled;
} | [
"public void disable()\r\n {\r\n \tdisabled = true;\r\n }",
"IButton setDisabled(boolean disabled);",
"public void disable() {\n\t\tif (mayBeDisabled)\n\t\t\tthis.setEnabled(false);\n\t}",
"public void setDisabled(boolean value) {\n getPolymerElement().setDisabled(value);\n }",
"public vo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method for choosing an item to buy by its key and making it into an invoice by looking for its key value in hashmap. | private void buyItem(Customer c) {
// Show list of items
String choice;
Long selected;
Item item; // add values of item to Invoice
showItems();
// select an item to buy and search for it by its key in the hashmap
System.out.println("Enter the product Id of the item you want to purchase");
// c... | [
"public void purchaseItem(Map<String, Object> boughtItem){\n\n try {\n File purchase = ConfigCreators.createFile(this.shopInfo.getShopNameDir() + \"/PurchaseInventory.json\");\n purchase = ConfigCreators.createDefaultJsonData(purchase, PandoraShop2.getPlugin(PandoraShop2.class));\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
INTERNAL: Returns a nicely formatted list of class names. | public static String getClassList(Object[] classes) {
StringBuilder buf = new StringBuilder();
for (int ix = 0; ix < classes.length; ix++) {
buf.append(getClassName((Class) classes[ix]));
if (ix + 2 < classes.length) {
buf.append(", ");
} else if (ix + 1 < classes.length) {
buf... | [
"Set<String> getClassNames();",
"public String[] getClassNames() {\n return classNames;\n }",
"private static String[] getClassNames(Class[] source)\n {\n String out[] = new String[source.length];\n for(int i=0; i<out.length; i++)\n {\n String brackets = \"\";\n Class ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Sets the prompt the ATM should be on | public void setPrompt()
{
//stepNum = 0 get Account Number
if(stepNum == 0)
prompt = "Enter Account Number:";
//stepNum = 1 get PIN Number
if(stepNum == 1)
prompt = "Enter PIN:";
//step = 2 Main Transaction Menu
if(stepNum == 2)
prompt = "Transaction Menu:\n"
+ "0.Balance Inquiry\n"
+ "1... | [
"public void setPrompt() {\n if (currentUser == null) {\n this.prompt = ApplicationConfiguration.DEFAULT_PROMPT;\n }\n else if (currentSplit == null) {\n this.prompt = currentUser.getName();\n }\n else {\n this.prompt = currentUser.getName() + \".\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function just to call InputStream.read(buf, offset, limit) | public int read(byte[] buf, int offset, int limit) throws IOException
{
return this.inputStream.read(buf, offset, limit);
} | [
"abstract public int read(byte[] buffer, int num_to_read) throws IOException;",
"public void read(long bOff, char[] buf, int index, int length) {\n/* 267 */ boundsCheck(bOff, length * 2L);\n/* 268 */ super.read(bOff, buf, index, length);\n/* */ }",
"@Override\n public int read(byte[] b, int off... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional bytes attach_data = 20; | boolean hasAttachData(); | [
"void addAttachment(byte[] bytes, String fileName, String description);",
"void setAttachmentContent(AttachmentReference attachmentReference, byte[] attachmentData) throws Exception;",
"public void setAttachment(byte[] value) {\n this.attachment = value;\n }",
"public LinkedHashMap appendDataToAttac... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
set the service profiles for alarm service | public void initializeServiceProfile(){
setConstantsServiceProfile(1, 11, 4.0, 0.11);
setConstantsServiceProfile(2, 9, 12.0, 0.04);
setConstantsServiceProfile(3, 3, 2.0, 0.18);
//set the service profiles for medical analysis service
setConstantsServiceProfile(4,22,4.0,0.12);
setConstantsServicePr... | [
"private void weeklyProfileAlarm() {\n String actionName = \"weeklyService\";\n\n Calendar time = Calendar.getInstance();\n time.set(Calendar.DAY_OF_WEEK, time.get(Calendar.DAY_OF_WEEK) * 7);\n time.set(Calendar.HOUR_OF_DAY, time.get(Calendar.HOUR_OF_DAY) + 1);\n\n Intent logInten... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use this method to verify the results of the GA algortihms in this class. Hardcoding a shortes route here, among the millions of possible routes, will tell if how good the algorithms preform. The best result here is 136. | public void hardcodeShortestRoute() {
distanceMatrix[0][2] = 10;
distanceMatrix[2][4] = 9;
distanceMatrix[4][6] = 11;
distanceMatrix[6][8] = 5;
distanceMatrix[8][10] = 7;
distanceMatrix[10][12] = 8;
distanceMatrix[12][14] = 13;
distanceMatrix[14][1] = 2;
... | [
"@Override\n\tpublic Result calculateRoute() {\n\n\t\t// Get tour size\n\t\tint size = tour.size();\n\n\t\t// repeat until no improvement is made\n\t\tint improve = 0;\n\n\t\twhile (improve < 100) {\n\t\t\tdouble best_distance = getAfstand(tour);\n\n\t\t\tfor (int i = 0; i < size - 1; i++) {\n\t\t\t\tfor (int k = i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Code here executes on main thread after user presses button | public void onClick(View v) {
Intent i = new Intent(getApplicationContext(), RegisterActivity.class);
startActivity(i);
} | [
"public void pressButton() {\r\n\t\tcommand.execute();\r\n\t}",
"public void buttonReableThread() {\n\t\t//Start a new thread for waiting for server's move.\n\t\tnew Thread(new Runnable() {\n\t\t @Override public void run() {\n\t\t \t//While the server has not made a move, just wait.\n\t\t \twhile(myClie... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a short description of the servlet. | @Override
public String getServletInfo() {
return "Short description";
} | [
"public String getServletInfo()\n {\n return \"Short description\";\n }",
"public String getServletInfo() {\r\n\t\treturn \"Short description\";\r\n\t}",
"public String getServletInfo()\r\n {\r\n\treturn \"Short description\";\r\n }",
"@Override\n public String getServletInfo() {\n re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |