query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Is the context allowed to publish to the given topicPath. | boolean allowedToPublish(IMqttsnContext context, String topicPath, int size) throws MqttsnException; | [
"boolean hasTopicSettings();",
"boolean hasPublishRequest();",
"boolean canRender(String channelPublishId) throws AuthorizationException;",
"boolean canManage(String channelPublishId) throws AuthorizationException;",
"boolean topicExists(String topic);",
"public boolean canView(TopicMember topicMember) {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return an array containing at each index the maximum sum of a contiguous subsequence extremes excluded starting at index i. Time complexity is O(N) Space complexity is O(N) | static int[] maxContiguousSubsequenceStartingAt(int[] array) {
assert (array.length > 1);
final int n = array.length;
final int[] mcss = new int[n];
mcss[n - 2] = array[n - 2];
for (int i = n - 3; i > 0; i--) {
mcss[i] = Math.max(mcss[i + 1] + array[i], array[i]);
}
return mcss;
} | [
"public int maxSubArray(int[] nums) {\n\n //'i' will hold the initial marker, 'j' will hold the sums progressing forward from 'i' and 'k' will hold the sums progressing from the end.\n\n int startingIndex = 0;\n int endingIndex = nums.length;\n int maxSum = 0;\n\n for (int i = 0; i < nums.length - 1;... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
required uint64 map_size = 1; | public Builder setMapSize(long value) {
bitField0_ |= 0x00000001;
mapSize_ = value;
return this;
} | [
"@Test\n public void testSizeForNewMap() {\n assertEquals(0, map.size());\n }",
"java.lang.String getMapSize();",
"public static int getLineRequiredMapSize ()\n {\n return lineRequiredMap.size ();\n }",
"static int mapSize(HashMap<String, Integer> map) {\n\t\treturn map.size();\n\t}",
"pub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ANY" $ANTLR start "CONTAINS" | public final void mCONTAINS() throws RecognitionException {
try {
int _type = CONTAINS;
int _channel = DEFAULT_TOKEN_CHANNEL;
// CmisBaseLexer.g:93:10: ( ( 'C' | 'c' ) ( 'O' | 'o' ) ( 'N' | 'n' ) ( 'T' | 't' ) ( 'A' | 'a' ) ( 'I' | 'i' ) ( 'N' | 'n' ) ( 'S' | 's' ) )
// CmisBaseLexer.g:93:12: ( 'C' | 'c' ... | [
"public R visit(RecordContainsClause n);",
"public R visit(BlockContainsClause n);",
"ContainsStatement createContainsStatement();",
"public ExpressionBuilder anyOf(final String content) {\n patternContent.append(\"[\" + content + \"]\");\n return this;\n }",
"QueryBuilderInterf... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
.warmup.entity.User owner = 8; | public Builder setOwner(com.depromeet.warmup.grpc.entity.UserOuterClass.User value) {
if (ownerBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
owner_ = value;
onChanged();
} else {
ownerBuilder_.setMessage(value);... | [
"public void createUser(User owner) {\n\n\n }",
"public static void main(String[] args) {\n\n User user = User.builder().id(\"1\").name(\"builder\").age(1).build();\n\n System.out.println(user.getId());\n\n\n\n\n }",
"public abstract void use(Entity user);",
"public void mo91717d(User user... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a single CriteriaBuilder instance. | public static CriteriaBuilder getInstance(){
if (criteriaBuilder == null){
criteriaBuilder = new CriteriaBuilder();
}
return criteriaBuilder;
} | [
"public CriteriaBuilder getCriteriaBuilder() throws DAOException;",
"protected CriteriaBuilder getCriteriaBuilder(){\r\n\t return entityManager.getCriteriaBuilder();\r\n\t}",
"public com.google.ads.googleads.v13.resources.AdGroupCriterion.Builder getAdGroupCriterionBuilder() {\n bitField0_ |= 0x00001000... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this will perform a 11 excahnge between the carriers. accept 1 remove 1 | private boolean myGreatOpt11(Message carrierA, Message carrierB) {
String ipCarrA;
int portCarrA;
String ipCarrB;
int portCarrB;
Message savingsMsgCarrA;
Message savingsMsgCarrB;
Message replyMsgCarrA;
Message replyMsgCarrB;
Message msgA = new Mess... | [
"private void removeBarriers(){\n\t\tbarriers.clear();\n\t}",
"private void carsLeaving(){\n // Let cars leave.\n \tint i=0;\n \twhile (exitCarQueue.carsInQueue()>0 && i < exitSpeed){\n if (exitCarQueue.frontCar() instanceof AdHocCar){\n noPassholder--;\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Ticks the candles The method look for the 12 candles and goes through them if all lights of the candles successfully are turned off, the door opens | public void candleTick() {
doorflag = 0;
bomb1.tick();
bomb2.tick();
bomb3.tick();
for (Candle candle : candleList) {
candle.tick();
if (candle.getFlag())
doorflag++;
candle.tick();
if (doorflag == 12)
flagga1 = true;
}
} | [
"public static void lightCandles()\n {\n Robot.turnLeft();\n Robot.move();\n turnRight();\n lightCandle();\n lightCandle();\n lightCandle();\n lightCandle();\n lightCandle();\n lightCandle();\n lightCandle();\n lightCandle();\n l... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ renamed from: d | public byte mo296d() {
return this.f299e;
} | [
"private void d() {\n }",
"public void mo1857d() {\n }",
"public void setD(String d) {\n this.d = d;\n }",
"public boolean d() {\n }",
"protected void d()\r\n/* 49: */ {\r\n/* 50:57 */ super.d();\r\n/* 51: */ }",
"protected void mo4791d() {\n }",
"@Override\n\tpublic voi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Devuelve el nombre de un objeto de la clase Div. | public String toString() {
return "DIV";
} | [
"public static com.google.gwt.user.client.Element createDiv() {\n return Document.get().createDivElement().cast();\n }",
"@Override\n\tpublic String toString() {\n\t\treturn \"DIV\";\n\t}",
"String getChildrenDivClass(T node);",
"public HTMLDivElement getElementDivServicios() { return this.$element_DivSer... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Put code here to be run every loop | public void driveReverse(Joystick xbox1) {
double steerStick;
steerStick = xbox1.getRawAxis(0);
if(steerStick < .1 || steerStick > -.1) {
steerStick = 0;
}
driveTrain.arcadeDrive((xbox1.getRawAxis(2) + -xbox1.getRawAxis(3)), xbox1.getRawAxis(0));
} | [
"@Override\n public void run() {\n\n for (int i = 0; i < 30; i++) {\n saleticket();\n }\n }",
"public void loop() {\r\n\r\n }",
"public static void loop() {\n//\t\tDebug.init(\"robotinfo\");\n\n \torigin = here;\n \texploredGrid[50][50] = true; \n \ttry {\n \t\tpr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Displays the fps counter at the given position | public void displayFps(CSpriteBatch sb, Vector2 pos)
{
displayFps(sb, pos.x, pos.y);
} | [
"public void updateFPS(){\n\t\tif(getTime() - lastFPS > 1000) {\n\t\t\tDisplay.setTitle(\"FPS: \" + fps);\n\t\t\tfps = 0;\n\t\t\tlastFPS += 1000;\n\t\t}\n\t\tfps++;\n\t}",
"private void renderGuiFpsCounter(SpriteBatch batch)\n\t{\n\t\tfloat x = cameraGUI.viewportWidth-55;\n\t\tfloat y = cameraGUI.viewportHeight-1... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column PUBLIC.COMPUTER.WARRANTY_END_DATE | public Date getWarrantyEndDate() {
return warrantyEndDate;
} | [
"public String getPV_END_DATE()\n {\n return (PV_END_DATE == null) ? \"\" : this.PV_END_DATE;\n }",
"public Date getEndDate() {\n return getDate(END_TIME);\n }",
"public int getDate_end() {\n return date_end;\n }",
"public Date getEndDateTime() {\n return _endDateTime;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO add your handling code here: | private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {
} | [
"@Override\n public void extornar() {\n \n }",
"@Override\n }",
"protected void method_5557() {}",
"@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n\tprotected void handleResponse(Response response) {\n\n\t}",
"@Override\n protecte... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
New cluster configuration .yandex.cloud.mdb.opensearch.v1.ConfigUpdateSpec config_spec = 5; | public yandex.cloud.api.mdb.opensearch.v1.ClusterServiceOuterClass.ConfigUpdateSpec getConfigSpec() {
if (configSpecBuilder_ == null) {
return configSpec_ == null ? yandex.cloud.api.mdb.opensearch.v1.ClusterServiceOuterClass.ConfigUpdateSpec.getDefaultInstance() : configSpec_;
} else {
... | [
"ClusterMetricsConfiguration.Update update();",
"@Override\n public void initNewCluster(ClusterConfig config) throws RestApiException {\n HttpPost memInit = new HttpPost();\n Map<String,String> params = new HashMap<String, String>();\n params.put(\"memoryQuota\", \"\" + config.memoryQuota);\n memInit... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Obtiene el texto del mensaje contenido en textMessage | private StringBuffer getTextMessage() {
return textMessage;
} | [
"public String getMsgText(){\n return message.getText();\n }",
"public String getMessageText(){\n return messageText;\n }",
"public String getTextMessage() {\n\t\treturn textMessage;\n\t}",
"protected final String getMessageText ()\r\n {\r\n return (String) getParameter(TEXT_INDEX);... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
ParamValue returns fragments::ParamValue: PrimitiveValueAnnotationParam | ObjectValueAnnotationParam; | @Override public ParserRule getRule() { return rule; } | [
"public String getParamValue()\n {\n return paramValue;\n }",
"public Class<?>[] getParameter() {\n\t\treturn new Class[] { ValueParam.class };\n\t}",
"SM9Parameter getParams();",
"public java.lang.String getValueparam() {\r\n return valueparam;\r\n }",
"public Collection<AnnotationVa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parses the input stream and partitions the parsed items into a set of form fields and a set of file items. | public HttpServletRequest handleMultipartRequest(final RequestWrapper request, final ServletContext servletContext)
throws HdivMultipartException {
org.apache.commons.fileupload.DiskFileUpload upload = new org.apache.commons.fileupload.DiskFileUpload();
upload.setHeaderEncoding(request.getCharacterEncodin... | [
"public List<FileItem> parseRequest(HttpServletRequest request) throws FileUploadException;",
"@Override\n\t\tpublic void readFields(DataInput in) throws IOException {\n\t\t\titem1.readFields(in);\n\t\t\titem2.readFields(in);\n\t\t}",
"private static GeneExtraction processFile(FileItem item, GeneExtraction gene... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new DocumentRules. | public DocumentRules(IArchetypeService service) {
this.service = service;
} | [
"public IRule createRule() {\n\t\tfinal Rule rule = new Rule();\n\t\trules.add(rule);\n\t\tlogger.debug(\"END createRule()\");\n\t\treturn rule;\n\t}",
"public Rules() {\n }",
"ValidationRules createValidationRules();",
"JenaRuleDocument createJenaRuleDocument();",
"ConstrainedNaturalLanguageRules createCo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Processes title tags in the feed. | private String readTitle(XmlPullParser parser) throws IOException, XmlPullParserException {
parser.require(XmlPullParser.START_TAG, ns, "title");
String title = readText(parser);
parser.require(XmlPullParser.END_TAG, ns, "title");
return title;
} | [
"public void prepareTitle(){\n\t\tif(this.getTitle().trim().length()>0 && !isTitlePresent){\n\t\t\ttitle += this.getTitle();\n\t\t\tisTitlePresent = true;\n\t\t\tthis.setTitle(title);\n\t\t\tsb.append(title);\n\t\t}\n\t}",
"void setTitle(gov.nih.nlm.ncbi.www.TitleDocument.Title title);",
"private static String ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). The option is a: boolean type. Group: advanced | default AdvancedGoogleCalendarStreamEndpointBuilder synchronous(
boolean synchronous) {
doSetProperty("synchronous", synchronous);
return this;
} | [
"@Override\n public void setSynchronous(boolean synchronous) {\n this.synchronous = synchronous;\n }",
"default AdvancedHttpEndpointBuilder synchronous(boolean synchronous) {\n doSetProperty(\"synchronous\", synchronous);\n return this;\n }",
"default AdvancedJmsEndpoin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Actualizar la lista de cuentas | public void onActivityResult(int requestCode, int resultCode, Intent data)
{
MostrarCuentas();
} | [
"public void actualizarLista() {\n\n for (int i = 0; i < tutoriasSolicitadas.size(); i++) {\n // TODO\n adaptadorTutoriasSolicitadas.notifyDataSetChanged();\n }// for top 5\n }",
"public void reiniciarListas() {\n\t\trelacion.reiniciarListas();\n\t}",
"public void atualiza... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of interpreting the object as an instance of 'Reference'. This implementation returns null; returning a nonnull result will terminate the switch. | public T caseReference(Reference object) {
return null;
} | [
"public Object getReference();",
"ObjectRefType getObjectRef();",
"public T getReference() {\n T local = refrence;\n refrence = null;\n return local;\n }",
"public ObjectReference prepareObjectReference() {\n return null;\n }",
"public T caseReferenceDEntity(ReferenceDEntity object)\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This code based on the JavaTemplatesPage code. Modified to work with SSE | @Override
protected void insertTemplate(Template template, IDocument document) {
ISourceViewer contextViewer = fTextEditor.getTextViewer();
ITextSelection textSelection = (ITextSelection) contextViewer
.getSelectionProvider().getSelection();
if (!isValidTemplate(document, template, textSelection.getOf... | [
"private void translateXMLJSPContent(int type) {\n \n \t\tIStructuredDocumentRegion sdr = getCurrentNode().getNext();\n \t\tint start = sdr.getStartOffset();\n \t\tint end = sdr.getEndOffset();\n \t\tString sdrText = \"\"; //$NON-NLS-1$\n \n \t\tStringBuffer regionText = new StringBuffer();\n \t\t// read structured... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets a resource as a stream, relative to the meanings of this context's implementation. | public java.io.InputStream getResourceAsStream(String res)
{
return context.getResourceAsStream(res);
} | [
"public String getStream();",
"protected IResourceStream getResponseResourceStream()\n \t{\n \t\treturn new StringBufferResourceStream();\n \t}",
"public String getStream() {\n\t\treturn stream;\n\t}",
"public String getUri() { return streamResourceContainer.getUri(); }",
"public StreamInterface getInletStr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Deletes the key and returns the modified tree, which might not be the same object as the original tree Thus must afterwards just use the returned one | public BST<K,V> delete(K search) throws InvalidKeyException {
int compare = search.compareTo(key);
if (compare == 0) {
// Easy cases: 0 or 1 child -- return other
if (!hasLeft()) return right;
if (!hasRight()) return left;
// If both children are there, rotate up the successor (smallest on right)
... | [
"public O delete(int key) {\n\t\tBinaryTree<O> nodeToRemove = searchNode(key);\n\t\t\n\t\tif (nodeToRemove.getLeft() == null && nodeToRemove.getRight() == null) {\n\t\t\tBinaryTree<O> parent = nodeToRemove.getParent();\n\t\t\t\n\t\t\tif (parent == null) {\n\t\t\t\troot = null;\n\t\t\t\t\n\t\t\t\treturn nodeToRemove... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__DecisionNode__Group_6_3__1" $ANTLR start "rule__DecisionNode__Group_6_3__1__Impl" InternalActivityDsl.g:10744:1: rule__DecisionNode__Group_6_3__1__Impl : ( ( rule__DecisionNode__OutgoingAssignment_6_3_1 ) ) ; | public final void rule__DecisionNode__Group_6_3__1__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalActivityDsl.g:10748:1: ( ( ( rule__DecisionNode__OutgoingAssignment_6_3_1 ) ) )
// InternalActivityDsl.g:10749:1: ( ( rule... | [
"public final void rule__XAssignment__Group_1_1_0__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOcelet.g:10266:1: ( rule__XAssignment__Group_1_1_0__0__Impl )\n // InternalOcelet.g:10267:2: rule__XAssignment__Group_1_1... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieve the arguments of the method. | public List<CfgArgument> getArguments() {
return arguments;
} | [
"public Object[] getArgs() {\n return args;\n }",
"public Object[] getArgs() {\n if (args == null) {\n return null;\n } else {\n Object[] result = new Object[args.length];\n for (int i = 0; i < args.length; i++) {\n result[i] = args[i];\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
method to initialize the variables | private void initVariables() {
selectedCountriesList = new ArrayList<>();
allCountriesList = AppUtils.getInstance().getAllCountries(this);
selectedCountriesList.addAll(allCountriesList);
btnAction.setText(getString(R.string.save));
tvTitle.setText(getString(R.string.add_address))... | [
"public void initialise() {\n\t\titemId = \"0\";\n\t\torganId = \"0\";\n\t\tcreatorFlag = \"\";\n\t\torderBy = \"0\";\n\t\tfunctionLovId = \"0\";\n\t\tm_error_string = \"\";\n\t}",
"private void initializeVariables()\n {\n this.prefixes = new HashMap<String, String>();\n this.statements = new Arr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the ordinal value of a containment property. RDF containers use properties of the form _1, _2, _3 etc to represent the containment relationship between the container and the objects it contains. When invoked on such a containment property, this method returns the integer part of the property name. When invoked ... | public int getOrdinal(); | [
"@DISPID(2981)\r\n @PropGet\r\n int getOrdinal();",
"public int getOrdinalNumber()\n\t{\n\t\treturn ordinalNumber;\n\t}",
"public int getOrdinal() {\r\n return ordinal;\r\n }",
"@java.lang.Override\n public long getOrdinal() {\n return ordinal_;\n }",
"org.apache.xmlbeans.XmlSho... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to change store | public void GA_change_basestore(String ZipCode) throws Throwable {
actionLib.WebdriverWaitForPage();
actionLib.Click(CommonVariables.CommonDriver.get().findElement(Ecom.Selected_Store));
actionLib.Click(CommonVariables.CommonDriver.get().findElement(Ecom.Change_Store));
actionLib.type(CommonVariables.CommonDri... | [
"void upgradeStoreStructure() throws StoreException;",
"public void setStore(Store store) {\r\n\t\tthis.storeId = store.getId();\r\n\t\tsetDirty();\r\n\t}",
"public void setStoreType(StoreType storeType);",
"@Override\n\tpublic Bb_StoreDto updateStore(int seq) {\n\t\treturn bbaStoreDao.updateStore(seq);\n\t}"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
CONSTRUCTOR Constructs a new instance of Frame with no title. | public MFrame()
{
this("");
} | [
"public Frame()\n {\n this.number = -1;\n this.dirty = false;\n this.reference = false;\n }",
"public MainFrame() {\n\t\tsuper();\n\t\tinitialize();\n\t}",
"public Frame(GraphicsConfiguration paramGraphicsConfiguration) {\n/* */ this(\"\", paramGraphicsConfiguration);\n/* ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated .proto_def.RoomEventNotification.Gift gifts = 3; | public java.util.List<? extends proto_def.RoomMessage.RoomEventNotification.GiftOrBuilder>
getGiftsOrBuilderList() {
if (giftsBuilder_ != null) {
return giftsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(gifts_);
}
... | [
"public interface ILiveGiftMsg\n{\n UserModel getMsgSender();\n\n void setShowNum(int showNum);\n\n int getShowNum();\n\n boolean isTaked();\n\n void setTaked(boolean taked);\n\n /**\n * 是否可以被播放\n *\n * @return\n */\n boolean canPlay();\n\n /**\n * 是否需要叠加\n *\n * ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Once the Canvas is created its add notify method will call this method to start the LWJGL Display and game loop in another thread. | public void startLWJGL() {
gameThread = new Thread() {
@Override
public void run() {
try {
Display.setParent(displayParent);
} catch (LWJGLException e) {
e.printStackTrace();
}
// start game
game = gameFactory.createGame();
game.run();
}
};
gameThread.start();
} | [
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tGLCanvas canvas = new GLCanvas(); // heavy-weight GLCanvas\n\t\t\t\tcanvas.setPreferredSize(new Dimension(CANVAS_WIDTH,\n\t\t\t\t\t\tCANVAS_HEIGHT));\n\t\t\t\tNyxGL renderer = new NyxGL();\n\t\t\t\t\n\t\t\t\t// Spring-ify\n\t\t\t\t@SuppressWarnings(\"resource\")\n\t\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Devuelve el peso del borde dirigido. | public double peso() {
return peso;
} | [
"public void pasaportePrimero() {\n Nodo aux = cabeza;\n int cont = 0;\n\n while (aux != null) {\n if (pasaporteCedula(aux.getPersona().getCedula())) { //Cuenta cuantos pasaportes hay en la Lista.\n cont++;\n }\n aux = aux.getSiguiente();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the destinationType property: The destination type. | public String destinationType() {
return this.destinationType;
} | [
"public int getDestPayType() {\n return destPayType_;\n }",
"public int getDestPayType() {\n return destPayType_;\n }",
"public String getDestination()\n\t{\n\t\treturn this.destination;\n\t}",
"public int getDestination() {\n\t\treturn destination;\n\t}",
"public Object getDestination()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Barcode already handled in onTap | @Override
public void onBarcodeDetected(Barcode barcode) {
} | [
"protected void onBarcode(String barcode) { }",
"@Override\n public void onClick(View v) {\n readBarcode(10);\n }",
"@Override\r\n\tpublic void barcodeChanged() {\r\n\t}",
"@Override\n public void onClick(View v) {\n neuenBarcodeHinzufuege... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets a CWLExpression object representation for the coresMin | public void setCoresMinExpr(CWLFieldValue coresMinExpr) {
this.coresMinExpr = coresMinExpr;
} | [
"public M cscrSelectionMin(Object min){this.put(\"cscrSelectionMin\", min);return this;}",
"public M cssoiPriceMin(Object min){this.put(\"cssoiPriceMin\", min);return this;}",
"public M cscrCarMin(Object min){this.put(\"cscrCarMin\", min);return this;}",
"public M csrIdMin(Object min){this.put(\"csrIdMin\", m... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
release all resources hold by AudioTxPath. User shall not use AudioTxPath afterwards | public void release(){
} | [
"public void release()\n\t{\n\t\t//end the current state in the db\n\t\t//audio_inference = new ML_toolkit_object(System.currentTimeMillis()+appState.timeOffset, 5, false, ASobj.inferred_audio_Status);\n\t\t//appState.ML_toolkit_buffer.insert(audio_inference);\n\n\t\t//audio_inference = new ML_toolkit_object(Syst... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return this Column's name | public String getName() {
return name;
} | [
"public String getColumnName()\n {\n return m_name;\n }",
"@Override\n public String getColumnName(int column) {\n return COLUMNS[column].toString();\n }",
"Field getColname();",
"public java.lang.String getColName() {\n java.lang.Object ref = colName_;\n if (ref instanceof jav... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the user ID of this loan activity. | @Override
public long getUserId() {
return _loanActivity.getUserId();
} | [
"public long getUserId() {\n\t\treturn _learningActivityResult.getUserId();\n\t}",
"public Integer getUserActivityId() {\n return userActivityId;\n }",
"@Override\n\tpublic long getUserId() {\n\t\treturn _amfAuditLog.getUserId();\n\t}",
"@Override\n\tpublic long getUserId() {\n\t\treturn _socialLink... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called when the activity is first created. | @Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
} | [
"protected void onCreate() {}",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t\tinitData();\n\t\n\t}",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tULog.i(this, \"onCreate() \");\n\t\tinitData();\n\t}",
"@Override\n public void onCreate () {\n super.onC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the paymentTotal attribute. | public BigDecimal getPaymentTotal() {
return paymentTotal;
} | [
"public Currency getTotalAmount() {\n return totalAmount;\n }",
"public java.math.BigDecimal getTotal() {\r\n\t\treturn total;\r\n\t}",
"public BigDecimal getTotal() {\n return total;\n }",
"public long getTotalAmount() {\n return totalAmount_;\n }",
"public double getPaidAmount() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Collects and loads images Puts them in a map | public static void initializeImages() {
MediaTracker tracker = new MediaTracker(menuPanel);
File folder = new File("images");
for (File f : folder.listFiles()) {
Image img = Toolkit.getDefaultToolkit().getImage(f.toString());
tracker.addImage(img, 0);
Game.imageMap.put(f.getName(), img);
}
... | [
"private void loadImages() {\n\t\tif (imageUrlList != null && imageUrlList.size() > 0) {\n\t\t\tfor (Map.Entry<String, String> mapEntry : imageUrlList.entrySet()) {\n\t\t\t\tAQuery aquery = new AQuery(getBaseContext());\n\t\t\t\tfinal String idValue = mapEntry.getValue();\n\t\t\t\taquery.ajax(mapEntry.getKey(), Bit... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Requirement tested: An actor who is authenticated as a carrier must be able to manage his or her curriculums, which includes deleting them Sentence coverage: 100% Data coverage: 100%, as we test the method using a carrier with more than one curriculum, one with just one curriculum and with a non carrier user. We've t... | @Test
public void driverDelete() {
final Object testingData[][] = {
{
// Correct: This carrier owns more than one curriculum
"carrier1", "curriculum1", null
}, {
// Incorrect: The carrier is not the owner of the curriculum
"carrier1", "curriculum2", IllegalArgumentException.class
}, {
//... | [
"@Test\n @WithMockUser\n void deleteConducenteFailureOwnership() throws Exception {\n Conducente conducente = mock(Conducente.class);\n Utente utente = new Utente();\n when(risorseService.getConducente(0L)).thenReturn(Optional.of(conducente));\n when(accountService.getLoggedUser()).thenReturn(Optional... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ renamed from: a | void mo29438a(boolean z); | [
"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"
]
]
}
} |
one x in middle | @Test
public void Test8(){
assertEquals("fdsdfx", Recursion.endX("fdsdxf"));
} | [
"public int getXMiddle() {\r\n return x+getWidth()/2;\r\n }",
"public int centerX() { return x + width/2; }",
"private int getMiddle() {\n\t\treturn (int)Math.ceil((this.fanout + 1) / 2.0) - 1;\n\t}",
"public int left(int x){\n return 2*x;\n }",
"public float midX() {\n return ori... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Appends and returns a new empty "in2" element | public org.xmlsoap.schemas.soap.encoding.String addNewIn2()
{
synchronized (monitor())
{
check_orphaned();
org.xmlsoap.schemas.soap.encoding.String target = null;
target = (org.xmlsoap.schemas.soap.encoding.String)get_store().add_elem... | [
"public static void arrayList(Scanner in2) {\n\t\tint s;\n\t\twhile (in2.hasNext()) {\n\t\t\ts = in2.nextInt();\n\t\t\tint numbers = in2.nextInt();\n\t\t\tif (s == 0) { // Perform insert operation\n\t\t\t\tif (!L1.contains(numbers))\n\t\t\t\t\tL1.add(numbers);\n\t\t\t} else if (s == 1) { // Check whether element is... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Verify Asia tab is clicking | public void verifyAsiaUserZone()
{
try {
boolean asiaTab=elementPresent(OR.txt_Home_User_Zone_Asia);
if (asiaTab==true)
{
clickOn(OR.txt_Home_User_Zone_Asia);
testStepPassed("Asia tab is displayed");
}
else
{
testStepPassed("Asia tab is not displayed");
}
} catch (Exception e) ... | [
"public void verifyClickOnHereLink() {\n\t\t\n\t}",
"public void verifyTabLocation(String a) throws IOException,\n\t\t\tInterruptedException {\n\t\tList<String> browserTabs = new ArrayList<>(getDriver()\n\t\t\t\t.getWindowHandles());\n\t\tgetDriver().switchTo().window(browserTabs.get(1));\n\t\tString actualUrl = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a wellformed ITEF BCP 47 language tag representing this locale string identifier for the client's current locale | public static String toLanguageTag(@NonNull Locale locale) {
return toBcp47Language(locale);
} | [
"java.lang.String getLanguageId();",
"CE getLanguageCode();",
"@Generated\n @CFunction\n public static native CFStringRef CFLocaleGetIdentifier(CFLocaleRef locale);",
"public java.lang.String getLangTag() {\n return langTag_;\n }",
"public static String lang_isoName() {\n\t\treturn moduleProvider.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reads file linebyline. Deletes punctuation, splits the line into words, where a word is a string surrounded by spaces. Counts every word's usage. | @SuppressFBWarnings("DM_DEFAULT_ENCODING")
private static Map<String, Integer> countWords(File file) {
Map<String, Integer> map = new HashMap<>();
try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
String line;
String[] words;
while ((line = ... | [
"private void analyzeLine(String line)\r\n\t {\r\n\t String token; int len;\r\n\t String[] tokens = line.split(\"[,.;:?!() ]\");\r\n\t for(int i=0;i<tokens.length;i++)\r\n\t {\r\n\t token = tokens[i];\r\n\t len = token.length();\r\n\t if (len > 4)\r\n\t {\r\n\t ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Increases an images width and height, the old image will be in the top left corner of the new image; the rest will be transparent black | protected static BufferedImage increaseImageSize(final BufferedImage img, final int width, final int height)
{
final BufferedImage newImg = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
final Graphics g = newImg.createGraphics();
g.setColor(new Color(0, 0, 0, 0));
g... | [
"IImage downscale(int newHeight, int newWidth);",
"private BufferedImage resizeImage(Image originalImage, int width, int height) { \n BufferedImage resizedBI = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); \n Graphics2D g = resizedBI.createGraphics(); \n g.setComposite(Alph... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public String toString() {
return super.toString() +
"\n" +
"Duracação do DVD: " + DVD.this.duracao;
} | [
"@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"
]
]
}
} |
Method to verify google play services on the device | private boolean checkPlayServices() {
int resultCode = GooglePlayServicesUtil
.isGooglePlayServicesAvailable(getReactApplicationContext());
if (resultCode != ConnectionResult.SUCCESS) {
if (GooglePlayServicesUtil.isUserRecoverableError(resultCode)) {
Toast.mak... | [
"private boolean checkPlayServices(Activity activityContext) {\n GoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance();\n int resultCode = apiAvailability.isGooglePlayServicesAvailable(activityContext);\n if (resultCode != ConnectionResult.SUCCESS) {\n if (apiAv... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handles the HTTP GET method. | @Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
} | [
"@Override\n\tpublic void handleGET(CoapExchange exchange) {\n\n\t\t\n\t}",
"protected void doGet(HttpServletRequest req, HttpServletResponse response) throws ServletException, IOException {\r\n\t\tSystem.out.println(\"--> get\");\r\n\t}",
"public void doGet(HttpServletRequest request, HttpServletResponse respo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculates hash of a data range. Important: If some of the data can't be read immediately (e.g. due to idiosyncrasies of underlying storage), then this method may return incorrect result. | byte[] digest(DataRange data); | [
"public byte[] calculateHash() {\r\n byte[] hash = null;\r\n\r\n try {\r\n MessageDigest digest = MessageDigest.getInstance(\"SHA-256\");\r\n\r\n // Creates DataOutputSteam with underlying ByteArrayOutputStream\r\n ByteArrayOutputStream baos = new ByteArrayOutputStream... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets (as xml) the "msg" element | public void xsetMsg(org.apache.xmlbeans.XmlString msg)
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.XmlString target = null;
target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(MSG$0, 0);
... | [
"private void setMsg(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n msg_ = value;\n }",
"public static void setMessage(String msg) {\r\n if (!isMessageSet()) {\r\n MgnlContext.setAttribute(Context.ATTRIBUTE_MESSAGE, msg);\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Respawns the player at a given position. | public static void respawn(Vector2 spawn){
if(Day100.player == null || (Day100.player != null && Day100.player.isDead())){
Day100.player = new PlayerController(spawn);
}
} | [
"public static void respawn(final Player player) {\r\n\t\trespawn(player, 2);\r\n\t}",
"@Override\n public void respawn(Player p) {\n super.respawn(p);\n }",
"public void respawn() {\r\n\t\tleaveMapElement(position);\r\n\r\n\t\tGameLogger.log(\"Egy doboz létrejön a(z) \" + initPosition.toString() +... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
overide method onStart sangat penting agar saat data ada perubahan langsung listview bertambah | @Override
protected void onStart() {
super.onStart();
databaseReference.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
listKelas.clear();
for (DataSnapshot kelasSnapSh... | [
"@Override\n\tprotected void onStart() \n\t{\n\t\tif (!data.isEmpty() || !allmessage.isEmpty())\n\t\t{\n\t\t\t data.clear();\n\t\t\t allmessage.clear();\n\t\t}\n\t\tgetData();\n\t\tthis.initListView();\n\t\tsuper.onStart();\n\t}",
"@Override\n\t\t\tpublic void onStart()\n\t\t\t{\n\t\t\t\tsuper.onStart();\n\t\t\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Helper to read the message received by this channel. | public ByteBuffer readMsgBlocking(int timeout) throws IOException {
setBlocking();
getChannel().socket().setSoTimeout(timeout);
ByteBuffer hdr = ByteBuffer.allocate(Integer.SIZE/8);
while (hdr.hasRemaining()) {
getChannel().read(hdr);
}
hdr.flip();
... | [
"private TextMessage readMessage() throws IOException {\n flush();\n return reader.getNextMessage();\n }",
"private Message read(SelectionKey key) {\n try {\n //assuming that the message is never larger than 8192 bytes\n ByteBuffer readBuffer = ByteBuffer.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the current category as saved in SharedPreferences, or null if none is saved yet | private void initCategory() {
category = sharedPreferencesManager.getString(KEY_CATEGORY);
} | [
"private void createNewCategory(SharedPreferences pref, String cat) {\n SharedPreferences.Editor mEditor = pref.edit();\n Integer size = pref.getAll().size() + 1;\n mEditor.putString(size.toString(), cat);\n mEditor.apply();\n }",
"private void saveCategories() {\n Log.d(\"SA... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Three is a required listener that's not present | @Test
public void whenBeforeNicknameChangedIsCalledAndRequiredListenersAreNotPresentThenCallsAreBlocked() throws MUCEventRejectedException {
final Map<String, Set<EMUCEventType>> originalMap = createEventMap("Three", EMUCEventType.BeforeNickChanged);
Whitebox.setInternalState(MUCEventDispatcher.class, "allRequire... | [
"public void checkListener() {\n if (this.canTrack) {\n try {\n OSPurchasingListener oSPurchasingListener = (PurchasingListener) this.listenerHandlerField.get(this.listenerHandlerObject);\n if (oSPurchasingListener != this.osPurchasingListener) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method corresponds to the database table sys_setting | int updateByExample(@Param("record") SysSetting record, @Param("example") SysSettingExample example); | [
"public HashMap<String, String> getSystemSetting() {\n // TODO Auto-generated method stub\n return SQLiteDBHelper.getConfiguration(InternalKeyWords.Config_DBPath,InternalKeyWords.Config_TableName);\n }",
"@SelectProvider(type=CWVSysSettingSqlProvider.class, method=\"selectByExample\")\r\n @Res... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
change to directory using absolute pathing. (starting from root and then navigating) | @Test
/**
* changes to a directory using absolute pathing
*/
public void testAbsolute() {
jShell.setCurrentDir(subOne);
cmdArgs = new String[2];
cmdArgs[0] = "cd";
cmdArgs[1] = "/folderTwo/subThree";
cd.run(cmdArgs);
assertEquals(jShell.getCurrentDir(), subThree);
// chan... | [
"private void actionGotoDir() {\n if(ensureFileSystemLoaded()) {\n String targetAddress = addressField.getText();\n String[] addressComponents = controller.parseAddressPath(targetAddress);\n if(addressComponents != null)\n setCurrentDirectory(addressComponents)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
fill array with value | public static void fillArray(float[][] a, float value) {
for (int i = 0; i < a.length; i++) {
for (int j = 0; j < a[i].length; j++) {
a[i][j] = value;
}
}
} | [
"private static void fill(double m[], double val) {\n for (int i = 0; i < m.length; ++i) {\n m[i] = val;\n }\n }",
"public oArray<T> fill(T value) {\n\t\treturn fill(value, 0, length());\n\t}",
"@Override public void fill(final int fromIndex, final int toIndex, final Number value) {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
string id = 1; | com.google.protobuf.ByteString
getIdBytes(); | [
"int getID(String wordString);",
"static Identifier id(String s) {\n return new Identifier(s);\n }",
"public void setId(String string) {\n\t\t\n\t}",
"public void setaId(String str) {\n this.aId = str;\n }",
"public String getIDstring()\n/* */ {\n/* 154 */ return this.idString;\n/* ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
delete tower index i | public void requestSellTower(int i) {
this.gold += towerList.get(i).getPrice();
towerList.remove(i);
} | [
"public void deleteTerm(int i){this.remove(i);}",
"void removeDatiDDT(int i);",
"public void deleteTeacher(int index){\n teachers.remove(index);\n}",
"public void delete(int i) {\n bst.delete(i);\n }",
"private void del(int index) {\r\n this.getChildren().remove(this.buttons[index]);... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional .civilization.LoginRes loginRes = 5; | com.kongyt.civilization.messages.Message.LoginResOrBuilder getLoginResOrBuilder(); | [
"Cmd.Game.cmdNotifyLoginResult.enLoginResult getResult();",
"network.message.ServerResponses.Login getLogin();",
"private LoginResponse() {\n initFields();\n }",
"public String getLogin() {\r\n/* 105 */ return this.login;\r\n/* */ }",
"public void login() {//0\n\t\t\n\t}",
"private Login... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GetMapping for getting the current player of a running game, returns single Id | @GetMapping("/game/{id}/kickOff/currentPlayerIds")
@ResponseStatus(HttpStatus.OK)
@ResponseBody
public long getCurrentPlayer(@PathVariable(value = "id") Long id) {
return gameService.getGameById(id).getCurrentPlayerId();
} | [
"public int getId() {\r\n return player_id;\r\n }",
"int getPlayerId() {\n return playerId;\n }",
"public Player getPlayerWithId(String playerId);",
"public long getPlayerId() {\n return playerId_;\n }",
"public int getIdPlayer(){\r\n\t\treturn this.idPlayer;\r\n\t}",
"public long ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
} | [
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflator = getMenuInflater();\n\t\tinflator.inflate(R.menu.activity_action_bar, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu( android.view.Menu menu)\r\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Inflate the layout for this fragment | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
mOptionsView = inflater.inflate(R.layout.fragment_options, container, false);
int tempGridX =getArguments().getInt(GRIDX,3);
int tempGridY =getArguments... | [
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.movie_statistic_layout, parent, false);\n }",
"@Override\n\tprotected View initView(LayoutInflater inflate... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of interpreting the object as an instance of 'Alarm Event'. This implementation returns null; returning a nonnull result will terminate the switch. | public T caseAlarmEvent(AlarmEvent object)
{
return null;
} | [
"public T caseSignalEvent(SignalEvent object)\n {\n return null;\n }",
"public void handleAlarmEvent(Event e) {\n\t\tif (e.getAlarm() == null) throw new IllegalArgumentException(\"Event object did not contain an Alarm\");\n\t\tObjectNode wrapper = Json.newObject();\n\t\twrapper.put(\"action\", actionMap.get(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests that the addTracks works as expected. | @Test
public void testAddTracks() {
IMusicModel musicModel =
new MusicModel(4, 50,
new Melody(50,
new Chord(1,
new Note(Pitch.D_SHARP, 5, 1),
new Note(Pitch.A, 5, 2)),
... | [
"public void added(Iterable<? extends Track> tracks);",
"public boolean addTracks (int startTrack, int endTrack, Talk talk) {\n int diff = endTrack - startTrack + 1;\n int intTrack = startTrack;\n for ( int i = 0; i < diff; i++ ) {\n if ( !addTrack(intTrack,talk) ) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if field publicVersion is set (has been assigned a value) and false otherwise | public boolean isSetPublicVersion() {
return EncodingUtils.testBit(__isset_bitfield, __PUBLICVERSION_ISSET_ID);
} | [
"public boolean isSetPublishedVersion() {\n return EncodingUtils.testBit(__isset_bitfield, __PUBLISHEDVERSION_ISSET_ID);\n }",
"public boolean isPublic() {\n return ((Boolean) mFields.get(\"public\"));\n }",
"public boolean hasVersion() {\n return ((bitField0_ & 0x00000008) != 0);\n }"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
JB JP default constructor JP | public VideoGame(){
super();
} | [
"public RemoteImplementation() {\n\t}",
"SunEJBHelperImpl() {\n }",
"public jm() {}",
"public MonCheAppFacade( )\r\n\t{\r\n\t\tsuper();\r\n\t}",
"DefaultConstructor() {\n\t\tSystem.out.println(\"DefaultConstructor\");\n\t}",
"private JSDInterface() {\n\t\tsuper(0);\n\t}",
"public EnqueteModelJDBCImp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Execute the append function call | private static String appendfn(FnCall fn) throws Exception {
String value = makeReplacement(fn.trueCode, fn.cmds, fn.lkup, fn.intTable, fn.ds, fn.thisTag);
DcmElement el = fn.ds.get(fn.thisTag);
if (el == null) return value;
SpecificCharacterSet cs = fn.ds.getSpecificCharacterSet();
int vm = el.vm(cs);
if (... | [
"private static void append() {\n\t\t\n\t}",
"public void append (Run run);",
"public void append(Object o);",
"public static void appendMethod() {\n\n StringBuilder sb = new StringBuilder(\"\");\n sb.append(1).append(\"some\");\n sb.append(true);\n print(sb);// prints 1sometrue\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Connecting to Redis server on localhost | public static void main(String[] args) {
Jedis jedis = new Jedis("localhost");
System.out.println("Connection to server sucessfully");
//set the data in redis string
jedis.set("tutorial-name", "Redis tutorial");
// Get the stored data and print it
System.out.println("Stor... | [
"@Override\n public void connect(String url) throws LookupServiceException {\n client = RedisClient.create(url);\n connection = client.connect();\n redisCommands = connection.sync();\n\n /*\n RedisURI redisURI = RedisURI.builder().\n RedisURI redisUri = RedisURI.Builder.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if a color is valid. | public static boolean isColorValid(String hexColor) {
final char firstHexLetter = 'A';
final char lastHexLetter = 'F';
if (hexColor != null && hexColor.length() == hexColorLength) {
for (char c : hexColor.toCharArray()) {
if (!Character.isDigit(c)) {
if (!(c >= firstHexLetter && c <= lastHexLetter)) {... | [
"public void validateColor() {\r\n\t\ttry {\r\n\t\t\tNoveltyType noveltyTypeAux = noveltyTypeDao.colorExists(\r\n\t\t\t\t\tnoveltyType.getId(), idColor);\r\n\t\t\tif (noveltyTypeAux != null) {\r\n\t\t\t\tString messageExistence = \"message_ya_existe_verifique\";\r\n\t\t\t\tControladorContexto.mensajeErrorEspecifico... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ return n number of specified message nodes starting from the last specified node and going upwards not including the specified node key | public void getNextNMessages (String child, String key, final String start, int amount) {
Query query;
if (!start.equals("")) {
query = FirebaseDatabase.getInstance().getReference("messages").child(child)
.child(key).orderByKey().endAt(start);;
} else {
... | [
"public Node findNthNodeFromEnd(int n) {\r\n\t\tint size = 0;\r\n\t\tNode currentNode = getRoot();\r\n\r\n\t\twhile(currentNode.getNext()!=null) {\r\n\t\t\tcurrentNode = currentNode.getNext();\r\n\t\t\tsize ++;\r\n\t\t}\r\n\r\n\t\t//traverse from the front and traverse for (length - n + 1) \r\n\t\tint traversalLeng... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Ensure that Rule Template Attributes that should generate a field on the lookup form do so. | @Test
public void testAdditionalAttributes() {
RuleTemplateBo template = KEWServiceLocator.getRuleTemplateService().findByRuleTemplateName("Testing.Template");
RuleBaseValuesLookupableHelperServiceImpl lookupableHelperService = new RuleBaseValuesLookupableHelperServiceImpl();
lookupableHelpe... | [
"void validate(Field metaField, FieldMetaData fmd) {\n\n }",
"@Override\n protected void doAdditionalValidation(final ValidationContext context) {\n }",
"@Override\n\t\t\tpublic boolean shouldSkipField(FieldAttributes f) {\n\t\t\t\treturn f.getName().equalsIgnoreCase(\"name\");\n\t\t\t\t//return false;... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ JADX WARNING: inconsistent code. / Code decompiled incorrectly, please refer to instructions dump. | private boolean isChipSwitchSupport(int freq) {
if (this.mMSSSwitchCapa == 3) {
return true;
}
if (this.mMSSSwitchCapa != 1) {
return false;
}
synchronized (this.mSyncLock) {
if (freq < 2412 || freq > MAX_FREQ_24G) {
} else {
... | [
"public String method_8412() {\r\n // $FF: Couldn't be decompiled\r\n }",
"static void method_571() {\r\n // $FF: Couldn't be decompiled\r\n }",
"static void method_6601() {\r\n // $FF: Couldn't be decompiled\r\n }",
"static void method_5455() {\r\n // $FF: Couldn't be decompiled\r\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Update the point with its velocity | public void update()
{
this.setFloatX(this.x + this.velocity.x);
this.setFloatY(this.y + this.velocity.y);
} | [
"public void update(){\n this.positionX = this.positionX + velocityX;\n this.positionY = this.positionY + velocityY;\n }",
"public void updatePosition() {\n\t\tx += velX;\n\t\ty += velY;\n\t}",
"public void updatePosition() {\r\n\t\tposition[0] += velocity[0];\r\n\t\tposition[1] += velocity[1];... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
End of variables declaration//GENEND:variables | @Override
public void keyTyped(KeyEvent e) {
} | [
"private static void EX5() {\n\t\t\r\n\t}",
"@Override\n\tprotected void initVariable() {\n\t\n\t}",
"public void mo17751g() {\n }",
"public void mo1857d() {\n }",
"public static void Q22()\r\n\t{\r\n\t}",
"public void mo28221a() {\n }",
"public void mo3914b() {\n }",
"protecte... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | public boolean onDown(MotionEvent e)
{
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"
]
]
}
} |
Format: Variable length, up to 10,2 NDescription: The prorate amount (for prorated subscriptions). | @ApiModelProperty(example = "11.13", value = "<strong>Format: </strong>Variable length, up to 10,2 N<br><strong>Description: </strong>The prorate amount (for pro-rated subscriptions).")
public BigDecimal getProrateAmt() {
return prorateAmt;
} | [
"@Override\n\tpublic String toString(){\n\t\treturn super.toString() + String.format(\"$%-20s\", getNetMonthlyPay());\n\t}",
"public String getPricing(){\r\n\t\tif(rentalCost != 0) {\r\n\t\t\treturn retailCost + \" \" + rentalCost;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn retailCost + \"\";\r\n\t\t}\r\n\t}",
"pub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generate Random Customers First Name: | public String generateFirstName() {
int rand = (int) (Math.random() * 25);
switch (rand) {
case 0:
return "elad";
case 1:
return "kobi";
case 2:
return "dan";
case 3:
return "haki";
case 4:
return "heli";
case 5:
return "natali";
case 6:
return "omer";
case 7:
... | [
"public static String randomFirstName() {\n Boolean gender = randomBoolean();\n if(gender == true) {\n return femaleFirstNames[randomIntegerBetween(0, femaleFirstNames.length - 1)];\n } else {\n return maleFirstNames[randomIntegerBetween(0, maleFirstNames.length - 1)];\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if this collection changed as a result of the call | boolean add(E e); | [
"public boolean isChanged() {\n return changed.get();\n }",
"public boolean hasChanged() {\n return modified;\n }",
"public boolean hasChanges()\n {\n return hasChanges;\n }",
"private boolean hasChanged() {\n return toInsert.size() > 0 || toDelete.size() > 0;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return a number between 0 and 100, based on a given value. The result is scaled by 0 and 100 by making 0 correspond to the given bottom value and 100 correspond to the given top value. If the bottom is larger than the top, then this method will return still scale so that the bottom corresponds to 0 and 100 to the top. | public static int getRatingZeroToOneHundred(int bottom, int top, int value) {
float range = Math.abs(top - bottom);
int normalize = value - Math.min(top, bottom);
int answer = (int) ((normalize / range)* 100 + 0.5);
answer = Math.max(answer, 0);
answer = Math.min(answer, 100);
... | [
"private double getY(double value)\n {\n double aniMin = (min - oldMin) * aniProgress / (float)ANIMATION_TICKS + oldMin;\n double aniMax = (max - oldMax) * aniProgress / (float)ANIMATION_TICKS + oldMax;\n\n double top = PADDING;\n double bottom = getHeight() - PADDING_BOTTOM;\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the text matcher for field values. | public TextMatcher getValueMatcher() {
return valueMatcher;
} | [
"@Nullable\n public String getHintTextToMatch() {\n return hintTextToMatch;\n }",
"java.lang.String getCorrectedValueText();",
"public JRExpression getValueExpression();",
"@Override\n\tpublic String getTextValue() {\n\t\treturn (resolvedText != null ? resolvedText : ownText);\n\t}",
"public String get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return this card's name | public String getCardName() {
return cardName;
} | [
"public String name() {\n name = \" My Cards\" ;\n return name;\n }",
"public String toString() {\n\t\tString cardName = indexToRank(cardRank) + \" of \" + indexToSuit(cardSuit);\n\t\treturn cardName;\n\t}",
"private String setName()\n {\n if(cardNumber>10)\n {\n re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This is interface for SMS Sender/s | public interface SmsSender {
/**
* This method sends SMS to specified user on his/her mobile number.
*
* @param user user to whom SMS needs to be sent
* @param campaign organisation campaign
*/
void send(final User user, final OrganisationCampaign campaign);
} | [
"public void sendSMS() {\n }",
"public interface SmsCodeSender {\n void send(String mobile,String code);\n}",
"public interface SmsSender {\n\n void sendSms(String phone, String Code); //, String params\n\n\n}",
"@Override\n\tpublic void send() {\n\t\tSystem.out.println(\"This is Sms Sender\");\n\t}"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the name of the waypoint. | public String getWaypointName() {
return waypointName;
} | [
"java.lang.String getPlaceName();",
"public String getName() {\r\n\t\treturn (_goalAction != null) ? _goalAction.getName() : null;\r\n\t}",
"public String getName()\n {\n return \"P\"+getpId();\n }",
"public String getName()\n {\n return GreenfootUtil.extractClassName(getQualifiedName()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method that generates a completely new id that is unique | public static synchronized String generate() {
long now = System.currentTimeMillis();
boolean duplicateTime = now == LAST_PUSH_TIME;
LAST_PUSH_TIME = now;
char[] timeStampChars = new char[8];
for (int i = 7; i >= 0; i--) {
timeStampChars[i] = PUSH_CHARS.charAt((int)... | [
"long generateID();",
"public void UniqueIDgen() {\n\n UUID uniqueKey = UUID.randomUUID();\n setId(uniqueKey.toString());\n\n }",
"private String generateId(){\n return UUID.randomUUID().toString()\n .replace(\"-\", \"\");\n }",
"private UUID generateID() {\n\t\tUUID ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Construct a server that listens on the specified port. setConnFactory() must be called to establish a connection factory. | public ServerThread(int port) {
this(port, null);
} | [
"public Server(Integer port) {\n try {\n server = new ServerSocket(port);\n System.out.println(\"Init Server\");\n this.start();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public Server (int aport)\n {\n if (aport == 0)\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO Autogenerated method stub | @Override
public void startGame(int playerNum) {
} | [
"@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"
]
]
}
} |
Zooms by scaling the scene by the given factor as related to the original scene size. Repeated calls of this method with the same zoom factor will not change the scene size. Take care: This method does not throw a positioning exception while zooming out. The caller should make sure, that the scaling of the scene does n... | public void zoom(float newZoomFactor) {
if (newZoomFactor == zoomFactor) {
return;
}
float scaleFactor = newZoomFactor / this.zoomFactor;
this.zoomFactor = newZoomFactor;
float xCenterOld = view.centerX();
float yCenterOld = view.centerY();
float sceneWidthOld = this.scene.getWidt... | [
"public void zoom(double factor) {\n if (factor == 0) {\n return;\n }\n proj.setLonWidth(proj.getWidth() / proj.getPixPerLon() / factor);\n project();\n }",
"private void setZoomFactor(final double zoomFactor)\n\t{\n\n\t\tfinal double zoomFactorRatio = zoomFactor / curren... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the list of configuration files that were loaded while processing compiler settings. | List<String> getLoadedConfigurationFiles(); | [
"public static List<GeneratorConfig> getGeneratorConfigs() {\n\t\tif (Constants.configList == null) {\n\t\t\tList<File> files = getListFiles(Constants.CONF_DIR);\n\t\t\tConstants.configList = getConfigsByFiles(files);\n\t\t}\n\t\treturn Constants.configList;\n\t}",
"public List<String> getConfigurationResources()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns an ordered range of all the khach hangs. Useful when paginating results. Returns a maximum of end start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtilALL_POS will return the full result set... | public static List<KhachHang> findAll(
int start, int end, OrderByComparator<KhachHang> orderByComparator,
boolean retrieveFromCache) {
return getPersistence().findAll(
start, end, orderByComparator, retrieveFromCache);
} | [
"@Override\n\tpublic List<Agenda> findAll(\n\t\tint start, int end, OrderByComparator<Agenda> orderByComparator) {\n\n\t\treturn findAll(start, end, orderByComparator, true);\n\t}",
"public static List<PhatVay> findAll(\n\t\tint start, int end, OrderByComparator<PhatVay> orderByComparator) {\n\n\t\treturn getPers... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor for tweet spout that accepts the credentials | public TweetSpout(
String key,
String secret,
String token,
String tokensecret,
String strkey)
{
custkey = key;
custsecret = secret;
accesstoken = token;
accesssecret = tokensecret;
keyword = strke... | [
"private TwitterOAuth() { \n\t\t\t\n\t}",
"public Twitter() {\r\n time=0;\r\n collecttweet=new HashMap<>();\r\n collectusers =new HashMap<>();\r\n }",
"public Twitter()\n\t{\n\t\ttweet = new HashMap<>();\n\t\tfollow = new HashMap<>();\n\t\ttweetList = new ArrayList<>();\n\t}",
"public ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns the old parent node | private Node disconnectFromParent()
{
Relationship toParentNode = treeNode.getSingleRelationship(
RelTypes.SUB_TREE, Direction.INCOMING );
Node parentNode = toParentNode.getStartNode();
toParentNode.delete();
return parentNode;
} | [
"public ParseNode parent() { return parent; }",
"public treeNode getParent()\r\n\t {\r\n\t\t return parent;\r\n\t }",
"public Node getParent() {\n/* 197 */ return this.parent;\n/* */ }",
"public Tree getParent () {\r\n\tcheckWidget();\r\n\treturn parent;\r\n}",
"public pt.ist.fenixframework.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |