query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
This method merges the documentation built with the JSONDoc default scanner with data extracted from the Spring's annotations. Path is calculated as the concatenation between the RequestMapping "value" on the controller class and the RequestMapping "value" on the method signature. Eventually replaces the "path" value o...
@Override public ApiMethodDoc mergeApiMethodDoc(Method method, Class<?> controller, ApiMethodDoc apiMethodDoc) { apiMethodDoc.setVerb(getApiVerbFromSpringAnnotation(method, controller)); apiMethodDoc.getProduces().addAll(getProducesFromSpringAnnotation(method, controller)); apiMethodDoc.getConsumes().addAll(getC...
[ "Map<String, Object> swagger();", "public interface IControllerDocBuilder {\n\n /**\n * build api docs and return as string\n *\n * @param controllerNode\n * @return\n */\n String buildDoc(ControllerNode controllerNode) throws IOException;\n\n}", "void buildApiDocumentation(MethodDocBu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of getKey method, of class Parameter.
@Test public void testGetKey() { System.out.println("getKey"); Parameter instance = new Parameter("key", "value"); String expResult = "key"; String result = instance.getKey(); assertEquals(expResult, result); // TODO review the generated test code and remove the defau...
[ "@Test\n public void testGetKey() {\n System.out.println(\"getKey\");\n assertEquals(\"avain1\", instance.getKey());\n }", "boolean hasParameter(String key);", "P getParam(final E key);", "@Test\n\tpublic void testGetKey() {\n\t\tGeneralTree<String> gt = new GeneralTree<String>();\n\t\tass...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether the 'catagory' field has been set.
public boolean hasCatagory() { return fieldSetFlags()[3]; }
[ "public boolean isSetCatName() {\n return this.catName != null;\n }", "public void setCatagory(java.lang.String value) {\n this.catagory = value;\n }", "public boolean isSetCategory() {\n return this.Category != null;\n }", "public boolean isSetCategory() {\n return this.category != null;\n }"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Uninstalls the necessary listeners.
protected void uninstallListeners() { if (this.window != null) { this.window.removeWindowListener(this.windowListener); this.window.removePropertyChangeListener(this.propertyChangeListener); } }
[ "protected void uninstallListeners() {\n }", "protected void uninstallListeners() {\n\t}", "void unregisterListeners();", "public void resetListeners() {\n\t\tfinal ListenerSupport<AgentShutDownListener> backup = new ListenerSupport<>();\n\n\t\tgetListeners().apply(backup::add);\n\n\t\tbackup.apply(listene...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Get Course Meeting Returns a Course Meeting for the given meeting Id. The "course.attendance.VIEW" entitlement is required to view a Course Meeting. Since: 3500.7.0
public static RestCall<CourseMeeting> getCourseMeeting(String courseId, String meetingId) { return RestCallBuilder .start(new TypeToken<CourseMeeting>() {}) .get() .url("/learn/api/public/v1/courses/{courseId}/meetings/{meetingId}") .pathParam("courseId", courseId...
[ "public Meeting getMeeting(String id) throws Exception;", "public void setMeetingId(int meetingId) {\n this.meetingId = meetingId;\n }", "public static RestCall<List<CourseMeeting>> getCourseMeetings(String courseId) {\n return RestCallBuilder\n .start(new TypeToken<List<CourseMeetin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Demonstrates some basic types that you can use as parameters and return values in AIDL.
public void basicTypes(int anInt, long aLong, boolean aBoolean, float aFloat, double aDouble, String aString) throws android.os.RemoteException;
[ "BasicType createBasicType();", "@Override\n public void basicTypes(int anInt, long aLong, boolean aBoolean, float aFloat, double aDouble, String aString) throws android.os.RemoteException {\n android.os.Parcel _data = android.os.Parcel.obtain();\n android.os.Parcel _reply...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieve the Risk Aversion Parameter
public double riskAversion() { return _dblRiskAversion; }
[ "public double riskAversion()\n\t{\n\t\treturn _riskAversion;\n\t}", "String getValParam();", "public abstract int getParameterValueMode();", "java.lang.String getParameterValue();", "String getRisk();", "public Long getParameterVersion() {\n return this.parameterVersion;\n }", "String getPara...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
readHTTPline() is specific to the needs of the HTTP protocol: it reads a line ending with CRLF. As RFC 2616 section 5.1 allows us to assume, no CR or LF characters may appear in the line except in the final CRLF sequence. As RFC 2616 section section 2.2 explains, the line can only contain ASCII and perhaps ISO88591, an...
private static String readHTTPline(InputStream in) throws IOException { StringBuffer sb = new StringBuffer(); int c; while ((c = in.read()) >= 0 && c != '\n') { if (c != '\r') // can only be the CR before the LF sb.append((char) (byte) c); } return sb....
[ "public String readCRLFLine() throws IOException {\n\t\tStringBuilder sb = new StringBuilder();\n\t\t\n\t\tint i = read();\n\t\twhile(i != -1) {\n\t\t\tchar c = (char) i;\n\t\t\tsb.append(c);\n\t\t\t\n\t\t\tint length = WebServer.CRLF.length();\n\t\t\tif (sb.length() >= length && sb.substring(sb.length() - length)....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the path to the indexing configuration file.
public void setIndexingConfiguration(String path) { indexingConfigPath = path; }
[ "public void setIndexDirectoryPath(String path) {\n indexDirectoryPath = path;\n }", "public static synchronized void setConfigFilePath(String path) {\r\n configFilePath = path;\r\n }", "public boolean setIndexDirectory(String path) {\n if (path != null && path.length() != 0) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Spring Data JPA repository for the ContentType entity.
@SuppressWarnings("unused") @Repository public interface ContentTypeRepository extends JpaRepository<ContentType, Long> { }
[ "@SuppressWarnings(\"unused\")\n@Repository\npublic interface CodeTypeRepository extends JpaRepository<CodeType, Long> {\n\n CodeType findByTypeCode(String typeCode);\n}", "public interface TypeRepository extends JpaRepository<Type,Long> {\n\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculate the current steps using the sensor and add it to Firebase
@Override public void onSensorChanged(SensorEvent event) { /*final DocumentReference dr = nFirestore.collection("User").document(mAuth.getCurrentUser().getUid());*/ if (running){ steps = findViewById(R.id.steps); final Map<String,Object> userMap = new HashMap<>(); ...
[ "@Override\n public void onSensorChanged(SensorEvent event) {\n int curTotalSteps = (int) event.values[0];\n int curSteps=0;\n if(prevTotalStep ==0){\n prevTotalStep =curTotalSteps;\n return;\n }else{\n curSteps = curTotalSteps- prevTotalStep;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the maritime reference of this dm history maritime.
public void setMaritimeReference(java.lang.String maritimeReference) { _dmHistoryMaritime.setMaritimeReference(maritimeReference); }
[ "@Override\n\tpublic void setMaritimeReference(java.lang.String maritimeReference) {\n\t\t_dmHistoryMaritime.setMaritimeReference(maritimeReference);\n\t}", "@Override\n\tpublic void setMaritimeName(java.lang.String maritimeName) {\n\t\t_dmHistoryMaritime.setMaritimeName(maritimeName);\n\t}", "@Override\n\tpubl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the amAdmCjg value for this TDadosConjugeCliente.
public int getAmAdmCjg() { return amAdmCjg; }
[ "public void setAmAdmCjg(int amAdmCjg) {\n this.amAdmCjg = amAdmCjg;\n }", "public String getGeciciAda() {\r\n\t\treturn geciciAda;\r\n\t}", "public String obtCadena()\r\n\t{\r\n\t\treturn cadena;\r\n\t}", "public int getCAlmacen() {\n return cAlmacen;\n }", "public java.lang.String getC...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Pesquisar Materiais pelo idServicoTipo na tabela de ServicoTipoMaterial Recupera os materiais do servico tipo material
public Collection recuperarMaterialServicoTipoConsulta(Integer idServicoTipoMaterial) throws ErroRepositorioException{ Collection retornoConsulta = null; Collection retorno = new ArrayList(); Session session = HibernateUtil.getSession(); String consulta = ""; try{ if(idServicoTipoMaterial != null){ ...
[ "public Collection<Integer> recuperarMaterialServicoTipo(Collection<Integer> materiais) throws ErroRepositorioException{\n\n\t\tCollection<Integer> retornoConsulta = new ArrayList();\n\n\t\tSession session = HibernateUtil.getSession();\n\n\t\tString consulta = \"\";\n\n\t\ttry{\n\t\t\tif(materiais != null && !mater...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
agrega nodo a arreglo de vertices
public boolean agregarNodo(int nodo){ for(int i=0;i<vertices.length;i++){ //si ya existe devuelve false if(vertices[i]==nodo) return false; } for(int i=0;i<vertices.length;i++){ //si no existe lo agrega y devuelve true if(vertices...
[ "public void agregarNodo() {\n \t\n \tthis.vertices.fitsArreglo(1);\n \t\n\t\tPar sito = new Par(new Nodo(this.numVertices++), new Lista<Lado>());\n\t\tthis.vertices.agregar_final(sito);\n }", "public void agregarNodo(int cantidad) {\n \t\n \ttry {\n\t if (cantidad == 0)\n\t \tretu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column perms.perms_t_staff.cl_birth_date
public void setClBirthDate(Date clBirthDate) { this.clBirthDate = clBirthDate; }
[ "public void setBirth_date(Date birth_date) {\n this.birth_date = birth_date;\n }", "public com.sudoku.comm.generated.User.Builder setBirthDate(java.lang.String value) {\n validate(fields()[2], value);\n this.birthDate = value;\n fieldSetFlags()[2] = true;\n return this; \n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the one_time_only value for this ZZPkgContent.
public void setOne_time_only(int one_time_only) { this.one_time_only = one_time_only; }
[ "public void setJustInTime(boolean justInTime) {\r\n this.justInTime = justInTime;\r\n this.setChanged();\r\n this.notifyObservers();\r\n }", "public void setFirstTime(Date firstTime);", "public static void SetTimeDate(boolean on){\n\t\tif (on) {\n\t\t\t System.out.println(\"GUI:: SetTim...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter Methods Interpretation Getter method that requests a list of DisplayFormat objects each containing the relevant information about a User object from the Model that has been made generic by the corresponding compile[type]Data() for the View to use in displaying that object visually.
public ArrayList<DisplayFormat> getUserData(){ ArrayList<DisplayFormat> out = new ArrayList<DisplayFormat>(); for(User u : library.getUserCatalogue().getUsers()) { out.add(compileUserData(u)); } return out; }
[ "public abstract String getDisplayClass();", "public java.lang.String getDisplayFormat() {\r\n return displayFormat;\r\n }", "public List<FormatInfo> getFormats()\r\n\t{\r\n\t\tString[] pathParams = { ConnectorConstants.FORMAT_NAME };\r\n\t\t\r\n JAXRSConnector<JAXBElement<FormatList>> connecto...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if the property is embedded
public static boolean isEmbedded(MetaProperty metaProperty) { return metaProperty.getAnnotatedElement().isAnnotationPresent(jakarta.persistence.Embedded.class) || metaProperty.getAnnotatedElement().isAnnotationPresent(jakarta.persistence.EmbeddedId.class); }
[ "protected boolean isEmbedded ()\n {\n return (_ancestors != null);\n }", "boolean isEmbedded();", "private static <T> boolean isEmbeddedType(String property, ManagedType<T> classMetadata) {\n return classMetadata.getAttribute(property).getPersistentAttributeType() == PersistentAttributeType...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the encoding of this script.
public Charset getScriptEncoding() { return encoding; }
[ "String getEncoding();", "public String getEncoding();", "public String getEncoding() {\n return encoding;\n }", "public String getEncoding() {\n return encoding;\n }", "public String getEncoding() {\n if (isReference()) {\n AbstractFileSet ref = getRef(getProject());...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__TV_spec__Group__2__Impl" $ANTLR start "rule__TV_spec__Group__3" ../org.xtext.example.rmodp.ui/srcgen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:16334:1: rule__TV_spec__Group__3 : rule__TV_spec__Group__3__Impl rule__TV_spec__Group__4 ;
public final void rule__TV_spec__Group__3() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:16338:1: ( rule__TV_spec__Group__3__Impl rule...
[ "public final void rule__TV_spec__Group__2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:16307:1: ( rule__TV_spec__Gr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Verify mask as complete popup is close
public void verifyMarksAsCompletePopupIsClose() { getLogger().info("Verify mask as complete popup close"); try { boolean isClickClose = waitForCssValueChanged(popUpMarkCompleteWindows, "PopUp Mark Complete", "display", "none"); if (isClickClose) { NXGReports.addSt...
[ "public boolean closePopup();", "public void checkClose() {\n //to close window\n if (input.isKeyDown(Input.KEY_ESCAPE)) {\n closeRequested();\n }\n }", "public boolean checkAutoClose();", "public static boolean isCloseRequested() {return Display.isCloseRequested();}", "bo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Put passwordless authentication account.
public static void putPasswordlessAuthenticationAccount(final RequestContext requestContext, final Object account) { requestContext.getFlowScope().put("passwordlessAccount", account); }
[ "Account createAccount(String passphrase);", "void changePassword(Long accountId, String password);", "@Test\n public void testAccountSetPassword() {\n try {\n Account newAcc = new Account(1, \"holder\", \"holder\", Credential.ADMIN);\n newAcc.setPassword(\"newPasswordForHolder\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the topicHandle value.
public String getTopicHandle() { return this.topicHandle; }
[ "public void setTopicHandle(String topicHandle) {\n this.topicHandle = topicHandle;\n }", "public String getHandle() {\r\n return handle;\r\n }", "public Long getTopicId() {\n return topicId;\n }", "public String getHandle() {\n return this.handle;\n }", "public java....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the additionalProperties property: Additional details of this usage item. By default this is not populated, unless it's specified in $expand.
public String additionalProperties() { return this.innerProperties() == null ? null : this.innerProperties().additionalProperties(); }
[ "@ApiModelProperty(value = \"History items custom additional properties\")\n public Map<String, String> getAdditionalProperties() {\n return additionalProperties;\n }", "protected Map<String, Object> getAdditionalProperties()\n {\n return additionalProperties;\n }", "public SchemaOrBoolean get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
To handle the case where data sections are incomplete, with leadin missing, this by default overrides the given value of sepFirst for biphase sections with this issue. To prevent overriding, give sepFirst as a negative value or zero. The return value is the concatenation of the strings corresponding to the individual s...
public String joinedDurationsToString( int[][] data, String sep, int sepFirst, int sepInterval ) { if ( data == null ) return "** No signal **"; StringBuilder sb = new StringBuilder(); for ( int[] d : data ) { if ( sb.length() > 0 ) sb.append( ' ' ); sb.append( durationsToStr...
[ "public String getDefaultSeparator();", "boolean getSeparatorNull();", "io.dstore.values.StringValue getSeparator();", "public String getSeparator();", "public static String getPrefix(String src, char sep) {\r\n if (isEmpty(src)) {\r\n return BeeConst.STRING_EMPTY;\r\n }\r\n\r\n int p = src.in...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Wire up an early function exit. Hunts through all scopes until it finds a closure.
Node early_exit( Parse P, Node val ) { return _scope.stk().is_closure() ? P.do_exit(_scope,val) : _par.early_exit(P,val); // Hunt for an early-exit-enabled scope }
[ "void exitScope();", "@Test public void tightLoopTest() {\n check(\"declare function local:foo() { local:foo() }; local:foo()\",\n\n null,\n\n exists(Util.className(StaticFunc.class) + '/' + Util.className(StaticFuncCall.class) +\n \"[@tailCall eq 'true']\"),\n exists(Util.class...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor for the node model.
protected XTandemReaderNodeModel() { super(0, 3); }
[ "protected ListNodesNodeModel() {\r\n this(0, 1);\r\n }", "public Cnode() {\r\n }", "public JAiNode() {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\n\t}", "public TrainCarNode() {\n }", "public GraphModel() {\n this(null);\n }", "public SceneNode()\n\t{\n\t\tthis(U...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the preferencesDisMentionsCommentEmail value for this NetworkMember.
public java.lang.Boolean getPreferencesDisMentionsCommentEmail() { return preferencesDisMentionsCommentEmail; }
[ "public void setPreferencesDisMentionsCommentEmail(java.lang.Boolean preferencesDisMentionsCommentEmail) {\n this.preferencesDisMentionsCommentEmail = preferencesDisMentionsCommentEmail;\n }", "public java.lang.Boolean getPreferencesDisProfPostCommentEmail() {\n return preferencesDisProfPostComme...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Translated "Since this user has no permissions and is inactive, deletion is invalid".
@DefaultMessage("Since this user has no permissions and is inactive, deletion is invalid") @Key("systemUser.userDeleteInvalid") String systemUser_userDeleteInvalid();
[ "@DefaultMessage(\"This action will remove all the permissions for this user and make it inactive. The user itself will not be removed.\")\n @Key(\"systemUser.deleteUserMessage\")\n String systemUser_deleteUserMessage();", "public String getRestrictedAdminPageUserRemovedMsg() {\n return restrictedAdminPa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Load goods to the truck by the given amount.
@Override public void load(double amount) throws InvalidDataException, CannotFitException { if (amount < 0) { throw new InvalidDataException("Negative load amount: " + amount); } if ((currentLoadWeight + amount) > maxLoadWeight) { throw new CannotFitException("Additi...
[ "public void load(Article article, int amount);", "public void loadMoney(double amount) {\n if (amount > 0) {\n this.balance += amount;\n }\n }", "public void importData(List<Good> goods) throws IOException;", "private void fill() {\n Unit unit = getSelectedUnit();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method returns a string giving information about the CruiseShip.
public String toString() { return "The cruise ship \""+GetName()+"\" was built in "+GetYear()+". It has a maximum payload of "+maxPassengers+" passengers and is currently carrying "+curPassengers+" passengers."; }
[ "public String toString()\n {\n return \"\\nName of the Cruise Ship is: \\t\" + super.getShipName() + \n \"\\nMaximum number of Passengers:\\t\" + getMaxPassengers() + \n \"\\nYear ship was built: \\t\" + getYear();\n \n }", "public Strin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test the property 'callLegId'
@Test public void callLegIdTest() { // TODO: test callLegId }
[ "@Test\n public void callIdTest() {\n model.setCallId(\"TEST_STRING\");\n Assert.assertEquals(\"TEST_STRING\", model.getCallId());\n \n }", "@Test\n public void whisperCallControlIdsTest() {\n // TODO: test whisperCallControlIds\n }", "public boolean hasCallId() {\n return...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Display a list of computer
public void displayComputer(List<ComputerDTO> computerList) { for (ComputerDTO computerDTO : computerList) { System.out.println(computerDTO.toString()); } }
[ "private void showListComputerMenu() {\n\t\tString resp = null;\n\t\tint cpt = 0;\n\t\tdo {\n\t\t\tSystem.out.println(\"Entrez Q pour quitter,cliquez entrer pour continuer\");\n\t\t\tList<Computer> computer =computerService.getAllComputer(cpt);\n\n\t\t\tresp = input.nextLine();\n\t\t\tif (computer.isEmpty())\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fetched selected workspace position from preferences. If not found return default 1
private int getSavedOption(){ SharedPreferences preferences = getSharedPreferences(PREFERENCE_FILE_NAME, MODE_PRIVATE); return preferences.getInt(SAVED_WORKSPACE_POSITION_PREFERENCE_FIELD, -1); }
[ "Integer getActiveSongPosition();", "private int getSelectedTab() {\n String theme = \"default\";\n List<INamedParameters.NamedPair> pairs = getPageParameters().getAllNamed();\n theme = pairs.get(0).getValue();\n if (\"grid\".equals(theme)) {\n return 1;\n } else if (...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test hex string constructor of class SHA256Hash.
@Test public void testHexStringConstructor() { LOGGER.info("hex string constructor"); final String hexString = instance.toString(); assertEquals("71dc21f5d4e287b3d1c40bbe6ff0b6936b43f75559e1acf128bccbf9134da55e", hexString); final SHA256Hash constructedSHA256Hash = new SHA256Hash(hexString); asser...
[ "@Test\n public void testMakeSHA256Hash() {\n LOGGER.info(\"makeSHA256Hash\");\n SHA256Hash instance1 = SHA256Hash.makeSHA256Hash(\"abc\");\n assertEquals(\"45aeddf736951256e38dcbb5beab9834e6e12be46fd51d1a00ae7bbf8ac67e29\", instance1.toString());\n assertEquals(\"effe2d1b68b4c18beb8f7dc5319b469e6492ec...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets showUndoFlag. Not from DB, set in Servlet from context info in HttpSession.
public Boolean getShowUndoFlag() { return showUndoFlag; }
[ "public void setUndoEnabled(boolean b);", "boolean canUndo();", "public boolean canUndo();", "public void setUndo()\r\n\t{\r\n\t\tthis.undo = 3;\r\n\t}", "List getUndoInfos();", "public boolean canUndo() {\n return true;\n }", "String getUndoTitle();", "@Override\n public boolean isUndoable...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the user ID of this employee interview schedule.
@Override public long getUserId() { return _employeeInterviewSchedule.getUserId(); }
[ "public long getUserId() {\n\t\treturn _timesheetTask.getUserId();\n\t}", "@Override\n public long getEmployeeInterviewScheduleId() {\n return _employeeInterviewSchedule.getEmployeeInterviewScheduleId();\n }", "@Override\n\tpublic long getUserId() {\n\t\treturn _employee.getUserId();\n\t}", "@Ove...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
POST /realtimeeventimages : Create a new realTimeEventImage.
@PostMapping("/real-time-event-images") @Timed public ResponseEntity<RealTimeEventImageDTO> createRealTimeEventImage(@Valid @RequestBody RealTimeEventImageDTO realTimeEventImageDTO) throws URISyntaxException { log.debug("REST request to save RealTimeEventImage : {}", realTimeEventImageDTO); if (...
[ "@PostMapping(value = \"/addImage/{event_id}\", consumes= MediaType.MULTIPART_FORM_DATA_VALUE)\n public ResponseEntity<?> addImageToEvent(@PathVariable(value = \"event_id\") int event_id, @RequestParam(value = \"file\") MultipartFile image){\n\n if (!eventService.existsById(event_id)) {\n retur...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new XmlWriter object.
public XmlWriter( OutputStream output) { super( output); }
[ "public static XMLStringWriter create() {\r\n return new XMLStringWriter(new StringWriter());\r\n }", "public XmlWriter( Writer writer)\n {\n super( writer);\n }", "public interface XmlWriter\n{\n /**\n * Sets a public ID doctype.\n * \n * Must be set before any of the add or f...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
NOTA: FIX 15.4.2015 a seguito della CR 82. Vedi corpo del metodo _getImportoTotale()
@Override public double getImportoTotaleRiepilogo() { return _getImportoTotale(); }
[ "public void calcolaImportoTotaleCamere(){\r\n\t\t// Passo la richiesta allo stato attuale\r\n\t\t_soggiornoState.calcolaImportoTotaleCamere();\r\n\t}", "float getImporto();", "public double getImporteTotal();", "public BigDecimal calcolaImportoTotaleNoteCollegateEntrata(){\n\t\tBigDecimal result = BigDecimal...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clear the session manager
private void clearSessionManager(HttpSession p_session) { SessionManager sessionMgr = (SessionManager)p_session.getAttribute(SESSION_MANAGER); sessionMgr.clear(); }
[ "void clearSession();", "private void clearSession(){\n }", "public void clearSession(){\n currentUser = null;\n session = null;\n }", "void flushAndClearSession();", "public void clearSessionCache() {\n ofy().clear();\n }", "private void clearActiveSessions() {\n mUsersMana...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new RandomCityFactory using the given source of entropy.
public RandomCityFactory(Random r){ this.r = r; }
[ "public RandomCityFactory(long seed){\n\tr = new Random(seed);\n }", "public RandomCityFactory(){\n\tr = new Random();\n }", "public static UniformRandomProvider createRNG() {\n return SOURCES[ThreadLocalRandom.current().nextInt(SOURCES.length)].create();\n }", "abstract Truerandomness newInst...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Complete the firstRepeatedWord function below.
static String firstRepeatedWord(String s) { System.out.println("Input string is "+ s); String delimiter = null; char[] chars = s.toCharArray(); for (int i = 0; i < chars.length; i++) { if (chars[i] == ' ') { delimiter = "\\s"; break; ...
[ "private static char firstNonRepeatingCharacterV2(String str) {\n if(str == null) return '_';\n Map<Character, Integer> charCountMap = new HashMap<>();\n Set<Character> linkedHashSet = new LinkedHashSet<>();\n\n for(int i = 0; i < str.length(); i++) {\n char ch = str.charAt(i);\n if(charCountM...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the commands source pile.
public Command setSource(PileType source) { this.source = source; return this; }
[ "public void setSrc(File source) {\r\n if (!(source.exists())) {\r\n throw new BuildException(\"the presentation \" + source.getName()+ \" doesn't exist\");\r\n }\r\n if (source.isDirectory()) {\r\n throw new BuildException(\"the presentation \" + source.getName() + \" can't be a directory\");\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
convers to Phase1Edge and returns it
public Phase1Edge toPhase1Edge(){ Phase1Edge r = new Phase1Edge(); r.eo = eo; r.ep = new ArrayList<>(); for (int i = 0; i < 12; i++) { r.ep.add(0); } for (int i = 0; i < 12; i++) { r.ep.set(ep.perm.get(i), (i<4 || i>=8)?1:0); } retu...
[ "public Vertex getTarget(Edge edge)\n {\n return ((Transition)edge).getDestination();\n }", "EdgeType reverse();", "EDEdge<W> getEdge(int source, int dest);", "Edge<V,E> getEdge(V vOrig, V vDest);", "final public edge rev_edge(final edge e) {\r\n return rev_edge_v3(e);\r\n }", "Edge get(D...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieve a User by URL.
public static User findByUrl(String url) { return find.where().eq(Const.URL, url).findUnique(); }
[ "User get(String username) throws UserNotFoundException, SQLException;", "public User get(String id);", "User getUser( String username );", "User loadUser( String username ) throws UserNotFoundException;", "public User getUserByUsername(String username);", "public User getByName(String name);", "public ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns assembly of given name or null if the assembly has not been found.
public MsAssembly getAssembly(final String name) { for (final MsAssembly ass : assemblies) { if (ass.getName().equals(name)) { return ass; } } return null; }
[ "public MsAssembly getAssembly(final String name) {\n return assemblies.get(name);\n }", "private static Architect findArchitect(String name) {\n\t\tfor (Architect arc : architects) {\n\t\t\tif (arc.getName().equals(name))\n\t\t\t\treturn arc;\n\t\t}\n\t\treturn null;\n\t}", "public Optional<Package> ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
secondsAfterMidnight Input: String that represents time of day Returns: integer number of seconds after midnight (return 1 if String is not valid time of day) General time of day format HH:MM:SS Examples: Input StringReturn Value "12:34:09AM"2049 "12:00:00PM" 43200 (common noon) "12:00:02am"2 (AM/PM case insensitive) "...
public static int secondsAfterMidnight(String t) { int seconds; //initializing seconds, will be returned to main. t.toLowerCase(); //setting all input to lowercase so it is easier to handle. if (t.length() == 10){ //if input is 10 characters // if statement below checks whether each charac...
[ "static String timeConversion(String s) {\n if(s.contains(\"A\") && s.charAt(0) != '1' && s.charAt(1) != '2')\n return s.substring(0, s.length()-2);\n \n //checks if the time is AM and it is 12:XX:XX AM, if so returns 12 as 00:XX:XX\n if(s.contains(\"A\") && s.charAt(0) == '1'...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
register handler ke dalam manager. agar editor ada yang nyaut
public<DATA> void register (EditorRequestEventHandler<DATA> handler) { this.handlers.add(handler); }
[ "protected void addHandlers()\n { \n }", "public void registerDefautHandlers();", "private static void register() {\r\n final String[] types =\r\n { \"image/bmp\", \"image/png\", \"image/jpeg\", \"video/3gpp\",\r\n \"video/mp4\", \"audio/mp4\", \"audio/amr\", \"aud...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fits an (x, y) data set to the function defined as fname. All of the steps needed to iterate the simplex until the minimum is achieved are carried out.
public static double[] fitToFunction(double[] x, double[] y, String fname) { NelderMeadSimplex simp = getSimplex(x, y, fname); ChiSquared chisq = new ChiSquared(x, y, fname); PointComp comp = new PointComp(); boolean done = false; //if the simplex holds its value for a greater number of steps than twice the di...
[ "private void readFile(String filename) {\r\n try {\r\n FileInputStream input = new FileInputStream(filename);\r\n Scanner sc = new Scanner(input);\r\n while (sc.hasNext()) {\r\n x[m] = sc.nextDouble();\r\n y[m] = sc.nextDouble();\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method generate expression for factorial if left expression is of BinaryOp Type
private String generateFactorialExpression(BinaryOp binaryOp) { int leftNumber = 0; int rightNumber = 0; if(binaryOp.getLeft() instanceof Constant) { leftNumber = (int) ((Constant)binaryOp.getLeft()).getValue(); } if(binaryOp.getLeft() instanceof UnaryOp) { ...
[ "private Expression factor() {\n if (isUnaryOp()) {\n Operator op = new Operator(match(token.type()));\n Expression term = primary();\n return new Unary(op, term);\n }\n else return primary();\n }", "public int expr(){\n int soma = product();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the first game state.
public final GameState getFirstGameState() { return myFirstGameState; }
[ "public AbstractState getFirstState();", "public GameState initialGameState() {\r\n return initialGameState;\r\n }", "STATE getCurrentState();", "public E startState() {\r\n\t\treturn this.values[0];\r\n\t}", "public GameState getState()\n {\n return state;\n }", "public GameState g...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
the MountainBike subclass has one constructor
public MountainBike(int gear,int speed, int startHeight) { // invoking base-class(Bicycle) constructor super(gear, speed); seatHeight = startHeight; }
[ "public MountainBike() {\n }", "public Bike(){\n\t}", "public ElectricBike() {\n\t\tsuper();\n\t}", "public BicycleStation() {\n super();\n }", "private CSQuickBornPlant() {}", "public Beef() {\n\t\t\n\t}", "public FlatTire() {\n super(\"Flat Tire\",\"C\");\n }", "public Bicycle...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
register multiple geofences based on list of actions
public void registerGeofences(List<LBAction> actions){ for(LBAction act:actions){ registerGeofence(act); } Log.d(LOG_TAG, "GeofenceHelper - registered geofences: " + actions.size()); }
[ "public void registerGeofences(List<LBAction> actions, GoogleApiClient gac){\n for(LBAction act:actions){\n registerGeofence(act, gac);\n }\n\n Log.d(LOG_TAG, \"GeofenceHelper - registered geofences: \" + actions.size());\n\n }", "public void registerGeofence(LBAction lbAction) ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get choice from the user keyboard != null and is connected to System.in return an int that is >= SEARCH and <= QUIT
private static int getChoice(Scanner keyboard) { int choice = getInt(keyboard, "Enter choice: "); keyboard.nextLine(); while( choice < SEARCH || choice > QUIT){ System.out.println("\n" + choice + " is not a valid choice"); choice = getInt(keyboard, "Enter choice: "); keyboard.nextLine(); } return cho...
[ "private static int getChoice(Scanner keyboard) {\r\n // Note, no way to check if keyboard actually connected to System.in\r\n // so we simply assume it is. \r\n if(keyboard == null)\r\n throw new IllegalArgumentException(\"The parameter keyboard cannot be null\");\r\n\r\n int...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieve all Items from Database whose TestID matches the parameter
public ArrayList<Item> getItemsByTestID(int testID) { String itemQuery = "SELECT * FROM item WHERE TestID = ?;"; ArrayList<Item> items = new ArrayList<>(); try { PreparedStatement stmt = mConnection.prepareStatement(itemQuery); stmt.setInt(1, testID); ResultSe...
[ "List<Item> queryItem(String productid);", "public ArrayList<Session> getSessionsByTestID(int testID) {\n String sessionQuery = \"SELECT * FROM session WHERE TestID = ? ORDER BY Timestamp;\";\n ArrayList<Session> sessions = new ArrayList<>();\n try {\n PreparedStatement stmt = mCon...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Construct a layout queue.
public LayoutQueue() { tasks = new Vector<Runnable>(); }
[ "private void buildLayout() {\n HorizontalLayout actions = new HorizontalLayout(filter, newPart);\n actions.setWidth(\"100%\"); //what portion of screen to take\n filter.setWidth(\"100%\"); //what portion filter textbox takes\n actions.setExpandRatio(filter, 1); //expand (leaves no gaps)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
generateWordCloud generates an HTML file with word cloud.
public void generateWordCloud(final String htmlFileOut, final int limit) { generateWordCloud(htmlFileOut, limit, MIN_FONT_SIZE, MAX_FONT_SIZE, DEFAULT_RADIUS); }
[ "public void generateWordCloud(final String htmlFileOut) {\n\t\tgenerateWordCloud(htmlFileOut, this.wordMap.size());\n\t}", "@Test\n\tpublic void generateWordCloudFromUrl() throws IOException{\n\t\tWord[] words = wcm.generate(\"https://en.wikipedia.org/wiki/Tag_cloud\");\n\t\tassertTrue(words.length > 0);\n\t}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the bedrooms property.
public int getBedrooms() { return bedrooms; }
[ "public int getBedrooms() {\r\n\t\treturn bedrooms;\r\n\t}", "public int getBedrooms() {\r\n return bedrooms;\r\n }", "public RoomBedType getBedType()\n {\n return bedType;\n }", "public List<BldgRoom> getBldgRoomList() {\n return bldgRoomList;\n }", "public int getBedNum() ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Given the number of transactions, returns an array of doubles that represents the expected number of items for each starting digit. The index of the array corresponds to the starting digit.
private static double[] calculateExpectedArray(int numTransactions) { /* * Make the array of length 10, and set the 0 position to 0.0. 0 * will never be used, but this avoids having to adjust everything by * 1. */ double[] exp = new double[10]; exp[0] = 0.0; /*...
[ "@Test\n\tpublic void createNumberArrayWithTenInt(){\t\t//Fails\n\t\t//setup\n\t\tdouble[] data = {0,1,2,3,4,5,6,7,8,9};\n\t\tNumber[] expecteds = {0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0};\n\t\t//Execution\n\t\tNumber[] actuals = DataUtilities.createNumberArray(data);\n\t\tassertArrayEquals(expecteds, actuals);\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Point swapper needs to have clusters filled with points before it starts. The other algorithms just need clusters to have a centroid. The following method fills clusters with the nearest 20 points, which results in a bad initial allocation, but there is no obvious way to improve it.
@Override public void initializeClusters() { for( Point point : _points ) point.setNewCluster( null ); // This tells 'replaceWithNearest' that this point can be allocated // For each cluster, fill it with nearest points for( Cluster cluster : _clusters ) { cluster.replaceWithNearest( _points.size() / _...
[ "@Override\n\tpublic void performOneIteration() {\n\t\t// For every point, set the new cluster field to null to tell optimizer this point can be allocated\n\t\tfor( Point point : _points )\n\t\t\tpoint.setNewCluster( null );\n\t\t// Empty each cluster's list of points, but do not erase its centroid\n\t\tfor( Cluste...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Whether the command is streamed or not bool streamed = 5;
boolean getStreamed();
[ "default boolean isStreamed() {\n return false;\n }", "public boolean getStreamed() {\n return streamed_;\n }", "boolean isStreaming();", "public boolean getStreamed() {\n return streamed_;\n }", "public boolean isStreaming() {\n return false;\n }", "public boolean isStre...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR start "condition" D:\\Box Sync\\Codes\\tabbyxl\\src\\main\\resources\\CRL.g:66:1: condition : ( 'no' )? query (idntfr= ID )? ( ':' ( ( constraint ( ',' constraint ) ( ',' assignment )? ) | assignment ) )? EOL > ^( CONDITION TYPE[$condition::quantifier] query IDENTIFIER[$condition::id] ^( CONSTRAINTS ( ^( CONSTRA...
public final CRLParser.condition_return condition() throws RecognitionException { condition_stack.push(new condition_scope()); CRLParser.condition_return retval = new CRLParser.condition_return(); retval.start = input.LT(1); CommonTree root_0 = null; CommonToken idntfr=null; CommonToken string_literal18=n...
[ "public void setCondition(ExpressionNode condition);", "public ExpressionNode getCondition();", "cn.infinivision.dataforce.busybee.pb.meta.Expr getCondition();", "public final Arbre condition() throws RecognitionException {\r\n\t\tArbre cond_arbre = new Arbre(\"\");\r\n\r\n\r\n\t\tArbre ps =null;\r\n\t\tArbr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Replace the indicated component with a new component containing the specified data type. Flexarray component not handled.
private DataTypeComponent replaceComponent(DataTypeComponent origDtc, DataType resolvedDataType, int length, String name, String comment, boolean doNotify) { // FIXME: Unsure how o support replace operation with bit-fields. Within unaligned structure // the packing behavior for bit-fields prevents a one-for-one r...
[ "public void replaceComponent(Component oldComponent, Component newComponent);", "void setDataType(int type );", "public void setOldType(TypeElement type) {\n\t\toldType = type;\n\t}", "public void alterType(AttrType newType) { type = newType; }", "public\n void setComponentType(AnnotatedTypeMirror t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets a List of Coords with the shortest way
public List<Coord> getShortesWay() { List<Integer> l = this.path.getShortestPath(); List<Coord> c = new LinkedList<Coord>(); if(l != null) { for(int i = 0; i<l.size(); i++) { c.add(this.getCoordOfVertex(l.get(i))); } return c; } return null; }
[ "List<CoordinateDistance> getNearestCoordinates(Point coordinate, int n);", "static List<String> closestStraightCity(List<String> c, List<Integer> x, List<Integer> y, List<String> q) {\n List<String> result = new ArrayList<>(); \n \n\n for(int i=0;i<q.size();i++){\n int in=c.indexO...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column FreeHost_Product_VPS.HourIOPS16
public void setHouriops16(Integer houriops16) { this.houriops16 = houriops16; }
[ "public void setHouriops7(Integer houriops7) {\r\n this.houriops7 = houriops7;\r\n }", "public void setHouriops17(Integer houriops17) {\r\n this.houriops17 = houriops17;\r\n }", "public void setHouriops2(Integer houriops2) {\r\n this.houriops2 = houriops2;\r\n }", "public void se...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Convert a decimal string to a Satoshi BigInteger (1 Satoshi = 0.00000001 BTC)
public static BigInteger stringToSatoshi(String value) throws NumberFormatException { if (value == null) throw new IllegalArgumentException("No string value provided"); if (value.isEmpty()) return BigInteger.ZERO; BigDecimal decValue = new BigDecimal(value); retur...
[ "public static String satoshiToString(BigInteger value) {\n //\n // Format the BTC amount\n //\n // BTC values are represented as integer values expressed in Satoshis (1 Satoshi = 0.00000001 BTC)\n //\n BigInteger bvalue = value;\n boolean negative = bvalue.compareTo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get list of T from request.
public List<T> getTsFromRequest(Object data) { List<T> list; // it is an array - have to cast to array object if (data.toString().indexOf('[') > -1) { list = getListTFromJSON(data); } else { // it is only one object - cast to object/bean T obj = getTFromJSON(data); list = new ArrayLi...
[ "public List<Request> getRequests();", "RequestsList getRequestsList();", "ResponseEntity<List<Type>> findTaskTypes();", "public static List getlist(HttpServletRequest request){\n\t\tList list= (List) request.getAttribute(\"list\");\n\t\treturn list;\n\t}", "<T> List<T> getList(Class<T> dataType, String roo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Preparing the list data
private void prepareListData() { listDataHeader = new ArrayList<String>(); listDataChild = new HashMap<String, List<String>>(); // Adding child data listDataHeader.add("Distance"); listDataHeader.add("Rating"); listDataHeader.add("Cost"); // Adding child data List<String> distance = new ArrayList<S...
[ "private void prepareListData(List<RssItem> list) {\n \t\n listDataHeader = new ArrayList<String>();\n listDataChild = new HashMap<String, List<String>>();\n \n //add titles of articles\n for(int i = 0; i < list.size(); i++) {\n \tlistDataHeader.add(list.get(i).getTitle(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get whether to use monochrome noise.
public boolean getMonochrome() { return monochrome; }
[ "public boolean isMonoisotopic()\r\n\t{\r\n\t\treturn getData().isMonoisotopic();\r\n\t}", "@ApiModelProperty(value = \"Remove chroma noise during the analysis of a video.\")\n public Boolean isTachyonMediaHintHasChromaNoise() {\n return tachyonMediaHintHasChromaNoise;\n }", "public void setMonochrome(bool...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRuleLiteralorReferenceTerm" $ANTLR start "ruleLiteralorReferenceTerm" InternalJsonParser.g:1241:1: ruleLiteralorReferenceTerm returns [EObject current=null] : ( ( ruleQPREF ) ) ;
public final EObject ruleLiteralorReferenceTerm() throws RecognitionException { EObject current = null; enterRule(); try { // InternalJsonParser.g:1247:2: ( ( ( ruleQPREF ) ) ) // InternalJsonParser.g:1248:2: ( ( ruleQPREF ) ) { // InternalJson...
[ "public final EObject entryRuleLiteralorReferenceTerm() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleLiteralorReferenceTerm = null;\n\n\n try {\n // InternalJsonParser.g:1234:63: (iv_ruleLiteralorReferenceTerm= ruleLiteralorReferenceTerm EOF )\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Feature: textObjects getter for textObjects gets the text objects (figure, table, boxed text etc.) that are associated with a particular section
public FSArray getTextObjects() { if (Section_Type.featOkTst && ((Section_Type)jcasType).casFeat_textObjects == null) jcasType.jcas.throwFeatMissing("textObjects", "de.julielab.jules.types.Section"); return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Section_Type)jcasTy...
[ "public TextObject getTextObjects(int i) {\n if (Section_Type.featOkTst && ((Section_Type)jcasType).casFeat_textObjects == null)\n jcasType.jcas.throwFeatMissing(\"textObjects\", \"de.julielab.jules.types.Section\");\n jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Section_Type)jca...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Compute the Average Percentage Block/Statement/Branch Coverage
public float getAveragePercentageCoverage(int[] Chromosome){ float AveragePercentageCoverage = 0; int firstCoveredSum = 0; //Sum of the first test case in the order that covers the Block/Statement/Branch i. //System.out.println("testCaseCovered Size: "+this.testCaseCovered.size()); for(int k=0; k<this.testCase...
[ "public void AveragePercentageCoverageCheck(int g){\n\t\tfloat Metrics[] = new float[this.PopulationSize];\n\t\tfloat Max = 0, Sum = 0;\n\t\tArrayList<Integer> MaxAPC = new ArrayList<Integer>(); //Store the Chromosome that has the Largest APC.\n\n\t\tfor(int i=0; i<this.PopulationSize; i++){\n\t\t\tMetrics[i] = thi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns all rows from the renquiry table that match the criteria 'whether_land = :whetherLand'.
public Renquiry[] findWhereWhetherLandEquals(int whetherLand) throws RenquiryDaoException;
[ "public Renquiry[] findWhereAreaTypeEquals(String areaType) throws RenquiryDaoException;", "Iterable <Room> findAllByRented(boolean rented);", "boolean land();", "@Query(\"FROM Flight WHERE flightState=true\")\r\n\tpublic List<Flight> viewAll();", "public boolean land() {\n return true;\n }", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Record a single observation of an element.
public long record(final T element) { return record(element, 1); }
[ "void store(EObject element);", "public void record(RecordElement2 r) throws OdenException;", "public void AddElement(Element element) {\n\t\tSession session = HibernateUtil.getSessionFactory().getCurrentSession();\n\t\tsession.beginTransaction();\n\t\ttry {\n\t\t\tsession.save(element);\n\t\t} catch (Exception...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor for the RequestControl class
public RequestControl(RequestManager requestManager){ //add request commandList.put("createRequest", new CreateRequest(requestManager)); //change the status of a request commandList.put("updateRequestStatus", new UpdateRequestStatus(requestManager)); //view a request comm...
[ "public LfsittribRequest()\r\n\t{\r\n\t}", "public SelectRequest() {}", "public CapexRequest() {\r\n }", "public UBERequest() {\r\n }", "public ConServiceRequest () {\n\t\tsuper();\n\t}", "public RequestTemplate() {\n super();\n }", "public ManageDsaITRequestControl()\n {\n super(MANAGE_DS...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
go to movie list
private void goToListMovies(){ accountViewModel.setNullLoginResponse(); loginActivityBinding.progressBarApp.setVisibility(View.INVISIBLE); Intent intent = new Intent(this, MainListActivity.class); startActivity(intent); }
[ "public void playMovie() {\n\n String pathToMovieDir = targetDirectory + \"/\" + activeMovie.getTitle().replaceAll(\"[\\\\\\\\/:*?\\\"<>|]\", \"\");\n File movieFile = new File(pathToMovieDir + \"/movie\");\n\n // isDesktopSupported and the Thread are necessary to open more than one movie.\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the ovfFiles value for this OvfCreateDescriptorParams.
public com.vmware.converter.OvfFile[] getOvfFiles() { return ovfFiles; }
[ "public org.hpccsystems.ws.filespray.PhysicalFileStruct[] getFiles() {\n\t\t return files;\n\t }", "public String[] getExistFiles() {\r\n\t\treturn existFiles;\r\n\t}", "public void setOvfFiles(com.vmware.converter.OvfFile[] ovfFiles) {\r\n this.ovfFiles = ovfFiles;\r\n }", "public List<Object> file...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Pre: Player 2 should not have already reached 3 sets Post: p2Sets +=1
public void addP2Set() { assert (p2Sets < 3) : "Player 2 should not have already reached 3 sets"; p2Sets +=1; }
[ "public void addP1Set() {\n assert (p1Sets < 3) : \"Player 1 should not have already reached 3 sets\";\n p1Sets +=1;\n }", "public void addToPrevSets(int p1Set, int p2Set) {\n assert (p1Set < 8 && p2Set < 8): \"Number of games won in a set should not exceed 7\";\n p1PrevSets.add(p1S...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Indicates whether some other object is "equal to" this task by comparing the lines of the tasks.
@Override public boolean equals(Object obj) { return (obj instanceof Task && getLine().equals(((Task) obj).getLine())); }
[ "public boolean equals( DedexerTask otherTask ) {\r\n if( otherTask == null )\r\n return false;\r\n\tlong otherOffset = otherTask.getOffset();\r\n\tlong otherBase = otherTask.getBase();\r\n\tif( ( offset == 0L && base == 0L ) ||\r\n\t ( otherOffset == 0L && otherBase == 0L ) )\r\n\t\treturn toS...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Same as getHtmlFromUrl(url, false);
public static String getHtmlFromUrl(String url) { return getHtmlFromUrl(url, false); }
[ "public static StringBuilder retrieveHTML(URL url){\n StringBuilder builder = new StringBuilder();\n try {\n BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));\n String inputLine;\n while...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a new publication based on this one but with the specified publication extra infoString required to publish on Maven central repository.
public JkMavenPublication with(JkMavenPublicationInfo extraInfo) { return new JkMavenPublication(this.mainArtifacts, this.classifiedArtifacts, extraInfo); }
[ "Publication createPublication();", "Builder addPublication(String value);", "Publication getPubli();", "public void setPublication(String publication) {\n this.publication = publication;\n }", "@NotNull public static PublicationEvent.Builder publicationEvent() { return new PublicationEvent.Buil...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
removes a shell from the tray
public void removeShell() { shellCount--; }
[ "private void deleteShell(){\n try {\n if(Boolean.parseBoolean(this.groovyShell.evaluate(\"util.delShell\").toString())){\n groovyShells.remove(this.shellId);\n }\n }\n catch (Exception e){\n e.printStackTrace();\n }\n }", "public void...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Construct a new page crawler with this given settings to use by default.
public PageCrawler(CrawlSettings crawlSettings) { this.crawlSettings = crawlSettings; }
[ "public PageCrawler() {\n this(new CrawlSettings());\n }", "public static CrawlerPack start(){\n if (null == defaultCrawler)\n defaultCrawler = new CrawlerPack();\n return defaultCrawler;\n }", "public static CrawlerConfig create() throws ParseException\n {\n CrawlerCon...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Looks for all work logs of a specific type.
List<WorkLog> findAllByType(WorkLogType workLogType);
[ "public Map<Rig, List<RigLog>> findLogs(RigType type, Date begin, Date end)\n {\n Map<Rig, List<RigLog>> logs = new HashMap<Rig, List<RigLog>>();\n \n for (Rig rig : type.getRigs())\n {\n logs.put(rig, this.findLogs(rig, begin, end));\n }\n \n return lo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called when the checked state of a FAB has changed.
void onCheckedChanged(FloatingActionButton fabView, boolean isChecked);
[ "protected abstract boolean onCheckedChanged(boolean checked);", "void onCheckedChanged(Chip chip, boolean isChecked);", "public void checkStateChanged( CheckStateChangedEvent event )\n {\n dialogChanged();\n }", "@Override\n\tpublic void setChecked(boolean checked) {\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
bool force_delete_null = 1007;
boolean getForceDeleteNull();
[ "boolean getDeleteNull();", "public boolean getForceDeleteNull() {\n return forceDeleteNull_;\n }", "public boolean getDeleteNull() {\n return deleteNull_;\n }", "boolean isSoftDeletion();", "public boolean needsDelete()\r\n {\r\n return true;\r\n }", "io.dstore.values.Integer...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Return type fixed from 'androidx.activity.result.contract.ActivityResultContract' to match base method
@Override // androidx.activity.result.ActivityResultLauncher public ActivityResultContract<Unit, ?> getContract() { return getResultContract(); }
[ "@Override\n public boolean handleActivityResult(Context context, int requestCode, int resultCode, Intent data) {\n return false;\n }", "public interface ActivityResultManager {\n\n public static int ADD_KEY_RESULT = 100;\n public static int LOGIN_MOBILE_SUCESSED = 99;//手机号码登录成功\n// public s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Searches the input list for a matcher that matches the input value.
static <T> int findMatch( List<? extends Matcher<T>> list, T value ) { for ( int j = 0; j < list.size(); ++j ) { if ( list.get( j ).matches( value ) ) { return j; } } return -1; }
[ "public static int listOfStringFindContains(List<String> list, String value) {\r\n\t\treturn listOfStringFindSubstring(list, value, false);\r\n\t}", "public static int listOfStringFindContains(List<String> list, String value, boolean isCaseInsensitive) {\r\n\t\treturn listOfStringFindSubstring(list, value, isCase...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Show source code of the selected mutant. Changed part is colored in red
public void showMutant(String dir_name,String mutant_log) { System.out.println("MutantsViewerPanel.showMutant (with mutant_log)"); try { int changed_line = getMutatedLineNum(mutant_log); String changed_content = getMutatedContent(mutant_log); changeTF.setText(" (line " + ...
[ "public void showMutant(String dir_name, String mutant_log) {\n try {\n int changed_line = getMutatedLineNum(mutant_log);\n String method_signature = getMethodSignature(mutant_log);\n String changed_content = getMutatedContent(mutant_log);\n changeTF.setText(\" (li...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method which retrieves patient details from the database
private void getPatientDetailFromDb() { final SelectQuery patientInsertQuery = QueryProvider. getSelectpatientQuery(new IDataBaseResultNotifier() { @Override public <T> void OnDataBaseDataUpdated(T data) { if (getActivity() == null ...
[ "PatientInfo getPatientInfo(int patientId);", "public void getPatientData() {\r\n }", "public Patient getPatientById(Integer id);", "public static ResultSet getPatientInfo(int id) {\r\n\t\ttry{\r\n\t\t\tconnection = DriverManager.getConnection(connectionString);\r\n\t\t\tstmt = connection.prepareStatement(\"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the size of a file with a given path, in bytes
long getSize(String path) throws IOException;
[ "public static long getFileSize(String path)\n {\n if (StringUtils.isBlank(path))\n {\n return -1;\n }\n \n File file = new File(path);\n return (file.exists() && file.isFile() ? file.length() : -1);\n }", "long getFileLength(String path) throws IOExcepti...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of cdf method, of class NegativeBinomialDistribution.
@Test public void testCdf() { System.out.println("cdf"); NegativeBinomialDistribution instance = new NegativeBinomialDistribution(3, 0.3); instance.rand(); assertEquals(0.027, instance.cdf(0), 1E-7); assertEquals(0.0837, instance.cdf(1), 1E-7); assertEquals(0.16308, i...
[ "@Test\n public void testCdf() {\n System.out.println(\"cdf\");\n ContinuousDistribution instance = null;\n\n double[] param0p5 = new double[] { 0, 0, 0, 0.030859595783726712, 0.19874804309879912, 0.4778328104646086, 0.7385358700508893, 0.8999391668806049, 0.9707091134651118, 0.9934259629766...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets image view poster.
public void setImageViewPoster(ImageView imageViewPoster) { mImageViewPoster = imageViewPoster; }
[ "public void setPoster(String posterUrl) {\n this.poster = posterUrl;\n }", "public Builder posterImage(final Image val) {\n posterImage = val;\n return this;\n }", "private void setPosterImage(String posterLink) {\r\n\r\n try {\r\n BufferedImage image = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
auto generated Axis2 call back method for changeUserRoleToAlumni method override this method for handling normal response from changeUserRoleToAlumni operation
public void receiveResultchangeUserRoleToAlumni( net.agef.jobexchange.webservice.tests.util.UserWSStub.ChangeUserRoleToAlumniResponse result ) { }
[ "@Override\n public void onUserRoleChanged(JSONObject jsonObject) {\n }", "public void receiveResultchangeUserRoleToOrganisation(\r\n net.agef.jobexchange.webservice.tests.util.UserWSStub.ChangeUserRoleToOrganisationResponse result\r\n ) {\r\n }", "@Over...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
void OpenChannel_set_push_msat(struct LDKOpenChannel NONNULL_PTR this_ptr, uint64_t val);
public static native void OpenChannel_set_push_msat(long this_ptr, long val);
[ "public static native long OpenChannel_get_push_msat(long this_ptr);", "public static native void ChannelDetails_set_channel_value_satoshis(long this_ptr, long val);", "public static native void OpenChannel_set_first_per_commitment_point(long this_ptr, byte[] val);", "public static native void ChannelUpdate_s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The blockchain should store malware information and signatures of the suspected files
@Override public HashMap<String,String> malwareDataForMining() { String fileName; String malwareName; String familyType; String malwareSignatureHA256; String malwareSignatureMD5; HashMap<String, String> hmap = new HashMap<>(); System.out.print("Filename : "...
[ "public static void verify(){\n byte[] fileToVerify;\n BigInteger decryptedHashToCheck;\n BigInteger verifiedFileHash;\n BigInteger reEncryptedHash;\n\n // ii. If called to verify (e.g., \"java MySign v myfile.txt.signed\") your program should:\n // a. Read the cont...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column borrow_repayment.bo_repay_status
public Integer getBoRepayStatus() { return boRepayStatus; }
[ "public void setBoRepayStatus(Integer boRepayStatus) {\n this.boRepayStatus = boRepayStatus;\n }", "public String getRebillStatus()\n\t{\n\t\tif(response.containsKey(\"status\")) {\n\t\t\treturn response.get(\"status\");\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public Integer getRepayStatus() ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the available declarationResolver instance
public DeclarationScopeResolver getDeclarationResolver() { return this.declarationResolver; }
[ "public static ISymbolResolver getSymbolResolver()\r\n\t{\r\n synchronized (Activator.class) {\r\n if (sInstance != null) {\r\n return (ISymbolResolver)sInstance.mSymbolResolverServiceTracker.getService();\r\n } else {\r\n return null;\r\n }\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }