query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Returns the mean XY coordinates, [0] is X; [1] is Y
private double[] getMeanCenter(){ double[] meanXY = new double[2]; float[] trans = getTranslationVector(center.getX(),center.getY(),BITMAP_SIZE,BITMAP_SIZE,CONSTANT); // Plot points for (MeasurementService.DataPoint p: list) { meanXY[0] += (p.getX()*CONSTANT)+trans[0]; ...
[ "public Point getMean() {\r\n\t\tint XMean = 0;\r\n\t\tint YMean = 0;\r\n\t\tfor(Point p : this.points) {\r\n\t\t\tXMean += p.getX();\r\n\t\t\tYMean += p.getY();\r\n\t\t}\r\n\t\treturn new Point(XMean, YMean);\r\n\t}", "public Coordinates mean() {\n assert (!points.isEmpty()) : \"Cannot compute mean on emp...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Convert entity beans given in form of Arrays's into Map's, using given attribute names.
public List<Map<String, Object>> arrays2Maps(List<Object[]> rowsAsArrays, String[] attributeNames) { List<Map<String, Object>> list = new ArrayList<Map<String, Object>>(); for (Object[] row : rowsAsArrays) { Map<String, Object> rowAsMap = new HashMap<String, Object>(); for (int i = 0; i < attributeNames.l...
[ "java.util.Map<java.lang.String, java.lang.String> getAttributesMap();", "private Map<String, String> convertArrayToMap(PairDTO[] pairDTOs) {\n Map<String, String> map = new HashMap<>();\n for (PairDTO pairDTO : pairDTOs) {\n map.put(pairDTO.getKey(), pairDTO.getValue());\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns an instance of a view factory that can be used for creating views from elements. This implementation returns the current instance, because this class already implements ViewFactory.
public ViewFactory getViewFactory() { return this; }
[ "public ViewFactory getViewFactory() {\n EditorKit kit = getEditorKit(editor);\n ViewFactory f = kit.getViewFactory();\n if (f != null) {\n return f;\n }\n return BasicTextUI.this;\n }", "ViewElement createViewElement();", "View create...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Extract the list of concerned attributes inside a node that has conditions
public static Set<String> extractConditionAttributes(Element e, ExpressionAnalyzer ea) { return ea.getArguments(e.getAttribute("condition")); //return extractConditionAttributes(e, "condition"); }
[ "Collection<DynamicAttribute> getActiveAttributes(String nodeType, boolean searchableOnly, String[] attributeTypes);", "public static List<SimpleNode> getAttributeParts(Attribute node) {\n \t\tArrayList<SimpleNode> nodes = new ArrayList<SimpleNode>();\n \t\t\n \t\tnodes.add(node.attr);\n \t\tSimpleNode s = node.v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves the CatchClause list.
@SuppressWarnings({"unchecked", "cast"}) public List<CatchClause> getCatchClauseList() { List<CatchClause> list = (List<CatchClause>)getChild(1); list.getNumChild(); return list; }
[ "public List<CatchClause> getCatchClauses() {\n return getCatchClauseList();\n }", "public List<CatchClause> getCatchClauses() {\n return this.catchClauses;\n }", "public void setCatchClauseList(List<CatchClause> list) {\n setChild(list, 1);\n }", "public List<CatchClause> getCatchClausesNoT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Writes information about the installed packs and the variables at installation time.
protected void writeInstallationInformation() throws IOException, ClassNotFoundException { if (!installData.getInfo().isWriteInstallationInformation()) { logger.fine("Skip writing installation information"); return; } logger.fine("Writing installation informat...
[ "public StickerPack() {\n uninstalledPackSetup();\n packname = \"\";\n iconLocation = \"\";\n packBaseDir = \"\";\n datafile = \"\";\n extraText = \"\";\n description = \"\";\n urlBase = \"\";\n version = 1;\n displayOrder = 0;\n stickerCo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests whether everything is fine, if table prefix is null.
@Test public void testIfTablePrefixIsNull() throws SQLException { String tablePrefix = null; namingStrategy.setTablePrefix(tablePrefix); String className = "SomeCamelCaseClass"; String expectedPhysicalName = "somecamelcaseclass"; Dialect dialect = new H2Dialect(); ...
[ "@Test\n public void testIfTablePrefixIsEmpty() throws SQLException {\n String tablePrefix = \"\";\n\n namingStrategy.setTablePrefix(tablePrefix);\n\n String className = \"SomeCamelCaseClass\";\n String expectedPhysicalName = \"somecamelcaseclass\";\n Dialect dialect = new H2Di...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XConstructorCall__Group__5" $ANTLR start "rule__XConstructorCall__Group__5__Impl" ../org.xtext.lwc.instances.ui/srcgen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:9588:1: rule__XConstructorCall__Group__5__Impl : ( ( rule__XConstructorCall__Alternatives_5 )? ) ;
public final void rule__XConstructorCall__Group__5__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:9592:1: ( ( ( rule__XConstructo...
[ "public final void rule__XConstructorCall__Group__5__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:1...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new IServiceDao with an attached configuration
public IServiceDao(Configuration configuration) { super(IService.I_SERVICE, cn.vertxup.jet.domain.tables.pojos.IService.class, configuration); }
[ "public HibernateDAOFactory() {\n }", "ConfigurationServiceT createConfigurationServiceT();", "PromotionDaoImpl() {\r\n final BeanFactoryReference bf =\r\n SingletonBeanFactoryLocator.getInstance().useBeanFactory(\"contextDao\");\r\n this.daoFactory = (DaoFactory) bf.getFactory().getBean(\"daoFa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
fetch an appointment from a resultSet , using the appointmentColumns ( it is declared above ) I don't use all the columns I talk about id_client because I'm passing the Client as a parameter to the function also the name id_client on the clientColumns doesn't exist on the clientTable it's named id ( this may make confu...
@NotNull private Appointment fetchAppointment(ResultSet resultSet , Client client) throws SQLException, ParseException { int id = resultSet.getInt(appointmentColumns[0]); if(appointmentInInstance.containsKey(id)){ return appointmentInInstance.get(id); } String time = r...
[ "Appointment selectByPrimaryKey(String id);", "public static Appointment selectById(int id) {\n Appointment appointment = new Appointment();\n\n try (PreparedStatement ps = DBConnection.getConnection().prepareStatement(SELECT_BY_ID)) {\n ps.setInt(1, id);\n\n ResultSet rs = ps....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Modulos this number with an unsigned long. I.e. sets this number to this % mod.
public void urem(final long mod) { final long rem = udiv(mod); //todo: opt? len = 2; dig[0] = (int) rem; if (rem == (rem & mask)) { --len; return; } //if(dig[0]==0) sign = 1; dig[1] = (int) (rem >>> 32); }
[ "public static long fastPowerModulo(long argument, long exponent, long mod) {\r\n long result = -1;\r\n if (exponent == 0) return 1;\r\n else if (exponent % 2 == 0) {\r\n result = fastPowerModulo(argument, Math.floorDiv(exponent, 2), mod);\r\n return (result * result) % mo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a new scene for selecting from the actions available to operator users
public static Scene createOperatorScene(Scene oldScene) { //TODO: Update the label to provide clear instructions Label instr = new Label("Select an operator action:"); //TODO: Add the buttons for each action available to operators Button add = new Button("Add"); Button del = new Button("Delete");...
[ "public JMenu createSelectionMenu() {\n JMenu selectionMenu = new JMenu(\"Select\");\n selectionMenu.add(actionManager.getSelectAllAction());\n selectionMenu.add(actionManager.getSelectAllWeightsAction());\n selectionMenu.add(actionManager.getSelectAllNeuronsAction());\n selection...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a new object of class 'Delete Artifact'.
CdapDeleteArtifact createCdapDeleteArtifact();
[ "protected abstract void deleteArtifact() throws ClientException;", "Active_Digital_Artifact createActive_Digital_Artifact();", "private Delete() {}", "Delete createDelete();", "@DELETE\n @Consumes(MediaType.APPLICATION_JSON)\n public void delete(ArtifactBean artifact) throws ArtificerUiException;", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Interface for the basic stack data structure.
public interface Stack<T> { /** * Removes the top item from the stack. * * @return top item * @throws java.util.EmptyStackException if the stack is empty */ T pop(); /** * Adds an item to the top of the stack. * * @param item item to add */ void push(T item...
[ "public interface Stack<T>\n{\n\t/**\n\t * This method initializes an empty stack with a max size of n.\n\t *\n\t * @param n The maximum capacity of the stack.\n\t */\n\tvoid init(int n);\n\n\t/**\n\t * This method pushes the specified element onto the stack.\n\t *\n\t * @param x The element to be pushed.\n\t */\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reads the specified file and returns a DataFrame constituted by the content of that file
public DataFrame readFile(final File file) throws IOException{ final BufferedInputStream is = new BufferedInputStream(new FileInputStream(file)); byte[] bytes = new byte[2048]; final ByteArrayOutputStream baos = new ByteArrayOutputStream(bytes.length); try{ while((is.read(bytes, 0, bytes.length)) != -1){ ...
[ "public DataFrame readFile(final String file) throws IOException{\n\t\treturn readFile(new File(file));\n\t}", "public DataFrame readJSON(File file) throws FileNotFoundException {\n DataFrame dataFrame = new DataFrame();\n Pattern pattern = Pattern.compile(\"\\\"([^\\\"]*)\\\"\"); // regex to extrac...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the type of method used to evaluate quality of the dataset.
public void setEvaluationMethodType(final EvaluationMethodType newValue) { checkWritePermission(evaluationMethodType); evaluationMethodType = newValue; }
[ "public void setMethodType(MethodType method) {\n methodType = method;\n }", "public void selectTrainingType(VersatileMLDataSet dataset) {\n\t\tif (this.methodType == null) {\n\t\t\tthrow new EncogError(\n\t\t\t\t\t\"Please select your training method, before your training type.\");\n\t\t}\n\t\tMethodConfig c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Whether this placement is for a reference chromosome sequence
public boolean isChromosome() { return this.placement.getSeqId().startsWith("NC_"); }
[ "public boolean isReferenceTrue(){\n if(referenceBit == true){\n return true;\n }\n else{\n return false;\n }\n }", "public boolean isEquivalentTo(Reference ref) {\r\n return getTargetRef().equals(ref.getTargetRef());\r\n }", "public boolean hasRe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column FreeHost_Product_VPS.HourMB21
public Integer getHourmb21() { return hourmb21; }
[ "public Integer getHourmb22() {\r\n return hourmb22;\r\n }", "public Integer getHourmb11() {\r\n return hourmb11;\r\n }", "public Integer getHourmb23() {\r\n return hourmb23;\r\n }", "public Integer getHourmb7() {\r\n return hourmb7;\r\n }", "public Integer getHourmb1...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__SchedulerCollectionDef__Group_3_2__0__Impl" $ANTLR start "rule__SchedulerCollectionDef__Group_3_2__1" InternalDsl.g:22223:1: rule__SchedulerCollectionDef__Group_3_2__1 : rule__SchedulerCollectionDef__Group_3_2__1__Impl ;
public final void rule__SchedulerCollectionDef__Group_3_2__1() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalDsl.g:22227:1: ( rule__SchedulerCollectionDef__Group_3_2__1__Impl ) // InternalDsl.g:22228:2: rule__SchedulerCollectionDef__...
[ "public final void rule__SchedulerCollectionDef__Group_3__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:22173:1: ( rule__SchedulerCollectionDef__Group_3__2__Impl )\n // InternalDsl.g:22174:2: rule__SchedulerColle...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Copy constructor makes a copy of the Neuron passed in
public Neuron( Neuron copyMe ){ this.setSigmoid( copyMe.getSigmoid() ); this.setThreshold( copyMe.getThreshold() ); forwardNodes = new ArrayList<>(); backwardNodes = new ArrayList<>(); weightForNeuronNamed = new HashMap<>(); this.arrayListHelper( copyMe.getConnectedNodesD...
[ "public Neuron deepCopy() {\n return new Neuron(parent, this);\n }", "public Neuron() {\n\t\tthis.setInputConnections(new ArrayList<>());\n\t\tthis.setOutputConnections(new ArrayList<>());\n\t\tthis.setInputSummingFunction(new InputSummingFunction());\n\t\tthis.setActivationFunction(new ActivationFuncti...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Compute signal strength between source radio and given point.
double computeSignal(RadioInfo srcInfo, Location srcLoc, Location dst);
[ "public int getSignalStrength(){\n\t\treturn signalStrength;\n\t}", "@Override\n\tpublic Object signal(Vertex<?, ?> sourceVertex) {\n\t\tInteger distanceToSource = (Integer) sourceVertex.state();\n\t\tif (distanceToSource != Integer.MAX_VALUE) {\n\t\t\treturn distanceToSource + (int) this.weight();\n\t\t} else {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deserializes a UserProfile from a ByteBuffer.
public static UserProfile fromByteBuffer( java.nio.ByteBuffer b) throws java.io.IOException { return DECODER.decode(b); }
[ "public static User fromByteBuffer(\n java.nio.ByteBuffer b) throws java.io.IOException {\n return DECODER.decode(b);\n }", "public static UserOld fromByteBuffer(\n ByteBuffer b) throws IOException {\n return DECODER.decode(b);\n }", "Object deserialize(ByteBuffer bb);", "public User byteToO...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a SolrIndexSearcher.QueryCommand from this ResponseBuilder. TimeAllowed is left unset.
public QueryCommand createQueryCommand() { QueryCommand cmd = new QueryCommand(); cmd.setQuery(wrap(getQuery())) .setFilterList(getFilters()) .setSort(getSortSpec().getSort()) .setOffset(getSortSpec().getOffset()) .setLen(getSortSpec().getCount()) .setFlags(getFieldFlags(...
[ "TSearchQuery createSearchQuery(SearchQueryDefinitionAPI searchQueryDefinition);", "private SuggestQueriesResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public SearchResponse<T, P> build(Pageable searchRequest, QueryResponse queryResponse) {\n // Create res...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Changes boolean variables in shader program
public void loadBoolean(int location, boolean value){ float toLoad = 0; if(value){ toLoad = 1; } GL20.glUniform1f(location, toLoad); }
[ "public void setUseShader(boolean value);", "public void setShaderSupported(boolean value);", "protected void sendBoolean(boolean b, String uniformName) {\n int uniformLocation = glGetUniformLocation(programID, uniformName);\n glUniform1f(uniformLocation, (b == true) ? 1 : 0);\n }", "boolean ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the score of the specified color player
public int getScore(PieceColor color) { return (color == PieceColor.BLUE)? blueScore : greenScore; }
[ "public static int getColorScore(int playerID, int color) {\n\tif (color == 0) {\n\t return -10;\n\t}\n\tint ownColorDistanceTo255 = 255 - ((color >> ((2 - playerID) * 8)) & 0xFF); // range: [0, 255]\n\tint otherColorsDistanceTo0 = ((color >> (((1 - playerID) % 3) * 8)) & 0xFF)\n\t\t+ ((color >> (((-playerID) % ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Registers a new grid listener that will be notified if grid parameters change.
public void addListener(GridListener listener) { listeners.add(listener); }
[ "public void addGridListener(GridListener l) {\n\t\tthis.gridListenerList.add(GridListener.class, l);\n\t}", "public void addListener(final ConfigChangeListener listener) {\n listeners.add(listener);\n }", "public void addListener(CellViewObserver listener){\r\n listeners.add(listener);\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns whether ALT modifier is triggered by the specified modifiers or not.
public static boolean isAlt ( final int modifiers ) { return ( modifiers & InputEvent.ALT_MASK ) != 0; }
[ "public static boolean isAltKeyDown() { return Keyboard.isKeyDown(56) || Keyboard.isKeyDown(184); }", "public static boolean isAlt ( @NotNull final InputEvent event )\n {\n return isAlt ( event.getModifiers () );\n }", "boolean isModifier();", "final public native boolean isAltKey() /*-{\n ret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A new TrReader with reader STR, from string FROM, and to string TO.
public TrReader(Reader str, String from, String to) { if (from.length() != to.length()) { String message = "from and to must be same length"; throw new IllegalArgumentException(message); } _str = str; _from = from; _to = to; }
[ "ReadT createReadT();", "public TranslatorReader(WikiContext context, Reader in) {\n\t\tinitialize(context, in);\n\t}", "public CRLFLineReader(Reader reader) {\n\t\tsuper(reader);\n\t}", "public Reader newReader() {\n return new CharsReader(this);\n }", "Read createRead();", "public FastqReader(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the object in a XSD profile target associated a class (the method should be used in XSD profile targets).
public Object getXsdObject(Class clazz) { if (pso != null && pso.getData() != null) { List<Object> l = pso.getData().getAny(); for (Object o: l) { if (clazz.isInstance(o)) { return o; } else if (o instanceof JAXBElement) { ...
[ "protected static XPathElement retrieveRootXPath(Class<?> targetClass) {\n\t\tXMLObject xPathAnnot = targetClass.getAnnotation(XMLObject.class);\n\n\t\tif (xPathAnnot != null) {\n\t\t\treturn compileXPath(xPathAnnot, targetClass);\n\t\t} else {\n\t\t\tthrow new ClassDefException(\"Class \" + targetClass.getName()\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the backendPort property: The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables "Any Port".
public Integer backendPort() { return this.backendPort; }
[ "public int frontendPort() {\n return this.frontendPort;\n }", "public int getInternalPort() {\n return internalPort;\n }", "public int getPort(){\r\n\t\ttry {\r\n\t\t\treturn this.workerobj.getInt(WorkerController.PORT);\r\n\t\t} catch (JSONException e) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
if we have already scanned this line for this scope then simply return the next cached marker (choosing the longest match in case of a tie).
public Marker getCachedMarker() { Marker m = null; int bestLength = 0; int newLength; for (Marker m1 : cachedMarkers) { newLength = m1.match.getCapture(0).end - m1.from; if (m == null || m1.from < m.from || (m1.from == m.from && newLength > bestLength) || (m1.from == m.from && newLe...
[ "private int getNextMatch(String searchText) {\n \tint startPosition = textArea.getCaretPosition()+1;\n \treturn document.getContent().indexOf(searchText, startPosition);\n }", "public String getNextMarker() {\n return this.nextMarker;\n }", "public Optional<Long> getPatternOccurrencePosition...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the galleryItemIdentity property: The identifier of the gallery item corresponding to the product.
String galleryItemIdentity();
[ "public GalleryIdentifier identifier() {\n return this.identifier;\n }", "@Override\n\tpublic long getGalleryId() {\n\t\treturn _editionGallery.getGalleryId();\n\t}", "@Override\n\tpublic Long getImageId() {\n\t\treturn _editionGallery.getImageId();\n\t}", "@Override\n\tpublic long getPrimaryKey() {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a new SAXException.
public SAXException (String message) { super(message); this.exception = null; }
[ "public SAXException (Exception e)\n {\n this.exception = e;\n }", "public SAXException ()\n {\n this.exception = null;\n }", "public SAXException (String message, Exception e)\n {\n super(message);\n this.exception = e;\n }", "public XMLPipeline()\r\n throws SAXException {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
lbvserver that can be bound to sslpolicy.
public sslpolicy_lbvserver_binding[] get_sslpolicy_lbvserver_bindings() throws Exception { return this.sslpolicy_lbvserver_binding; }
[ "public sslpolicy_sslvserver_binding[] get_sslpolicy_sslvserver_bindings() throws Exception {\n\t\treturn this.sslpolicy_sslvserver_binding;\n\t}", "public cachepolicy_lbvserver_binding[] get_cachepolicy_lbvserver_bindings() throws Exception {\n\t\treturn this.cachepolicy_lbvserver_binding;\n\t}", "public void ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determines whether batch mode is used for inserting data into the database.
public boolean getUseBatchMode() { return _useBatchMode; }
[ "public boolean isUseBatchMode()\n {\n return _useBatchMode;\n }", "protected boolean batch() {\n return batch;\n }", "boolean isBulkLoad();", "public boolean sequenceBatchMode() {\n return sequenceBatchMode;\n }", "public void \n setBatchMode()\n {\n pIsBatchMode = true; \n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The BufferTask interface provide the basics methods to implementation a concrete consumer or producer classes.
public interface BufferTask extends Runnable { void terminate(); boolean hasFinished(); }
[ "interface BufferSupplier<T> {\n ReplayBuffer<T> call();\n }", "public interface StreamConsumer {\n\n /**\n * Will be called once just after construction. It provides the queue to\n * which processed and emptied and cleared buffers must be returned. For\n * each time <code>addFilledBuffer...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the 'dir_source' field. see above
public void setDirSource(trans.encoders.relayVote.DirSource value) { this.dir_source = value; }
[ "public trans.encoders.relayVote.RelayVote.Builder setDirSource(trans.encoders.relayVote.DirSource value) {\n validate(fields()[16], value);\n this.dir_sourceBuilder = null;\n this.dir_source = value;\n fieldSetFlags()[16] = true;\n return this; \n }", "public void setSource(String sou...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "ruleActionAddition" $ANTLR start "entryRuleActionMultiplication" ../com.blasedef.onpa.ONPA.ui/srcgen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:960:1: entryRuleActionMultiplication : ruleActionMultiplication EOF ;
public final void entryRuleActionMultiplication() throws RecognitionException { HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens("RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS"); try { // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/an...
[ "public final void ruleActionMultiplication() throws RecognitionException {\n\n \t\tHiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(\"RULE_ML_COMMENT\", \"RULE_SL_COMMENT\", \"RULE_WS\");\n \t\tint stackSize = keepStackSize();\n \n try {\n // .....
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Saves the given socket to the given recorder.
private void saveToRecorder(ProcessorURI curi, Socket socket, Recorder recorder) throws IOException, InterruptedException { recorder.inputWrap(socket.getInputStream()); recorder.outputWrap(socket.getOutputStream()); recorder.markContentBegin(); // Read the remote ...
[ "public void saveRecording() {\n RecordAndPlay.saveRecording();\n }", "public boolean save(CameraRecord record);", "public void savePlayerRecord() {\r\n //fileManager.saveRecord(record);\r\n }", "private void saveData() {\n\t\tlogger.trace(\"saveData() is called\");\n\t\t\n\t\tObjectOutputStream...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Suppose, for example guardedJoy is a method that must not proceed until a shared variable joy has been set by another thread. Such a method could, in theory, simply loop until the condition is satisfied, but the loop is wasteful, since is executes continuously while waiting.
public void guardedJoy() { // Simple loop guard. Wastes processor time. Don't do this! while(!joy) {} System.out.println("Joy has been achieved!"); }
[ "void stateDependentMethod() throws InterruptedException {\n\t// condition predicate must be guarded by lock\n\tsynchronized(lock) {\n\t while (!conditionPredicate())\n\t lock.wait();\n // object is now in desired state\n\t}\n}", "private interface CheckedConditionWaiter {\n boolean run(Cond...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns how many open seats are left in the course
public int getOpenSeats() { return enrollmentCap - roll.size(); }
[ "public int countNumOccupiedSeats() {\r\n int num = 0;\r\n for (Seat seat : seats) {\r\n if (seat.isOccupied()) {\r\n num++;\r\n }\r\n }\r\n return num;\r\n }", "public int numSeatsAvailable();", "public int getNumSeatsHeld() {\n return seatsHeld.size();\n }", "int find...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
.dstore.values.BooleanValue required = 3;
io.dstore.values.BooleanValue getRequired();
[ "io.dstore.values.BooleanValueOrBuilder getRequiredOrBuilder();", "io.dstore.values.BooleanValue getOnlyActive();", "io.dstore.values.BooleanValue getValuesInAnyValues();", "io.dstore.values.BooleanValue getPredefinedValues();", "io.dstore.values.BooleanValueOrBuilder getOnlyActiveOrBuilder();", "io.dstor...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Assembles parameters for this protocol application (edge or part of edge). Parameter type, value, table (optional) and row (optional) are separated by pipes (The optional PV table and PV row must appear together or not at all and must be associated with a parameter). Distinct parameters are separated by semicolons.
public void assembleParameters() throws ConversionException { parameters = new ArrayList<>(); List<ParameterValueAttribute> params = ((ProtocolApplicationNode)node).parameterValues; for(ParameterValueAttribute param : params) { // Code to retrieve the run number, if any - an artificial parameter. ...
[ "private void emitParmDefs() {\n ActivationSlot slot = getParameterSlots();\n if (slot != null) {\n printSlot(\"P\", slot);\n while (slot.getNext() != null) {\n slot = slot.getNext();\n out.print(\", \");\n printSlot(\"P\", slot);\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
DATABASE MAPPING : prl_pin_key ( BIGINT )
public void setPrlPinKey( Long prlPinKey ) { this.prlPinKey = prlPinKey; }
[ "public static native long RawInvoice_payee_pub_key(long this_arg);", "public String getPinKey() {\r\n return pinKey;\r\n }", "public void setPrlKey( Long prlKey ) {\n this.prlKey = prlKey;\n }", "public void setPKGRTTNKEY(java.lang.Long value) {\n this.PKG_RTTN_KEY = value;\n }", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter for property 'dc'.
public void setDc(DataCatalog dc) { this.dc = dc; }
[ "public void setDcdate(String dcdate) {\n this.dcdate = dcdate;\n }", "public DataCatalog getDc() {\n\t\treturn dc;\n\t}", "public void setWhichCard(CitadelsDistrictCard cdc)\n {\n this.cdc = cdc;\n }", "public void setOrderdc(Long orderdc) {\n this.orderdc = orderdc;\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a XPDL with empty process package
public static String createProcessPackageXpdl(AppDefinition appDef) { String appId = StringEscapeUtils.escapeXml(appDef.getAppId()); String appName = StringEscapeUtils.escapeXml(appDef.getName()); String date = (new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")).format(new Date()); String vers...
[ "DomainPackage createDomainPackage();", "public static TinyDP newDeploymentPackage()\n {\n return new TinyDPImpl( new DPBuilder(), null, new Bucket(), StoreFactory.defaultStore() );\n }", "DL createDL();", "@Override\r\n\tpublic IHaxePackage createPackage(String packageName, IProgressMonitor moni...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Run the full EM algorithm stack for variational inference and model parameter optimization
public EMAlgorithmStatus runExpectationMaximization() { config.validate(); /* If copy ratio posterior calling is enabled, the first few iterations need to be robust. * Therefore, we disable the target-resolved unexplained variance estimation (if enabled) and * enforce isotropic unexpla...
[ "public void runMaxProductAndDecompose() throws AlgorithmException\n {\n Submodel invariant = recursiveMaxProduct();\n \n logger.info(\"submodels before merge\");\n DataPrinter.printSubmodels(\"submodels.dat\", _submodels);\n \n // merge submodels\n _submodels = S...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Send a midi message, 3 bytes
protected void sendMidiNote(int m, int n, int v) { byte[] msg = new byte[3]; msg[0] = (byte)m; msg[1] = (byte)n; msg[2] = (byte)v; midiDriver.write(msg); }
[ "protected void sendMidi(int m, int n)\n {\n byte msg[] = new byte[2];\n\n msg[0] = (byte) m;\n msg[1] = (byte) n;\n\n midi.write(msg);\n }", "protected void sendMidi(int m, int n, int v)\n {\n byte msg[] = new byte[3];\n\n msg[0] = (byte) m;\n msg[1] = (b...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the value of the oldCMP scheme. This is an antonym for newCMP
public void setOldCMP(boolean oldCMP) { this.newCMP = !oldCMP; }
[ "public void setNewCMP(boolean newCMP) {\n this.newCMP = newCMP;\n }", "public void setCmpnt(Integer cmpnt) {\r\n this.cmpnt = cmpnt;\r\n }", "public void setCmp(int loc) {\n compareRegister = loc;\n }", "public void setCompIsnew(Integer compIsnew) {\n this.compIsnew = c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
verify if asinsatlldir attribute is valid. asinstalldir must be a valid directory and must contain the config directory.
private boolean verifyAsinstalldir(File home) throws ClassNotFoundException{ if (home!= null && home.isDirectory()) { if ( new File(home, "config").isDirectory() ) { return true; } } throw new ClassNotFoundException("ClassCouldNotBeFound"); }
[ "public void setAsinstalldir(File asinstalldir) {\n\t\tthis.asinstalldir = asinstalldir;\n\t}", "@Override\n public boolean isValidSdkInstall() {\n return sdkRootDirectory.exists() && libDirectory.exists() && thirdPartyDirectory.exists();\n }", "protected void validateMcaDeployedToWorkingDir() {\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
///Agency Extended Report Queries Queries Stops count, unduplicated urban pop and rural pop within x meters of all stops, and route miles for a givn transit agency
public static double[] stopsPopMiles(String agencyId, double x, int dbindex, String popYear) { Connection connection = makeConnection(dbindex); Statement stmt = null; String querytext = "with census as (select population"+popYear+" as population, poptype from census_blocks block inner join gt...
[ "public static ArrayList <StopR> stopGeosr(String username, int type, String[] dates, String[] days, String areaId, String agency, String route, double x, int dbindex, String popYear) throws SQLException {\n\t\tArrayList <StopR> response = new ArrayList<StopR>();\t\t\n\t\tStopR instance;\n\t\tConnection connection ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the feed updated item count.
public int getUpdatedCount() { return updatedCount; }
[ "public int getNumOfNewItems() {\n\t\tint count = 0;\n\t\tfor (FeedItem item : items) {\n\t\t\tif (!item.isRead()) {\n\t\t\t\tcount++;\n\t\t\t} \n\t\t}\n\t\treturn count;\n\t}", "public Integer getUpdateCnt() {\n return updateCnt;\n }", "public int getNumberOfUpdatedOnActivityFeed(Identity owner, Acti...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Goes through comma seperated features read from a file and stores them in an array
static String[] parseFeatures(String features ){ return features.trim().split(","); }
[ "public List<FeatureVector> readFile(File file) {\n List<FeatureVector> newlist = null;\n try {\n newlist = new ArrayList<>();\n BufferedReader reader = new BufferedReader(new FileReader(file));\n String line;\n while ((line = reader.readLine()) != null) {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
generate CorrelationId for the plan execution
public String createChoreographyCorrelationId() { PlanInstance instance; String correlationId; do { correlationId = String.valueOf(System.currentTimeMillis()) + Math.random(); instance = planRepo.findByChoreographyCorrelationId(correlationId); } while (instance !=...
[ "String getCorrelationId();", "private String generateNewCallId()\n {\n\n\t\t// Generate the variant number\n\t\tint variable = NumberUtils.getIntRandom();\n\n\t\t// Convert to hex value\n\t\tString hex = NumberUtils.toHexValue(variable);\n\n\t\t// Compose the final call id\n\t\treturn \"{2B073406-65D8-A7B2-5...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the "lastvalue" attribute
public double getLastvalue() { synchronized (monitor()) { check_orphaned(); org.apache.xmlbeans.SimpleValue target = null; target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_...
[ "public Object getLastValue() {\r\n return (get(getLastKey()));\r\n }", "public org.apache.xmlbeans.XmlDouble xgetLastvalue()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Posts a ResourceOperation with a new object
ResourceOperation post(final ResourceOperation newResourceOperation) throws ClientException;
[ "void post(final ResourceOperation newResourceOperation, final ICallback<ResourceOperation> callback);", "public final Response post(Reference resourceRef, Representation entity) {\n return handle(new Request(Method.POST, resourceRef, entity));\n }", "public OpenApiOperation getPostOperation() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Delete a conversion and her original delete it too.
User deleteConversion(Original original, Conversion conversion, User u);
[ "@Override\n\tpublic void removeSizeConversionFromSystem(\n\t\t\tSizeConversionMaster sizeConversionMaster) {\n\t\tgetHibernateTemplate().delete(sizeConversionMaster);\n\n\t}", "private void emptyConverter()\r\n\t\t{\r\n\t\t\twhile(converter.isEmpty() == false)\r\n\t\t\t{\r\n\t\t\t\tconverter.removeFirst();\r\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ In this method,the selected places are transferred to PlanActivity
public void plan(View v) { Intent intent = new Intent(MainActivity.this,PlanActivity.class); intent.putParcelableArrayListExtra("placesList", placesList); String address = autoCompView.getText().toString(); System.out.println(address + " " + city); if(address != null && add...
[ "private void handlePlaceSelected()\n {\n // launch the place autocomplete fragment to choose a location\n SupportPlaceAutocompleteFragment autocompleteFragment = (SupportPlaceAutocompleteFragment) getChildFragmentManager().findFragmentById(R.id.error_layout_choose_place);\n autocompleteFra...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new instance of DomainNode. Creates SubsystemNode branches based on LEM Domain object and lists all RelationshipNodes of Domain under a default tree node named relationshipLevel.
public DomainNode( Domain d , Eleminator inEleminator ) { this.domain = d; eleminator = inEleminator ; Iterator i = d.getSubsystems().values().iterator(); while( i.hasNext() ) { add( new SubsystemNode( (org.jdns.xtuml.metamodel.Subsystem)i.next() )); } i = d.getRelationships().values().iterator();...
[ "Domain createDomain();", "private void createDomain() {\n String uniquePath = \"/shared/\" + domainNamespace + \"/domains\";\n\n // create WebLogic domain credential secret\n createSecretWithUsernamePassword(wlSecretName, domainNamespace,\n ADMIN_USERNAME_DEFAULT, ADMIN_PASSWORD_DEFAULT);\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The canMove2 method checks to see if the location 2 spaces in front of the bug is occupied.
public boolean canMove2() { Grid<Actor> gr = getGrid(); if (gr == null) { return false; } Location loc = getLocation(); Location next = loc.getAdjacentLocation(getDirection()); Location next2 = next.getAdjacentLocation(getDirection()); if (!gr.isValid(next)) { return false; } if (!gr.isVal...
[ "public boolean checkMove(int x1, int y1, int x2, int y2) {\n if (DEBUGMODE)\n System.out.println(\"CHECK MOVE STATUS :\");\n Piece piece = plateau.getPieceFromPosition(x1, y1);\n if (piece == null) {\n System.out.println(\"Pas de piece a cette coordonne\");\n r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Computes the division of a complex number by multiplying it magnitude and adding its angles.
public ComplexNumber divide(double angle, double magnitude) { double totalMag = this.magnitudeOfNumber / magnitude; double totalAngle = this.angleOfNumber - angle; double realPart1 = totalMag * Math.sin(totalAngle); // Angle to be set in radians double imgPart1 = totalM...
[ "public Complex DivideBy (Complex z) {\n\ndouble rz = z.Magnitude();\n\nreturn new Complex((u*z.u+v*z.v)/(rz*rz),(v*z.u-u*z.v)/(rz*rz));\n\n}", "public ComplexNumber multiply(double angle, double magnitude) {\r\n double totalMagnitude = this.magnitudeOfNumber * magnitude;\r\n double totalAngle = thi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Marks the leaf "vlantag2" with operation "replace".
public void markVlanTag2Replace() throws JNCException { markLeafReplace("vlanTag2"); }
[ "public void markVlanTag1Replace() throws JNCException {\n markLeafReplace(\"vlanTag1\");\n }", "public void markVlanTag2Merge() throws JNCException {\n markLeafMerge(\"vlanTag2\");\n }", "public void markUtilizedReplace() throws JNCException {\n markLeafReplace(\"utilized\");\n }"...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__SchedulerCollectionDef__Group__4" $ANTLR start "rule__SchedulerCollectionDef__Group__4__Impl" InternalDsl.g:22073:1: rule__SchedulerCollectionDef__Group__4__Impl : ( ( rule__SchedulerCollectionDef__Group_4__0 )? ) ;
public final void rule__SchedulerCollectionDef__Group__4__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalDsl.g:22077:1: ( ( ( rule__SchedulerCollectionDef__Group_4__0 )? ) ) // InternalDsl.g:22078:1: ( ( rule__SchedulerCollecti...
[ "public final void rule__SchedulerCollectionDef__Group_4__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:22281:1: ( rule__SchedulerCollectionDef__Group_4__1__Impl )\n // InternalDsl.g:22282:2: rule__SchedulerColle...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
isAdj method checks if the given node number is adjacent to this node returns true on succes and false on failure
public boolean isAdj(int num) { for (int i=0;i < index;i++) { if (num == nodes[i]) return true; } return false; }
[ "private boolean hasAdjacent(int node) {\n for (int i = 0; i < this.matrix[node].length; i++) {\n if (this.matrix[node][i]) {\n return true;\n }\n\n }\n return false;\n }", "public boolean isAdjacentTo(Node<T> n) {\n\t\treturn this.adjacent.contains(n);...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the adjacency matrix
public int[][] getAdjacencyMatrix();
[ "private boolean[][] makeAdjacencyMatrix() {\r\n\t\tboolean[][] adj = new boolean[graph.size()][graph.size()];\r\n\t\tfor(int i = 0; i < graph.size(); i++) {\r\n\t\t\tfor(String s: graph.get(i)) {\r\n\t\t\t\tif(getIndex.get(s) != i)\r\n\t\t\t\tadj[i][getIndex.get(s)] = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn adj;\r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column ehr_person_file_condition.create_user_name
public String getCreateUserName() { return createUserName; }
[ "java.lang.String getCreateUser();", "public String getCreateUserName() {\r\n\t\treturn createUserName;\r\n\t}", "public String getCreateUserName() {\r\n return createUserName;\r\n }", "public String getCreateUser()\r\n\t{\r\n\t\treturn createUser;\r\n\t}", "public String getCreateUser () {\r\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks whether the 'field443' field has been set
public boolean hasField443() { return fieldSetFlags()[443]; }
[ "public void setField443(java.lang.CharSequence value) {\n this.field443 = value;\n }", "public boolean hasField509() {\n return fieldSetFlags()[509];\n }", "public boolean hasField465() {\n return fieldSetFlags()[465];\n }", "public boolean hasField442() {\n return fieldSetFlags()[44...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This will handle the file input to get soldier positions, number of soldiers, the playground with and length
private void input() { String path = "/escape.i%d-%d"; Reader r = new Reader(String.format(path, LEVEL, DIFFICULTY)); lenght = r.getLenght(); width = r.getWidth(); soldiers = r.getSoldiers(); for (int i = 1; i <= soldiers; i++) { Vec2d pos = r.getPosition(i);...
[ "public void parseInput() {\n\n int exitErrorCode = -1;\n try {\n ObjectMapper mapper = new ObjectMapper();\n JsonNode rootNode = mapper.readTree(new File(fileName));\n int humanPlayerCount = 0;\n int computerPlayerCount = 0;\n playersVector = new Vector();\n\n parseNameValues(ro...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column base_dictionaryitem.dictitem_desc_
public String getDictitemDesc() { return dictitemDesc; }
[ "public String getItemDesc() {\n return itemDesc;\n }", "public String getItemDesc() {\n return (String)getAttributeInternal(ITEMDESC);\n }", "public void setDictitemDesc(String dictitemDesc) {\n\t\tthis.dictitemDesc = dictitemDesc == null ? null : dictitemDesc.trim();\n\t}", "@Override\n\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__LockedRevolute__Group__3__Impl" $ANTLR start "rule__LockedPlanar__Group__0" ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/srcgen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:3804:1: rule__LockedPlanar__Group__0 : rule__LockedPlanar__Group__0__Impl rule__LockedPlanar__Group_...
public final void rule__LockedPlanar__Group__0() 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:3808:1: ( rule__LockedPlanar...
[ "public final void rule__LockedPlanar__Group__0__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:3820:1: ( ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated for supporting the association named AbonBillpos2docpos2docpos. It will be deleted/edited when the association is deleted/edited. / WARNING: THIS METHOD WILL BE REGENERATED.
public com.hps.july.persistence.AbonBillpos2docpos getAbonBillpos2docpos() throws java.rmi.RemoteException, javax.ejb.FinderException { return (com.hps.july.persistence.AbonBillpos2docpos)this.getAbonBillpos2docposLink().value(); }
[ "protected com.ibm.ivj.ejb.associations.interfaces.SingleLink getAbonBillpos2docposLink() {\n\tif (abonBillpos2docposLink == null)\n\t\tabonBillpos2docposLink = new LeaseDocPositionToAbonBillpos2docposLink(this);\n\treturn abonBillpos2docposLink;\n}", "public com.hps.july.persistence.AbonPays2docpos getAbonPays2d...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates the collection page for CloudPcUserSetting
public CloudPcUserSettingCollectionPage(@Nonnull final java.util.List<CloudPcUserSetting> pageContents, @Nullable final CloudPcUserSettingCollectionRequestBuilder nextRequestBuilder) { super(pageContents, nextRequestBuilder); }
[ "public CloudPcUserSettingCollectionPage(@Nonnull final CloudPcUserSettingCollectionResponse response, @Nonnull final CloudPcUserSettingCollectionRequestBuilder builder) {\n super(response, builder);\n }", "@NotNull public static CollectionPage.Builder collectionPage() { return new CollectionPage.Builde...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find the internal TimeManager Agent
private void getMySynchronizerID() { DFAgentDescription template_2 = new DFAgentDescription(); ServiceDescription sd_2 = new ServiceDescription(); sd_2.setType("InternalTimeManager"); try { sd_2.setOwnership(getContainerController().getContainerName()); } catch (C...
[ "public static TimeMachine getTimeMachine() {\n return _instance;\n }", "public static TimerManager getTimerManager() {\n TimerManager test = Framework.getBinderProxy(TestContext.TIMER_TASK_SERVER, TimerManager.class);\r\n return test;\r\n }", "public static psi15_mainAgent getInstanc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a clone of this piece at the given node
public Piece clone(Node node) throws IOException { return new King(this, node); }
[ "@Override\r\n public Piece clonePiece(){\r\n Pawn other = new Pawn(player,x,y);\r\n return other;\r\n }", "public Node clone()\r\n\t{\r\n\t\tNode clonedNode=(Node)this;\r\n\t\treturn new Node(clonedNode.data);\r\n\t}", "N cloneNode(N node);", "public CourseNode clone()\r\n\t\t{\r\n\t\t\tr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Look up the HDict representation of a BComponent by its id. Return null if the BComponent cannot be found, or if it is not haystackannotated.
public HDict onReadById(HRef id) { if (!cache.initialized()) throw new IllegalStateException(Cache.NOT_INITIALIZED); if (LOG.isTraceOn()) LOG.trace("onReadById " + id); try { BComponent comp = tagMgr.lookupComponent(id); r...
[ "public COMPONENT getComponent(ComponentSpecification id) {\n Map<String, Map<Version, COMPONENT>> componentVersionsByName = componentsByNameByNamespace.get(id.getNamespace());\n if (componentVersionsByName == null) return null; // No matching namespace\n\n Map<Version, COMPONENT> versions = c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tries to localize LockLogin.jar plugin file if provided does not exist or is null
private File detectLockLogin() { File[] updates = new File(FileUtilities.getPluginsFolder(), "update").listFiles(); if (updates != null) { for (File file : updates) { try { JarFile jar = new JarFile(file); ZipEntry entry = jar.getEntry...
[ "public static void copyDefaultLanguageFiles() {\n URL main = Main.class.getResource(\"Main.class\");\n try {\n JarURLConnection connection = (JarURLConnection) main.openConnection();\n JarFile jar = new JarFile(URLDecoder.decode( connection.getJarFileURL().getFile(), \"UTF-8\" )...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Display the dialog, adding the fragment to the given FragmentManager. This is a convenience for explicitly creating a transaction, adding the fragment to it with the given tag, and committing it. This does not add the transaction to the back stack. When the fragment is dismissed, a new transaction will be executed to r...
public final void show(FragmentManager manager) { deleteDialogFragment(manager); clickGuard = false; // super.show(manager, TAG); FragmentTransaction transaction = manager.beginTransaction(); transaction.add(this, TAG); transaction.commitAllowingStateLoss(); }
[ "private void attachFragment() {\n if (mFragment != null) {\n FragmentManager fragmentManager = getFragmentManager();\n fragmentManager.beginTransaction().replace(R.id.fragment_container, mFragment).commit();\n\n } else {\n Log.e(\"MainActivity\", \"Error in creating f...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the starting location of the current token in the document.
public final int getStartOffset() { return fStartToken; }
[ "private SourcePosition getTreeStartLocation() {\n return peekToken().location.start;\n }", "public int startTokenIndex() {\n return this.startTokenIndex;\n }", "public ParseToken getStartToken() { return _startToken; }", "public int getPosition() {\n return token.getPosition();\n }",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Scans for beacons between a specified start angle and end angle, and then backwards again. It looks only at light values above 42, which seems to be a good threshold to use, and stores the peaks found in the scanner's bearings instance variable.
public void lightScan(int startAngle, int endAngle) { int threshold = 35; motor.rotateTo(startAngle); int[] ccwBearings = {1000, 1000}; int[] cwBearings = {1000, 1000}; int highestLightValue = 0; int ccwIndex = 0; int cwIndex = 0; boolean ccw = false; boolean ccwAssigned = false; boo...
[ "public void scanForBeacons(View v) {\n Log.i(TAG, \"Scanning for beacons\");\n scanning = true;\n beaconManager.connect(new BeaconManager.ServiceReadyCallback() {\n @Override\n public void onServiceReady() {\n try {\n beaconManager.startR...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Cases the JMS Message into a SessionMessage
private SessionMessage getSessionMessage(Message message) { try { return (SessionMessage) ((ObjectMessage) message).getObject(); } catch (JMSException e) { e.printStackTrace(); return null; } }
[ "@Override\n public Message createMessage(Session session) throws JMSException {\n TextMessage textMessage = session.createTextMessage(new Gson().toJson(jsonObject) );\n textMessage.setStringProperty(\"Selector\",selector);\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates set of available upgrade options that the user can take
public void createUpgradeOptions(Player currPlayer){ ArrayList<Upgrade> availableUpgrades = currPlayer.getAvailableUpgrades(); for (int i = 0; i < availableUpgrades.size(); i++) { String rank = "Level: " + availableUpgrades.get(i).level + ", "; String dollars = "Dollar Cost: " + ...
[ "public void createOptionList(){\r\n options.clear();\r\n\r\n\r\n if(isTurn) {\r\n if (role == null) {\r\n if (currSet.hasScene()) {\r\n ArrayList<Role> roles = currSet.getAvailableRoles(rank);\r\n if (roles.size() > 0) {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the square where all players are located at the start of the game.
public Square startingSquare() { return squares[GO_SQUARE]; }
[ "Square getCurrentPosition();", "public Tile getTopLeft(){\n for(Tile tile: tiles){\n if(tile.getGameX() == 0 && tile.getGameY() == 0){\n return tile;\n }\n } \n return null;\n }", "public Point findStart() {\n Point start = new Point();\n for( ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Event listener for the plutoRadioButton
public void plutoRadioButtonListener() { if (plutoRadioButton.isSelected()) dwarfPlanetsImageView.setImage(plutoImage); discoveredByLabel.setText("Discovered By: Clyde Tombaugh"); dateOfDiscoveryLabel.setText("Date of Discovery: February 18 1930"); orbitPeriodLab...
[ "public void radioButtonChanged()\r\n {\r\n if (this.favLangToggleGroup.getSelectedToggle().equals(this.cPlusPlusRadioButton))\r\n radioButtonLabel.setText(\"The selected item is: C++\");\r\n \r\n if (this.favLangToggleGroup.getSelectedToggle().equals(this.cSharpRadioButton))\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Shows the UpdateTenant Page with the Tenant Information Populating the fields.
public Result showUpdateTenant() { return ok(updateTenant.render(selectedTenant)); }
[ "public Result updateTenant() {\n\t\tForm<Tenant> filledTenant = tenantForm.bindFromRequest();\n\t\tTenant criteria = filledTenant.get();\n\t\tcriteria.setTenantId(selectedTenant.getTenantId());\n\t\tcriteria.setId(selectedTenant.getId());\n\t\ttry {\n\t\t\tTenantDao tenantDao = cassandraFactory.getTenantDao();\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Send Private Message with event and message as Embed or String
public void sendPrivateMessage(MessageEmbed message, PrivateMessageReceivedEvent event) { event.getChannel().sendMessage(message).queue(); }
[ "public abstract void sendPrivateMessage(String nickname, String message);", "public void onPrivateMessage(OnPrivateMessageEvent e);", "void onPrivMsg(TwitchUser sender, TwitchMessage message);", "private static void sendMessage(final String message) {\r\n messageToTwitch.print(\"PRIVMSG #\" + Settings...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column CTSTRS_EFF_PCS.OP_NO
public void setOP_NO(BigDecimal OP_NO) { this.OP_NO = OP_NO; }
[ "public void setOisOpprc(String oisOpprc) {\n this.oisOpprc = oisOpprc == null ? null : oisOpprc.trim();\n }", "public void setOprNo(Long oprNo) {\r\n\t\tthis.oprNo = oprNo;\r\n\t}", "public void setOcNo(String value) {\n setAttributeInternal(OCNO, value);\n }", "public BigDecimal getOP_NO...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets show levels option. System default value: true
void setShowLevels(boolean showLevels);
[ "void setLevelsDisplayOption(LevelsDisplayOption option, boolean show);", "public void setShow_level(String show_level) {\n this.show_level = show_level;\n }", "boolean getLevelsDisplayOption(LevelsDisplayOption option);", "boolean areLevelsShown();", "boolean isLevelsDisplayOptionSupported(Levels...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
api to delete a particular correlationtype by its id.
@DELETE @UnitOfWork @Produces(MediaType.APPLICATION_JSON) @ApiOperation("Delete a particular correlation-type by its id") @Path(Constants.API_V1_VERSION + "/correlation/{id}/delete") public Response deleteCorrelationType(@PathParam("id") final long id) throws MetaStoreException { try { ...
[ "ICustomerType deleteCustomerType(UUID id) throws SiteWhereException;", "public void deleteByComplement(int id, TripletType type) throws DAOException;", "public int deleteByTypeId(long typeId) throws DataAccessException {\n Long param = new Long(typeId);\n\n return getSqlMapClientTemplate().delete...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests a successful registration by the dao instance. Verifies that the registered() method of the controller is called.
@Test public void testRegisterSuccessfully() { SignUpRequest request = new SignUpRequest(UNIQUE, "Secret"); dao.register(request); verify(controller).registered(); }
[ "@Test\r\n public void testRegisterSuccessAndUserStoringSuccess() {\r\n when(dbService.getByEmail(anyString())).thenReturn(null);\r\n presenter.onViewLayoutCreated();\r\n presenter.register(name, email, password, password);\r\n verify(call).enqueue(callbackCaptor.capture());\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ An IpSpace term is one of these things
public Rule IpSpaceTerm() { return FirstOf( IpPrefix(), IpWildcard(), IpRange(), IpAddress(), IpSpaceAddressGroup(), IpSpaceLocation(), IpSpaceParens()); }
[ "Integer getNLNDsp();", "String getSpaceConnection();", "Integer macAdressLearningRange();", "public interface QueryTerm extends QueryNode\n{\n}", "@Override\n \tpublic @Nonnull String getProviderTermForIpAddress(@Nonnull Locale locale) {\n \t\treturn \"IP address\";\n \t}", "public interface Space {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the PAGE_TYPE value for this ABSTRACTPORTAL_PAGE_PORTLET_VIEWType.
public void setPAGE_TYPE(java.lang.String PAGE_TYPE) { this.PAGE_TYPE = PAGE_TYPE; }
[ "public final void setPageType(String pageType) {\n\t\tthis.pageType = pageType;\n\t}", "public void setPageType(PageType pageType) {\r\n this.pageType = pageType;\r\n }", "public void setPORTLET_TYPE(java.lang.String PORTLET_TYPE) {\r\n this.PORTLET_TYPE = PORTLET_TYPE;\r\n }", "public vo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method recursively traverse a given two dimensional array spirally clockwise starting at the top left element.
private static MySimpleArrayList<Integer> helperTraversingSpirally(int [][] Array2D, int start_x, int start_y, int row, int column) { // Create a new MySimpleArrayList object. MySimpleArrayList<Integer> result = new MySimpleArrayList<Integer>(); // Best case, it is ending of recursive ...
[ "static void traverse(int [][] arr,int i,int j){\n\t\tif(j%n==0 && j>0){\n\t\t\tSystem.out.println();\t\t\n\t\t\ti++;\n\t\t\tif(i%n==0 && i>0){\n\t\t\t\treturn ;\n\t\t\t}\n\t\t}\n\t\tSystem.out.print(arr[i%n][j%n]+\" \");\n\t\ttraverse(arr,i,++j);\n\t}", "public void traversalArray() {\n try {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a retrofit service from an arbitrary class (clazz)
protected static <T> T createRetrofitService(final Class<T> clazz, final String endPoint) { Retrofit retrofit = new Retrofit.Builder() .baseUrl(endPoint) .client(new OkHttpClient()) .addConverterFactory(GsonConverterFactory.create()) .build(); ...
[ "public static <T> T createRetrofitService(final Class<T> clazz) {\n OkHttpClient client = new OkHttpClient.Builder()\n .connectTimeout(180, TimeUnit.SECONDS)\n .writeTimeout(120, TimeUnit.SECONDS)\n .readTimeout(120, TimeUnit.SECONDS)\n .addInterce...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the set of controller nodes that are the active members for a partition. Active members of a partition are typically those that are actively participating in the data replication protocol being employed. When a node first added to a partition, it is in a passive or catch up mode where it attempts to bring it se...
Set<NodeId> getActivePartitionMembers(PartitionId partitionId);
[ "public Set<NodeRef> controllerNodes() {\n Set<NodeRef> controllers = new LinkedHashSet<>();\n\n for (KafkaPool pool : nodePools) {\n if (pool.isController()) {\n controllers.addAll(pool.nodes());\n }\n }\n\n return controllers;\n }", "Set<Dis...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is responsible for communicating the persistence layer that move the email object to destination folder.
public void move(Folder destFolder) { checkDestinationFolderIsNotSourceFolder(destFolder); emailDao.move(id, parentFolder.getPath(), destFolder.getPath()); }
[ "public boolean move(Email email, EmailFolder newFolder) {\n File emailFile = getEmailFile(email);\n if (emailFile == null) {\n log.error(\"Cannot move email [\" + email + \"] to folder [\" + newFolder + \"]: email file doesn't exist.\");\n return false;\n }\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds an annotation and retrieves a field value via reflection. Note that reflection needs to be used to access these annotations since they are loaded using a different classloader that does not share state with the classloader the compiler is running with.
@Nullable private static String getAnnotationField( Annotation[] annotations, Class<?> annotationClass, String field) { Annotation annotation = getAnnotation(annotations, annotationClass); if (annotation == null) { return null; } try { Method fieldAccessor = annotation.annotationTyp...
[ "protected Field getFieldWithAnnotation(Class clazz, Class annotation)\r\n {\r\n Field result = null;\r\n Field fields[] = clazz.getDeclaredFields();\r\n for (Field field : fields) {\r\n Annotation an = field.getAnnotation(annotation);\r\n if (an != null) {\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set value of IncomingRequest_ReceivingOrganisation
public final void setIncomingRequest_ReceivingOrganisation(com.mendix.systemwideinterfaces.core.IContext context, nap.proxies.Organisation incomingrequest_receivingorganisation) { if (incomingrequest_receivingorganisation == null) getMendixObject().setValue(context, MemberNames.IncomingRequest_ReceivingOrganis...
[ "public final void setIncomingRequest_ReceivingOrganisation(nap.proxies.Organisation incomingrequest_receivingorganisation)\r\n\t{\r\n\t\tsetIncomingRequest_ReceivingOrganisation(getContext(), incomingrequest_receivingorganisation);\r\n\t}", "public final void setReceivingOrganisation(java.lang.String receivingor...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Apply a "within" constraint to the property with a center of x,y and distance of d
public static <N extends Number & Comparable<N>> Distance2dExpression<N> within( String propertyName, N x, N y, N distance) { return new Distance2dExpression<N>(Operator.WITHIN, propertyName, x, y, distance); }
[ "protected abstract NativeSQLStatement createNativeDwithinStatement(Point geom, double distance);", "public abstract boolean isInside(double x, double y);", "public boolean inBounds(ImageCoordinate c);", "@Test\n\tpublic void bothBoundariesWithinObject() {\n\t\t\n\t\tboolean result = example.intersects(-1, 1)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generate a new cluster with the specified Monte Carlo track ID. Return null for failure.
public Cluster newCluster( VTrack trv, int mcid ) { Cluster clu = null; // Check track has been propagated to the surface. Assert.assertTrue( _srf.pureEqual( trv.surface() ) ); if ( ! _srf.pureEqual( trv.surface() ) ) return clu; // Require that track is in bounds i...
[ "void addCluster(int clusterID);", "int getClusterId();", "private static Topology generateTopology(int cID, double gridLength, double clusters) {\n double[] densityCity = {\n 718, // 0 --- Des Moines\n 1357, // 1 --- Boston\n 3766 // 2 --- San Francisco\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
instance of member database to make modifications adds provider
public void addProvider() { providerDatabase.addProvider(); }
[ "public void uptadeDB(){\n //mainDatabase.modifyStaff(this);\n }", "public MemberBusinessLogic() {\n memberDAO = new MemberDAOImpl();\n }", "private void initDatabase(){\n sql = new SQLManager(this);\n }", "private void init(){\n //Get instance of Members to access Members...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }