query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Create a new PurchaseDao without any configuration
public PurchaseDao() { super(Purchase.PURCHASE, com.ims.dataAccess.tables.pojos.Purchase.class); }
[ "private PurchaseDAO(){\n }", "public PurchaseDao(Configuration configuration) {\n super(Purchase.PURCHASE, com.ims.dataAccess.tables.pojos.Purchase.class, configuration);\n }", "Purchase create(Purchase purchase) throws SQLException, DAOException;", "public NDevicePurchaseDetailDAOImpl() {\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
To select First BankDetail
public void selectFirstBankDetail(ExtentTest extentedReport, boolean screenshot) throws Exception { try { if (WaitUtils.waitForElement(driver, btnSelectBankDetailRow1)) { btnSelectBankDetailRow1.click(); WaitUtils.waitForElement(driver, but_CheckAccount); Log.message("Bank detail is selected", driver, ...
[ "BankUserInfo selectByPrimaryKey(String bankUserId);", "public void fetchBankBasedOnBankCountry(){\n\t\ttry{\n\t\t\tsetExceptionMessage(null);\n\t\t\tif(bankList != null && !bankList.isEmpty()){\n\t\t\t\tbankList.clear();\n\t\t\t}\n\t\t\tif(getExchangeCountryId() != null){\n\t\t\t\tList<BankMaster> lstBankMaster ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Given two binary search trees root1 and root2, return a list containing all the integers from both trees sorted in ascending order. Example 1: [2] [1] / \ / \ [1] [4] [0] [3] Input: root1 = [2,1,4], root2 = [1,0,3] Output: [0,1,1,2,3,4] Example 2: [1] [8] \ / [8] [1] Input: root1 = [1,null,8], root2 = [8,1] Output: [...
public List<Integer> getAllElements(TreeNode root1, TreeNode root2) { List<Integer> result = new ArrayList<>(); List<Integer> t1 = new ArrayList<>(); List<Integer> t2 = new ArrayList<>(); // populate each list with the in order sequence of each tree inOrder(root1, t1); ...
[ "public void union(int root1, int root2) {\n if (array[root2] < array[root1]) {\n array[root1] = root2; // root2 is taller; make root2 new root\n } else {\n if (array[root1] == array[root2]) {\n array[root1]--; // Both trees same height; new one is taller\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if a Double value is zero.
public static boolean isZero(Double x) { return x != null && x.equals(BeeConst.DOUBLE_ZERO); }
[ "public static boolean isDoubleZero(double a) {\n return Math.abs(a) <= Constants.DOUBLE_EQUAL_PRECISION;\n }", "private boolean isZero(double d) {\n return d * d == 0;\n }", "public static boolean isZero(double x)\n {\n // double eps = std::numeric_limits<double>::epsilon();\n double ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the perl lib.
public void setPerlLib(String perlLib) { this.perlLib = perlLib; }
[ "@Param(mandatory=false, defaultDoc = \"Contents of the PERLLIB in the environment of Yatea binary.\")\n public String getPerlLib() {\n return perlLib;\n }", "public static void setLibrary(String lib) {\n\t\tsetPreferenceStoreValue(PreferenceConstants.P_LLVM_LIBRARIES, lib);\n\t}", "public void set...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method allows the CuteCreato gain the specified number of experience points, leveling up if necessary
public void gainExp(int exp) { int initialLevel = this.level; experiencePoints += exp; System.out.println(species + " gained +" + exp + " experience!\n"); int[] totalExperiencePointsAccumulated = new int[200]; for (int i = 0; i < totalExperiencePointsAccumulated.length; i++) { final int EXPERIENC...
[ "@Override\n protected int getBonusPoints() {\n return leadership + experience;\n }", "public void gainPoint() {\n if (points < 10) {\n points++;\n } else {\n this.gameOver = true;\n }\n }", "public void gainExpHonors(int exp){\r\n\t\tSystem.out.println...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
return byte array representation of the 64bit bitcode.
public static byte[] getBitCode64() { return getBitCode64Internal(); }
[ "public byte[] toByteArray() {\r\n byte[] raw = new byte[8];\r\n byte[] bi = bigIntValue().toByteArray();\r\n System.arraycopy(bi, 0, raw, raw.length - bi.length, bi.length);\r\n return raw;\r\n }", "byte [] readBin128();", "private static final byte[] longToByteArray(long l) {\n\t\tbyte[] retVal =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fetch direct connections test exception.
@SuppressWarnings("static-access") @Test public void fetchDirectConnectionsTest_Exception() throws Exception { PowerMockito.whenNew(AWSStaticCredentialsProvider.class).withAnyArguments().thenThrow(new Exception()); assertThat(directConnectionInventoryUtil.fetchDirectConnections(new Basi...
[ "@Test\n public void testConnectFailures()\n {\n StudioProgressMonitor monitor = null;\n ConnectionParameter connectionParameter = null;\n Connection connection = null;\n ConnectionWrapper connectionWrapper = null;\n\n // invalid port\n monitor = getProgressMonitor();...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called on construction and when the target directory is changed. It reads the persisting file and makes sure the files get put in the right place when the user adds movies.
private void loadTargetDirectory() { // Get directory containing JAR String name = this.getClass().getName().replace('.', '/'); String s = this.getClass().getResource("/" + name + ".class").toString(); File persistingData; if (s.contains(".jar")) { s = s.replace('/',...
[ "public void initialize(){\n //Creating directory if one does not already exist\n try {\n new File(_localResourcesPath).mkdir();\n new File(_localDatabasePath).mkdir();\n new File (_concatenationsPath).mkdir();\n new File (_localUserRecordingDirPath).mkdir()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A CIFFConstants defines some constants for CIFF metadata.
public interface CIFFConstants { /** * CIFF auto rotate: none. * This is one of the possible values for the * {@link CIFFTags#CIFF_SI_AUTO_ROTATE} metadata tag. */ short CIFF_AUTO_ROTATE_NONE = 0; /** * CIFF auto rotate: the image is rotated 90 CCW. * This is one of the p...
[ "public static interface CwConstants extends Constants {\n\t\t\n\t\tString cwAddContactDialogCaption();\n\t\t\n\t\tString cwUpdateContactDialogCaption();\n\t\t\t\t\n//\t\tString cwDialogBoxClose();\n//\n//\t\tString cwDialogBoxDescription();\n//\n//\t\tString cwDialogBoxDetails();\n//\n//\t\tString cwDialogBoxItem(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Build a returnparameter. Removes all current return parameters from the operation and adds the supplied parameter. The directionkind of the parameter will be return. The name will be equal to the name of the last found return parameter or the default value "return" if no return parameter was present in the operation.
public void setReturnParameter( MOperation operation, MParameter newReturnParameter) { Iterator params = operation.getParameters().iterator(); String name = "return"; while (params.hasNext()) { MParameter parameter = (MParameter)params.next(); if ((paramet...
[ "Parameter createReturnResult(String name, Type type);", "public MParameter getReturnParameter(MOperation operation) {\n Vector returnParams = new Vector();\n MParameter firstReturnParameter = null;\n Iterator params = operation.getParameters().iterator();\n while (params.hasNext()) {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ persistent graph constructor that makes a graph that has all the nodes and edges from the previous graph and does not have the given edge
private PersistentGraph(Edge e, PersistentGraph g){ nodes = g.getNodes(); if(g.getEdges() == null){ edges = null; }else{ edges = g.getEdges().remove(e); } }
[ "public static Graph createUndirectedGraph() {\n return new Graph(false);\n }", "public Graph copy();", "public Graph() {}", "public Graph(){\r\n vertices = new ArrayList<>();\r\n edges = new ArrayList<>();\r\n }", "private PersistentGraph(PersistentGraph g, Edge e){\n\t\tImmutabl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Read main records until handleRecord() has had enough, or we hit the input or output limit.
@SuppressWarnings("nls") @Override public void run() throws FatalException { Logger.getLogger(OneToManyLookupProcessNode.class).info( "run with inlimit: " + getInLimit() + " outlimit: " + getOutLimit()); // First populate the readers. start(); RecordReader<T> mainReader = getReader(getMainConstraint()); ...
[ "private void readNext() {\n nextLine = null;\n try {\n while (nextLine == null) {\n nextLine = reader.readNext();\n reader.consumeEmptyLines();\n if (reader.eof()) {\n break;\n }\n }\n if (nextLine != null) {\n super.recordCounter++;\n if (sup...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__GIfExpression__Group__3" $ANTLR start "rule__GIfExpression__Group__3__Impl" ../org.gemoc.gel.xtext.ui/srcgen/org/gemoc/gel/ui/contentassist/antlr/internal/InternalGEL.g:8140:1: rule__GIfExpression__Group__3__Impl : ( 'then' ) ;
public final void rule__GIfExpression__Group__3__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.gemoc.gel.xtext.ui/src-gen/org/gemoc/gel/ui/contentassist/antlr/internal/InternalGEL.g:8144:1: ( ( 'then' ) ) // ../org.gemoc.gel...
[ "public final void rule__AstExpressionIf__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:19088:1: ( ( 'then' ) )\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__OrderedSetExp__Group__5__Impl" $ANTLR start "rule__OrderedSetExp__Group_4__0" InternalOCLlite.g:7739:1: rule__OrderedSetExp__Group_4__0 : rule__OrderedSetExp__Group_4__0__Impl rule__OrderedSetExp__Group_4__1 ;
public final void rule__OrderedSetExp__Group_4__0() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalOCLlite.g:7743:1: ( rule__OrderedSetExp__Group_4__0__Impl rule__OrderedSetExp__Group_4__1 ) // InternalOCLlite.g:7744:2: rule__OrderedS...
[ "public final void rule__OrderedSetExp__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:7701:1: ( ( ( rule__OrderedSetExp__Group_4__0 ) ) )\n // InternalOCLlite.g:7702:1: ( ( rule__OrderedSetExp__G...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the timing operators.
List<OperatorDTO> getTimingOperators();
[ "private ISeq<Op<Double>> getOperations() {\n\t\tISeq<Op<Double>> operations = ISeq.of(MathOp.ADD, MathOp.MUL, MathOp.POW, MathOp.SUB, MathOp.DIV);\n\t\tif (this.mode == OptimizationMode.LogExp) {\n\t\t\toperations = operations.append(MathOp.LOG, MathOp.LOG10, MathOp.EXP, MathOp.SQRT);\n\t\t} else if (this.mode == ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the local adult field
public void setAdult(boolean adult){ this.adult = adult; }
[ "public void setAdultNum(int value) {\n this.adultNum = value;\n }", "public boolean isSetAdult() {\n return EncodingUtils.testBit(__isset_bitfield, __ADULT_ISSET_ID);\n }", "public boolean isAdult(){\n\t\treturn adult;\n\t}", "public void setNumberOfAdults(int value) {\n this.numberOfAdu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Pick up as much of the entity item as possible. If everything was picked up the entity item will be marked dead. Otherwise the MeeCreep will try to get the rest later
void pickup(EntityItem item);
[ "@Override\n protected void acquireTargetItem(FarmYardItem item) {\n if (item instanceof Egg) {\n super.acquireTargetItem(item);\n totalEggsCollected++;\n } else if (item instanceof Crop) {\n animalFeed++;\n ((Crop) item).harvestParentPlant();\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Computes the symmetric difference between geom1 and geom2.
public static Geometry ST_SymDifference(Geometry geom1, Geometry geom2) { return geom1.symDifference(geom2); }
[ "public static Geometry ST_Difference(Geometry geom1, Geometry geom2) {\n return geom1.difference(geom2);\n }", "protected abstract NativeSQLStatement createNativeSymDifferenceStatement(Geometry geom);", "protected abstract NativeSQLStatement createNativeDifferenceStatement(Geometry geom);", "public void ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes an existing MultiPartyCollaboration object at the specified index.
public MultiPartyCollaboration removeMultiPartyCollaboration(int index) { return (MultiPartyCollaboration)_objMultiPartyCollaboration.remove(index); }
[ "public BinaryCollaboration removeBinaryCollaboration(int index)\n {\n return (BinaryCollaboration)_objBinaryCollaboration.remove(index);\n }", "public boolean removeMultiPartyCollaboration(MultiPartyCollaboration obj)\n {\n return _objMultiPartyCollaboration.remove(obj);\n }", "public MultiPartyColla...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add custom extensions (for now features and plugins) to the current table if they're activated.
public void registerCustomExtensions(HtmlTable table) throws ExtensionLoadingException { if (StringUtils.isNotBlank(table.getTableConfiguration().getBasePackage())) { logger.debug("Scanning custom extensions..."); // Scanning custom extension based on the base.package property List<AbstractExtensio...
[ "public void addCustExt() {\n String toAdd = customExt.getText();\n String[] extensions = toAdd.split(\",\");\n ExtensionsAdder.addExtensions(extensions);\n }", "public void registerCoreExtensions() {\n if (extensionsRegistered) {\n throw H2O.fail(\"Extensions already registered\")...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests that the stack attribute in the base linker is effective when creating the command line for a linker that extends it.
public void testExtendsStack() { final LinkerDef baseLinker = new LinkerDef(); baseLinker.setStack(new FlexInteger("10000")); final LinkerDef extendedLinker = (LinkerDef) createExtendedProcessorDef(baseLinker); setLinkerName(extendedLinker, "msvc"); final String[] preArgs = getPreArguments(extendedL...
[ "public void testExtendsLinkerArgs() {\n final LinkerDef baseLinker = new LinkerDef();\n final LinkerArgument linkerArg = new LinkerArgument();\n linkerArg.setValue(\"/base\");\n baseLinker.addConfiguredLinkerArg(linkerArg);\n final LinkerDef extendedLinker = (LinkerDef) createExtendedProcessorDef(ba...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This stores the set of root nodes
public static HashSet<KDNode> RootSet() { return root_map; }
[ "public static HashSet<KDNode> RootSet() {\n\t\treturn root_map.get(class_id);\n\t}", "Set<String> getRootNodes() {\n return this.graph.keySet();\n }", "public void rootSet(Node root);", "@Override\r\n public Node[] getRootNodes() {\r\n return new Node[] {getNetworkNode()};\r\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the set of current stream paths.
public Set<String> getStreamPaths() { // todo: instead of returning a set here, perhaps // we can return Iterator<String> Set<String> streamSet = new HashSet<String>(); if (streams != null) { for (ChildData child : streams.getCurrentData()) { streamSet.add(child.getPath()); } } return Collections....
[ "public Set<Path> getPaths() {\n\n\t\tfinish();\n\t\tlock.acquireReadLock();\n\t\tlogger.debug(\"Getting paths.\");\n\t\tSet<Path> unmodfilePaths = Collections.unmodifiableSet(paths);\n\t\tlock.releaseReadLock();\n\t\treturn unmodfilePaths;\n\n\t}", "public List<String> paths() {\n return getPaths();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the message body as a string. If the message contains a content type header with a specified charset, and if the payload has been read as a byte array, then it is returned encoded into this charset.
public String getMessageContent() throws UnsupportedEncodingException { if ( this.messageContent == null && this.messageContentBytes == null ) return null; else if (this.messageContent == null) { ContentType contentTypeHeader = (ContentType) this.nameTable.g...
[ "public byte[] getRawContent() {\n try {\n if (this.messageContent == null &&\n this.messageContentBytes == null &&\n this.messageContentObject == null) {\n return null;\n } else if (this.messageContentObject != null ) {\n Strin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check to see if FeeList is set.
public boolean isSetFeeList() { return feeList != null && !feeList.isEmpty(); }
[ "public boolean isSetRentalFeeList() {\r\n return rentalFeeList != null && !rentalFeeList.isEmpty();\r\n }", "public void setFeeList(List<FeeComponent> feeList) {\r\n this.feeList = feeList;\r\n }", "public boolean isSetBeerList() {\n return this.beerList != null;\n }", "public boolean...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the value of the 'Props' attribute. If the meaning of the 'Props' attribute isn't clear, there really should be more of a description here...
Object getProps();
[ "int getProps();", "public List<Prop> getProps() {\n return props;\n }", "Object getOtherprops();", "public PafDimMemberProps getMemberProps() {\r\n\t\treturn memberProps;\r\n\t}", "public Term getPropertiesTerm() {\n return prop ;\n }", "public String getPropValue() {\n return ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a new Player at the "center" of the game.
public Player() { this(new Point3D(0, HEIGHT / 2, 0)); }
[ "public void CreatePlayer() {\n this.player = new Player();\n\n gamePlatform.getChildren().addAll(this.player.getBody(), this.player.getCannon());\n\n gamePlatform.getChildren().get(55).setTranslateX(WIDTH / 2);\n gamePlatform.getChildren().get(55).setTranslateY(WIDTH * 0.9375);\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the Check field. Check that paid this payment.
@gw.internal.gosu.parser.ExtendedProperty public entity.Check getCheck() { return (entity.Check)__getInternalInterface().getFieldValue(CHECK_PROP.get()); }
[ "public String getCheckStatus() {\n return this.CheckStatus;\n }", "public java.lang.String getCheckNumber() {\n return checkNumber;\n }", "public String getCheckResult() {\n return checkResult;\n }", "public com.github.jtendermint.jabci.types.Types.ResponseCheckTx getCheckTx() {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__PersistenceProperty__Group__3" $ANTLR start "rule__PersistenceProperty__Group__3__Impl" ../com.idobjects.dsl.ui/srcgen/com/idobjects/dsl/ui/contentassist/antlr/internal/InternalIdObjectsDsl.g:2131:1: rule__PersistenceProperty__Group__3__Impl : ( ( rule__PersistenceProperty__Group_3__0 ) ) ;
public final void rule__PersistenceProperty__Group__3__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../com.idobjects.dsl.ui/src-gen/com/idobjects/dsl/ui/contentassist/antlr/internal/InternalIdObjectsDsl.g:2135:1: ( ( ( rule__PersistenceProper...
[ "public final void rule__PersistenceProperty__Group_3__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.idobjects.dsl.ui/src-gen/com/idobjects/dsl/ui/contentassist/antlr/internal/InternalIdObjectsDsl.g:2223:1: ( rule__PersistencePr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the stack this AVR is using
public StackInterface Stack() { return mStack; }
[ "public String getStack() {\n return this.stack;\n }", "public BStack getStack(String TAG){\n return backStackMap.get(TAG);\n }", "private OperandStack stack(){\n\t\treturn frame.getStack();\n\t}", "public Uuid stackUuid() {\n return stackUuid;\n }", "public static String getCurrentS...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
cuts four bytes out of an byte array according to a given index value
private static byte[] getFourBytes(byte[] input, int index){ int i = index; int j = 0; byte[] result = new byte[4]; while(j < 4){ result[j++] = input[i++]; } return result; }
[ "public static byte[] fourBytes(byte[] b, int index) { return nBytes(4,b,index); }", "public static void copyFourBytes(byte[] s, byte[] d, int index) { copyNBytes(4,s,d,index); }", "public byte[] remove(int index, int len) {\n synchronized (ByteVector.class) {\n if (index < 0 || index > data.l...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
System.out.println("passing through " + SerializablePayloadAndHeaderRetainingTransformer.class.getName());
@Transformer public Message<?> keepOnlySerializablObjects (Message<?> in) throws Throwable { MessageHeaders headers = in.getHeaders(); Map<String, Object> serializableHeaders = new HashMap<String, Object>(); for (String k : headers.keySet()) { Object val = headers.get(k); if (val instanceof Serializable...
[ "public PacketTransformer getTransformer()\n {\n return transformer;\n }", "Transformer getTransformer();", "public SimpleDelegatingTransformer() {\n\t\tsuper();\n\t}", "Object getTransformedMessage() throws TransformerException;", "public IRequestReader getPayloadReader();", "public abstract...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ see superclass Returns the terminology id map.
@Override public Map<Long, String> getTerminologyIdMap(String terminology, String version, String branch) throws Exception { Logger.getLogger(getClass()).debug( "Content Service - get id to terminology id map " + terminology + "/" + version); Terminology terminologyObj = getTerminolog...
[ "public String getTerminologyId();", "@Override\n\tpublic java.util.Map<java.util.Locale, java.lang.String> getManualIdMap() {\n\t\treturn _scienceApp.getManualIdMap();\n\t}", "protected AeIntMap getIdObjectMap()\r\n {\r\n return mIdObjectMap;\r\n }", "public Map<Node, Node> getIdoms() {\n\t\treturn ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column familyphoto.commentFk
public void setCommentfk(Long commentfk) { this.commentfk = commentfk; }
[ "public Long getCommentfk() {\n return commentfk;\n }", "public void setCommentId(int commentId);", "public void setCommentId(long value) {\n this.commentId = value;\n }", "@Override\n\tpublic void setCommentId(long commentId) {\n\t\t_comment.setCommentId(commentId);\n\t}", "public void ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'field651' field
public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField651(java.lang.CharSequence value) { validate(fields()[651], value); this.field651 = value; fieldSetFlags()[651] = true; return this; }
[ "public void setField651(java.lang.CharSequence value) {\n this.field651 = value;\n }", "public void setField653(java.lang.CharSequence value) {\n this.field653 = value;\n }", "public void setField629(java.lang.CharSequence value) {\n this.field629 = value;\n }", "public void setField652(java.lang...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the maxProductDisplayName value.
public void setMaxProductDisplayName(String maxProductDisplayName) { this.maxProductDisplayName = maxProductDisplayName; }
[ "public String getMaxProductDisplayName() {\n return this.maxProductDisplayName;\n }", "public void setDisplayName(String value) {\n setAttributeInternal(DISPLAYNAME, value);\n }", "public void setProductName(String value)\n {\n productName = value;\n }", "void setDisplayName(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Build worker node entity by IP and PORT
private WorkerNodeEntity buildWorkerNode() { WorkerNodeEntity workerNodeEntity = new WorkerNodeEntity(); if (DockerUtils.isDocker()) { workerNodeEntity.setType(WorkerNodeType.CONTAINER.value()); workerNodeEntity.setHostName(DockerUtils.getDockerHost()); workerNodeEnti...
[ "public Node(String _ip, int _port) {\n\t\tip = _ip;\n\t\tport = _port;\n\t}", "List<NodeConfiguration> workerNodes();", "public Node(int port) {\n this();\n portnum = port;\n }", "Port createPort();", "NodeConnection createNodeConnection();", "Network createNetwork();", "public TomP2PI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the corresponding object from a String being a DCI name.
private static DCINameEnumeration getDCINameFromString(String dciName) throws IllegalArgumentException { if (dciName == null) { throw new IllegalArgumentException("Unknown dci name detected (" + dciName + ")"); } DCINameEnumeration name = DCINameEnume...
[ "public Object lookup(String name);", "public LandCards findLandFromName(String str){\n\n\t\tLandCards correspondingCardToName = null;\n\t\tLinkedList<LandCards> ownedLands = getOwnedLands();\n\t\tfor (LandCards landCard : ownedLands) {\n\t\t\tif(landCard.getName().equals(str)){ //Object is found.\n\t\t\t\tcorres...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the requestMessage value for this CartRequestT.
public void setRequestMessage(auction.schema.Arche_Itempage3_Service_xsd.CartRequestStockTextT[] requestMessage) { this.requestMessage = requestMessage; }
[ "public void setRequestMessage( String requestMessage ) {\n this.requestMessage = requestMessage;\n }", "public void setRequestMessage(ch.iec.tc57._2011.schema.message.RequestMessageType requestMessage)\n {\n synchronized (monitor())\n {\n check_orphaned();\n ch.iec.tc57...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column commodity_attr.attr_val
public void setAttrVal(String attrVal) { this.attrVal = attrVal; }
[ "public void setAttr(String name,Object val)\n{\n\tAttributeEntry ae = (AttributeEntry)_j_attribute_table.get(name);\n\n\tif(ae == null)\n\t{//attribute does not exist\n\t\t//error(\"(mxj) setAttr failed for \"+name+\". It may not be declared as an attribute.\");\n\t\tthrow new MaxRuntimeException(\"attribute \"+na...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get all field from ancestor to current class keep the order
public static List<Field> getAllFieldsFromAncestor(Class<?> clazz) { List<Field> fields = new ArrayList<>(); for(Class<?> now = clazz; null != now; now = now.getSuperclass()) { Field[] nowFields = now.getDeclaredFields(); // add from last to head for(int i = nowFields...
[ "private static HashSet<Field> getAllFields(Class<?> cls) {\n // First, let's get all the super classes.\n HashSet<Class<?>> ancestors = getInstrumentedAncestors(cls);\n\n // Then, let's get all the fields of these classes.\n HashSet<Field> allFields = new HashSet<>();\n for (Class<?> ancestor : ance...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Encodes no / empty data as an empty byte array.
public static byte[] encodeNoData() { return new byte[0]; }
[ "public static DataEvent emptyBytes() {\n\t\treturn EMPTY_BYTES;\n\t}", "public byte[] nullToEmpty(byte[] array) {\n if (array == null || array.length == 0) {\n return EMPTY_BYTE_ARRAY;\n }\n return array;\n }", "public static Data empty() {\r\n\t\treturn new Data(ByteBuffer.a...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter for stackVersion. Stack version.
public void setStackVersion(String stackVersion) { this.stackVersion = stackVersion; }
[ "@JsonProperty(\"stackVersion\")\n public String getStackVersion() {\n return stackVersion;\n }", "public void setVersion(int value) {\n this.version = value;\n }", "void setVersion(String version);", "public void setVersion(java.lang.Integer value) {\n this.Version = value;\n }", "privat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Execute the "getUserTrips" function
public ResultSet getUserTrips(uclm.esi.cardroid.data.oracle.User usr, Current current) { CallableStatement cstmt = null; ResultSet result = null; try { String sql92Style = "{ ? = call callable_statements.get_user_trips(?) }"; // Create the CallableStatement object cstmt = _conn.prepareCall(sql92Style...
[ "public ResultSet getPassengerTrips(uclm.esi.cardroid.data.oracle.User usr,\n\t\t\tCurrent current) {\n\t\tCallableStatement cstmt = null;\n\t\tResultSet result = null;\n\n\t\ttry {\n\t\t\tString sql92Style = \"{ ? = call callable_statements.get_passenger_trips(?) }\";\n\t\t\t// Create the CallableStatement object\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the cooked record book.
ReadOnlyCookedRecordBook getRecordBook();
[ "public String getBook() {\n\t\treturn aBook;\n\t}", "public Book getBook() {\n\t\treturn book; //changed BoOk to book\r\n\t}", "public static @NonNull Book book() {\n return getBook(null, DEFAULT_DB_NAME);\n }", "public String getWantBook() {\n return wantBook;\n }", "public OrderBook ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
create hashmap to track the cards played
public PlayedCards() { playedCards = new HashMap<>(); }
[ "private void initialPlayingCard() {\r\n int index = 0;\r\n for (int i = 1; i <= 15; i++) {\r\n if (i < 14) {\r\n StringBuilder nameSb = new StringBuilder();\r\n switch (i) {\r\n case 1:\r\n nameSb.append(\"A\");\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the Music String representing this element and all of its settings.
public String getMusicString();
[ "public String toString()\n {\n String musicString = \"name: \" + name + \", artist: \" + artist +\n \", duration: \" + duration;\n return musicString;\n }", "public String getMusicString()\r\n {\r\n StringBuffer buffy = new StringBuffer();\r\n buffy.append(\"+\");\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Stops the call recording tone if recording has stopped or there are no longer any calls.
private void maybeStopCallAudioTone() { if (!mIsRecording || !hasActiveCall()) { stopCallRecordingTone(); } }
[ "private void stopCallRecordingTone() {\n if (mLoopingTonePlayer != null) {\n Log.i(this, \"stopCallRecordingTone: stopping call recording tone.\");\n mLoopingTonePlayer.stop();\n mLoopingTonePlayer = null;\n }\n }", "public void stop() {\r\n\t\tisRecording = fals...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handler for the emulated hardware devices
public void handleDevices() { byte[] b = { 0, 0, 0 }; char c = ' '; int d = 0; if (ports[0] == 1) return; if (ports[0] == 0 && ports[1] == 1) { try { System.in.read(b, 0, 1); } catch(Exception e) { System.out.println(e); } ports[1] = (int)b[0]; ports[0] = 1; } ...
[ "public void deviceEntered(DevicesEvent e);", "public void initDevice() {\r\n\t\t\r\n\t}", "private void execHandlerDevice( Message msg ) {\n\t\t // get the connected device's name\n\t\tString name = msg.getData().getString( BUNDLE_DEVICE_NAME );\n\t\tlog_d( \"EventDevice \" + name );\n\t\thideButtonConnect();\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ The getDocSize() method iterates throught the whole list and returns the number of Users in the list whose accType is Doctor
public int getDocSize(){ int counter = 0; /* ====> Size counter */ User marker = new User(); /* ====> Create a marker */ marker = this.getHead(); /* ====> Set the marker at the beginning of the list */ while(marker.getNext()!= null){ /* ====> Move marker to next element...
[ "public int getAdmSize(){\n\t\t\n\t\tint counter = 0;\t\t\t\t\t\t\t\t\t\t\t/* ====> Size counter */\n\t\t\n\t\tUser marker = new User();\t\t\t\t\t\t\t\t\t/* ====> Create a marker */\n\t\tmarker = this.getHead();\t\t\t\t\t\t\t\t\t/* ====> Set the marker at the beginning of the list */\n\t\t\n\t\twhile(marker.getNext...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Computes the convex hull of a ROC curve
public static ConvexReceiverOperatingCharacteristic computeConvexNull( ReceiverOperatingCharacteristic roc ) { ArrayList<ReceiverOperatingCharacteristic.DataPoint> origRocData = roc.getSortedROCData(); ArrayList<DataPoint> convexRoc = new ArrayList<DataPoint>( origRo...
[ "private void calculateConvexHull() {\n\t}", "Shape getConvexHull();", "public Polygon getConvexHull() {\n\t\tint n = getNCoordinates();\n\t\tint[] xCoordinates = getXCoordinates();\n\t\tint[] yCoordinates = getYCoordinates();\n\t\tRectangle r = getBounds();\n\t\tint xbase = r.x;\n\t\tint ybase = r.y;\n\t\tint[...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Stops the consumer thread.
public void killConsumer() { synchronized (lock) { exit = true; lock.notify(); } }
[ "private void stop() {\n try {\n Thread.sleep(10000);\n if (consumerConnector != null) {\n consumerConnector.shutdown();\n }\n } catch (Exception ie) {\n }\n }", "@Override\n public void stop() throws Exception {\n\t\tconsumer.unregister()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
on message bubble long pressed
@Override public void onMessageBubbleLongClick(EMMessage message) { }
[ "void onMessageBubbleLongClick(EMMessage message);", "public void onLongPress(PressID p);", "public void onLongPress();", "public void onLongRelease(PressID p);", "boolean onMessageBubbleClick(EMMessage message);", "@Override\n public void onLongPress(View v) {\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
forward the packet to ConnectPoint where the DHCP server is attached.
private void forwardPacket(InternalPacket packet) { //send Packetout to dhcp server connectpoint. if (packet.getDestLocation() != null) { TrafficTreatment t = DefaultTrafficTreatment.builder() .setOutput(packet.getDestLocation().port()).build(); OutboundPacket...
[ "private void forwardPacket(Ethernet packet, PacketContext context) {\n ConnectPoint toSendTo = null;\n\n if (!useOltUplink) {\n toSendTo = dhcpServerConnectPoint.get();\n } else {\n toSendTo = getUplinkConnectPointOfOlt(context.inPacket().\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Realiza la lectura del archivo Properties para determinar la clave de conexion con BD
private boolean readFilePasswordProperties() { boolean propertiesClaveCorrecto = true; try { InputStream fis = null; Properties properties = null; File archivo = null; // LEE PROPERTIES DE LA CLAVE //fis = new FileInputStream(FarmaConstants.RUTA_PROPERTIES_CLAVE); fis =...
[ "private void cargaProperties() throws InvalidPropertiesFormatException, FileNotFoundException, IOException {\r\n\t\tproperties = new Properties();\r\n\t\tString usuario = \" \";\r\n\t\tString contrasenya = \"\";\r\n\t\tproperties.load(new FileInputStream(\"usuarios.ini\"));\r\n\t\tusuario = properties.getProperty(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This tests whether timestamps are properly extracted in the timestamp extractor and whether watermark are correctly forwarded from the custom watermark emit function.
@Test public void testTimestampExtractorWithCustomWatermarkEmit() throws Exception { final int numElements = 10; StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(); env.getConfig().setAutoWatermarkInterval(10); env.setParallelism(1); Data...
[ "@Test\n public void testTimestampExtractorWithDecreasingCustomWatermarkEmit() throws Exception {\n final int numElements = 10;\n\n StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();\n\n env.getConfig().setAutoWatermarkInterval(1);\n env.setParallel...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
the arraylist stores all the lines in the file
private static List<String> fileReader(File f) { List<String> fileLines = new ArrayList<String>(); //this block populates the arraylist try { fileLines = Files.readAllLines(Paths.get(f.getAbsolutePath())); } catch (IOException e) { e.pr...
[ "private void readFile() {\r\n\t\tScanner sc = null; \r\n\t\ttry {\r\n\t\t\tsc = new Scanner(inputFile);\t\r\n\t\t\twhile(sc.hasNextLine()){\r\n\t\t\t\tlines.add(sc.nextLine());\r\n\t } \r\n\t\t}\r\n\t\tcatch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tsc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieve the exception constructor
Constructor<? extends RefException> getExceptionConstructor( String qualifiedExceptionName, String qualifiedPackageName );
[ "Constructor<? extends RefException> getExceptionConstructor(\n String qualifiedExceptionName,\n String qualifiedPackageName\n ){\n Constructor<? extends RefException> constructor = this.exceptionConstructors.get(qualifiedExceptionName);\n if(constructor == null) {\n String...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Move the graph backward by a percentage (amount) of the screen width. Percentages are expected in decimal form. For example, 0.50 for 50%.
public final void moveBackwardPercentage(final double amount) { moveEntireGraphingPanel(-(this.getWidth() * amount)); }
[ "private void moveForwardPercentage(final double amount) {\n\t\tmoveEntireGraphingPanel(this.getWidth() * amount);\n\t}", "public final void moveToEnd() {\n\t\tgoToLastGraphPosition();\n\t\tmoveBackwardPercentage(FIFTY_PERCENT);\n\t}", "public final void moveBackward() {\n\t\tint localZoom = zoom;\n\t\tif (zoom...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks for a given fieldname/type pair if it is a valid combination for this tuple.
protected boolean isValidNameTypePair(String field, Class type){ return (field.equals(PROCESS_FIELDNAME)) && (type == PROCESS_FIELDTYPE); }
[ "static boolean checkTupleType(TupleType type, Data[] datums)\n throws VisADException, RemoteException {\n if (datums == null || type == null) return false;\n int n = datums.length;\n if (n != type.getDimension()) return false;\n for (int i=0; i<n; i++) {\n if (!type.getComponent(i).e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Generates Solr schema.xml file mixing mapping.json specifications and schema.xmlEMPTY file
public void generateSchema() throws Exception { BufferedReader fin = new BufferedReader(new FileReader(Cfg.CONFIGURATIONS_PATH + "mapping/mapping.json")); Mapping mapping = new Gson().fromJson(fin, Mapping.class); fin.close(); // insert several fields by default StringBuffer sb = new StringBuffer(); s...
[ "File generateSchema() throws IOException, JAXBException;", "public void writeSchema(String _filename);", "public String getSchemaLocation();", "SchemaDefinition createSchemaDefinition();", "String getSchemafile();", "Schema createSchema();", "private void writeSchema(Document doc, Element schema) {\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
public static double similarityUsers(int user1, int user2) throws SQLException The similarity between two users, in fuction of their ratings.
public static double similarityUsers(int user1, int user2) throws SQLException{ double sim = 0; int item = 0; if (user1 == user2){ sim=1; } else { if (Datos.hasRated(user1) == false | Datos.hasRated(user2)== false){ sim = 0; } else { try{ String selectStatement = "SELECT DISTINCT id_ite...
[ "public static double computeSimilarity(int paraUser1, int paraUser2) {\r\n\r\n\t\tdouble tempSimilarity = 0;\r\n\t\t\r\n\t\tif (userDegree[paraUser1] == 0) {\r\n\t\t\ttempSimilarity = 0;\r\n\t\t}//Of if\r\n\t\tif (userDegree[paraUser2] == 0) {\r\n\t\t\ttempSimilarity = 0;\r\n\t\t}//Of if\r\n\t\t\r\n\t\t\t// 1.by M...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true if this value does not contain a singleton object label.
public boolean isNotASingletonObject() { checkNotPolymorphicOrUnknown(); if (object_labels == null) { return true; } for (ObjectLabel object_label : object_labels) { if (object_label.isSingleton()) { return false; } } re...
[ "public boolean isMaybeSingleObjectLabel() {\n checkNotPolymorphicOrUnknown();\n return object_labels != null && object_labels.size() == 1;\n }", "public boolean isNotASummarizedObject() {\n checkNotPolymorphicOrUnknown();\n if (object_labels == null) {\n return true;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Invalidates all cached items and lists associated with the given bucket.
public synchronized void invalidateBucket(String bucket) { PrefixKey key = new PrefixKey(bucket, ""); getPrefixSubMap(itemMap, key).clear(); }
[ "@VisibleForTesting\n synchronized void invalidateCache() {\n LOG.debug(\"Invalidating all cached KeyProviders.\");\n if (cache != null) {\n cache.invalidateAll();\n }\n }", "public void invalidateAll() {\n mCache.invalidateAll();\n }", "public void invalidateCaches() {\n // nothing c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Validation is done in the end of test on all indexes of a region by verifying last on a region key and verifying state of index based on the last operation.
public void validate(Region region) { // Get List of All indexes. Collection<Index> indexes = ((LocalRegion) region).getIndexManager().getIndexes(); // validate each index one by one for (Index index : indexes) { if (region instanceof PartitionedRegion) { validateOnPR((Partiti...
[ "boolean verifyEntryAndIndexValue(RegionEntry re, Object value, ExecutionContext context) {\n IMQEvaluator evaluator = (IMQEvaluator) getEvaluator();\n List valuesInRegion = null;\n Object valueInIndex = null;\n\n try {\n // In a RegionEntry key and Entry itself can not be modified else RegionEntry...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Condition 3 of rule constructDeeperUnderstanding02_PATH_2_GOAL_8_COMPONENT_txtResp_22. The original expression was: action.getGoal().getComponent().getName().equalsIgnoreCase("txtResp")
private boolean constructDeeperUnderstanding02_PATH_2_GOAL_8_COMPONENT_txtResp_22_cond_3() { return (module_entity_Action_1.getGoal().getComponent().getName().equalsIgnoreCase("txtResp")); }
[ "private boolean constructDeeperUnderstanding03_PATH_1_GOAL_4_COMPONENT_txtResp_12_cond_3() {\r\n return (module_entity_Action_1.getGoal().getComponent().getName().equalsIgnoreCase(\"txtResp\"));\r\n }", "private boolean constructDeeperUnderstanding03_PATH_2_GOAL_8_COMPONENT_txtResp_25_cond_3() {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
override method to generate a result between 500 and 800 randomly invoke method in MyTools class
@Override public double compete() { double result=MyTools.getRandomNum(500, 800); setThisResult(result); return result; }
[ "@Override\n\tpublic double compete() {\n\t\tdouble result=MyTools.getRandomNum(10, 20); \t\n\t\tsetThisResult(result);\n\t\treturn result;\n\t}", "@Override\n public int beber() {\n\n return ( (int) (Math.random() * 300) + 300 );\n }", "double generateRandom();", "private void generate(){\n\t\tn...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
System.out.println("With IndexExpNode " + ien.myString());
private Petrinet interpretIndexExp(IndexExpNode ien) throws CompilationException, InterruptedException, ExecutionException { Petrinet pn = interpretASTNode(ien.getProcess()); //System.out.println("IndexExpNode net " + pn.myString("edge")); return pn; }
[ "public String getIndexStr() {\t\t\n\t\treturn indexStr;\n\t}", "public String toString() {\r\n return TextFormat.getInstance(Index.class).formatToString(this);\r\n }", "public ATExpression base_indexExpression();", "@Override\n\tpublic String toString() {\n\t\treturn index.toString();\n\t}", "Exp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reenables double buffering globally.
public void enableDoubleBuffering( Component c ) { RepaintManager currentManager = RepaintManager.currentManager( c ); currentManager.setDoubleBufferingEnabled( true ); }
[ "public static void enableDoubleBuffering(Component c) \n {\n RepaintManager currentManager = RepaintManager.currentManager(c);\n currentManager.setDoubleBufferingEnabled(true);\n }", "protected void setDoubleBuffering( boolean dbon ) {\n\t\tthis.dbon = dbon;\n\t\tif (!dbon) {\n\t\t\toffscreen = null;\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Metodo para obtener las horasReportadas de Reporte
public int getHorasReportadas() { return horasReportadas; }
[ "public void setHorasReportadas(int horasReportadas) {\r\n this.horasReportadas = horasReportadas;\r\n }", "void listarReportes(){\r\n\t}", "public List<String> darPuntosEfectivosHoras( Long hora1, Long hora2, Long min1, Long min2 ){\r\n\t\tlog.info(\"Buscando puntos efectivos horas\");\r\n\t\tList<Strin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Loads Github Page with Documentation
@FXML public void loadDocumentation() throws Exception { java.awt.Desktop.getDesktop().browse(new URI("https://github.com/Senarii/CheckoutEWB/blob/master/readme.md")); }
[ "java.lang.String getDocumentationUrl();", "Element loadFrontPageOf(GitHubProject project) throws IOException {\n String url = format(\"https://github.com/%s/%s\", project.organization().name(), project.name());\n return Jsoup.connect(url).get();\n }", "public static String getOnlineDocumentationUrl() {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the long value of column. If the column's type is not an long, or the column does not exist, an IllegalArgumentException is thrown.
public long getLongColumn(String column) { if (! hasColumn(column)) throw new IllegalArgumentException("No such column " + column); String name = canonicalize(column); if (isColumnNull(name)) return -1; Object value = data.get(name); if...
[ "@Override\n public long getLong(String col)\n throws IllegalArgumentException, ArrayIndexOutOfBoundsException, ClassCastException {\n return getLong(findColumnStrict(col));\n }", "public long getLongColumn(String column)\n {\n String canonicalized = canonicalizeAndCheck(column);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Verify confirmation duration is not added when it is not enabled in config overlay by default
@Test public void confirmationDurationIsNotAddedWhenItIsNotEnabledInConfigOverlay() throws Exception { WifiConnectedNetworkScorerImpl scorerImpl = new WifiConnectedNetworkScorerImpl(); // Register Client for verification. mWifiScoreReport.setWifiConnectedNetworkScorer(mAppBinder, scorerImpl)...
[ "boolean hasActivatePeriodSeconds();", "long getConfirmationsRequired();", "boolean hasGrantPeriodSeconds();", "public boolean isInstantConfirmation() {\n return instantConfirmation;\n }", "protected abstract boolean isConfirmEnabled();", "boolean isSetPaymentDelay();", "boolean hasRetryDurati...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Vacancy Report Step & Tasklet
@Bean public Step executeVacncyReportStep() throws Exception { return stepBuilderFactory.get("executeVacncyReportStep") .listener(stepListener) .tasklet(vacTasklet()) .build(); }
[ "void startReportingTask();", "@Bean\r\n\tpublic Step executeVacncyMissnCritclReportStep() throws Exception {\r\n\t\treturn stepBuilderFactory.get(\"executeVacncyMissnCritclReportStep\")\r\n\t\t\t\t.listener(stepListener)\r\n\t\t\t\t.tasklet(vmcoTasklet())\r\n\t\t\t\t.build();\r\n\t}", "@Bean\r\n\tpublic Step e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__AndForm__Group__0" $ANTLR start "rule__AndForm__Group__0__Impl" InternalDSLSAT.g:773:1: rule__AndForm__Group__0__Impl : ( ruleNandForm ) ;
public final void rule__AndForm__Group__0__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalDSLSAT.g:777:1: ( ( ruleNandForm ) ) // InternalDSLSAT.g:778:1: ( ruleNandForm ) { // InternalDSLSAT.g:778:1: ( r...
[ "public final void rule__AndForm__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDSLSAT.g:803:1: ( ( ( rule__AndForm__Group_1__0 )* ) )\n // InternalDSLSAT.g:804:1: ( ( rule__AndForm__Group_1__0 )* )\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRuleJavaCode" $ANTLR start "ruleJavaCode" InternalDsl.g:11237:1: ruleJavaCode returns [EObject current=null] : (otherlv_0= 'code' ( (lv_code_1_0= RULE_ML_CODE ) ) ) ;
public final EObject ruleJavaCode() throws RecognitionException { EObject current = null; Token otherlv_0=null; Token lv_code_1_0=null; enterRule(); try { // InternalDsl.g:11243:2: ( (otherlv_0= 'code' ( (lv_code_1_0= RULE_ML_CODE ) ) ) ) // InternalD...
[ "public final EObject entryRuleJavaCode() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleJavaCode = null;\n\n\n try {\n // InternalDsl.g:11230:49: (iv_ruleJavaCode= ruleJavaCode EOF )\n // InternalDsl.g:11231:2: iv_ruleJavaCode= ruleJavaCode EOF...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the name property from a Contact instance.
public Contact name(final String name) { this.name = name; return this; }
[ "public void setNameContact(java.lang.String nameContact) {\n this.nameContact = nameContact;\n }", "public void setContact(java.lang.String value) {\n this.contact = value;\n }", "public void setClaimContactName(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(CLAIM...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Similar as above method, return patches in an ordered List of Columns
public List<List<FImage>> getOrderedPatches(FImage image) { List<List<FImage>> patches = new ArrayList<List<FImage>>(); for(int x = 0; x < image.width-size; x += sampleSize) { ArrayList<FImage> line = new ArrayList<FImage>(); for(int y = 0; y < image.height-size; y += sampleSize) { FImage patch =...
[ "public List<List<String>> getPatches() throws SQLException {\n\t\treturn queryData(\n\t\t\t\t\"SELECT col_name from (SELECT m.name AS table_name, p.cid AS col_id, p.name AS col_name, p.type AS col_type, p.pk AS col_is_pk, p.dflt_value AS col_default_val,p.[notnull] AS col_is_not_null FROM sqlite_master m LEFT OUTE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/deletes the element specified by index and returns the deleted element. if index is invalid it return null
public T delete(int index) { if (index >= 0 && index <= upperBound) { int i = index; T temp = (T) array[index]; while (i < upperBound) { array[i] = array[i + 1]; i++; } upperBound--; return temp; } el...
[ "public boolean deleteItem(int index);", "public T remove(int index) {\n return null;\n }", "@SuppressWarnings(\"unchecked\")\r\n public T delete(int index){\r\n if (index < 0 || index >= dataSize) {\r\n throw new IndexOutOfBoundsException(\"Invalid index\");\r\n }\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes all nodes before the current node.
public void removeBefore(){ if(head==tail) return;//no other nodes, nothing to do. --size; head=curr.getPrev(); head.setPrev(null); }
[ "public void removeFromTheBeginning() {\n Node temp = head.getNext();\n head = temp;\n }", "public void removeNodeAfter() { cursor = cursor.getNext().getNext(); }", "public Node removeFront()\n {\n if(this.head.getNextNode()!= null) {\n String newPay = this.head.getNextNode...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
string AppName = 3;
java.lang.String getAppName();
[ "java.lang.String getApplicationName();", "public final String getAppName( )\n\t{\n\t\treturn this.data.getString( \"applicationName\" );\n\t}", "public String getApplicationName() {\n Context context=this.getApplicationContext();\n int stringId = context.getApplicationInfo().labelRes;\n re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Others method / Calculate ALARMTIME by taking REFERENCE +/ this.HOUR and this.MINUT
public void updateAlarmTime (){ int newHour, newMinut; if (relative) { //Before newMinut = reference.getMinutes() - alarmMinutes; newHour = reference.getHours() - alarmHours - ((newMinut<0)?1:0); newMinut = (newMinut<0)?newMinut+60:newMinut; newHour = (newHour<0)?newHour+24:newHour; } else ...
[ "private float ConvertTimeToRelativeAngleToReference()\n\t{\n\t\tCalendar c = Calendar.getInstance(); \n\t\tint hour = c.get(Calendar.HOUR);\n\t\tint minutes = c.get(Calendar.MINUTE);\n\t\tboolean currentlyAM = ( c.get(Calendar.AM_PM) == Calendar.AM );\n\t\t\n\t\treturn ConvertTimeToRelativeAngleToReference(hour, m...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculate Mode for data in any specific linkedList
public static float calculateMode(LinkedList<TRecord> TRecordLinkedList) { if (TRecordLinkedList.getHead() != null) { Node<TRecord> current = TRecordLinkedList.getHead(); float mode = current.getData().getGrade(); current = current.getNext(); int counter = 0; ...
[ "public int getMode() {\r\n List<Integer> rbtList = createArray(rbt.root);\r\n int n = rbtList.size();\r\n int max = 0;\r\n int maxCount = 0;\r\n\r\n for (int i = 0; i < n; i++) {\r\n int count = 0;\r\n for (int j = 0; j < n; j++) {\r\n if (rbt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Statement = SimpleStatement | IfStatement | WhileStatement | ReturnStatement | ReadStatement | PrintStatement | Block | ";"
private void parseStatement() { switch (nextToken.kind) { case Token.IDENT: parseSimpleStatement(); break; case Token.IF: parseIfStatement(); break; case Token.WHILE: parseWhileStatement(); ...
[ "public Statement parseStatement()\n {\n ArrayList <Statement> arraylist = new ArrayList <Statement> ();\n\n if (currentToken.equals(\"WRITELN\"))\n {\n eat(\"WRITELN\");\n eat(\"(\");\n Expression exp = parseExpression();\n eat(\")\");\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the current form of the application at the time that the StartEvent was fired. This will help event handlers to distinguish between the first start() call of the app, and subsequent start() calls.
public Form getCurrentForm() { return currentForm; }
[ "public Form getCurrentForm() {\n return currentForm;\n }", "public Form getCurrent(){\n Form current = impl.getCurrentForm();\n if(current != null && current instanceof Dialog) {\n if(((Dialog)current).isMenu() || ((Dialog)current).isDisposed()) {\n Form p = curr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method inserts a RxStep at the end of the steps array
public void addRxStep (RxStep step) { RxToolkit.trace("RxSection::addRxStep("+step+")"); if(steps.indexOf(step) == -1) steps.add(step); else RxToolkit.reportError("Can not add step that already exists"); }
[ "public void addRxStep (int index, RxStep step) {\n RxToolkit.trace(\"RxSection::addRxStep(\"+index+\",\"+step+\")\");\n steps.add(index,step);\n }", "public void addStep(BooleanSupplier step) {\n _steps.add(step);\n }", "public abstract void stepSkipped( RxStep skipped_step);", "public void ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set whether the alarm should vibrate.
public void setVibrate(Context context, boolean isVibrate) { this.isVibrate = isVibrate; PreferenceData.ALARM_VIBRATE.setValue(context, isVibrate, id); }
[ "public boolean setVibrate() {\n boolean isVibrate = checkVibrate();\n editor.putBoolean(Constans.KeyPreference.TURN_VIBRATE, !isVibrate);\n editor.commit();\n return !isVibrate;\n }", "public void vibrate() {\n if ((deltaX > vibrateThreshold) || (deltaY > vibrateThreshold) |...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
An acceptable is bid is one that exceeds the starting price of an item
@Override public boolean isAcceptableBid(Item item) { return amount > item.getStartPrice(); }
[ "public double checkSold(){\n int lastIndex=this.bids.size()-ONEI;\n DateTime today= new DateTime();\n if(today.isAfter(this.endDate) && bids.get(lastIndex).getBidAmount()>= (this.reserveAmount*.95)){\n this.qty-=bids.get(lastIndex).getBidQty();\n this.qtySold+=bids.get(lastIndex).getBidQty(); \n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets whether iterators should go into the attachments of the parts.
public boolean getIterateIntoAttachmentsOfParts() { return(iterateIntoAttachmentsOfParts); }
[ "public\t\tboolean\t\tgetIterateIntoPartsOfParts()\n\t\t{\n\t\treturn(iterateIntoPartsOfParts);\n\t\t}", "@Override\n public boolean hasNext() {\n if ((this.innerIterator == null) || (!this.innerIterator.hasNext() && this.outerIterator.hasNext())) {\n this.innerIterator = this.outerIterator.n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the distance to trigger a sync in dips
public void setDistanceToTriggerSync(int distance) { mTotalDragDistance = distance; }
[ "public void setDistance(int distance);", "public void setDist(int d){distance = d;}", "public void setDistance(double value) {\r\n this.distance = value;\r\n }", "void setDistanceTraveled(int distanceTraveled);", "public void setDistance(){\n distance = destination.dist;\n }", "public...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Finds the first data member which has a name. / nullptr is returned if no named data member exists.
@Converted(kind = Converted.Kind.AUTO, source = "${LLVM_SRC}/llvm/tools/clang/lib/AST/Decl.cpp", line = 3857, FQN="clang::RecordDecl::findFirstNamedDataMember", NM="_ZNK5clang10RecordDecl24findFirstNamedDataMemberEv", cmd="jclank.sh -java-options=${SPUTNIK}/modules/org.clang.ast/llvmToClangType ${LLVM_SRC}/llv...
[ "@Nullable\n public Member findMember(String memberName) {\n if (memberName == null)\n return null;\n\n return members.stream().filter(m -> m.name.equals(memberName)).findFirst().orElse(null);\n }", "public Optional<MemberShape> getMember(String name) {\n return Optional.ofNullable(members.get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method for calculate total cost of current branch (sum of cost of this node and of parent nodes)
public Double getBranchTotalCost() { var totalCost = 0D; if (parent != null) { totalCost += parent.getBranchTotalCost(); } if (item != null) { totalCost += item.getCost(); } return totalCost; }
[ "public double getCost() {\n\t\treturn tree.getCost() + 2;\r\n\t}", "public void computeTotalCost() {\n\t\tthis.totalCost = this.getTotalCost();\n\t}", "public double totalCost() {\n double result = 0;\n for (T route : routes)\n result += route.getCost();\n\n return result;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Its a wraper method for bitFlip and binAddOne takes the twos complement of a number and returns it as a binary string TwosComp(String)
public static String twosComp(String number){ return binAddOne(bitFlip(number)); }
[ "private static String printOneAndTwosComplement(String bin)\n {\n int n = bin.length();\n int i;\n\n String ones = \"\", twos = \"\";\n ones = twos = \"\";\n\n // for ones complement flip every bit\n for (i = 0; i < n; i++)\n {\n ones += flip(bin.charA...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated .com.ctrip.flight.intl.agg.flighttypes.v3.KeyValuePairType ExtraMarketingInfo = 12;
public java.util.List<? extends com.ctrip.flight.intl.agg.flighttypes.v3.KeyValuePairTypeOrBuilder> getExtraMarketingInfoOrBuilderList() { if (extraMarketingInfoBuilder_ != null) { return extraMarketingInfoBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.un...
[ "public com.ctrip.flight.intl.agg.flighttypes.v3.KeyValuePairType.Builder addExtraMarketingInfoBuilder() {\n return getExtraMarketingInfoFieldBuilder().addBuilder(\n com.ctrip.flight.intl.agg.flighttypes.v3.KeyValuePairType.getDefaultInstance());\n }", "public com.ctrip.flight.intl.agg.flighttype...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The DescribeCacheSubnetGroups operation returns a list of cache subnet group descriptions. If a subnet group name is specified, the list will contain only the description of that group.
public Future<DescribeCacheSubnetGroupsResult> describeCacheSubnetGroupsAsync(DescribeCacheSubnetGroupsRequest describeCacheSubnetGroupsRequest, AsyncHandler<DescribeCacheSubnetGroupsRequest, DescribeCacheSubnetGroupsResult> asyncHandler) throws AmazonServiceException, AmazonClientExcept...
[ "public Future<DescribeCacheSubnetGroupsResult> describeCacheSubnetGroupsAsync(DescribeCacheSubnetGroupsRequest describeCacheSubnetGroupsRequest) \n throws AmazonServiceException, AmazonClientException;", "DescribeCacheSubnetGroupsResult describeCacheSubnetGroups(DescribeCacheSubnetGroupsRequest descri...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test of setInputFile method, of class CMDWorker.
@Test public void testSetInputFile() { System.out.println("setInputFile"); String string = ""; // PluginsCMDWorker instance = new PluginsCMDWorkerEmul(); instance.setInputFile(string); }
[ "public void setInputFile(File input){\n this.inputFile = input;\n }", "private void setInputFile( File inputFile ) \r\n \t{\r\n \t\tthis.inputFile = inputFile;\r\n \t\t/**\r\n \t\t * TODO:\r\n \t\t * Must complete proper init method for re-initialization\r\n \t\t */\r\n \t}", "void setInput(String pa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is invoked by the Spring Container after the instance of this class is created. This method calls the API provider to fetch news articles of different categories and store it in the news map.
@PostConstruct private void init() { logger.info("Fetching news"); categories.forEach((category) -> { threadPoolService.getThread(() -> { try { newsMap.put(category, getArticlesFromCategory(category)); } catch (NewsNotFoundException e) { logger.warning("Could not get articles of " + category);...
[ "private void fetchNews() {\n if (isOnline(mContext)) {\n // showing refresh animation before making http call\n swipeRefreshLayout.setRefreshing(true);\n\n // appending offset to url\n // String url = URL_TOP_250 + offSet;\n ApiInterface apiService = Ap...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if the given solution set is the best so far
public void checkIfBest(List<Item> solution){ int currentWeight = 0; int currentValue = 0; //calculate the weight and value of solution for (Item item : solution){ currentWeight += item.getWeight(); currentValue += item.getValue(); } if (currentWei...
[ "boolean bestSolution(int itemId);", "private boolean checkSolutions() {\n\t\tfor (int i = 0; i < population; ++i) {\n\t\t\tif (populationArray.get(i).getFitness() == 0) {\n\t\t\t\tsolution = populationArray.get(i);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private static void feasible(in...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the EnvironmentLoader singleton instance
EnvironmentLoader getEnvironmentLoader();
[ "public static Env getInstance() {\n if (instance == null) {\n instance = new Env();\n }\n return instance;\n }", "public static NativeLibraryLoader getInstance() {\n return instance;\n }", "public static Environment getEnvironment() { return envObj; }", "public static A...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }