query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Calculates the mercenary's cost.
private int mercenaryCost() { int totalSkill = pilotSkill + fighterSkill + traderSkill + engineerSkill + investorSkill; return totalSkill * 50; }
[ "Double getTotalCost();", "public int calculateCost() {\n\t\t\tfor(graph_data e : toCity) {\n\t\t\t\tif(e.destination.toString().equals(parentNode.toString())) \n\t\t\t\t\treturn e.cost;\n\t\t\t}\n\t\t\treturn 0;\n\t\t}", "protected double calculateTotalCost() {\n return this.getPrice() + this.getTotalCo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Manually sets the edge length. This is the steadystate length between two nodes. Don't expect this as an exact value, since most graphs are more complex than two nodes connected by an edge.
public void setEdgeLen(double newEdgeLen) { if (newEdgeLen > 0) edgeLen = newEdgeLen; else calculateEdgeLength(); }
[ "public void setEdge(Edge edge, double elapsed_length) {\r\n\t\tthis.edge = edge;\r\n\t\tthis.elapsed_length = elapsed_length;\r\n\t}", "public void setEdgeWidth(Number edgeWidth) {\n\t\tthis.edgeWidth = edgeWidth;\n\t}", "public void setEdgeStrokeDestinationWidth(double value) {\n _edgeStrokeWidth2 = value;...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the controller AI
public void setAI(IAIModel ai) { this.ai = ai; }
[ "public void setController(IAdaptiveController controller);", "public void setGameController(IController gameController){\n this.gameController = gameController;\n }", "public void setController(Controller controller){this.controller = controller;}", "public void setupController() {\n\t\tSystem.out....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Here we make more obvious that enum is read from payload java.lang.ArrayIndexOutOfBoundsException: 2 at org.apache.avro.io.ResolvingDecoder.readEnum(ResolvingDecoder.java:257) as a result
@Test public void anotherFailingTest() throws IOException { //construct entity // BufferedBinaryEncoder#159 (!bytes.hasArray() && bytes.remaining() > bulkLimit) - here we make "!bytes.hasArray()" ByteBuffer payload = ByteBuffer.allocateDirect(8 * 1024); // BufferedBinaryEncoder#159...
[ "@Test\n public void parseEnum() {\n\n Assertions.assertEquals(XXXEnum.X, parseEnum(XXXEnum.class, \"X\"));\n Assertions.assertEquals(XXXEnum.Y, parseEnum(XXXEnum.class, \"Y\"));\n Assertions.assertNull(parseEnum(XXXEnum.class, null));\n Assertions.assertNull(parseEnum(XXXEnum.class, ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a client by it's id.
@Override public Client getClient(int id) throws HttpClientErrorException, ResourceAccessException { String route = createRoute(clientRoute); UriComponents path = UriComponentsBuilder.fromPath(clientRoute).buildAndExpand(String.valueOf(id)); headers = Auth.createAuthHeader(app_key, app_sec...
[ "public Client getClient(int id) {\n\t\tfor (Client client : this.clients) {\n\t\t\tif (client.getId() == id) {\n\t\t\t\treturn client;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "@NotNull\n public Client getClient(@NotNull Long id) {\n return idToClients.get(id);\n }", "@Override\r\n\tpublic C...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
On creation of new chromosome
public void setGenes(String chromosome){ for(int i = 0, j = 0; i < genes.length; i++){ genes[i] = new Gene(); genes[i].setCode(chromosome.substring(j, j+4)); j+=4; } }
[ "protected abstract Chromosome generateRandomChromosome();", "public GeneticAlgorithm(Chromosome chromosome){\n random = new Random();\n this.chromosome = chromosome;\n }", "public void generateChromosome() {\n \tbyte gene = 0;\n for (int i = 0; i < size(); i++) {\n \tif(i==0 |...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the tip text for this property
public String seedTipText() { return "random number seed"; }
[ "public String getTipText() {\n return mTipText;\n }", "public String getToolTip()\n {\n return this.tooltipText;\n }", "public String getToolTipText() {\n return tooltipText;\n }", "public String getTooltip()\n {\n ValueBinding vb = getValueBinding(\"tooltip\");\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
sets the height of the node
public int getHeight();
[ "public void setNodeHeight(double height);", "public void setHeight(int height) { \n\t\tassert(this!=EMPTY_NODE);\n\t\tthis.height=height; \n\t}", "public void setHeight(int h) { height = h; }", "public void setHeight(double h) {this.height = h;}", "public void setHeight(double newVal) {\n height = n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Prueft, ob Deckeltyp schon Teil der Kollektion an Deckeltypen ist
public boolean hasDeckeltyp(Deckeltyp deckeltyp) { if (deckeltypen.contains(deckeltyp)) { return true; } return false; }
[ "public detekcjaKolizji(){\r\n\r\n\t}", "TypePolitiqueTir createTypePolitiqueTir();", "@Override\r\n\tpublic void tipoDeBicicleta() {\n\t\tmarco.soyTipo();\r\n\t\thorquilla.soyTipo();\r\n\t\ttransmisiones.soyTipo();\r\n\t}", "void deaktiviereAlle(KartenTyp pTyp){\n Karte k;\n for (int i=0; i<spi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
uint32 normal_round_hp_recovery = 14;
public int getNormalRoundHpRecovery() { return normalRoundHpRecovery_; }
[ "public int getHigh() {return 1023 - _hundred;}", "long mo5852h();", "int mo105105h();", "int mo25499h0();", "int getPOWACTL3();", "public final int mo68523h() {\n return 10;\n }", "int getMpRecovery();", "private double h() {\n // TODO: Make this\n return 10000;\n }", "public int ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set value of TurnAroundTime
public final void setTurnAroundTime(com.mendix.systemwideinterfaces.core.IContext context, java.lang.Integer turnaroundtime) { getMendixObject().setValue(context, MemberNames.TurnAroundTime.toString(), turnaroundtime); }
[ "public void setTurnaroundTime(int turnaroundTime)\r\n\t{\r\n\t\tthis.turnaroundTime = turnaroundTime;\r\n\t\tlog.println(\"simPCB.setTurnaroundTime turnaroundTime=\" + this.turnaroundTime);\r\n\t}", "void setTime(Time time);", "public void setTime(TimeSpan time)\n {\n myTime = time;\n }", "publi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates a new profesor.
public Profesor() { }
[ "public Profile() {\n }", "private ProfileCreator() {\n\t}", "public Produto() {\r\n\t}", "public Profiler() {\r\n }", "public Prova() {\r\n }", "public Produto() {\n }", "public Prospect() {\n }", "public static ProfileCreator getInstance() {\n\t\t// here can be some condition chec...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Created by Administrator on 2018/5/11 0011.
public interface ITiyanprisenter { void loadTiyan(int id,int type); }
[ "@Override\n public void extornar() {\n \n }", "@Override\n }", "private static void EX5() {\n\t\t\r\n\t}", "public void mo5201a() {\n }", "@Override\n public int utilite() {\n return 0;\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ renamed from: a
public final TextView mo36837a() { return this.f6549a; }
[ "public interface C3511a {\n /* renamed from: a */\n void mo29057a(int i);\n }", "interface C4511c {\n /* renamed from: a */\n void mo29775a();\n }", "public interface ans {\n /* renamed from: a */\n void mo1174a();\n}", "public interface C24712af {\n /* renamed from...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Increments the last used image id by 1 and writes to file to be used in the next call
private void incrementImgIdByOne(int currentId){ String localDir = "appdata/usersdata/imgIds.txt"; FileOutput writer = new FileOutput(localDir, false); writer.print(currentId + 1); writer.close(); }
[ "private int getNextSnapshotId() {\n return ++_nextShapshotId;\n }", "public void incrPicNum() {\n \tpicNum = (picNum + 1) % MiniThree.getNumArrowPics();\n }", "@Override\r\n public void save() {\n String newImageName = newImageVolumeName; ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XOrExpression__Group_1_0_0__1" $ANTLR start "rule__XOrExpression__Group_1_0_0__1__Impl" InternalBotDuino.g:8755:1: rule__XOrExpression__Group_1_0_0__1__Impl : ( ( rule__XOrExpression__FeatureAssignment_1_0_0_1 ) ) ;
public final void rule__XOrExpression__Group_1_0_0__1__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalBotDuino.g:8759:1: ( ( ( rule__XOrExpression__FeatureAssignment_1_0_0_1 ) ) ) // InternalBotDuino.g:8760:1: ( ( rule__XOrE...
[ "public final void rule__XOrExpression__Group_1_0_0__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../jpaqldsl.ui/src-gen/jpaqldsl/ui/contentassist/antlr/internal/InternalJPAQLDsl.g:15153:1: ( ( ( rule__XOrExpression__FeatureAssi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int a=0; int b=0; int c=1; for(int i=0;i<x;i++){ a=b; b=c; c=a+b; System.out.print(a+" "); } }
[ "@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" ] ] } }
Returns true if this parameter is an enum identifier
private static boolean isEnumIdentifier(Parameter parameter) { switch (parameter.kind()) { case IDENTIFIER: case MEMBER_SELECT: break; default: return false; } TypeSymbol typeSymbol = parameter.type().tsym; if (typeSymbol != null) { return typeSymbol.getKind() == ...
[ "public boolean enumLiteralHasKey(String name) {\n return props.contains(name);\n }", "public boolean isEnum() {\n return _enum;\n }", "@Override\n\tpublic boolean visit(EnumDeclaration node) {\n\t\treturn true;\n\t}", "public static boolean isEnum(String s){\n s = s.toUpperCase();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
input types: int, EntityManager method to get orderId by input invoices iD from firebird table ORDERSOUTINV return type: int
public static int getOrderIdBySPRoiID(int invoiceId,EntityManager em){ Query getorderId = em.createNativeQuery("select id from ORDERSOUTINV where OUTCOMEINVOICEIDSSET ='"+ invoiceId+"'"); return (int)getorderId.getSingleResult(); }
[ "IInvoice byId( String invoiceId );", "public Integer getInvoiceId() {\r\n\t\treturn invoiceId;\r\n\t}", "public String getInvoiceId() {\r\n return invoiceId;\r\n }", "Long saveInvoice(Invoice inv);", "public int getInvoiceNo() { \n\t\treturn invoiceNo; \n\t}", "@Override\n public TOrderInfor g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method first deletes all the files in given folder
public static void deleteFile(String fileName) { AmazonS3 client = UtilitiesS3.getS3Client(); List<S3ObjectSummary> fileList = client.listObjects(DeclareConstant.BUCKET, fileName).getObjectSummaries(); for (S3ObjectSummary file : fileList) { System.out.println(file.getKey()); client.deleteObject(Declar...
[ "public void delete() {\n File[] allContents = folder.listFiles();\n if (allContents != null) {\n for (File file : allContents) {\n file.delete();\n }\n }\n folder.delete();\n }", "public static void emptyFolder(String folder) throws Exception {\n\n for (File file: new Fil...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
public boolean SentRequestTravelInfo(String terminalId, String bufferId,String index) { try{ os = socket.getOutputStream(); RequestTravelInfo r = new RequestTravelInfo(terminalId, bufferId, index); boolean opTemp = r.DBOperation(true); byte[] responseBytes = r.replyToClient(); if(responseBytes!=null&&o...
[ "@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" ] ] } }
If we are on the abort chain already, send a 500. If not, turn the throwable into a response result and switch to the abort chain
public void handleException(Throwable t) { handleException(t, false); }
[ "String afterException(HttpServletRequest request, HttpServletResponse response, Throwable e);", "public void sendError( HttpStatus status ) throws IOException;", "@Test\n\tpublic void shouldGetUnexpectedErrorExceptionFor500Response() throws Exception {\n\t\twireMockRule.stubFor(get(urlMatching(\"/things/someth...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form LevelSelection
public LevelSelection() { initComponents(); setBackground(Color.PINK); Border compound, raisedbevel, loweredbevel; raisedbevel = BorderFactory.createRaisedBevelBorder(); loweredbevel = BorderFactory.createLoweredBevelBorder(); Border redline = BorderFactory.createLineBord...
[ "@Override\n public Control createControl( final Composite parent ) {\n Composite composite = new Composite( parent, SWT.NONE );\n composite.setLayout( new GridLayout() );\n\n // Group grpGeneral = createGeneralGroup( composite );\n dlgField = new LevelSelectionDialogField( composite );\n initLevelSe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determines the base URL of this page. Typically this is the request URL, but it may also be the URL specified in the page's "base" tag.
private URL getBaseUrl(String uncommentedContent) throws MalformedURLException { URL url = getWebResponse().getWebRequest().getUrl(); final List<String> baseUrls = LWPageUtilities.getAllBaseLinks(uncommentedContent); if (!baseUrls.isEmpty()) { final String baseUrl = base...
[ "public static String getBaseUrl( HttpServletRequest request )\n {\n if ( request == null )\n {\n return getBaseUrl( );\n }\n\n String strBase;\n\n // Search for a Virtual Host Base Url defined in the request\n strBase = getVirtualHostBaseUrl( request );\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter function for the sign coefficient
public DriveTrain setInverted(final boolean doInvert) { if (doInvert) { sign = -1.0f; } else { sign = 1.0f; } return this; }
[ "public boolean getSign(){ return positive; }", "void setSigned(boolean isSigned);", "public int sign() {\n return this.sign;\n }", "public int getYSign() {\n/* 281 */ return this.ySign;\n/* */ }", "public Integer getSignterm() {\n return signterm;\n }", "Double getSignDuplic...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method pushes the booking made by the user into the invoice data base table.
public void pushDate(String userName, String roomNo, ArrayList<String> dateBooked, double cost, String dateToDisplay, String fullName, String checkedInStatus) { try { int orderNo = 0; long timeStamp = System.currentTimeMillis(); String defaultPay = "NO"; Statement stmt = this.con.cre...
[ "private void addBookings() {\n int seatBooking = Integer.parseInt(laNumSeats.getText());\n String flightNum = txtNumber.getText();\n BookingsDB bookingsDB = new BookingsDB();\n StopsDB stopsDB = new StopsDB();\n btnSave.setText(\"wait while processing data!\");\n btnSave.s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Requires: hexadecimal number Effects: returns the binary representation of hex
public static int hexToBin(String hexRep){ String binRep = ""; for(int i = 0; i < hexRep.length(); i++) binRep += hexToNibble(hexRep.charAt(i)+""); return Integer.parseInt(binRep); }
[ "private static String getHexadecimalFromBinaryNumber(String number) {\n\t\tint decimal = getDecimalFromBinaryNumber(number);\r\n\t\t// Convert Decimal to Hexadecimal\r\n\t\tString hexadecimal = getHexadecimalFromDecimalNumber(decimal);\r\n\t\treturn hexadecimal;\r\n\t}", "private String hexToBinary(String hex, i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to send data to the alert box
public void send_data_to_alert(String data_to_enter) { // System.out.println("****************send_data_to_alert**********: " + // data_to_enter); Alert promptAlert = driver.switchTo().alert(); promptAlert.sendKeys(data_to_enter); }
[ "public void sentTextToAlert() {\n\t\tdriver.switchTo().alert().sendKeys(\"Text\");\n\t}", "public void raiseAlert(Alert alert, String text);", "public void issueAlert(String message);", "private void AlertBox(String alert) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n build...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Apply global bindings in the model.
public void applyGlobal(FacesContext ctx, ModelBindingContext mbc) { // default is do nothing }
[ "public void executeBindings() {\n synchronized (this) {\n long j = this.f10642e;\n this.f10642e = 0;\n }\n }", "public final void bindComponents() {\r\n\t\tdoBeforeBind();\r\n\t\tbinder = new AnnotateDataBinder(this);\r\n\t\tIterator<String> itKeys = bindObjects.keySet().it...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Arranges currently selected shapes such that they have the same vertical distance between them.
public static void equallySpaceColumn(RMEditor anEditor) { // If no selected shapes, beep and return if(anEditor.getSelectedShapeCount()==0) { anEditor.beep(); return; } // Get selectedShapes sorted by minXInParentBounds List <RMShape> shapes = RMShapeUtils.getShapesSortedByFrameY(anEditor.getSelec...
[ "private void swapShapes() {\n\t\tboolean status = false;\n\t\tRectF bounds = selected.getRectFBounds();\n\t\tfor(Thing thing: things) {\n\t\t\tif(RectF.intersects(bounds, thing.getRectFBounds())\n\t\t\t\t\t&& selected.getPosition() != thing.getPosition()) {\n\t\t\t\tint thingPosition = thing.getPosition();\n\t\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Starts routines in a separate task for UI responsiveness. If neccessary, enables Bluetooth and starts scanning for BLE devices.
public void scan() { // bind receiver to bluetooth state change events this.mainActivity.registerReceiver(this.btEventReceiver, new IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED)); AsyncTask asyncTask = new AsyncTask() { @Override protected Object doInBackground(Ob...
[ "public void doStartScanning()\n {\n if ( !this.isLookingForDevices() ) {\n this.deviceSearch = true;\n this.closeAllGattConnections();\n this.clearDeviceListView();\n\n this.handler.postDelayed( () -> {\n if ( this.bluetoothAdapter.isDiscovering(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A name which can later be used to reference this button. If a button is defined on the BUTTONS property with this same name, its configuration properties will be merged in as defaults.
public native final String name() /*-{ return this.name; }-*/;
[ "public String getName() {\n return \"butt\";\n }", "public MyButton(String name) {\n\t\tsetBackground(Color.BLUE);\n\t\tsetForeground(Color.BLACK);\n\t\tsetText(name);\n\t}", "private JButton button(String name) {\n JButton button = new JButton(name);\n button.setText(name);\n butto...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method corresponds to the database table company_customer_service
protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); return criteria; }
[ "public interface CustomerManageService extends BaseService {\n public Map<String,Object> findCustomersByCondtion(int visitId, int id, Map<String, Object> condition) throws ServiceException;\n\n public Map<String,Object> getCustomerInfo(int visitId, Map<String, Object> condition) throws ServiceException;\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public StudentCourses calcGPA(String studentId) { return scRepository.findOne(studentId); }
[ "@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" ] ] } }
Returns the content (value) set for the interface object.
public String getContent() { return getValue(); }
[ "@Override\n\tpublic\n\tArrayList<Value> getContent() {\n\t\treturn this.content;\n\t}", "public Map<String, Map<String, Variant<?>>> getInterfaces() {\n return interfaces;\n }", "public List<BValuable> getInterfaces();", "public Multimap<String,String> getContent()\n\t{\n\t\tMultimap<String...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ULTRA KEK this shit wasnot public
public TcpReaderThreadBan(BanClass par1TcpConnection, String par2Str) { super(par2Str); this.theTcpConnection = par1TcpConnection; }
[ "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\n\tpublic void zavrsenaKupovina() {\n\t\t\n\t}", "void mo29804K();", "void mo29335d(K k);", "public void verdeelKaarten()\n {\n huidigSpel.verdeelKaarten();\n }", "void mo3117k();", "private boolean k() {\n }", "public de...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Annotations for mapping web requests on methods in requesthandling classes with flexible method signatures.
@GetMapping("/get") public String hello() { return "Hello from Bridgelabz"; }
[ "@RequestMapping(\"/\") //for mapping web requests onto methods in request-handling classes with flexible method signatures. \n\tString acceptRequest(){\n\t\treturn \"index\";\n\n\t}", "Response handle(IRequest request,Response response);", "@GetMapping(path=\"/hello-world\") //<--- (2)Automatically sets the HT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
jhipsterneedleentityaddfield JHipster will add fields here, do not remove
public String getId() { return id; }
[ "@Override\n public void editNewlyAddedField() {\n }", "public void createFields() {\n }", "public EntityInfoBuilder<T> addField(String fieldPath) {\n String columnName = fieldPath.toLowerCase().replaceAll(\"\\\\.\", \"_\");\n return addField(fieldPath, columnName, false);\n }", "@Ov...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
CLeanup binding in order to prevent memory leaks
@Override protected void onDestroy() { binding.unbind(); binding = null; super.onDestroy(); }
[ "protected void onBind()\n\t{\n\t}", "@Override\n\t\tprotected void bind(){\n\t\t\t\n\t\t}", "public void Bind() {\n\t\t\n\t}", "@Override\n public void bind(Shell shell) {\n out = shell;\n binding.setVariable(\"__out__\", out);\n }", "private CxxLinkableEnhancer() {}", "public void doAfterBind() ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Utility to create an ExpandedSignaturePair for an ECDSA_SECP256K1 key prefix
private static ExpandedSignaturePair ecdsaExpanded(@NonNull final TestKeyInfo keyInfo) { final var key = keyInfo.publicKey(); final var sigPair = ecdsaSig(keyInfo, 33); final var compressed = key.ecdsaSecp256k1OrThrow(); final var array = new byte[(int) compressed.length(...
[ "static EciesEnvelopeKey fromPublicKey(final PublicKey publicKey, final byte[] sharedInfo1) throws EciesException {\n try {\n // Generate ephemeral key pair\n final KeyPair ephemeralKeyPair = keyGenerator.generateKeyPair();\n final PrivateKey ephemeralPrivateKey = ephemeralKe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Renvoie le type de l'Attribut
public TypeSGBD<?> getType() { return type; }
[ "public String attributeType(String aname) {\r\n\t //this is not used yet\r\n\t String s=\"\";\r\n\t return s;\r\n }", "public String getAttributeType();", "AttributesType getAttributes();", "Object buildAttribute2(Object type);", "TipoAtributo createTipoAtributo();", "T attributeIsIncorrectType(WSAtt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
inserts unique nodes into the binary tree Modified by Tyler Bruno
public static boolean insert(int id) { Node newNode = new Node(id); //If there is no node in the root, make this new created node the root if (root == null) { root = newNode; return true; } //Find duplicates. If duplicated do not add to BST. if(f...
[ "void insert(long key)\n {\n BTreeNode rootNode = root;\n int i = rootNode.getKeyCount();\n if (i == 2 * degree - 1)\n {\n TreeObject Tobj = new TreeObject(key);\n while (i > 0 && Tobj.compareTo(rootNode.getKey(i - 1)) < 0)\n {\n i--;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find the _Fields constant that matches fieldId, or null if its not found.
public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // PLATFORM_ARGS return PLATFORM_ARGS; case 2: // OPTION return OPTION; case 3: // PAGE_OPTION return PAGE_OPTION; default: return null; }...
[ "@org.apache.thrift.annotation.Nullable\n public static _Fields findByThriftId(int fieldId) {\n switch(fieldId) {\n case 1: // HR_ID\n return HR_ID;\n case 2: // COMPANY_ID\n return COMPANY_ID;\n case 3: // COMPANY_TAG_IDS\n return COMPANY_TAG_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates the subscription data structures by removing entries. TODO avoid any unnecessary synchronization while updating data structures.
@Override public void unsubscribe(UnsubscribeMessage msg) { updateOnUnsubscribe(msg.getClientId(), msg.getMqttTopic()); }
[ "void clearSubscribers();", "@Override\n public void unsubscribe() {\n }", "public void removeSubscription(Subscription subscription);", "public void unsubscribe() {\n subscribed = false;\n }", "@Override\n public void unregister(Subscriber m) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated .dzhyun.FenBiChengJiao Data = 2;
public Builder addAllData( java.lang.Iterable<? extends com.dzhyun.proto.DzhyunGupiaoqiepian.FenBiChengJiao> values) { if (dataBuilder_ == null) { ensureDataIsMutable(); super.addAll(values, data_); onChanged(); } else { dataBuilder_.addAllMessages(value...
[ "private void data() {\n\n\t}", "public static void main(String[] args) {\n\t\tint k_10_iPerson = 10; \t\t\t\t\t\t\t\t\t\t\t\t\t\t// 학생수 정의\n\t\tPP13InputData k_10_indata = new PP13InputData(k_10_iPerson);\n\t\t\t\n\t\tfor (int k_10_i = 0; k_10_i < k_10_iPerson; k_10_i++) {\t\t\t\t\t\t// 학생수만큼 반복\n\t\t\tString k_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Email Sender: sends email from ICM mail account. HTML Friendly.
public static void sendEmail(String mailTo, String subject, String message) { // SMTP server information String host = "smtp.gmail.com"; String port = "587"; String mailFrom = "icm.systemg.10@gmail.com"; String password = "ICM@12345"; // outgoing message information ...
[ "public void sendEmail() {\n\n final String[] TO = {\"\"};\n final String[] CC = {\"\"};\n final Intent emailIntent = new Intent(Intent.ACTION_SEND);\n emailIntent.setData(Uri.parse(\"mailto:\"));\n emailIntent.setType(\"text/plain\");\n emailIntent.putExtra(Intent.EXTRA_EM...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Created by yangmingquan on 2018/10/11.
public interface QuartzTaskMapper extends MyMapper<QuartzTask> { }
[ "@Override\n public void extornar() {\n \n }", "@Override\n }", "@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\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub Log.d("http", (String) gv.getAdapter().getItem(pos));
@Override public void onItemClick(AdapterView<?> arg0, View arg1, int pos, long id) { Intent i = new Intent(GalleryActivity.this, ImageActivity.class); i.putExtra("name", (String) gv.getAdapter().getItem(pos)); startActivity(i); }
[ "@Override\n public Object getItem(int pos )\n {\n return data.get(pos);\n }", "@Override\r\n public String getItem(int position) {\n \t\r\n return _itemString[position];\r\n }", "@Override\r\n public Object getItem(int position) {\n return tattos_grid_Images[p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void run() { try { Map<String, String> paramMap = new HashMap<String, String>(); paramMap.put("payType", ABConstant.AB_PAY_TYPE); String resultJson = HttpRequest.getPayMoney( ABConstant.ABPAY_CHANGE_URL, paramMap); List<Iapppay> list = JsonHelper.fromJso...
[ "@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" ] ] } }
HACER UN PROGRAMA QUE PIDA EL NUMERO Y DESPLIEGUE LA TABLA DE MULTIPLICAR QUE LE CORRESPONDA.
static int[][] generaMatriz(int filas, int columnas){ int i,j; int[][] matriz = new int[filas][columnas]; //Relleno la primera fila y la primera columna de la matriz for (i=0 ; i < matriz.length ; i++){ matriz[i][0]=i; matriz[0][i]=i; ...
[ "private void numeros() {\n int j;\n int cont = 1;\n String num = \"\";\n String c = \"\";\n String SQL = \"SELECT MAX(id) FROM depositos\";\n try {\n Statement st = con.createStatement();\n ResultSet rs = st.executeQuery(SQL);\n if (rs.next...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initialize your data structure here.
public WordDictionary() { root = new Node(); }
[ "@Override\n\tpublic void initData() {\n\n\t\t\n\t}", "private void initializeData() {\n employees.put(1, \"Amos Burton\");\r\n employees.put(2, \"Julie Mao\");\r\n employees.put(3, \"Alex Kamal\");\r\n employees.put(4, \"James Holden\");\r\n employees.put(5, \"Josephus Miller\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns count of ways to reach nth stair using 1 or 2 or 3 steps.
public static int findStep(int n) { if (n == 1 || n == 0) return 1; else if (n == 2) return 2; else return findStep(n - 3) + findStep(n - 2) + findStep(n - 1); }
[ "private int countNumWays(int n) {\n int a = 1, b = 2, c = 4;\n int d;\n while (n-- > 3) {\n d = a + b + c;\n a = b;\n b = c;\n c = d;\n }\n return c;\n }", "public static int stairClimbing(int n){\n int distinct_ways = 0;\n int o...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handle the click events from the fragment (Callbacks handler)
public void onFragmentClickEvent(View v){ }
[ "public void handleClicks(View v) {\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tif (fragmentItemClick != null)\n\t\t\t\t\tfragmentItemClick.itemClick(position);\n\t\t\t}", "public void onButtonPressed(Uri uri) {\n //if (mListener != null) {\n // mListener.onFragmentInte...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fixture initialization (common initialization for all tests).
@Before public void setUp() { }
[ "@BeforeAll\n public static void initVariables() throws ParserException {\n model = new ModelManager();\n storage = new StorageManager();\n foodList = SampleUtil.generateSampleData(5);\n }", "@BeforeSuite(alwaysRun = true)\r\n\tpublic void initSetUp() throws FileNotFoundException, IOExc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void removeFromGroup(String featureId, String groupName) { }
[ "@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" ] ] } }
AddJobFlowSteps adds new steps to a running job flow. A maximum of 256 steps are allowed in each job flow. If your job flow is longrunning (such as a Hive data warehouse) or complex, you may require more than 256 steps to process your data. You can bypass the 256step limitation in various ways, including using the SSH ...
public Future<AddJobFlowStepsResult> addJobFlowStepsAsync( final AddJobFlowStepsRequest addJobFlowStepsRequest, final AsyncHandler<AddJobFlowStepsRequest, AddJobFlowStepsResult> asyncHandler) throws AmazonServiceException, AmazonClientException { return executorServic...
[ "public void addStep(int step, String description) {\n // TODO\n }", "public void addStep(IUIStep step) {\n\t\tthis.stepManager.addStep(step);\n\t}", "private void generateWorkflowSteps() {\n cwlRepresentation.append(\"steps:\").append(\"\\n\");\n for (ModuleNode moduleNode : solution.ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implements the cancel operation.
public String transaction_cancel(int reservationId) { if(currUser.equals("")) { return "Cannot cancel reservations, not logged in\n"; } try { try { getReservation.clearParameters(); getReservation.setInt(1, reservationId); getReservation.setString(2, currUser); ResultSet rs = getReservation....
[ "protected void cancel() {\n }", "@Override\n\t\t\t\t\t\t\tpublic void cancel() {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "@Override\r\n\tpublic void cancel() {\n\t}", "public void cancel () {\r\n \t\t//TODO: implement cancel()\r\n \t}", "@Override\n public void cancel() {\n\n }", "public void cance...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get latency file names
public List<String> getLatencyRuleNames() { return getLatencyRules(false).getRuleNames(); }
[ "String getLogPrimaryFiles();", "java.lang.String getFileStartTime();", "long latency();", "public ArrayList<String> getFileNames() { \n\t\t\n\t\tif (fileNames != null )\n\t\t\treturn fileNames;\n\n\t\t//Create the array if has not been created previously\n\t\tfileNames = new ArrayList<String>(numberOfFiles);...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Builds a structure specifying the details of the plane ticket. Makes a requisition to the server and gets a query response.
private ConsultaPassagem novaConsultaPassagem() { System.out.println("Passagem só de ida (y/n)? "); boolean isOneWay = scanner.nextLine().startsWith("y"); System.out.print("Origem: "); String origin = scanner.nextLine(); System.out.print("Destino: "); String destinati...
[ "protected void buildRecord(ResultSet rs) throws SQLException {\n //ticket table\n this.setId(rs.getInt(\"kb_id\"));\n categoryId = DatabaseUtils.getInt(rs, \"category_id\");\n title = rs.getString(\"title\");\n description = rs.getString(\"description\");\n itemId = DatabaseUtils.getInt(rs, \"ite...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
inserts a status effect; returns true if we need to readjust temp stats
public boolean addStatus(statusEffectData toInsert){ LLLnode nodeToInsert; //LLLnode reference animateStatusCondition(toInsert.returnKey(), toInsert.isPositive()); if(toInsert instanceof damageEffect){ //insert to damage effects if this condition nodeToInsert = new LLLnode(toInsert);...
[ "public void shiftStatus() {\n\t\tif (fireStatus > 0) {\r\n\t\t\tstatus = \"fire\";\r\n\t\t} else if (World.getPrecipitationValue() >= 0.5 && World.getTemperature() < 32) {\r\n\t\t\tstatus = \"snowy\";\r\n\t\t} else status = \"normal\";\r\n\t\tif (World.getPrecipitationValue() == 1) fireStatus -= 3;\r\n\t\telse if ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to deactivate bonus from bonus database
public static boolean deactivateBonus(int id) { boolean x = false; for (Bonus bonus : BONUS_DATABASE) { if (id == bonus.getId()) { bonus.setActive(false); x = true; } } return x; }
[ "public void turnBonusOff() {\n this.expression.turnBonusOff();\n super.setIsBonus(false);\n }", "public void deactivate()\n\t{\n\n\t}", "protected void deactivate () {\n active = false;\n }", "public void deactivate() {\n//\t\tContextBus.getInstance().unsubscribe(this);\n\t\tDataba...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ renamed from: c
public void mo866c(View view) { this.f4438b = false; C0996j0 j0Var = null; if (this.f4437a.f4430d > -1) { view.setLayerType(2, null); } C0990i0 i0Var = this.f4437a; Runnable runnable = i0Var.f4428b; if (runnable != null)...
[ "@Override\n\tpublic void c() {\n\t\t\n\t}", "@Override\r\n\tvoid c() {\n\t\t\r\n\t}", "protected void c() {\n\n\t}", "void mo3976c(C5247d c5247d);", "void mo62419c();", "void m28293a(C5003c c5003c, C5006e c5006e);", "void mo24495a(C12578a c12578a);", "void mo22731b(C33642d c33642d);", "public void ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public int compareTo(AccountHolder o) { 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" ] ] } }
get instance based on the urgency and the day. If the emergency boolean is true it returns the supervisor singleton. instance.
public static Guard getInstance(final boolean emergency) { if (emergency) { //We do a lazy initalization of the Supervisor ,in our example it is an expensive object. if(isNull(Guard.supervisor)){ Guard.supervisor = new SupervisorGuard(); } return G...
[ "public static Supervisor get() {\r\n\t\tif(instance == null)\r\n instance = new Supervisor(ActorSystem.create());\r\n return instance;\r\n\t}", "public static HotelSystem getInstance(){ // call this function to instantiate HotelSystem object\r\n return singleton; \r\n }", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Parse a string into a Stmt AST node, applying substitutions.
public Stmt parseStmt(String fmt, Object o1, Object o2, Object o3, Object o4, Object o5, Object o6, Object o7) { return (Stmt) parse(fmt, list(o1, o2 , o3, o4, o5, o6, o7), STMT); }
[ "public R visit(StringStatement n);", "public static void parse(String str)\n\t{\n\t\tSystem.out.println(str);//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n\t\tASTParser parser = ASTParser.newParser(AST.JLS3);\n\t\tparser.setSource(st...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test case number: 147 /Coverage entropy=1.7917594692280547
@Test(timeout = 4000) public void test147() throws Throwable { String string0 = "jK\\y3D6!sEZr<"; XmlEntityRef xmlEntityRef0 = new XmlEntityRef("jKy3D6!sEZr<"); assertNull(xmlEntityRef0.defaultTagName()); assertFalse(xmlEntityRef0._isGeneratedId()); assertEquals("jKy3D6!sEZr<", xmlEnti...
[ "@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" ] ] } }
delete and return a random item
public Item dequeue() { if (count == 0) { throw new java.util.NoSuchElementException(); } Item item; int pos = StdRandom.uniform(count); item = arr[pos]; arr[pos] = arr[count - 1]; arr[count - 1] = null; count--; ...
[ "public Item sample() // return (but do not delete) a random item\n {\n\t if (counter == 0) throw new java.util.NoSuchElementException();\n\t return items[StdRandom.uniform(counter)];\n }", "public Item getRandom() {\n\t\treturn set[RandomUtils.inclusive(set.length - 1)];\n\t}", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
public static void main(String[] args) { String s ="this is a demo of getchars method"; int start=10; int end=14; char buf[]=new char[end-start]; s.getChars(start, end, buf, 0); System.out.println(buf); }
[ "@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" ] ] } }
Visit method for unary minus node. Recursively computes the value of its child node Then applies the negation and stores the result.
@Override public void visit(UnaryMinusTreeNode node) { node.getChild().accept(this); this.result = -this.result; }
[ "public R visit(UnaryMinusExpression n) {\n R _ret=null;\n n.nodeToken.accept(this);\n n.primaryExpression.accept(this);\n return _ret;\n }", "public Object visit(BinaryArithMinusExpr node) {\n node.getLeftExpr().accept(this);\n node.getRightExpr().accept(this);\n return null;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns whether or not this move involves a piece moving towards its own side.
public static boolean isKingMove(Move move, Piece piece) { Color color = piece.getColor(); Piece.Type type = piece.getType(); if(type != Piece.Type.KING) return false; //Red Piece and move is going up if(color == Color.RED && move.isFacingRed()) { return true; ...
[ "private boolean isLegalBishopMove() {\n\n\t\tif (!(Math.abs(toRow - fromRow) == Math.abs(toCol - fromCol))) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// check whether this piece moves over pieces\n\n\t\tif ((toRow > fromRow) && (toCol > fromCol)) {\n\t\t\tint l = toRow - fromRow;\n\t\t\tfor (int i = 1; i < l; i++) {\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
getItem is called to instantiate the fragment for the given page. Return a PlaceholderFragment (defined as a static inner class below).
@Override public Fragment getItem(int position) { return PlaceholderFragment.newInstance(position + 1); }
[ "@Override\n public Fragment getItem(int position) {\n return PlaceholderFragment.newInstance(position + 1, o);\n }", "@Override\n\t\tpublic Fragment getItem(int position) {\n\t\t\treturn PageFragment.newInstance(position + 1);\n\t\t}", "@Override\n public Fragment getItem(int po...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Insert the Default Classifer/Watson Model for Clients with no/less historical data
public Integer loadDefaultClassifier(String classifierID,Integer instanceID) { Connection con = null; Integer status=null; Statement s=null; try { con=this.connectToDB(); s=con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE); String query = "INSERT INTO WATSON_MODEL_...
[ "private void insertDefaultData() {\n this.notificationWebServiceConfigurationRepository.save(this.notificationEndpointConfigurations());\n }", "private void createDefaultGoose() throws RemoteException\n\t\t{\n\t\t// this gives an initial goose that is cytoscape with a null network\n\t\tCyNetwork Curren...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Configures Scheduler on launch with time spent on incomplete tasks.
public void loadTimeSpent(ArrayList<Task> list) throws IOException { try { Scanner timeSpentSaved = new Scanner(new File("data/timeSpent.txt")); while (timeSpentSaved.hasNextLine()) { String[] taskString = timeSpentSaved.nextLine().split("\\|"); int index...
[ "private void setup() {\n\t\tplugin.getServer().getScheduler().runTaskLater(plugin, new Refill(plugin, 1, 0), 100);\r\n\t\tplugin.getServer().getScheduler().runTaskLater(plugin, new Refill(plugin, 2, 0), 100);\r\n\t\t// Schedule mins with tag 1 to run in 10 mintes, tag 2 in 20\r\n\t\tplugin.getServer().getScheduler...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
parse and fulfill List with data from .csv file
private void parse () { commentArrayList = helper.parseCommentsFromFile(); }
[ "public static ArrayList<Record> csvParsing(String csvFile){\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tbr = new BufferedReader(new FileReader(csvFile));\r\n\t\t\tbr.readLine(); // leggi la prima riga e ignorala\r\n\t\t\t\r\n\t\t\twhile ((line = br.readLine()) != null) {\t\r\n\t\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\r\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Performs a deep copy on other.
public readIndexFetchMiddle_result(readIndexFetchMiddle_result other) { if (other.isSetSuccess()) { this.success = new cn.ict.occ.messaging.ReadValue(other.success); } }
[ "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\r\n private void copyFrom(final _BeanImpl other, final boolean immutably) {\r\n if (other == null) {\r\n throw new IllegalArgumentException(\"other cannot be null\");\r\n }\r\n if (other.getClass() != getClass()) {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Represents a logical Connection to a remote peer within a messaging network. Exceptions NetworkException : Thrown when the underlying network connection fails. MessagingException : Thrown when the Connection gets to an erroneous state. TimeoutException : Thrown when an operation exceeds the connection timeout. Connecti...
public interface Connection extends ContextAware { /** * Retrieve the local identifier set by the application */ String getLocalID(); /** * Return the ID assigned by the remote peer if exposed by the underlying * protocol. */ String getRemoteID(); /** * Return the ID ...
[ "public interface PeerConnection extends Closeable {\n\n /**\n * @return Remote peer\n * @since 1.0\n */\n Peer getRemotePeer();\n\n /**\n * @return ID of a torrent, that this peer\n * is interested in sharing or downloading\n * @since 1.0\n */\n TorrentId getTorrentI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated .com.S2C.S2CAttr attrs = 2; repeated .com.S2C.S2CAttr attrs = 2;
java.util.List<com.S2C.S2CPtl.S2CAttr> getAttrsList();
[ "private Result checkAttributes2() {\n try {\n Attributes attrs = ctx.getAttributes(\"example.com\");\n if (!(compareAttrs(attrs, \"A\", \"127.0.0.1\")\n && compareAttrs(attrs, \"NS\", \"example.com.\") && compareAttrs(\n attrs, \"SOA\", \"host1.example.com...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Provide a suitable constructor
public BookAdapter(List<Book> bookList){ this.bookList = bookList; }
[ "public abstract T constructor();", "T construct();", "public Castle(){}", "public Constructor<T> withAnyArgs();", "private CerealeFactory() {}", "public abstract O newInstance();", "public MazeObjectFactory(Supplier<Type> constructor)\n\t{\n\t\tthis.constructor = constructor;\n\t}", "private Casier()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void beforeTextChanged(CharSequence arg0, int arg1, int arg2, int arg3) { }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Enabled aggressive block sorting
public boolean equals(Object object) { block5: { block4: { if (this == object) break block4; if (!(object instanceof PreciseDurationField)) { return false; } object = (PreciseDurationField)object; if ...
[ "@Override\n public int getBlockSortingIndex() {\n return 5;\n }", "@Override\r\n\tprotected void auxSort() {\n\t\t\r\n\t}", "@Test\n public void testSortLocatedBlocks() throws IOException, URISyntaxException {\n HelperFunction(null, 0);\n }", "private Sorting() {}", "public void sortChang...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Elimina el producto indicado del stock, no importa cual sea la cantidad disponible del mismo.
public Boolean eliminarProducto(Producto producto){ if(!this.stock.containsKey(producto)){ return false; } this.stock.remove(producto); return true; }
[ "public void eliminarProductos() {\n\t\ttry {\n\t\t\tImportacionLogica objLogica = new ImportacionLogica();\n\t\t\tString valida = objLogica.eliminarProductosImportacion(this.importacion.getId());\n\t\t\tRequestContext requestContext = RequestContext.getCurrentInstance();\n\t\t\trequestContext.execute(\"PF('tablaIm...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a text corresponding the current state of the Equation
private String giveOutput() { if (currentOperator == FIRST) return currentDigits; if (currentOperator == NOP) return "" + currentValue; return "" + currentValue + " " + currentOperator + " " + currentDigits; }
[ "public String equation() {\n\t\treturn equation(frmt);\n\t}", "public String getEquation()\n {\n return this.equation;\n }", "public String getEquation() {\n return this.expression;\n }", "@Override\n\tpublic String getValue() {\n\t\tString result = \"if ( \";\n\t\tresult += exp1.getVa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initialize the SmartProgressWindow, run some lengthy tasks, and then close
public SmartProgressWindowDemo() { super(null, true, true, true); this.setTitle("SmartProgressWindow Demo..."); this.setStatus("Initializing..."); this.setProgressCounter(0); Runnable q = new Runnable() { public void run() { SmartFile x = null; SmartRandomAccessFile xRaf = null; ...
[ "@Override\r\n\t\tpublic void run()\r\n\t\t{\n\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tfor (int i = 0; i < progressWindow.getMaxValue(); i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tprogressWindow.setValue(i);\r\n\t\t\t\t\t// Koenstliche Verloengerung des Vorgangs\r\n\t\t\t\t\tThread.sleep(1000);\r\n\r\n\t\t\t\t\t// Die Abfrage ob ab...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ access modifiers changed from: packageprivate
public abstract void setCameraId(String str);
[ "protected void method_5557() {}", "@Override\n }", "@Override\n public void extornar() {\n \n }", "public void mo28221a() {\n }", "protected void mo4791d() {\n }", "protected void method_2117() {\n }", "@Override\r\n public void publicando() {\n }", "private ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
WRITE THE FACTORY METHOD TO RETURN A PriceComparator OBJECT
public static PriceComparator getPriceComparator() { return new PriceComparator(); }
[ "public PriceComparator() {\n this(true);\n }", "@Test\n public void priceAscendingOrderSameProductProducesAZero() {\n Comparator<IProduct> comp = ComparatorIProduct.priceAscendingOrder();\n assertEquals(0, comp.compare(products.get(0),products.get(0)));\n }", "public interface Wei...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor which open the teacher window
public TeacherWindow(int state, TeacherInterface t) throws InvalidStateException{ super(state,t); name = new JFormattedTextField(); firstName = new JFormattedTextField(); office = new JFormattedTextField(); phone = new JFormattedTextField(); email = new JFormattedTextField(); if(state==InformationWindow.MODIFY ...
[ "public QuestionRepositoryGUI() {\n\n\t\ttc = new TeacherController();\n\n\t}", "public TeacherFrame(String name) {\r\n\t\t\r\n\t\tsetBounds(100, 100, 289, 342);\r\n\t\tcontentPane = new JPanel();\r\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n\t\tsetContentPane(contentPane);\r\n\t\tcontentPane.set...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'user_location_city' field.
public com.giant.avro.schema.Test.Builder setUserLocationCity(int value) { validate(fields()[6], value); this.user_location_city = value; fieldSetFlags()[6] = true; return this; }
[ "public void setcity_location(String city_location) {\n\t\tthis.city_location = city_location;\n\t}", "public void setLocationAddressCity(String locationAddressCity) {\n if (TextUtil.isEmptyOrSpaces(locationAddressCity)) {\n this.locationAddressCity = null;\n } else {\n this.lo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the Port of the Clients Socket.
public int getPort() { return PORT; }
[ "public int getPort()\n\t{\n\t\treturn socket.getPort();\n\t}", "public int getConnectionPort() {\n\t\treturn socket.getPort();\n\t}", "public int getClientPort() {\n return config.getClientPort();\n }", "public int getServerPort()\r\n {\r\n return socket.getLocalPort();\r\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a TextView from a Readable.
public TextView(Appendable out) { this.out = out; }
[ "public TextView(Context object, AttributeSet object2, int n, int n2) {\n block173 : {\n block172 : {\n string2 = \"TextView\";\n super((Context)object, (AttributeSet)object2, n, n2);\n this.mEditableFactory = Editable.Factory.getInstance();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Multiplies the values of this vector by the given scale values and returns the result in store.
public CCVector2 multiply(final CCVector2 theScale, final CCVector2 theStore) { return multiply(theScale.x, theScale.y, theStore); }
[ "public void multiply(float scale);", "public void multi(final double scale);", "public void scale(double val) {\n x *= val;\n y *= val;\n z *= val;\n }", "public Vector scale(double scale){\n y = y * scale;\n x = x * scale;\n return this;\n }", "public void scale(float val...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the 'server_id' field.
public long getServerId() { return server_id; }
[ "@java.lang.Override\n public java.lang.String getServerId() {\n java.lang.Object ref = serverId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds an entity from database.
public CashTransaction findById(final int id) { LOG.debug("getting CashAccountTransaction instance with id: " + id); try { CashTransaction instance = entityManager .find(CashTransaction.class, id); LOG.debug("get successful"); return instance; ...
[ "CrudEntity<T> findById(Object id);", "@Override\n public T find(K id) {\n return getEntityManager().find(clazz, id);\n }", "public abstract T find(T obj) throws DAOException;", "public EntityType find(final Object id) {\n LOGGER.debug(\">>>>> com.itesoft.common.freemind.dao.common.Abstrac...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
retrieve the views from the edit popup window
public void submitChanges(View view) { final View contentView = dreamEditPPW.getContentView(); EditText dreamSubjectEP = (EditText) contentView.findViewById(R.id.dream_subject_ep); EditText dreamContentEP = (EditText) contentView.findViewById(R.id.dream_content_ep); // convert the text in the edit texts to str...
[ "private void findViews() {\n\t\tlvList = (ListView) findViewById(R.id.lv_item_list);\n\t\tbtnEdit = (Button) findViewById(R.id.btn_as_edit);\n\t\tbtnClose = (Button) findViewById(R.id.btn_as_close);\n\n\t}", "public Collection getPopupMethods(View v);", "private void findViews(){\n //Toolbar\n mT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs an instance from ISO8601 formatted strings. May pass nulls to create an empty instance.
public TimeSpan(String begin, String end) { this(TimestampUtils.parse(begin), TimestampUtils.parse(end)); }
[ "public ISO8601Date() {\n date = false;\n }", "ArrayList<DateTime> parseTimeStrings_ISO8601(ArrayList<String> s) {\n ArrayList<DateTime> d = new ArrayList<DateTime>();\n DateTimeFormatter formatter = DateTimeFormat.forPattern(getString(R.string.ISO8601_pattern));\n\n for (String t : s)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Description of the Method
private static void prtln(String s) { // System.out.println("SchemaRegistry: " + s); System.out.println(s); }
[ "@Override public String toString() {\n\t\treturn \"method\";\n\t}", "public static void DemoMethod() {\n\t\t\n\t}", "@Override\n }", "public void method();", "public String theMethod() {\n return \"OK\";\n }", "@Override\n public void method() {\n }", "@Override\r\n public...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
.tophap.mapbox_gl.ListValue list_value = 5;
public com.tophap.mapbox_gl.proto.Expressions.ListValue.Builder getListValueBuilder() { return getListValueFieldBuilder().getBuilder(); }
[ "public void startUpdateGlList() {\n/* 61 */ GL11.glNewList(this.glListClouds, 4864);\n/* */ }", "@JSProperty(\"features\")\n void setFeatures(GeoJSONFeature... value);", "void mo10244c(List<LatLng> list) throws RemoteException;", "void setGeoPoint(List<GeoPoint> _geoPoint_);", "private void add...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public List<CFTestPlan> findAllByStageAndScope(TestingStage stage, TestScope scope) { return testPlanRepository.findAllByStageAndScope(stage, scope); }
[ "@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" ] ] } }
image(Health, x 32, y 50, 130, 86); image(enemies[0], x, y);
ImageData CreateEnemy() { return new ImageData(0, x, y); }
[ "public void GameOverpic(){\n robotimage3 = new GreenfootImage(\"gameover.png\"); \n }", "public void act() \n {\n image = new GreenfootImage(\"\"+hp, 20, Color.YELLOW, new Color(0f, 0f, 0f, 0f));\n //image.drawString(\"\"+hp, x, y);\n setImage(image);\n }", "Enemy(double x, ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end ruleStateDefinition $ANTLR start entryRuleTransitionStatement ../org.yakindu.sct.statechart.expressions/srcgen/org/yakindu/sct/statechart/parser/antlr/internal/InternalExpressions.g:420:1: entryRuleTransitionStatement returns [EObject current=null] : iv_ruleTransitionStatement= ruleTransitionStatement EOF ;
public final EObject entryRuleTransitionStatement() throws RecognitionException { EObject current = null; EObject iv_ruleTransitionStatement = null; try { // ../org.yakindu.sct.statechart.expressions/src-gen/org/yakindu/sct/statechart/parser/antlr/internal/InternalExpressions.g:42...
[ "public final EObject entryRuleTransitionStatement() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleTransitionStatement = null;\n\n\n try {\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:393:2:...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void onItemClick(AdapterView<?> arg0, View arg1, int pos, long id) { int n=(int)lv.getSelectedItemPosition(); borrar(n); Toast.makeText(getApplicationContext(), "Devuelto+ ", Toast.LENGTH_LONG).show(); ...
[ "@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" ] ] } }