query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Retrieves the character's privileges. | Privileges getPrivileges(); | [
"public NSArray privileges() {\n\t\treturn SWAccessPrivilegeUtilities.privilegesForObject( record );\n\t}",
"SerializablePrivilege[] getSupportedPrivileges(Session session, String absPath) throws InternalException;",
"SerializablePrivilege[] getSupportedPrivileges(Node node) throws InternalException;",
"publi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs a BigFraction with given numerator and denominator. Fraction will be reduced to lowest terms. If fraction is negative, negative sign will be carried on numerator, regardless of how the values were passed in. | public BigFraction(BigInteger numerator, BigInteger denominator)
{
if (numerator == null)
{
throw new IllegalArgumentException("Numerator is null");
}
if (denominator == null)
{
throw new IllegalArgumentException("Denominator is null");
}
... | [
"public BigFraction(final double numerator, final double denominator)\n {\n if (denominator == 0)\n {\n throw new ArithmeticException(\"Divide by zero.\");\n }\n\n final BigFraction tmp = new BigFraction(numerator).divide(new BigFraction(denominator));\n this.numerat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the carpentry matching the UUID and group. | public static it.vmt.gh.sb.model.Carpentry getCarpentryByUuidAndGroupId(
String uuid, long groupId)
throws com.liferay.portal.kernel.exception.PortalException {
return getService().getCarpentryByUuidAndGroupId(uuid, groupId);
} | [
"public static it.vmt.gh.sb.model.Carpentry fetchCarpentryByUuidAndGroupId(\n\t\tString uuid, long groupId) {\n\n\t\treturn getService().fetchCarpentryByUuidAndGroupId(uuid, groupId);\n\t}",
"@Override\n\tpublic CrmContact fetchByUUID_G(String uuid, long groupId) {\n\t\tuuid = Objects.toString(uuid, \"\");\n\n\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'backLeft' field. | public java.math.BigDecimal getBackLeft() {
return backLeft;
} | [
"public java.math.BigDecimal getBackLeft() {\n return backLeft;\n }",
"public String getBack() {\n\t\treturn this.back;\n\t}",
"public int getBack() {\n return back;\n }",
"public String getBack()\r\n\t{\r\n\t\treturn back;\r\n\t}",
"public double getSetbackFront()\r\n {\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the max concurrent request count | public int getMaxConcurrentRequest() {
return maxConcurrentRequest;
} | [
"public int getMaxConcurrentRequests() {\n return maxConcurrentRequests;\n }",
"public int maxConcurrentRequests() {\n return this.maxRequests;\n }",
"public int getMaxParallelRequests() {\n return maxParallelRequests;\n }",
"public static int getMaxThreadCount(){\n return... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
========================================================================= ======================== OVERLOADED METHODS ============================= ========================================================================= Sends the indicated command to the target object indicated by the globalObjectId. The target (whic... | public Object sendSynchronous(GlobalObjectId globalObjectId, Command command) {
return command.execute();
} | [
"public void sendASynchronous(GlobalObjectId globalObjectId, Command command) {\n\t\tcommand.execute();\n\t}",
"public void sendCommand(Command cmd);",
"public native static void sendSimpleCommand(GameObject oper1, String oper2);",
"protected abstract DispatchOutcome dispatchCommand(CommandEnvelope cmd);",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
JSON Get method that gets the room members and their roles | private void jsonParse() {
String url = "http://coms-309-sb-4.misc.iastate.edu:8080/getroommembers";
url = url + "/" + sessionManager.getRoomid() + "/" + sessionManager.getID() + "/";
JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, url, null,
new Response.... | [
"@Get\n public String getMembers(){\n ArrayList<String> members = new ArrayList<>();\n try {\n members.addAll(controller.getMembers(getQueryValue(\"id\")));\n }catch(MenuException e){\n System.out.println(e.getMessage());\n }\n return new YaGson().toJson(m... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
if we should allow invite by identifier (if the inviter knows the identifier, and no attributes on the external subject are mandatory by the application) | public boolean isAllowInviteByIdentifier() {
return GrouperUiConfig.retrieveConfig().propertyValueBoolean("inviteExternalMembers.allowInviteByIdentifier", false);
} | [
"void maybeInvitation(String eventId);",
"void acceptInvitation(String eventId);",
"boolean hasFromIdIsReceived();",
"public boolean isIncomingInvitePending();",
"InviteEntity accept(Integer inviteId);",
"boolean acceptInvitation(long meetingId, long userId);",
"boolean isSetExternalId();",
"public bo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter de la variable d'instance this.reservationService. | public IReservationService getReservationService() {
return this.reservationService;
} | [
"public IReservationService getReservationService() {\n return this.reservationService;\n }",
"private ReservationDAO getReservationDAO() {\r\n return this.reservationDAO;\r\n }",
"public void setReservationService(final IReservationService reservationService) {\r\n this.reservationSe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ crate arr number 1 to 10 and multiply the result with 19. | public static void main(String[] args) {
int [] nums = {1,2,3,4,5,6,7,8,9,10};
for ( int i = 0; i<nums.length; i++){
nums[i]= nums[i]*19;
System.out.println(nums[i]);
}
} | [
"public void multiplyElements(int arr[], int multiplier) {\n int length = arr.length;\n\n for (int i = 0; i < length; i++) {\n arr[i] *= multiplier;\n }\n }",
"@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};... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter for the qid | public String getQid() {
return qid;
} | [
"public Integer getqNo() {\n return qNo;\n }",
"public Integer getqTypeid() {\n return qTypeid;\n }",
"public java.lang.Integer getQ() {\n return q;\n }",
"public Long getQst_id() {\r\n return qst_id;\r\n }",
"public java.lang.String getQQ() {\n return QQ;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A unit has been destroyed. It was either our unit or enemy unit. | @Override
public void onUnitDestroy(Unit unit) {
// We need to get unit by ID, but we need to use our own solution, because normally if we iterated against
// objects in getAllUnits(), dead unit objects would be gone. But if we manually save them, we can access them
// at this point, w... | [
"public void attacked(Unit unit) {\n\t\tthis.currentHealth = this.currentHealth - unit.getBaseAttackDamage();\n\t\tif (this.getCurrentHealth() <= 0) {\n\t\t\tthis.getCell().building = null;\n\t\t\t// System.out.println(\"Building Destroyed\");\n\t\t\tunit.owner.addMoney(this.reward);\n\t\t\t// System.out.println(un... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Event__NameAssignment" $ANTLR start "rule__Command__NameAssignment" ../org.xtext.example.rmodp.ui/srcgen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:27787:1: rule__Command__NameAssignment : ( ruleQualifiedName ) ; | public final void rule__Command__NameAssignment() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:27791:1: ( ( ruleQualifiedName ) )
... | [
"public final void rule__Event__NameAssignment() 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:27776:1: ( ( ruleQualifi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Read an OpenCL source file packaged as a resource and do some text substitutions | private String readAndProcessSourceFile(String fileName, HashMap<String, String> substitutions) {
try {
// Read the source file packaged as a resource
BufferedReader br = new BufferedReader(new InputStreamReader(
getClass().getClassLoader().getResourceAsStream(fil... | [
"public String loadFile(String fileName, Source src, Context context) throws IOException{ \r\n \t\tResources resources = context.getResources();\r\n \t\t\r\n \t //Create a InputStream to read the file into \r\n \t InputStream iS; \r\n \r\n \t if (src==Source.RAW_FOLDER) { \r\n \t //get the resou... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set maximum (absolute value) output for the X axis on the current joystick. maxOutput should be a percentage (<1) or 1 for 100%. Inputs will be multiplied by this value before being returned. To invert the axis, make this value negative. | public void setXMaxOutput(double maxOutput)
{
XMaxSpeedPercent = maxOutput;
} | [
"public void setMaxOutput(double maxOutput){\n m_drive.setMaxOutput(maxOutput);\n }",
"public void setMaxOutput(double maxOutput) {\n drive.setMaxOutput(maxOutput);\n }",
"public void setMaxOutput(double maxOutput) {\n m_drive.setMaxOutput(maxOutput);\n }",
"public void setYMaxOutput(double ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Import books from known source folders | private void startImport(boolean cleanup) {
int booksOK = 0;
int booksKO = 0;
String message;
List<String> cleanupLog = cleanup ? new ArrayList<>() : null;
notificationManager.startForeground(new ImportStartNotification());
List<File> files = Stream.of(Site.values())
... | [
"private void prepareSourceRepos() {\n \t\tif (sourceRepos == null || sourceRepos.isEmpty())\n \t\t\treturn;\n \t\tfor (Iterator iter = sourceRepos.iterator(); iter.hasNext();) {\n \t\t\tObject next = iter.next();\n \t\t\tif (next instanceof MyFileSet) {\n \t\t\t\tMyFileSet fileset = (MyFileSet) next;\n \t\t\t\t// ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__MapElement__Group__4__Impl" $ANTLR start "rule__TupleExp__Group__0" InternalOCLlite.g:8144:1: rule__TupleExp__Group__0 : rule__TupleExp__Group__0__Impl rule__TupleExp__Group__1 ; | public final void rule__TupleExp__Group__0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalOCLlite.g:8148:1: ( rule__TupleExp__Group__0__Impl rule__TupleExp__Group__1 )
// InternalOCLlite.g:8149:2: rule__TupleExp__Group__0__Impl rule... | [
"public final void ruleTupleExp() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:1241:2: ( ( ( rule__TupleExp__Group__0 ) ) )\n // InternalOCLlite.g:1242:2: ( ( rule__TupleExp__Group__0 ) )\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Modify the dir and levels arrays by applying the bidi algorithm to the arrays, changing them in place. On output, the direction array contains only L, R, or AR codes, and the levels array contains the resolved levels. | static void applyBidiRules(byte[] dirs, byte[] levels, boolean ltr) {
byte[] wdirs = (byte[])dirs.clone(); // working dir array, can mutate
resolveWeakTypes(wdirs, levels, ltr);
resolveNeutralTypes(wdirs, levels, ltr);
resolveImplicitLevels(wdirs, dirs, levels, ltr);
} | [
"Bidi(byte[] dirs, byte[] levels, boolean ltr) {\n applyBidiRules(dirs, levels, ltr); // save the input dirs\n this.ltr = ltr;\n this.dirs = dirs;\n this.levels = levels;\n }",
"private static void resolveImplicitLevels(byte[] dirs, byte[] odirs, byte[] levels, boolean ltr) {\n byte baselevel = (b... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Decompress the message using Huffman tree represented by treeString | public static String decompress(final String treeString, final String message) {
BinaryNodeInterface<Character> rootNode = new BinaryNode<Character>();
generateTree(rootNode, treeString);
String result = message;
if (result.length() == 0) {
return result;
}
... | [
"public static String createHuffmanCode(String message) {\n //It keeps the frequency count\n Map<String,Integer> frequencyCount = new HashMap<>();\n\n\n //this loop builds the frequency map\n for(int i =0; i <message.length(); i++){\n if(frequencyCount.containsKey(String.value... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter method for the COM property "EnableActiveBatchEventTriggers" | @DISPID(29)
// = 0x1d. The runtime will prefer the VTID if present
@VTID(34)
boolean enableActiveBatchEventTriggers(); | [
"@DISPID(27)\r\n\t// = 0x1b. The runtime will prefer the VTID if present\r\n\t@VTID(32)\r\n\tboolean enableEventTriggers();",
"ETriggers getTriggers();",
"public List<Trigger> getActiveTriggers() {\n return activeTriggers;\n }",
"public boolean getTrigger() {\n if (triggers[1]==1.0)\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set value of mot_history | public final void setmot_history(java.util.List<vehiclelookup.proxies.dataObj> mot_history)
{
setmot_history(getContext(), mot_history);
} | [
"public final void setmot_history(com.mendix.systemwideinterfaces.core.IContext context, java.util.List<vehiclelookup.proxies.dataObj> mot_history)\n\t{\n\t\tjava.util.List<com.mendix.systemwideinterfaces.core.IMendixIdentifier> identifiers = new java.util.ArrayList<com.mendix.systemwideinterfaces.core.IMendixIdent... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creating profile from specified attribute list and object. | public static Profile createProfile(AttributeList attList, Object object) {
if (attList == null || attList.size() == 0)
return null;
List<Double> values = null;
Map<String, Object> mapValues = null;
if (object == null)
values = Util.newList();
else {
if (object instanceof Map<?, ?>) {
Map<?, ?... | [
"private Profile createProfile() {\n Profile profile = new Profile();\n profile.setActivation(createActivation());\n return profile;\n }",
"Profile createProfile();",
"private IProfile createProfile() {\n \t\tIProfile profile = getProfile();\n \t\tif (profile == null) {\n \t\t\tMap prope... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A type of bed. This is used for indicating the bed or beds available in an accommodation. | @NotNull public static BedType.Builder bedType() { return new BedType.Builder(new HashMap<String,Object>()); } | [
"public BedType getBedType() {\n\t\treturn bedType;\n\t}",
"public RoomBedType getBedType()\n {\n return bedType;\n }",
"public boolean isBed() {\n return this.type == Type.BED;\n }",
"public void setBedType(RoomBedType bedType)\n {\n this.bedType = bedType;\n }",
"public... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the SecondaryColor in this ColorWheel at position i | public int getSecondaryColor(int i) {
return secondary[i];
} | [
"public Color getColor(int i) {\t\n\t\treturn color[i];\t\n\t}",
"public Color getColor(int i)\n\t{\n\t return _cols[i];\n\t}",
"public static Color getMainColor(int i) {\n float hue = ((i * 3) % 5) * 0.2f;\n float sat = 0.7f;\n float bright = 0.5f;\n\n return new Color(Color.HSBtoR... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates the position of the asteroid | public void updateAsteroid(int height, int width) {
if (isAlive()) {
incX(getVelX());
if (getX() < -20) {
setX(width + 20);
} else if (getX() > width + 20) {
setX(-20);
}
incY(getVelY());
if (getY() < -20) {
setY(height + 2... | [
"public void update()\n {\n //Update the asteroids\n for (int i = 0; i < numAsteroids; i++)\n {\n asteroids[i].update(i);\n }\n }",
"public void repositionOnGround() {\n y = y + 1;\n }",
"public void moveAsteroidUpandDown() {\t\t\t\r\n\t\tsetX(this.getX()+1... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if the view at the given position has a same row sibling in front of it. | public boolean hasPreviousViewInSameRow(int position) {
return mLayoutManager.hasPreviousViewInSameRow(position);
} | [
"private boolean isSameRow(int firstVisibleItem) {\n return firstVisibleItem == mPreviousFirstVisibleItem;\n }",
"public boolean isInFront() {\n\t\treturn parent_ == null ? false : getPosition() == parent_\n\t\t\t\t.getNChildren() - 1;\n\t}",
"@Override\n public boolean relative(int row) {\n ensur... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method returns a set of mime/media types a marshaller/unmarshaller may support. This should never return null. If a marshaller/unmarshaller should not support any mime/media types (unlikely scenario) then an empty set rather than null shall be returned. | public Set<MediaType> getSupportedMediaTypes(); | [
"protected final List<MimeType> supportedMimeTypes() {\n\t\treturn this.supportedMimeTypes;\n\t}",
"String[] getSupportedMimeTypes();",
"public List<MediaType> getRequestedMediaTypes() {\n return requestedMediaTypes;\n }",
"public List getMimeTypes();",
"private Set<String> createDefaultAllowedMim... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Verify Fiat Withdrawal Verifies an unverified withdrawal. You can get the code from /v1/user/exchange/bank/fiat/withdraw/newVerifycode. | public SuccessResult v1userexchangebankfiatwithdrawverify(Code body, String authorization, String accept) throws ApiException {
ApiResponse<SuccessResult> resp = v1userexchangebankfiatwithdrawverifyWithHttpInfo(body, authorization, accept);
return resp.getData();
} | [
"public void setFuiouWithdrawCode(String fuiouWithdrawCode) {\n this.fuiouWithdrawCode = fuiouWithdrawCode;\n }",
"private com.squareup.okhttp.Call v1userexchangebankfiatwithdrawverifyCall(Code body, String authorization, String accept, final ProgressResponseBody.ProgressListener progressListener, final... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Starts a new round of leader election. Whenever our QuorumPeer changes its state to LOOKING, this method is invoked, and it sends notifications to all other peers. | public Vote lookForLeader() throws InterruptedException {
try {
self.jmxLeaderElectionBean = new LeaderElectionBean();
MBeanRegistry.getInstance().register(self.jmxLeaderElectionBean, self.jmxLocalPeerBean);
} catch (Exception e) {
LOG.warn("Failed to register with JM... | [
"public void start() {\n logger.info(\"LeaderSelector start racing for leadership\");\n leaderElection();\n }",
"private void startVoting() {\n List<Node> nodes = new ArrayList<>(network.getAllNodes());\n Collections.shuffle(nodes);\n // Importand order! first, fill in all po... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Remove every read symbol and every action associated with the given symbol | void removeSymbol(String symbol){
this.removeAllReadSymbols(symbol);
this.removeAllActions(symbol);
} | [
"void removeReadSymbol(Transition transition, Tape tape, int head, String symbol){\n TransitionGroup transitionGroup = transitionToTransitionGroup.get(transition);\n if(symbol == null)\n symbol = TuringMachineDrawer.BLANK_SYMBOL;\n transitionGroup.removeReadSymbol(tape, head, symbol)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
converts the fastq file to the fasta file | public void convert() throws IOException
{
// Builds chain of readers for reading fast records from the fastq file.
FileReader fr = new FileReader(fastq);
BufferedReader br = new BufferedReader(fr);
FastqReader fqr = new FastqReader(br);
// Builds chain of writers for writing fasta records to the fasta file... | [
"public void convert() throws IOException {\r\n \t\r\n \t// Build the readers.\r\n \tFileReader fr = new FileReader(fastq);\r\n \tBufferedReader br = new BufferedReader(fr);\r\n \tFastqReader fqr = new FastqReader(br);\r\n \t\r\n \t// Build the writers.\r\n \tFileWriter fw = new FileWriter(f... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a And in the prop territory, from 2 booleans or 2 properties. The 2 arguments should not have different types. If one of the argument is null, it returns the other one. | public static Term and(final Term f1, final Term f2) {
if (f1 == null) {
return Logic.boolToPred(f2);
}
if (f2 == null) {
return Logic.boolToPred(f1);
}
return Logic.and(Logic.boolToPred(f1), Logic.boolToPred(f2));
} | [
"private Object and(Object left, Object right, EvaluationContext ctx) {\n Boolean l = EvalHelper.getBooleanOrNull( left );\n Boolean r = EvalHelper.getBooleanOrNull( right );\n // have to check for all nulls first to avoid NPE\n if ( (l == null && r == null) || (l == null && r == true) |... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets rec thirty sale cnt. | public Long getRecThirtySaleCnt() {
return this.recThirtySaleCnt;
} | [
"public Long getNumSale() {\n\t\treturn numSale;\n\t}",
"public Long getRecSevenSaleCnt() {\n\t\treturn this.recSevenSaleCnt;\n\t}",
"public int getSale() {\n\t\treturn sale;\r\n\t}",
"public Long getRecThirtySaleAmt() {\n\t\treturn this.recThirtySaleAmt;\n\t}",
"public void setRecThirtySaleCnt(Long recThir... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This is used to acquire a cookie usiing the name of that cookie. If the cookie exists within the HTTP header then it is returned as a Cookie object. Otherwise this method will return null. Each cookie object will contain the name, value and path of the cookie as well as the optional domain part. | public Cookie getCookie(String name) {
return header.getCookie(name);
} | [
"public Cookie getCookieObject(String name) {\n Cookie[] cookies = request.getCookies();\n if (cookies != null)\n for (Cookie cookie : cookies)\n if (cookie.getName().equals(name))\n return cookie;\n return null;\n }",
"public Cookie getCookieOb... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__AddExp__OpAssignment_1_1" $ANTLR start "rule__AddExp__RightAssignment_1_2" ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/srcgen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:10351:1: rule__AddExp__RightAssignment_1_2 : ( ruleMultExp ) ; | public final void rule__AddExp__RightAssignment_1_2() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:10355:1: ( ( ruleMultEx... | [
"public final void rule__AddExp__Group_1__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8373:1: ( ( ( ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fill a resource by parsing tags | private static void fillResourceInfos( PackageResource pr, Document doc, String strKey, String strCreated )
{
String strDocumentTag = _service.getMapping( strKey );
if ( !strDocumentTag.equals( CkanService.NOT_FOUND ) )
{
NodeList nList = doc.getElementsByTagName( strDocum... | [
"TagResourceResult tagResource(TagResourceRequest tagResourceRequest);",
"public void parse() throws IOException {\n try {\n // read resource file header.\n ResourceTableHeader resourceTableHeader = (ResourceTableHeader) readChunkHeader();\n\n // read string pool chunk\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the snpId value for this SnpInfo. | public void setSnpId(java.lang.String snpId) {
this.snpId = snpId;
} | [
"public void setsId(Integer sId) {\n this.sId = sId;\n }",
"public void setpSId(Integer pSId) {\n this.pSId = pSId;\n }",
"public no.ruter.events.avro.tps.IdMapping.Builder setNsrId(java.lang.CharSequence value) {\n validate(fields()[0], value);\n this.nsrId = value;\n fieldSe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__PrimitiveTypes__Group_0__2" $ANTLR start "rule__PrimitiveTypes__Group_0__2__Impl" InternalJSchema.g:1822:1: rule__PrimitiveTypes__Group_0__2__Impl : ( ( rule__PrimitiveTypes__StringAssignment_0_2 ) ) ; | public final void rule__PrimitiveTypes__Group_0__2__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalJSchema.g:1826:1: ( ( ( rule__PrimitiveTypes__StringAssignment_0_2 ) ) )
// InternalJSchema.g:1827:1: ( ( rule__PrimitiveTypes__... | [
"public final void rule__PrimitiveTypes__Group_0__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalJSchema.g:1800:1: ( ( ( rule__PrimitiveTypes__StringNameAssignment_0_1 ) ) )\n // InternalJSchema.g:1801:1: ( ( rule... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculate no of ways to reach n stairs using m steps Recursion Technique | static int nStairsRecur(int stairs, int hops) {
if(stairs < 0) {
return -1;
}
if(stairs == 0 || stairs == 1) {
return 1;
}
int res = 0;
for(int i = 1; i <= hops && i <= stairs; i++) {
res += nStairsRecur(stairs - i, hops);
... | [
"public static long countWaysToClimb(int[] steps, int n) {\n\n int ans[] = new int[n+1];\n ans[0]=1; // why ?? because we are going bottom up and same as recursion when we reach ground level 0 we know\n // there was a way . Consider steps=[2,3]; so cWC(steps,2), cWC(steps,3) will have 2-2,3-2 a... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Spring Data repository for the MQuestDropRateCampaignContent entity. | @SuppressWarnings("unused")
@Repository
public interface MQuestDropRateCampaignContentRepository extends JpaRepository<MQuestDropRateCampaignContent, Long>, JpaSpecificationExecutor<MQuestDropRateCampaignContent> {
} | [
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface CommunityMediaRepository extends JpaRepository<CommunityMedia, Long> {\n\n}",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface ContentDocRepository extends JpaRepository<ContentDoc, Long> {\n}",
"@SuppressWarnings(\"unused\")\n@Repositor... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the protocol partitioner. | public DistributedLogProtocolBuilder withPartitioner(Partitioner<String> partitioner) {
config.setPartitioner(partitioner);
return this;
} | [
"public void setPartitioner(String partitioner) {\n this.partitioner = partitioner == null ? null : partitioner.trim();\n }",
"protected void setPartitioner(final Partitioner partitioner) {\n\t\tthis.partitioner = partitioner;\n\t}",
"public String getPartitioner() {\n return partitioner;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves all Visit Recrods from all Citizen accounts. | public ArrayList<Record> getAllVisits()
{
int i,j;
for(i=0;i<accounts.size();i++)
for(j=0;j<accounts.get(i).getRecords().size();j++)
allVisits.add(accounts.get(i).getRecords().get(j));
return allVisits;
} | [
"@Transactional\r\n\tpublic Set<Visit> loadVisits() {\r\n\t\treturn visitDAO.findAllVisits();\r\n\t}",
"Collection<Account> getAll();",
"public List<Crime> getAllCrimes() {\n return mCrimes;\n }",
"private static Collection<Crate> getCrates()\n {\n return instances;\n }",
"@Override\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column USER_PROFILE_VIEW.XBOX_LIVE | public void setXboxLive(String xboxLive) {
this.xboxLive = xboxLive;
} | [
"public void setLive(Boolean live)\n\t{\n\t\tthis.live = live;\n\t}",
"public void setHideXboxLiveFlag(Boolean hideXboxLiveFlag) {\n\t\tthis.hideXboxLiveFlag = hideXboxLiveFlag;\n\t}",
"public void setTimeToLive(long value) {\n this.timeToLive = value;\n }",
"public void setTimeToLive(int timeToLive... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the allowed account types for the current logged user and the given account owner | @DontEnforcePermission(traceable = false, value = "The implementation must carry out with the permissions control")
Collection<? extends AccountType> getAllowedTypes(final AccountOwner owner); | [
"public static List<Account_Type> get_account_types(Session session) throws Error{\n\t\tlog(\"get account from session\");\n\t\treturn get_account_types(session,\"\");\n\t}",
"public String getAccountType();",
"public Set<Account> getAccountsForOwner(String username);",
"public Set<AccountType> getManageableA... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns true if all named files exist | public static boolean allExists(String... files) {
for (int i = 0; i < files.length; i++) {
if (!Files.exists(files[i])) {
logger.debug("Files " + files[i] + " doesn't exist");
return false;
}
}
return true;
} | [
"boolean existFileByName(String name);",
"private boolean checkSpecificFiles ()\n {\n for (SpecificFile specificFile : descriptor.getSpecificFiles()) {\n if (!new File(specificFile.target).exists()) {\n return false;\n }\n }\n\n return true;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns this grace note's fret. | public int getFret() {
return _fret;
} | [
"public Object getFremark() {\n return fremark;\n }",
"public double getFare() {\n return fare;\n }",
"@Override\n public final Float getForfeit() {\n return _forfeit;\n }",
"public java.lang.String getFhr () {\n\t\treturn fhr;\n\t}",
"double getCurrentFare() {\n retu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets (as xml) the "ParentName" element | public org.apache.xmlbeans.XmlString xgetParentName()
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.XmlString target = null;
target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(PARENTNAME$40, 0);
return target;
... | [
"public java.lang.String getParentName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PARENTNAME$40, 0);\n if (target == n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes a security service from a share network. | ShareNetwork removeSecurityService(String shareNetworkId, String securityServiceId); | [
"boolean removeSharedService(String serviceId) throws CoreException, IllegalStateException;",
"public void removeServiceEntry(String linkName);",
"public void removeDeviceServiceLink();",
"ShareNetwork addSecurityService(String shareNetworkId, String securityServiceId);",
"static void removeFileFromShared()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs a Noise Spread. Move pixels around randomly | public NoiseSpread(GeglFilter parent)
{
super(parent, "gegl:noise-spread");
} | [
"public static BufferedImage getNoiseImage(){\n time += 0.01;\n for( int y = 0 ; y < Settings.HEIGHT ; y++){\n for(int x = 0 ; x < Settings.WIDTH ; x++){\n double dx = (double) x / Settings.HEIGHT;\n double dy = (double) y / Settings.HEIGHT;\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Opens android share dialog pass one of uri or shareText | public static void openShareDialog(Context context, String title, String uri, String shareText, String shareSubject) {
Intent share = new Intent(Intent.ACTION_SEND);
share.setType("text/plain");
share.putExtra(Intent.EXTRA_TEXT, shareText);
share.putExtra(Intent.EXTRA_SUBJECT, shareSubje... | [
"public void share(View view){\n Toast.makeText(this, \"Loading share options ...\", Toast.LENGTH_SHORT).show();\n //Create an intent to share\n Intent sharingIntent = new Intent(Intent.ACTION_SEND);\n sharingIntent.setType(\"text/plain\");\n String shareBody = \"You should check ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Write the first `k` entries of a hash map `map` to the file `fname`. | static void writeToFile(HashMap<Integer,Double> map, String fname, int k) {
try {
BufferedWriter writer = new BufferedWriter(new FileWriter(fname));
if (map != null) {
int i = 0;
for (Map.Entry<Integer,Double> e : map.entrySet()) {
... | [
"void writeToFile(HashMap<Integer,Double> map, String fname, int k) {\r\n try {\r\n BufferedWriter writer = new BufferedWriter(new FileWriter(fname));\r\n \r\n if (map != null) {\r\n int i = 0;\r\n for (Map.Entry<Integer,Double> e : map.entrySet(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Scale a grid containing Perlin noise to be between the min and max values provided. | public static DoubleGrid2D scaleGrid(DoubleGrid2D grid, double min, double max) {
for (int ndx = 0; ndx < grid.getWidth(); ndx++) {
for (int ndy = 0; ndy < grid.getHeight(); ndy++) {
double value = min + (max - min) * grid.get(ndx, ndy);
grid.set(ndx, ndy, value);
}
}
return grid;
} | [
"public InterpolatorGrid(double min, double max) {\n minValue = min;\n maxValue = max;\n }",
"public void setRandomScale(float min, float max) {\n\t\t\tminPartScale = min;\n\t\t\tmaxPartScale = max;\n\t\t}",
"double[] setMaxScaling(double[] scaling);",
"public void remapToRange(float minRange... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the ContentSetting value for this origin. | public @ContentSettingValues @Nullable Integer getContentSetting(
BrowserContextHandle browserContextHandle) {
return WebsitePreferenceBridgeJni.get().getPermissionSettingForOrigin(
browserContextHandle, mContentSettingsType, mOrigin, getEmbedderSafe());
} | [
"Setting getSetting();",
"public String getValue (String setting);",
"public Setting getSetting(){\n\t\treturn setting;\n\t}",
"public Setting getCurrentSetting() {\n\t\treturn currentSetting;\n\t}",
"public String settings() {\n return this.settings;\n }",
"public StorageSetting storage_setting... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function takes the users selection and switches the current converter to the selected converter | private void converterSelectionActionPerformed(java.awt.event.ActionEvent evt) {
int i = converterSelection.getSelectedIndex();
switch(i){
case 0:
switchPanels(Temperature);
break;
case 1:
switchPanels(Length);
... | [
"public void converterSelected();",
"public void converterUnselected();",
"private void switch_ActionPerformed(java.awt.event.ActionEvent evt) {\n \n int temp = tempSelect1.getSelectedIndex();\n tempSelect1.setSelectedIndex(tempSelect2.getSelectedIndex());\n tempSelect2.setSelectedIn... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the season where groupId = &63; and seasonId = &63; or returns null if it could not be found, optionally using the finder cache. | public hu.webtown.liferay.portlet.model.Season fetchByG_S(long groupId,
long seasonId, boolean retrieveFromCache)
throws com.liferay.portal.kernel.exception.SystemException; | [
"public hu.webtown.liferay.portlet.model.Season fetchByG_S(long groupId,\n\t\tlong seasonId)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public Season getSeason( int seasonId ) throws OpenMMMidtierException;",
"public Season getSeason( int showId, int seasonNumber ) throws OpenMMMidtierE... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes the given statement from the article. | public void remove(Statement statement) {
synchronized (ontology) {
if (statements.contains(statement)) {
log("remove statement: " + statement.getText(getDefaultLanguage()));
statements.remove(statement);
}
if (ontology != null) {
if (statement instanceof Sentence) {
ontology.retractSentence... | [
"void removeStatement(Resource subject, URI predicate, String literal,\r\n\t\t\tString languageTag) throws ModelRuntimeException;",
"void removeStatement(String subjectURIString, URI predicate,\r\n\t\t\tString literal, String languageTag) throws ModelRuntimeException;",
"private void removeStatement(){\n\t\tsyn... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the simple travels from user. | Request<List<SimpleTravelProxy>> getSimpleTravelsFromUser(Long userId); | [
"private List<User> retrieveTravelContacts() {\n if (checkIfContactKeysExists()) {\n return SharedPrefsUtils.convertSharedPrefsToTravelContacts(context);\n }\n //TODO: display no contacts UI below header\n return new ArrayList<>();\n }",
"public String getTravel() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the list of DisableSpecificWarnings children. | @Nonnull
List<GenericDomValue<String>> getDisableSpecificWarningses(); | [
"@Nonnull\n\tList<GenericDomValue<String>> getWarningLevels();",
"public List<Warning> getWarnings() {\n return ImmutableList.copyOf(warnings);\n }",
"public final Set<Node> getAllWarningNodes() {\n\t\tSet<Node> result = new HashSet<Node>();\n\t\tif (this.containsWarnings()) {\n\t\t\tresult.add(this);\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the patterns the user created. Also provides way to publish more | public static void patterns() {
try {
List<Pattern> patterns = PlatformClient.patterns(getUser());
render(patterns);
} catch (ApplicationException e) {
e.printStackTrace();
flash.error("Can not get patterns : %s", e.getMessage());
render();
}
} | [
"public List<String> getPatterns() {\n return patterns;\n }",
"public List<RoomPattern> getPatternList();",
"public String[] getPatterns() {\n return this.patterns;\n }",
"PatternsGetPatternsDefinitionStages.WithAppId getPatterns();",
"@Override\n public List<BannerPattern> getPatterns() {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new Arm. | public Arm() {
// Device number 4 maps to the physical Servo 1 port on the XRP
m_armServo = new XRPServo(4);
} | [
"ArmOp createArmOp();",
"public Arm() {\n initializeLogger();\n initializeCurrentLimiting();\n setBrakeMode();\n encoder.setDistancePerPulse(1.0/256.0);\n lastTimeStep = Timer.getFPGATimestamp();\n }",
"public com.nlu.entity.model.Ram create(long ramId);",
"Swarm createSw... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the available Java compiler. | protected JavaCompiler getJavaCompiler() {
JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
if (compiler == null) {
throw new DiagnosticException(
com.asakusafw.lang.compiler.common.Diagnostic.Level.ERROR,
"system Java compiler is not enab... | [
"public String getCompiler() {\n String compilerImpl = getCompilerVersion();\n if (fork) {\n if (isJdkCompiler(compilerImpl)) {\n if (facade.hasBeenSet()) {\n log(\"Since fork is true, ignoring compiler setting.\",\n Project.MSG... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Email use xml USE method : buildWebRequest(Document requestDoc, MDGlobalData data, List requests, boolean testing) | @Override
public boolean buildWebRequest(JSONObject jsonRequest, MDGlobalData data, List<MDGlobalRequest> requests) throws KettleException {
throw new KettleException("Error Global Email Service uses XML ");
//return false;
} | [
"private static Document SendRequest(HttpsURLConnection connection, String requestToken,\n\t\t\t String siteID, String verb, String entriesPerPage, boolean descriptionSearch)\n\t{\n\n\t\ttry\n\t\t{\n\t\t\t//Get the XML file into a Document object\n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newIns... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test case number: 3 / 1 covered goal: 1 oasis.names.tc.ciq.xsdschema.xal._2.AddressLine.setType(Ljava/lang/String;)V: rootBranch | @Test
public void test3() throws Throwable {
AddressLine addressLine0 = new AddressLine();
addressLine0.setType((String) null);
assertNull(addressLine0.getType());
} | [
"@Test\n public void test2() throws Throwable {\n AddressLine addressLine0 = new AddressLine();\n String string0 = addressLine0.getType();\n assertNull(string0);\n }",
"@Test\n public void test5() throws Throwable {\n AddressLine addressLine0 = new AddressLine();\n addressLine0.set... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the last foo in the ordered set where field2 = &63;. | public Foo findByField2_Last(boolean field2,
com.liferay.portal.kernel.util.OrderByComparator<Foo> orderByComparator)
throws NoSuchFooException; | [
"public Foo fetchByField2_Last(boolean field2,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<Foo> orderByComparator);",
"public FieldResult<T> last() {\n if (fields.size() >= 1) {\n this.onlyOne = true;\n this.field = fields.get(fields.size() - 1);\n } else {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get a reference to the object that maintains the current semantic (procedure nesting) level. | SemanticLevel currentLevel() {
return currentLevel;
} | [
"public final ScopeBuilder getInnermostActiveScope() {\n checkScopeOpen();\n return myLexicalScopeStack.peek();\n }",
"@Override\n public ISemanticContext getSemanticContext() {\n return new SemanticContext(nativeGetSemanticContext(m_nativePtr));\n }",
"private Object getOuter() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
unused default movieplayer constructor | public MoviePlayer() {
super();
this.screenType = new Screen();
this.monitorType = null;
} | [
"public PlayerControl() {\n\n }",
"private PBPlayerCore() {}",
"private CSSearchPlayer() {}",
"public NFLPlayer(){\n }",
"public Audioplayer()\n {\n \n }",
"public Player() {}",
"private CurrentMovie() {\n\n }",
"public AiPlayer()\n {\n // nothing to do here\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setting Antharas spawn task. | public void setAntharasSpawnTask()
{
if (_monsterSpawnTask == null)
{
synchronized (this)
{
if (_monsterSpawnTask == null)
{
GrandBossManager.getInstance().setBossStatus(ANTHARASOLDID, WAITING);
_monsterSpawnTask = ThreadPool.schedule(new AntharasSpawn(1), 60000 * Config.ANTHARAS_WAIT_TIME)... | [
"public void spawn() {\r\n\t\tif (!isIngame) return;\r\n\t\tnew BukkitRunnable(){\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tgetPlayer().teleport(getSpawn());\r\n\t\t\t\tif (!getTeam().equals(teamName.SPECTATOR)){\r\n\t\t\t\t\tresetPlayerInfo();\r\n\t\t\t\t\tgiveClass();\r\n\t\t \t\tupdateXPbar()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
create a int array "factorCount[0..n]" and initialize all entries it as 0. A value in factorCount[i] will increase if i is Not a prime, else set 1. | private static void sieveOfEratosthenes(int n) {
factorCount = new long[n + 1];
for (int i = 2; i * i <= n; i++) {
// if factorCount[i] is not changed, then it is a prime
if (factorCount[i] == 0) {
// update all multiples of i
for (int j = i * i; j <= n; j += i) {
factorCount[j]++;
}
f... | [
"static int[] factorizeWithCount(int n)\n\t{\n\t\tint countPrimes[] = new int[end];\n\t\twhile(n > 1)\n\t\t{\n\t\t\tint prime = largestPrime[n];\n\t\t\tint countP = 0;\n\t\t\twhile(n % prime == 0)\n\t\t\t{\n\t\t\t\tn /= prime;\n\t\t\t\tcountP++;\n\t\t\t}\n\t\t\tcountPrimes[prime] = countP;\n\t\t}\n\t\treturn countP... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
getSystemFunctions JDBC API Get a comma separated list of system functions. | public String getSystemFunctions()
throws SQLException
{
// The SimpleText driver does not support any System functions
return "";
} | [
"public String getSystemFunctions()\n throws SQLException\n {\n return \"\";\n }",
"public String getSystemFunctions() throws SQLException {\n return \"database,ifnull,user,convert\";\n }",
"List<String> listFunctions(String dbName) throws DatabaseNotExistException, CatalogException;",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Delete default actors from project role Deletes the [default actors](apirestapi2resolutionget) from a project role. You may delete a group or user, but you cannot delete a group and a user in the same request. Changing a project role's default actors does not affect project role members for projects already created. [P... | public Single<ProjectRole> deleteProjectRoleActorsFromRole(
Long id, Optional<String> user, Optional<String> group, Optional<RestRequestEnhancer> restRequestEnhancer) {
RestRequest.Builder requestBuilder = RestRequest.builder()
.method(HttpMethod.DELETE)
.basePath(DEFAULT_BASE_PATH)
.pa... | [
"public Response deleteActors() {\n\t\t// List<Actor> actors = actorService.deleteActors(userToken);\n\t\t// List<ActorBean> actorBeans = ActorBeanHelper.asActorBeans(actors);\n\t\treturn null;\n\t}",
"public void deleteRcsBotUserrole(RcsBotUserrole rcsbotuserrole);",
"public void clearActors(){\n\t\tactorCreds... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Committing the content of the text according to the current column and the given content. | public abstract void commit(IRodinElement elm, int col,
String contents); | [
"@Override\n\t\t\t\t\t\t\tpublic void modifyText(ModifyEvent event1) {\n\t\t\t\t\t\t\t\titem.setText(col, text.getText());\n\n\t\t\t\t\t\t\t}",
"private void processCommit() throws HsqlException {\n tokenizer.isGetThis(Token.T_WORK);\n session.commit();\n }",
"@Override\n public boolean comm... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get blocks array useful for other classes trying to access blocks. | public Block[] getBlocks() {
return blocks;
} | [
"public Block[] getAllBlocks(){\n\t\tBlock[] arr = new Block[tail];\n\t\tfor(int x = 0; x < tail; x++)\n\t\t\tarr[x] = ds[x];\n\t\treturn arr;\n\t}",
"public List<Block> blocks() {\r\n return this.blocks;\r\n }",
"public BlockList getBlocks() {\n return blocks;\n }",
"public ArrayList<Bloc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
MP: returns side score. Example: score west | public native static float scoreSide(GameSide oper1); | [
"public double getScore();",
"long getScore();",
"float getScore();",
"abstract protected double doScore(MultiStringWrapper ms, MultiStringWrapper mt);",
"Double getAwayScore();",
"int getScore();",
"public int getCurrentScore();",
"abstract int calculateScore();",
"int getGetScore();",
"private i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets ith "controlPersons" element | void setControlPersonsArray(int i, ch.crif_online.www.webservices.crifsoapservice.v1_00.AddressDescription controlPersons); | [
"public void setControlPersonsArray(int i, ch.crif_online.www.webservices.crifsoapservice.v1_00.AddressDescription controlPersons)\n {\n synchronized (monitor())\n {\n check_orphaned();\n ch.crif_online.www.webservices.crifsoapservice.v1_00.AddressDescription target = null;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Shows details for a share network. | ShareNetwork get(String shareNetworkId); | [
"List<? extends ShareNetwork> listDetails();",
"private void showNetworksDialog() {\n\n final MainPanel panel = mFileSystemController.getActivePanel();\n \n if (panel == null || panel.getActivity() == null) {\n // very weired situation; try to avoid crash.\n return;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of removeRemainingInvalidRouters method, of class BTRouterPatch. | @Test
public void testRemoveRemainingInvalidRouters() {
System.out.println("removeRemainingInvalidRouters");
ArrayList<String> routers = new ArrayList<>(Arrays.asList(
"A.example.COM,1.1.1.1,NO,11,Faulty fans",
"b.example.com,1.1.1.2,no,13,Behind the other routers so ... | [
"void rejects_invalid_racer() {\n }",
"@Test\n public void testPrintFinalRouters() {\n System.out.println(\"printFinalRouters\");\n ArrayList<String> arrList = new ArrayList<>(Arrays.asList(\n \"b.example.com,1.1.1.2,no,13,Behind the other routers so no one sees it\",\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the sync handler realtime. | public void setSyncHandlerRealtime(boolean isRealtime) {
this.isSyncHandlerRealTime = isRealtime;
} | [
"public void setRealtime(boolean NewValue);",
"public void setSynchronized(boolean fSync)\n {\n if (fSync)\n {\n m_nFlags |= ACC_SYNCHRONIZED;\n }\n else\n {\n m_nFlags &= ~ACC_SYNCHRONIZED;\n }\n }",
"@PropertySetter(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Parses the MP3 file, and sets up artist and/or title. Returns true if the file is MP3 file, it contains the ID3 tag, and at least artist or title is parsed | public boolean parse(File mp3file) throws IOException {
m_artist = null;
m_title = null;
// Read the first five bytes of the ID3 header - http://id3.org/id3v2-00
RandomAccessFile file = new RandomAccessFile(mp3file, "r");
byte[] headerBuf = new byte[10];
file.read(header... | [
"public void parse(File mediaFile) throws IOException {\n\ttry {\n\t\tMP3File mp3 = new MP3File(mediaFile);\n\t\t\n\t\tif ( mp3.hasID3v1Tag() ) {\n\t\t\t// process v1 fields\n\t\t\tID3v1 id3 = mp3.getID3v1Tag();\n\t\t\tsetAlbum(id3.getAlbum());\n\t\t\tsetArtist(id3.getArtist());\n\t\t\tsetSongName(id3.getTitle());\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns all the columnIds this filter uses, in this case exactly all the columnIds that the subfilter uses. | @Override
public Set<String> getAllColumnIds() {
return subFilter.getAllColumnIds();
} | [
"@Override\n public Set<String> getAllColumnIds() {\n Set<String> result = Sets.newHashSet();\n for (QueryFilter subFilter : subFilters) {\n result.addAll(subFilter.getAllColumnIds());\n }\n return result;\n }",
"public Collection<String> getColumnSelectionIds () {\n return getSelectionIds ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get field configuration schemes for projects Returns a [paginated](pagination) list of field configuration schemes and, for each scheme, a list of the projects that use it. The list is sorted by field configuration scheme ID. The first item contains the list of project IDs assigned to the default field configuration sc... | public PageBeanFieldConfigurationSchemeProjects getFieldConfigurationSchemeProjectMapping(List<Long> projectId, Long startAt, Integer maxResults) throws RestClientException {
Object postBody = null;
// verify the required parameter 'projectId' is set
if (projectId == null) {
throw ne... | [
"public PageBeanIssueTypeSchemeProjects getIssueTypeSchemeForProjects(Set<Long> projectId, Long startAt, Integer maxResults) throws IOException {\n HttpResponse response = getIssueTypeSchemeForProjectsForHttpResponse(projectId, startAt, maxResults);\n TypeReference<PageBeanIssueTypeSchemeProjects> typ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
creates a distance map of all the GamePieces reachable from the passed in GamePiece | public HashMap<GamePiece, Integer> generateDistanceMap(GamePiece startNode) {
ArrayList<String> directions = new ArrayList<String>(
Arrays.asList("left", "right", "top", "bottom"));
ArrayDeque<GamePiece> queue = new ArrayDeque<GamePiece>();
ArrayList<GamePiece> seen = new ArrayList<GamePiece>();
... | [
"HashMap<GamePiece, Integer> distanceMap(GamePiece from) {\n ArrayDeque<GamePiece> worklist = new ArrayDeque<GamePiece>();\n HashMap<GamePiece, Integer> distances = new HashMap<GamePiece, Integer>();\n ArrayList<GamePiece> seen = new ArrayList<GamePiece>();\n distances.put(from, 0);\n worklist.add(fr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the id property: Resource Id of the source resource used to create this restore point collection. | public RestorePointCollectionSourceProperties withId(String id) {
this.id = id;
return this;
} | [
"public void setResourceId(String id)\n {\n Id = id;\n }",
"public void setId() {\n this.id = id;\r\n }",
"@RdfProperty(\"http://www.coadunation.net/schema/rdf/1.0/service#IPID\")\n public void setId(String id) {\n this.id = id;\n }",
"public void setId(String id) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the disable service status. | public int getDisableServiceStatus() {
int status = 0;
if (AppSettings.getInstance() == null) {
AppSettings.createInstance(MediatekFactory.getApplicationContext());
}
status = AppSettings.getInstance().getDisableServiceStatus();
Logger.d(TAG, "getDisableServiceStatus"... | [
"public Integer getDisable() {\r\n return disable;\r\n }",
"protected StatusService getStatusService() {\n return getLockssDaemon().getStatusService();\n }",
"public Status getServiceStatus() {\n\n if (service.getStatus() != null) {\n if (service.getStatus().equals(Status.ERROR))... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ The following function is used to replace NOW or CURRENT_TIMESTAMP functions in an update Replace value for database functions. | public void replaceValueForDatabaseFunctions(String tableName,
List<String> valueList) {
for (int i = 0; i < valueList.size(); i++) {
String valStr = valueList.get(i).trim();
if (valStr.equalsIgnoreCase("NOW()")
|| valStr.equalsIgnoreCase("NOW")
|| valStr.equalsIgnoreCase("CURRENT_TIMESTAMP")
... | [
"public String getCurrentTimestampSQLFunctionName() {\n \t\t// the standard SQL function name is current_timestamp...\n \t\treturn \"current_timestamp\";\n \t}",
"public void testCurrentTimestamp() throws SQLException, InterruptedException\n { \n currentFunctionTests(Types.TIMESTAMP, CURRENT_TIMEST... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the bucket number as the integer keyValue modulo the number of buckets for the hash table. | public int calcBucket(int keyValue) {
return (keyValue % buckets.length);
} | [
"public int calcBucket(int keyValue) {\n\t\treturn(keyValue % buckets.length);\r\n\t}",
"private int bucketIndex(K key){\r\n return key.hashCode() % numberOfBuckets;\r\n }",
"private int hashValue(K key) {\r\n\t\treturn (Math.abs(key.hashCode()) % currentCapacity);\r\n\t}",
"public int getBucketNum(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
When parse xml entries that return list values. | @Test
public void whenParseXMLEntriesThatReturnListValues() {
List<Entry> entryList = List.of(new Entry(1), new Entry(2), new Entry(3));
StoreXML storeXML = new StoreXML(new File("xmlEntries.xml"));
File xml = storeXML.save(entryList);
File xmlQuotes = new File("xmlQuotes.xml");
... | [
"private static List<String> parseXmlForList(File xmlFile) throws Exception {\r\n\tList<String> list = new ArrayList<String>();\r\n\tDocumentBuilder docBuilder =\r\n\t\tDocumentBuilderFactory.newInstance().newDocumentBuilder();\r\n\tDocument dom = docBuilder.parse(xmlFile);\r\n\tElement nodeElement = dom.getDocumen... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add new drawable to board according to it id. | public void addDrawableToBoard(long drawableId, Serializable drawable,
long boardId, String userEmail) throws SharedPaintException; | [
"public void setDrawable(int new_drawable_id)\n\t{\n\t\tthis.drawable_id = new_drawable_id;\n\t\tthis.drawable_bitmap = BitmapFactory.decodeResource(getResources(), this.drawable_id);\n\t}",
"public void put(@NonNull final String key, final Drawable value) {\n put(key, value, -1);\n }",
"public void a... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Constructeur. Puisque le systeme ne pourra pas creer deux bases de donnees simultanement alors le systeme va verifier si une base de etait creee ou pas. Sinon, baseCree sera assignee en true et la base de donnees est creee. Lors de la creation de la base de donnees le logiciel va creer des listes pour les utilisateur... | public BaseDonnees() {
if(!baseCree) {
utilisateurs = new ArrayList<>();
employes = new ArrayList<>();
membres = new ArrayList<>();
professionnels = new ArrayList<>();
transactions = new HashMap<>();
seances = new HashMap<>();
... | [
"protected void creaCampi() {\n /* variabili e costanti locali di lavoro */\n Campo unCampo;\n\n try { // prova ad eseguire il codice\n /* invoca il metodo sovrascritto della superclasse */\n super.creaCampi();\n\n /* elimina il campo della superclasse link al c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Attempts to look for file number in the old file name.\ | private String findNumber(String fname) {
char[] f = fname.toCharArray();
for (int i = 0; i < f.length; i++) {
if (Character.isDigit(f[i])) {
if (i + 1 < f.length && Character.isDigit(f[i + 1])) {
boolean match = false;
... | [
"private String getNewName(String filename, Path directoryPath) {\n if (Files.exists(directoryPath.resolve(filename))){\n Matcher m = PATTERN.matcher(filename);\n if (m.matches()){\n String prefix = m.group(1);\n String number = m.group(2);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
for every internal edge assign (again assuming only 1 for now), find the corresponding leafInput and place the assign on top of that LeafInput. Modify the joinLeafInputsHashMap as well. | private void pushAssignsIntoLeafInputs(IPlanPrettyPrinter pp,
HashMap<EmptyTupleSourceOperator, ILogicalOperator> joinLeafInputsHashMap, List<AssignOperator> assignOps)
throws AlgebricksException {
for (Map.Entry<EmptyTupleSourceOperator, ILogicalOperator> mapElement : joinLeafInputsHas... | [
"private void pushAssignsIntoLeafInputs(IPlanPrettyPrinter pp, List<ILogicalOperator> leafInputs,\n List<AssignOperator> assignOps, List<ILogicalExpression> assignJoinExprs) throws AlgebricksException {\n int pos = 0;\n for (ILogicalOperator lo : leafInputs) {\n ILogicalOperator ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional .bosphorus2.CATTRIBUTE cattributeinherited_fields = 2; | boolean hasCattributeinheritedFields(); | [
"private CATTRIBUTE(Builder builder) {\n super(builder);\n }",
"boolean hasCobjectinheritedFields();",
"java.util.List<bosphorus2.Aomgen.CATTRIBUTE> \n getAttributesList();",
"boolean hasCdefinedobjectinheritedFields();",
"boolean hasCprimitiveinheritedFields();",
"private CMULTIPLEATTRIBUT... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clears the value of the 'fundPassword' field | public Builder clearFundPassword() {
fundPassword = null;
fieldSetFlags()[5] = false;
return this;
} | [
"public void clearPassword() {\n\t\tpassword.setValue(\"\");\n\t}",
"public void removePassword() {\n setPassword(\"\");\n fetchPassword();\n }",
"public void clearPassword() {\n\t\tthis.password = null;\n\t}",
"public void clear()\n {\n currentPassword.setText(\"\");\n passwordField1.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of getEmpresa method, of class ClienteEmpresa. | @Test
public void testGetEmpresa() {
Empresa e = new Empresa(312134, "Askov");
ClienteEmpresa ce = new ClienteEmpresa(3534,e,54689,"Roberto",67485943);
assertEquals(e, ce.getEmpresa());
} | [
"@Test\r\n public void testGetCodigo() {\r\n Empresa e = new Empresa(312134, \"Askov\");\r\n ClienteEmpresa ce = new ClienteEmpresa(3534,e,54689,\"Roberto\",67485943);\r\n assertEquals(ce.getCodigo(),ce.getCodigo());\r\n }",
"@Test\r\n public void testGet() {\r\n System.out.pr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get all building records by given owner id or throw owner not found exception | @GetMapping("/properties/owner/{ownerId}")
public Collection<BuildingRecord> getAllBuildingRecordsByOwnerId(@PathVariable Long ownerId) {
return this.buildingRecordService.getAllByOwner(this.ownerService.findById(ownerId));
} | [
"@ApiOperation(value = \"Returns a list of buildings base on an app user id\")\n @GetMapping(value = \"/buildings/owners/id/{id}\", produces = MediaType.APPLICATION_JSON_VALUE)\n public List<BuildingDto> getAllBuildingsByOwner(@PathVariable(\"id\") int id) {\n return etlService.getAllBuildingsByOwner(id);\n }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a SQL string that can be used to create a foreign key constraint for the relationship. | public String createFkConstraint(DbRelationship rel); | [
"public String createFkConstraint(DbRelationship rel) {\n StringBuffer buf = new StringBuffer();\n StringBuffer refBuf = new StringBuffer();\n\n buf\n .append(\"ALTER TABLE \")\n .append(((DbEntity) rel.getSourceEntity()).getFullyQualifiedName())\n .append(\" AD... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
set id. this will index the atom if it has a parent. id cannot be reset. | public void setId(String id) {
String id0 = this.getId();
if (id0 != null) {
if(!id0.equals(id)) {
throw new RuntimeException("Cannot reindex id");
}
} else {
// LOG.debug("ATOM SET ID "+id);
super.setId(id);
ParentNode parent = this.ge... | [
"public void setParent(int id);",
"public static void setParentId(BaseContentEntry<?> entry, String id) {\n entry.addLink(SitesLink.Rel.PARENT, ILink.Type.ATOM, id);\n }",
"protected final void setTreeId(int id) {\n m_treeid = id;\n }",
"public void setId() {\n this.id = id;\r\n }",
"priva... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to get the consignor by consignor name. | public Contact getConsignorByName(String name) {
if (null != contactsList) {
int size = contactsList.size();
Contact contact = null;
for (int i = 0; i < size; i++) {
contact = contactsList.get(i);
if (!contact.isConsignee() && name.equals(contact.getName())) {
return contact;
}
}
}
r... | [
"public String getConsignorName()\n\t{\n\t\treturn wConsignorName;\n\t}",
"public String getConsignorName()\n\t{\n\t\treturn getValue(WorkingInformation.CONSIGNORNAME).toString();\n\t}",
"public String getConsignorName()\n\t{\n\t\treturn getValue(StoragePlan.CONSIGNORNAME).toString();\n\t}",
"private String g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional bytes explicitLac = 4; | boolean hasExplicitLac(); | [
"com.google.protobuf.ByteString getExplicitLac();",
"@java.lang.Override\n public com.google.protobuf.ByteString getExplicitLac() {\n return explicitLac_;\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString getExplicitLac() {\n return explicitLac_;\n }",
"@java.lang.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the Equation PV Meta Data cache | public EquationPVMetaDataCache getPvMetaDataCache(String pvName)
{
return pvMetaDataCaches.get(pvName);
} | [
"public EquationPVMetaDataCacheHandler()\n\t{\n\t\tthis.pvMetaDataCaches = new Hashtable<String, EquationPVMetaDataCache>();\n\t}",
"public EquationPVMetaData getPvMetaData(String pvName)\n\t{\n\t\tif (isExists(pvName))\n\t\t{\n\t\t\tEquationPVMetaDataCache pvMetaDataCache = pvMetaDataCaches.get(pvName);\n\t\t\tr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the subFundGroup attribute. | public SubFundGroup getSubFundGroup() {
return subFundGroup;
} | [
"public String getSubFundGroupCode() {\n return subFundGroupCode;\n }",
"public int getSubGroup() {\n return subGroup;\n }",
"public String getCardgroupSub() {\r\n return (String) getAttributeInternal(CARDGROUPSUB);\r\n }",
"public String getSubgroup() {\n\t\treturn subgroup;\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |