query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
optional string residues = 3; usually be numbered sequentially. | public Builder setResidues(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
residues_ = value;
onChanged();
return this;
} | [
"java.lang.String getResidues();",
"java.lang.String getResid();",
"public java.lang.String getResidues() {\n java.lang.Object ref = residues_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Writes a BSON undefined element to the writer. | void writeUndefined(String name); | [
"void writeUndefined();",
"protected abstract void doWriteUndefined();",
"private Element createXmlElementForUndefined(Undefined undefined, Document xmlDocument, Constraint constraint) {\n\t\tElement element = xmlDocument.createElement(XML_UNDEFINED);\n\t\treturn element;\n\t}",
"public void writeNull() throw... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convert from an InputStream filled with an XML response from the server to a given JAVA Object of returnType | public Object unMarshall(String returnType, InputStream is) throws Exception; | [
"@Override\n public final <T> T xmlToObject(InputStream xml, Class<T> toType) {\n try {\n Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();\n StreamSource xmlstream = new StreamSource(xml);\n JAXBElement<T> je1 = unmarshaller.unmarshal(xmlstream, toType);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Build graphs and spot check that at least one location has the expected set of children | private void testBuildGraph() {
// All test graphs have a node 8 with children [9, 10]
Set<Node> expectedChildren = new HashSet<>();
expectedChildren.add(new Node(9));
expectedChildren.add(new Node(10));
StudySetGraph disconnectedGraphWithoutCycle = new StudySetGraph(Edges.disconnectedGraphWithoutCycle);
N... | [
"boolean hasChildren();",
"@Test\n public void testIsAncestryResolved_NoParents() {\n // verify correct resolution response when no parents are set\n assertFalse(\"no parent set [reston], should not be resolved\", reston.geoName.isAncestryResolved());\n assertFalse(\"no parent set [fairfax... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generates the fields in the field group if they haven't been created yet. This guarantees a non return value. | @Override
public final FieldGroup getFieldGroup() throws IllegalStateException {
if(group == null) {
if(!canGenerateFieldGroup()) {
throw new IllegalStateException();
}
Log.debug(this + " generating fields..");
setFieldGroup(generateFieldGroup());
}
return group;
} | [
"protected boolean canGenerateFieldGroup() {\n\t\treturn true;\n\t}",
"protected abstract void createFields();",
"void advanceFieldInfosGen() {\n fieldInfosGen = nextWriteFieldInfosGen;\n nextWriteFieldInfosGen = fieldInfosGen + 1;\n generationAdvanced();\n }",
"void populateFields();",
"void adva... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Receive response from the device. This should only be executed when were are expected a response from the device. This thread blocks until a command prompt character is received. The command prompt character indicates the end of the transmission. | private synchronized String receiveResponse() {
log.debug("Waiting for response from the device.");
//Initialize the buffers
StringBuffer recievedData = new StringBuffer();
char currentChar = ' ';
try {
do {
//If there are bytes available, read them
if (this.inputStream.available() > 0)... | [
"private String sendAndWaitForResponse(String command) throws IOException {\n StringBuffer strBuf = new StringBuffer();\n out.println(command);\n\n while (!in.ready()) ;\n\n while (in.ready()) {\n strBuf.append(in.readLine() + \"\\n\");\n }\n\n return strBuf.toSt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__LocalVariable__Group__4" $ANTLR start "rule__LocalVariable__Group__4__Impl" InternalOCLlite.g:6778:1: rule__LocalVariable__Group__4__Impl : ( ( rule__LocalVariable__InitExpAssignment_4 ) ) ; | public final void rule__LocalVariable__Group__4__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalOCLlite.g:6782:1: ( ( ( rule__LocalVariable__InitExpAssignment_4 ) ) )
// InternalOCLlite.g:6783:1: ( ( rule__LocalVariable__InitEx... | [
"public final void rule__LocalVariable__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:6771:1: ( rule__LocalVariable__Group__4__Impl )\n // InternalOCLlite.g:6772:2: rule__LocalVariable__Group__4__Impl\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Since the method check is done after all other checks, it is easy to determine if the line is a method definition. The line simply needs to contain '(' and should not contain '=' or '.' or ';', otherwise, it can also be an object initialization or a function call. | private boolean isMethod() {
return !line.contains("=") && !line.contains(".") && !semicolon && line.contains("(");
} | [
"private static boolean checkerForMethod(String currentLine){\n boolean answer = false;\n if ((currentLine.contains(\"(\") && currentLine.contains(\")\")\n && !currentLine.contains(\";\") && !currentLine.contains(\"class\")) &&\n (currentLine.contains(\"public\") || curre... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return a new AttributeSet from the value of a BitSet. This bitset will be wrapped, and any changes to one will be reflected in the other. | public static AttributeSet fromBitSet(BitSet bits) {
AttributeSet set = new AttributeSet();
set.bits = bits;
return set;
} | [
"public static AttributeSet create() {\r\n AttributeSet as = new AttributeSet();\r\n as.bits = new BitSet();\r\n return as;\r\n }",
"public AttributeSet copy() {\r\n AttributeSet newSet = new AttributeSet();\r\n newSet.bits = (BitSet) bits.clone();\r\n return newSet;\r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the array of the bytes that compose this AgentXVarbindList. | public byte[] encode()
{
ByteArrayOutputStream encodedData = new ByteArrayOutputStream(getLength());
for (int i = 0; i < myList.size(); i++)
{
AgentXVarbind vb = getValueAt(i);
encodedData.write(vb.encode(), 0, vb.getLength());
}
return encodedData.toB... | [
"public byte[] getsBVarbinary() {\n\t\treturn sBVarbinary;\n\t}",
"private ArrayList<String> getBinaryValues() {\n ArrayList<String> binValues = new ArrayList<String>();\n binValues.add(Utilities.convertStringtoBinaryString(\"\" + this.datagram.getVersion()));\n binValues.add(Utilities.conver... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Writes given data at a node at end of given key. | public void write(byte[] key, int start, T data) {
int i;
for (i = 0; start + i < key.length; i++) {
byte oldValue = readByte(i);
byte newValue = key[start + i];
if (branchIndex == i) { // There is a branch that we need to follow
// Select (or rare cases, create) a branch
Node<T> newNod... | [
"public void put(byte[] key, T data) {\n\t\troot.write(key, 0, data);\n\t}",
"public void writeDHTKeyVal(String key, String val){\n\t\tDHTNode node = dynamoRing.getResponsibleNode(key);\n\t\tArrayList<DHTNode> successorList = dynamoRing.getNSuccessors(node, REPLICATION_COUNT-1);\n\t\tArrayList<DHTNode> responsibl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the callePrincipal value for this DireccionDTO. | public java.lang.String getCallePrincipal() {
return callePrincipal;
} | [
"public java.lang.String getPrincipal()\r\n {\r\n return this._principal;\r\n }",
"@Override\n public AclPrincipal getAclPrincipal() {\n return AclPrincipal.newBuilder()\n .mergeFrom(this.principal)\n .build();\n }",
"public BigDecimal getReturnedPrincipal() {\n return ret... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
If the search word is more than one word, this method comes in place and use a recursive method to checks for equality, it advance one by one into source and target and check them and return true if all of them is equal I know it is recursive BUT it will execute 2 or 3 times (depends on number of word in search word) s... | private static boolean searchForCompanionWords(Collator collator, String[] source, String[] target, int sourceMatch,
int targetMatch) {
if (source.length <= sourceMatch + 1) return false;
if (target.length <= targetMatch + 1) return false;
if (... | [
"private Boolean solution(String s1, String s2){\n\t\t\n\t\tint k = s1.length();\n\t\tchar[] input1 = s1.toCharArray();\n\t\t\n\t\tint m =0 ,count=0;\n\t\t\n\t\twhile(m < s2.length()-1){\n\t\t\t\n\t\tchar[] temp1 = s2.substring(m, m+k).toCharArray();\n\t\t\t\n\t\t\tfor(int i=0; i<s1.length(); i++){\n\t\t\t\tfor(int... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Flaps set the flaps of the controlled aircraft. (0 (no flaps) ≤ t ≤ 1 (full flaps)) | public void setFlaps(double t) throws FgException{
//check that t is between 0 and 1
if(0<=t && t<=1)
flight.setValue("controls/flight/flaps", t);
else
throw new IllegalArgumentException("Error: Plane.setRudder: InputValue ("+t+") not between 0 and 1.");
} | [
"public void setGhostsFrightened() {\n for (Ghost ghost : ghosts) {\n ghost.setPhase(Phase.FRIGHTENED, Phase.FRIGHTENED.getDuration());\n }\n }",
"public void setUnmannedAircrafts(entity.GL7UnmannedAircraft[] value);",
"public void setFlightsScheduled(int value) {\n this.fligh... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add a sales tax to a price and return the result. | private static double addTax(double price, double rate) // The method addTax with 2 parameters will find the price with the given states tax rate factored into the price.
{
price = price + (price * (rate/100)); //The price after tax is found by taking the initial price and adding the price multiplied by the... | [
"private static double addTax(double price) //The method addTax with 1 parameter will find the price with Arizona tax factored in\n {\n final double AZTAX = 8.40; //the Arizona sales tax is set to a constant\n price = price + (price * (AZTAX/100)); //the price after tax will be the initial price pl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test getting the active reservation in a conference call, when the primary is cancelled. | public final void testGetActiveReservation() {
final DataRecord reservation = this.reservationDataSource.createNewRecord();
createReservation(reservation, false);
this.conferenceCallReservationService.saveReservation(reservation, createRoomAllocations(),
TIMEZONE_ID);
final i... | [
"public void testCancelAppointment() {\r\n final RoomReservation reservation = createRoomReservation();\r\n populateReservation(reservation);\r\n createAppointment(reservation);\r\n \r\n ExchangeCalendarVerifier.checkExchangeEquivalence(reservation, this.appointmentHelper,\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Original specfile type: LocalFunctionTags | @JsonProperty("tags")
public LocalFunctionTags getTags() {
return tags;
} | [
"@JsonProperty(\"tags\")\n public void setTags(LocalFunctionTags tags) {\n this.tags = tags;\n }",
"private String getFuncName(){\n StringTokenizer st = new StringTokenizer(label);\n return st.nextToken(\"<\");\n }",
"static public interface InternalTags {\r\n\r\n /**\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Truncate a cal at the specified calendar date. This doesn't support weeks. | public static Calendar truncateCal(Calendar cal, int field) {
Calendar calp = (Calendar) cal.clone();
calp.set(Calendar.MILLISECOND, 0);
calp.set(Calendar.SECOND, 0);
if(field == Calendar.MINUTE) {
return calp;
}
calp.set(Calendar.MINUTE, 0);
if(fie... | [
"public static void truncar() {\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.set(Calendar.MINUTE, 0);\n\t\tcalendar.set(Calendar.SECOND, 0);\n\t\tcalendar.set(Calendar.MILLISECOND, 0);\n\t\tDate truncado = calendar.getTime();\n\t}",
"public static final Function<Date,Date> truncate(final int cal... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Changes the state of the edge associated with the door on the vertex where the Agent is. | public void changeDoorState(Agent ag, int door, EdgeState state)
throws InterruptedException {
Vertex vertexFrom, vertexTo;
Long key = new Long(numGen.alloc());
EdgeStateChangeEvent event;
vertexFrom = getVertexFor(ag);
vertexTo = vertexFrom.neighbour(door);
e... | [
"public void updateEdge() {\n\t}",
"public void editEdge(){\n\t}",
"public void setDoor(Door theDoor) {\n aDoor = theDoor;\n }",
"public void setRouteNewEdge();",
"void setupEdge(GeomPlanarGraphEdge edge)\n {\n\t //System.out.println(\"enter setupEdge indexOnPath \" + indexOnPath + \" currentIndex \... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Worker Methods Parses a Partitioned Dataset Entry, and returns an FTPFile object. | protected FTPFile parsePDSLine( String[] aLine, String raw ) throws ParseException {
FTPFile rtn = null;
if ( aLine[0].equals( HEADER_NAME ) ) {
if ( log.isDebug() ) {
log.logDebug( BaseMessages.getString( PKG, "MVSFileParser.DEBUG.Skip.Header" ) );
}
return null;
}
rtn = new F... | [
"public FTPFile parseFTPEntry(String entry) {\n\t\t// one block in VMS equals 512 bytes\n\t\tlong longBlock = 512;\n\n\t\tif (matches(entry)) {\n\t\t\tFTPFile f = new FTPFile();\n\t\t\tf.setRawListing(entry);\n\t\t\tString name = group(1);\n\t\t\tString size = group(2);\n\t\t\tString datestr = group(3) + \" \" + gr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Open a sql file in the script viewer / runner | private void openSQL(File file) {
Utils.logD("SQL file", _logging);
// Look in last location
final SharedPreferences settings = getSharedPreferences("aSQLiteManager",
MODE_PRIVATE);
settings.getString("RecentOpenSQLPath", _dbPath);
Intent iSqlViewer = new Intent(_cont, SQLViewer.class);
iSqlViewer.putEx... | [
"public void executeSQLScript(Connection connexion, String filename) throws IOException, SqlToolError, SQLException {\n System.out.print(DAOTest.class.getResource(filename));\n String sqlFilePath = DAOTest.class.getResource(filename).getFile();\n \n SqlFile sqlFile = new SqlFile(new File(s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Update the stats information of the specified region. | CompletableFuture<Boolean> updateRegionStats(final long clusterId, final Region region,
final RegionStats regionStats); | [
"public void setRegion(String region);",
"public void setRegion(java.lang.String region) {\n this.region = region;\n }",
"public abstract void updateStatistics();",
"Pair<Region, RegionStats> getRegionStats(final long clusterId, final Region region);",
"abstract public void updateStats();",
"pub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Log an exception (throwable) at the INFO level with an accompanying message. | public void info(String msg, Throwable throwable); | [
"void info(String message, Throwable t);",
"public void info(String message, Throwable t) {\n\t\tlogger.info(message, t);\n\t}",
"void info(String loggerFqcn, Object message, Throwable t);",
"void log(LogLevel level, String message, Exception e);",
"public void logInfo(String message) {\n logAnnot(\"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes the namespace scope. | public void removeNamespaceScope() {
// removes the current namespace
if (namespaceStack.size() > 0) {
namespaceStack.remove(namespaceStack.size() - 1);
} else {
this.logger.error("Trying to remove a namespaces scope from an empty stack of Namespaces");
}
} | [
"void unsetNamespace();",
"public void deregisterScope(OntologyScope scope);",
"public void unsetNamespace()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(NAMESPACE$6);\n }\n }",
"void removeScope(String name, StatsLogger... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a CharacterProperties object from a chpx stored in the StyleDescription at the index istd in the StyleDescription array. The CharacterProperties object is placed in the StyleDescription at istd after its been created. Not every StyleDescription will contain a chpx. In these cases this function does nothing. | private void createChp(int istd)
{
StyleDescription sd = _styleDescriptions[istd];
CharacterProperties chp = sd.getCHP();
byte[] chpx = sd.getCHPX();
int baseIndex = sd.getBaseStyle();
if(baseIndex == istd) {
// Oh dear, this isn't allowed...
// The word file see... | [
"private void createPap(int istd)\n {\n StyleDescription sd = _styleDescriptions[istd];\n ParagraphProperties pap = sd.getPAP();\n byte[] papx = sd.getPAPX();\n int baseIndex = sd.getBaseStyle();\n if(pap == null && papx != null)\n {\n ParagraphProperties parentPAP = new Para... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method initializes jContentPaneabmProd | private JPanel getJContentPaneabmProd() {
if (jContentPaneAbmProd == null) {
jContentPaneAbmProd = new JPanel();
jContentPaneAbmProd.setLayout(new BoxLayout(getJContentPaneabmProd(), BoxLayout.X_AXIS));
jContentPaneAbmProd.add(getJSplitPaneabmProd(), BorderLayout.CENTER);
}
return jContentPane... | [
"private void initializePanel() \n\t{\n\t\tcontentPane = new JPanel();\n\t\tcontentPane.setBorder( new EmptyBorder(5, 5, 5, 5) );\n\t\tsetContentPane(contentPane);\n\t\tcontentPane.setLayout(null);\n\t\t\n\t\tinitializeTextFields(contentPane);\n\t\tcreateLabels(contentPane);\n\t\tinitializeButtons(contentPane);\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Stampa un messaggio nella console di gioco che indica il contenuto del ContainerObj. | public void printContenuto() {Motore.write(this.toString()+" contiene: "+contenuto.toString());} | [
"@Override\r\n\tpublic void stampaMessaggio(String messaggio) {\r\n\r\n\t\tSystem.out.println(\"\"+messaggio);\r\n\t\t\r\n\t}",
"public void mostrarMensaje()\r\n\t{\r\n\t\t// esta instruccion llama a obtenerNombreDelCurso para obtener\r\n\t\t//el nombre del curso que este LibroCalificaciones4 representa\r\n\t\tSy... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called when disconnected from the other player. Clears the event without giving rewards. | protected void disconnectFromEvent() {
super.dispose(false);
cOtherClient.dispose();
} | [
"public void onDisconnected() {\n reset();\n }",
"@EventHandler(ignoreCancelled = true)\n public void onPlayerQuit(PlayerQuitEvent event) {\n ElytraPlayerState _deletedState = playerStates.remove(event.getPlayer().getName());\n // just in case your JVM supports forced garbage ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
insert Zeros to make it a puzzle | public void insertZeros(int zerosToInsert) {
double remainingSquares = BOARD_WIDTH * BOARD_HEIGHT;
double remainingZeros = (double)zerosToInsert;
for(int i=0;i<9;i++) {
for(int j=0;j<9;j++) {
if(Math.random() <= (remainingZeros/remainingSquares))
{
... | [
"public void solver(){\n int z = 0;\n for(int i = 0; i < 81; i++){ //determines how many 0's are in the puzzle\n if(puzzle[i] == 0){\n z++;\n }\n }\n while(z > 0){ //while the puzzle still contains 0's\n for(int i = 0;... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets or sets selected status of option. Returns true if option is selected. | @ApiModelProperty(value = "Gets or sets selected status of option. Returns true if option is selected.")
public Boolean isSelected() {
return selected;
} | [
"public boolean getIsSelected() {\n return this.isSelected;\n }",
"public boolean isSelected(Option option, Object value) {\n\t\treturn ObjectUtils.equals(option.getValue(), value) ||\n\t\t\tObjectUtils.equals(option.getCode(), value);\n\t}",
"public Boolean getIsselected() {\n return isselecte... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adiciona o paciente e ordena alfabeticamente | public void adicionar(Paciente pac) {
if (estaVazia()) {
NoLista novo = new NoLista(pac);
this.primeiro = novo;
this.ultimo = novo;
} else {
int cont = 0;
for (NoLista aux = this.primeiro; aux != null; aux = aux.getProximo()) {
int comp = pac.getNome().compareToIgnoreCase(aux.getPaciente().getNom... | [
"ParqueaderoEntidad agregar(ParqueaderoEntidad parqueadero);",
"@Override\n public Paciente create(Paciente paciente) {\n return this.pacienteRepository.save(paciente);\n }",
"void addPermanent(Permanent permanent, int createOrder);",
"public void adicionarProduto(Produto p) {\n produtos.a... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR start "model_key" main.java.PLSQLKeys.g:1287:1: model_key : PLSQL_NON_RESERVED_MODEL ; | public final model_key_return model_key() throws RecognitionException {
model_key_return retval = new model_key_return();
retval.start = input.LT(1);
Object root_0 = null;
Token PLSQL_NON_RESERVED_MODEL243=null;
Object PLSQL_NON_RESERVED_MODEL243_tree=null;
try {
... | [
"private Model.KEYS getModelKey(KeyEvent key) {\n int keyCode = key.getKeyCode();\n\n // Model.KEYS.NULL == \"empty\" key\n Model.KEYS modelKey = Model.KEYS.NULL;\n\n switch (keyCode) {\n // setting value according to keyCode\n case KeyEvent.VK_UP:\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A mutable version of ComboBoxModel. | public interface MutableComboBoxModel<E> extends ComboBoxModel<E> {
/**
* Adds an item at the end of the model. The implementation of this method
* should notify all registered <code>ListDataListener</code>s that the
* item has been added.
*
* @param item the item to be added
*/
p... | [
"@Override\n public AbstractComboBoxModel getComboBoxModel() {\n if (mModel == null) {\n mModel = new Model();\n }\n return mModel;\n }",
"public DBComboBoxModel() {\n setDBSelectQueryViewable(new DBSelectQueryViewable());\n }",
"JComboBox addComboBox(ComboBoxMode... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional uint32 ADC2 = 8; RAW data from ADC2 | public boolean hasADC2() {
return ((bitField0_ & 0x00000100) == 0x00000100);
} | [
"int getADC2();",
"public int getADC2() {\n return aDC2_;\n }",
"public int getADC2() {\n return aDC2_;\n }",
"public boolean hasADC2() {\n return ((bitField0_ & 0x00000100) == 0x00000100);\n }",
"boolean hasADC2();",
"int getADC1();",
"Bit getALUSRC2() {\n\t\treturn aluS... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__UpdateAddition__Group__0__Impl" $ANTLR start "rule__UpdateAddition__Group__1" ../eu.quanticol.caspa.ui/srcgen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7391:1: rule__UpdateAddition__Group__1 : rule__UpdateAddition__Group__1__Impl ; | public final void rule__UpdateAddition__Group__1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7395:1: ( rule__UpdateAddition__Group__1__Impl )
... | [
"public final void rule__UpdateAddition__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7406:1: ( ( ( rule__UpdateAddition__Group... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
creates report, requires filename | public void createReport(String filename)
{
try {
BufferedWriter writer;
if(filename.contains(".txt"))//if filename does have .txt open file
{
writer = new BufferedWriter( new FileWriter(filename));
}
else//else add .txt to filename then open it
{
writer = new BufferedWriter( new FileWr... | [
"private void createReport()\n\t{\n\t\tSystem.out.println(\"Please input complete path to save report in.\");\n\t\t\n\t\tString path_to_file = userInput();\n\t\t\n\t\tif(app.pathExists(path_to_file))\n\t\t{\n\t\t\ttry {\n\t\t\t\tapp.printReport(path_to_file);\n\t\t\t\tSystem.out.println(\"A report is printed\");\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
End of LDA_Init() / Log Likelihood | private double getLogLikelihood()
{
return (this.getTopicLogLikelihood() + this.getDocumentLogLikelihood());
} | [
"public void runLinkLDA() {\n\n\t\t// initializes topic vars uniformly\n\t\tRandom rand = new Random();\n\t\tdouble initWordGivenTopicProb = 1.0 / numUniqueWords;\n\t\tdouble initLinkGivenTopicProb = 1.0 / numUniqueLinks;\n\t\tdouble initTopicGivenDocProb = 1.0 / this.numTopics;\n\n\t\t// fills in the initial vals ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
since it is uneven number of hex chars, the last one is being ignored | @Test
public void testHexToByteIgnoreLastChar() {
byte[] a = Crypto.hextobyte("4a41564120746563616Af");
assertArrayEquals("JAVA tecaj".getBytes(), new String(a).getBytes());
} | [
"private static String undoHex(String str)\r\n {\r\n \r\n StringBuilder sb = new StringBuilder();\r\n for( int i=0; i<str.length()-1; i+=2 )\r\n sb.append((char)Byte.parseByte(str.substring(i, (i + 2)), 16));\r\n return sb.toString();\r\n }",
"private static int getZ1ValueOfString11(byte[] str... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Case ID:116817. Test Case Name: Answer a question. Case ID:116818. Test Case Name: Edit an answer. Case ID:116819. Test Case Name: Delete an answer. PreCondition: PostCondition: | @Test
public void test04_05_06_AddEditDeleteAnswerAQuestion() {
String answer = txData.getContentByArrayTypeRandom(1)+"a116817";
String newanswer = txData.getContentByArrayTypeRandom(1)+"n116817";
info("Test 4: Answer a question");
/*Step Number: 1
*Step Name: Prepare data: Create a category, a question,
... | [
"@Test\n\tpublic void test07_08_09_AddEditDeleteAComment() {\n\t\tString answer = txData.getContentByArrayTypeRandom(1)+\"a116820\";\n\t\tString comment = txData.getContentByArrayTypeRandom(1)+\"c116820\";\n\t\tString newcomment = txData.getContentByArrayTypeRandom(1)+\"nc116820\";\n\t\tinfo(\"Test 7: Add a commen... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Trims the length of the given string to the given maxlength, if the string length is below the given maxlength the string returned unmodified. | public static String trimLength (String str, int maxLength)
{
Assert.assertTrue("maxLength must not be negative.", maxLength >= 0);
final String result;
if (str != null && str.length() > maxLength)
{
result = str.substring(0, maxLength);
}
else
{
... | [
"public static String truncate(String input, int length) {\r\n return truncate(input, length, \"\");\r\n }",
"public void setMaxLength(String maxlength) {\n this.maxlength = maxlength;\n }",
"public static String filteredString(String originalString, int minLength, int maxLength) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use AffiliationRef.newBuilder() to construct. | private AffiliationRef(Builder builder) {
super(builder);
} | [
"private Affiliation(Builder builder) {\n super(builder);\n }",
"public Reference(){\n\t\tsuper();\n\t\tresourceCopy = 0;\n\t\tstartDate = null;\n\t\tendDate = null;\n\t\tuserID = 0;\n\t}",
"public ReferenceImpl()\n {\n \t\n\t\tthis.refType = \"\";\n\t\t\n\t\tthis.refDesc = \"\";\n\t\t\n\t\tthis.p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
///////////////////////////////////////////////////////////////////////// Testing Eimhin Laverty ///////////////////////////////////////////////////////////////////////// Sets the simulatedTouchEvents used for simulated input | public void setSimulatedTouchEvents(List<TouchEvent> simulatedTouchEvents) {
this.simulatedTouchEvents = simulatedTouchEvents;
} | [
"public void setUseSimulatedTouchEvents(boolean useSimulatedTouchEvents) {\n if(useSimulatedTouchEvents) {\n this.useSimulatedTouchEvents = true;\n } else {\n this.useSimulatedTouchEvents = false;\n }\n }",
"public void setMarioEvents() {\n\t\tCollisionEvent event1, e... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
string field_1615 = 1615; | java.lang.String getField1615(); | [
"java.lang.String getField1677();",
"java.lang.String getField1665();",
"java.lang.String getField1672();",
"java.lang.String getField1634();",
"java.lang.String getField1636();",
"java.lang.String getField1658();",
"java.lang.String getField1616();",
"java.lang.String getField1620();",
"java.lang.S... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Load service provider with the specified name. | public static <T extends NamedService> Optional<T> load( Class<T> service, String name )
{
checkArgument( isNotBlank( name ), "Service provider name is null or blank" );
return load( service, name, NamedService::getName );
} | [
"public static Provider getProvider(String name) {\n return Providers.getProviderList().getProvider(name);\n }",
"public static void loadService() {\n Optional<EconomyService> optService = Sponge.getServiceManager().provide(EconomyService.class);\n if(optService.isPresent()) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__AstType__Group_0__0__Impl" $ANTLR start "rule__AstType__Group_0__1" ../org.caltoopia.frontend.ui/srcgen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20117:1: rule__AstType__Group_0__1 : rule__AstType__Group_0__1__Impl ; | public final void rule__AstType__Group_0__1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20121:1: ( rule__AstType__Group_0__1__Impl )
... | [
"public final void rule__AstType__Group_0_1_0__2() 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:20211:1: ( rule__AstType__Group_0_1_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
starts intent to RemoveTaskActivty | @Override
public void onClick(View v) {
Intent i = new Intent(ManageTaskActivity.this, RemoveTaskActivity.class);
//storing the task list in this intent
i.putParcelableArrayListExtra("TASK_LIST", _Task);
//starting activit... | [
"@Override\n public void onClick(View v) {\n Intent i = new Intent(ManageSaleActivity.this, RemoveSaleActivity.class);\n\n //storing the task list in this intent\n i.putExtra(\"SALE_LIST\", _Sales);\n\n //starting activity for result to return t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Handle the searching Args: query (String): Search term since (String): Only messages after the date (including the date), =yyyyMMdd or yyyyMMdd_HH:mm. until (String): Only messages before the date (excluding the date), =yyyyMMdd or yyyyMMdd_HH:mm. fromUser (String): Only messages published by the user. count (String)... | public String search(String query, String since, String until, String fromUser, String count) throws Exception {
String apiUrl = "api/search.json?";
this.query = query;
this.since = since;
this.until = until;
this.fromUser = fromUser;
this.count = count;
if (this.query != "") {
apiUrl = apiUrl + "qu... | [
"public String aggregations(String query, String since, String until, String fields, String limit, String count)\n \t throws Exception {\n \t\tString apiUrl = \"api/search.json?\";\n\n \t\tthis.query = query;\n \t\tthis.since = since;\n \t\tthis.until = until;\n \t\tthis.field... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a C++ specific FileConfig object Since the CppFileConfig class is implemented in Kotlin, the class is is not visible from all contexts. If the RCA is run from within Eclipse via "Run as Eclipse Application", the Kotlin classes are unfortunately not available at runtime due to bugs in the Eclipse Kotlin plugin. (... | private FileConfig createCppFileConfig(Resource resource,
IFileSystemAccess2 fsa, IGeneratorContext context)
throws IOException {
// Since our Eclipse Plugin uses code injection via guice, we need to
// play a few tricks here so that CppFileConfig does not appear as an
//... | [
"private GeneratorBase createCppGenerator(FileConfig fileConfig,\n ErrorReporter errorReporter) {\n // Since our Eclipse Plugin uses code injection via guice, we need to\n // play a few tricks here so that CppFileConfig and CppGenerator do not\n // appear as an import. Instead we loo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates the frame. No info will be displayed until the user selects a person. After selection the text box will be populated with facts from the database associated with that person. The text box is scrollable and the components will resize with the window. | public InspirationalPeopleFrame() {
Dimension minSize=new Dimension(450,350);
this.setMinimumSize(minSize);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 450, 350);
contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
contentPane.setLayout(new Border... | [
"public void designNewWindow()\r\n {\r\n //place the label and textfields in correct order\r\n addMemberG.add(addFNameL, 0, 0);\r\n addMemberG.add(addFNameText, 2, 0);\r\n addMemberG.add(addSNameL, 0, 1);\r\n addMemberG.add(addSNameText, 2, 1);\r\n addMemberG.add(addAftS... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
SPECIAL CASES..... 201205032049:22.817 WARNING: RHN Classic channel 'rhelx86_64server6cfae1' is NOT mapped in the file '/usr/share/rhsm/product/RHEL6/channelcertmapping.txt'. 201205032049:22.817 WARNING: RHN Classic channel 'rhelx86_64server6cfae1beta' is NOT mapped in the file '/usr/share/rhsm/product/RHEL6/channelcer... | @Test( description="Verify that all of the classic RHN Channels available to a classically registered consumer are accounted for in the in the channel-cert-mapping.txt or is a known exception",
groups={"debugTest","AcceptanceTests"},
dependsOnMethods={"VerifyChannelCertMapping_Test"},
dataProvider="getRhnCl... | [
"@Test(\tdescription=\"Verify that the migration product certs support this system's RHEL release version\",\n \t\t\tgroups={\"AcceptanceTests\",\"blockedByBug-782208\"},\n \t\t\tdependsOnMethods={\"VerifyChannelCertMapping_Test\"},\n \t\t\tenabled=true)\n \t@ImplementsNitrateTest(caseId=130940)\n \tpublic void Ver... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the date publish of this pna alerta. | public void setDatePublish(java.util.Date datePublish) {
_pnaAlerta.setDatePublish(datePublish);
} | [
"public void setPublishDate(Date publishDate);",
"public void setPublishDate(Date publishDate) {\r\n this.publishDate = publishDate;\r\n }",
"public void setPublishdate(Date publishdate) {\n this.publishdate = publishdate;\n }",
"void setPublishedDate(Date publishedDate);",
"public void ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional int32 BonusHP = 1; | public int getBonusHP() {
return bonusHP_;
} | [
"int getBonusHP();",
"int getBonusExp();",
"int getHPValue();",
"public int getBonusPracLevel();",
"public int getBonusAttackLevel();",
"float getBonusPercentHP();",
"public abstract int getBonus();",
"float getBonusMaxHealth();",
"int getBonusMoney();",
"void setBonusMaxHealth(float bonusMaxHealt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Dispatch view according to given request | public void dispatch(String request){
if(request.equalsIgnoreCase("PLAYER")){
playerView.show();;
}else{
homeView.show();
}
} | [
"protected void doDispatch (RenderRequest request,\n\t\t\t RenderResponse response) throws PortletException,java.io.IOException\n {\n WindowState state = request.getWindowState();\n \n if ( ! state.equals(WindowState.MINIMIZED)) {\n PortletMode mode = request.getPortletMode();\n if (mode.equals... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Search report list according to chosen criteria fields. | public void search() {
try {
reportList = agentMonthlyLifeSaleReportService.findAgentMonthlyLifeSaleReport(criteria);
} catch (SystemException ex) {
handelSysException(ex);
}
} | [
"@SearchQueryMethod(name = \"autoxReportSearch\", queryModel = AutoxReportSearchQuery.class)\r\n\t@OrderBy(\"createdOn\")\r\n\tpublic List<AutoxReportSearchResult> searchCandidates(SearchQuery searchQuery);",
"public abstract List<T> find(SearchCriteria searchCriteria);",
"public static void addAssumedMatchRepo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Encrypt the message arguments: a String to be encrypted returns: a SealedObject containing the encrypted string | public SealedObject encrypt ( String plainstr )
{
try
{
des_cipher.init ( Cipher.ENCRYPT_MODE, the_key );
return new SealedObject( plainstr, des_cipher );
}
catch ( Exception e )
{
System.out.println("Failed to encrypt message. " + plainstr... | [
"public String encrypt(String stringToEncrypt);",
"public EncryptorReturn encrypt(String in) throws CustomizeEncryptorException;",
"String encrypt(String input) throws IllegalArgumentException, EncryptionException;",
"public abstract String encryptMsg(String msg);",
"public String encrypt(String plainText);... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checking if permission is granted or not. permission for using microphone : voice message and voice filter message. permission to use the storage : this is so that user can hear the audio file. how the audio work will be explain on later in this code. | private boolean checkAndRequestPermissions() {
int permissionRecordAudio = ContextCompat.checkSelfPermission(this,
Manifest.permission.RECORD_AUDIO);
int permissionWriteExternalStorage = ContextCompat.checkSelfPermission(this,
Manifest.permission.WRITE_EXTERNAL_STORAGE);... | [
"public boolean checkAudioRecordPermission() {\n /* int result = ContextCompat.checkSelfPermission(getApplicationContext(),\n WRITE_EXTERNAL_STORAGE);*/\n int result1 = ContextCompat.checkSelfPermission(getApplicationContext(),\n RECORD_AUDIO);\n return /*result == ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__MultExp__OpAssignment_1_1" $ANTLR start "rule__MultExp__RightAssignment_1_2" ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/srcgen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:10382:1: rule__MultExp__RightAssignment_1_2 : ( rulePrimary ) ; | public final void rule__MultExp__RightAssignment_1_2() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:10386:1: ( ( rulePrima... | [
"public final void rule__MultExp__Group_1__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:8528:1: ( ( (... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method sets the saveRequired true if any values are changed in the Form components | private void setSaveRequiredChanged(){
if(functionType == ADD_MODE){
saveRequired = true;
}
ComboBoxBean degreeCodeBean = (ComboBoxBean)cmbDegreeType.getSelectedItem();
String strDegreeCode = degreeCodeBean.getCode().trim();
ComboBoxBean scho... | [
"public void setSaveRequired(boolean saveRequired) {\r\n this.saveRequired = saveRequired;\r\n }",
"void validateAllFields() {\n\t\tboolean dataRetrieved = !jsonManip.isEmpty();\n\t\tsaveButton.setVisible(dataRetrieved);\n\t\tdiscardButton.setVisible(dataRetrieved);\n\t\tboolean savingRequired = savingR... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the value of the 'Carrier HRF' containment reference. The full UDI carrier as the human readable form (HRF) representation of the barcode string as printed on the packaging of the device. | org.hl7.fhir.String getCarrierHRF(); | [
"public java.lang.String getHCAR() {\r\n return HCAR;\r\n }",
"java.lang.String getFlightCarrier();",
"java.lang.String getFlightCarrierCode();",
"public java.lang.String getCarrier() {\n return carrier;\n }",
"public String getFwbh() {\n return fwbh;\n }",
"String getCarrier... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__RecvStmt__Group_0_1__0" $ANTLR start "rule__RecvStmt__Group_0_1__0__Impl" InternalGo.g:11677:1: rule__RecvStmt__Group_0_1__0__Impl : ( ( rule__RecvStmt__IdlAssignment_0_1_0 ) ) ; | public final void rule__RecvStmt__Group_0_1__0__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalGo.g:11681:1: ( ( ( rule__RecvStmt__IdlAssignment_0_1_0 ) ) )
// InternalGo.g:11682:1: ( ( rule__RecvStmt__IdlAssignment_0_1_0... | [
"public final void rule__RecvStmt__Group_0_0__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:11642:1: ( rule__RecvStmt__Group_0_0__1__Impl )\r\n // InternalGo.g:11643:2: rule__RecvStmt__Group_0_0__1__Impl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Action Name : saveCityMaster Purpose: To saveCityMaster | public ActionForward saveCityMaster(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)throws IOException,SQLException
{
HttpSession session = request.getSession();
CityForm cityForm = (CityForm)form;
CityBean cityBean = new CityBean();
String mapp... | [
"void saveCity(City city);",
"public void saveCities(Cities entity) throws Exception;",
"public abstract void saveCity(final int index, final SharedPreferences sharedPref);",
"public void commitToPutAllCities() throws SQLException {\n \t\tstreetDAO.commit();\n \t}",
"public ActionForward showModifyCityMaste... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the indured_location of this ext_information. | @Override
public void setIndured_location(java.lang.String indured_location) {
_ext_information.setIndured_location(indured_location);
} | [
"@Override\n\tpublic java.lang.String getIndured_location() {\n\t\treturn _ext_information.getIndured_location();\n\t}",
"void setLocation(org.hl7.fhir.Location location);",
"public void setLocation( Location location ) { this.location = location; }",
"@Override\n\tpublic void setLocation(Location location){\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
dfs is used to get each vertex and check if the vertex is not seen then call dfsVisit with the component number | static int dfs(Graph g){
for(Graph.Vertex u : g){
CCVertex ccu = getCCVertex(u);
ccu.seen = false;
ccu.parent=null;
}
int cno=0; // Initializing count variable to check for connected components
for(Graph.Vertex u : g){
if(!seen(u))
dfsVisit(u, ++cno);
}
retur... | [
"void dfs(){\n // start from the index 0\n for (int vertex=0; vertex<v; vertex++){\n // check visited or not\n if (visited[vertex]==false){\n Explore(vertex);\n }\n }\n }",
"void DFS() {\n \t\n \t// Mark all the vertices as not visited(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create new clone crossbowman. | @Override
public AbstractUnit clone() {
return new Crossbowman();
} | [
"private void createNewBoard() {\r\n\t\tif (lastFactory == null) lastFactory = getDefaultFactory();\r\n\t\tif (lastFactory == null) {\r\n\t\t\tmessage(\"No current generator\", \"Select a generator from the drop down list.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcreateNewBoard(lastFactory);\r\n\t}",
"@Override\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the height of the 2D tiles array of the world | public int getWorldHeight() {
return tiles.getHeight();
} | [
"public int getTileHeight();",
"public int getHeight() {\n return (Integer)map.getProperties().get(\"height\") * (Integer)map.getProperties().get(\"tileheight\");\n }",
"public int getHeight() \n\t{\n\t\treturn grid.length;\n\t}",
"public int getNumYTiles() {\n\t\treturn tiles[0].length; \n\t}",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the comma separated string of date formats e.g dd/mm/yyyy,ddmmmyyyy where first one would be considered default | public void setDateFormats(String dateFormats)
{
this.dateFormats = dateFormats;
} | [
"public void setDateFormat(String value)\n {\n format = value;\n }",
"public String getDefaultDateFormatsString()\n {\n return\n \"EEEE, MMMM d, yyyy\\n\" +\n \"MMMM d, yyyy\\n\" +\n \"d MMMM yyyy\\n\" +\n \"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
scoreAuthorMatch Compare two dates, and return a match score 0..100 | private int scoreDateMatch(int tag1, int tag2)
{
// If they're exactly equal, great.
if (tag1 == tag2)
return 50;
// Parse the years
String str1 = data.tags.getString(tag1);
String str2 = data.tags.getString(tag2);
int year1 = -99;
int year2 = -99;
try { year1 = I... | [
"private int scoreAuthorMatch(int tag1, int tag2)\n {\n // If they're exactly equal, great.\n if (tag1 == tag2)\n return 100;\n \n // Don't do prefix scanning on short titles.\n String str1 = data.tags.getString(tag1);\n String str2 = data.tags.getString(tag2);\n if (str1.length(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculates the new value for the accumulated mean when a value is added, in the case where at least one of the previous mean and the value is nonfinite. | static double calculateNewMeanNonFinite(double previousMean, double value) {
/*
* Desired behaviour is to match the results of applying the naive mean formula. In particular,
* the update formula can subtract infinities in cases where the naive formula would add them.
*
* Consequently:
* 1.... | [
"private void mean() {\n\t\tthis.mean = sum / count;\n\t}",
"private Double getMean(Double[] values) {\n double sum = 0;\n int count = 0;\n for (Double d: values) {\n if (d != null) {\n sum += d;\n ++count;\n }\n }\n return cou... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generates combinations of size n from a list of objects. | public static <T> void generateCombinations(int n, List<T> in, List<List<T>> list) {
int numLists = getCombinationCount(in.size(),n);
for(int i = 0; i < numLists; i++) {
list.add(new ArrayList<>(n));
}
for(int j = 0; j < n; j++) {
// This is the period with which this position chan... | [
"private List<ItemSet> generateCombinations(List<Item> items, Integer size) {\n\t\tint[] indexes = new int[size];\n\t\tList<ItemSet> combinations = new ArrayList<>();\n\n\t\t// If the current size is not greater than the item size, process the\n\t\t// list\n\t\tif (size <= items.size()) {\n\t\t\t// Initialize the i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of changeCustomersInformation method, of class SimpleCustomerService. | @Test
public void testChangeCustomersInformation() {
System.out.println("changeCustomersInformation");
String tel = "2333";
String expResult = "6060";
final String sql = "INSERT INTO customer (id, tel) VALUES "
+ "(nextval('customer_ids'), '" + tel + "')";
Lo... | [
"Customer changeCustomersInformation(Customer customer);",
"@Test\n public void testSetCustomer() throws Exception {\n System.out.println(\"setCustomer\");\n String nameOfCustomer = \"Customer Changed Name \" + new Random().nextInt();\n Customer cus = customerTwo;\n cus.setCusName(n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get comment set on a gadget | @Test(groups = {"wso2.gs"}, dependsOnMethods = {"testGetCommentCountForGadget"}, description = "Get comment set on a gadget")
public void testGetCommentSetForGadget() throws RemoteException {
Comment commentSet[] = gadgetRepoServiceStub.getCommentSet(gadgetPath, commentStart, commentSetSize);
assert... | [
"public String getComments() { \n\t\treturn getCommentsElement().getValue();\n\t}",
"public comments getComments()\r\n\t{\r\n\t\treturn comments;\r\n\t}",
"public String getComment();",
"public java.lang.String getComments() {\n return _app.getComments();\n }",
"public ResStringPoolRef getComment... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
we should be processing just one FoldMaker per partition/call | @Override
public Iterator<Instance> call(Iterator<FoldMaker> foldMakerIterator)
throws DistributedWekaException {
if (foldMakerIterator.hasNext()) {
int count = 0;
while (foldMakerIterator.hasNext()) {
if (count > 1) {
throw new Distribu... | [
"@Override\n public Iterator<Instance> call(Iterator<FoldMaker> foldMakerIterator)\n throws DistributedWekaException {\n\n if (foldMakerIterator.hasNext()) {\n int count = 0;\n while (foldMakerIterator.hasNext()) {\n if (count > 1) {\n throw... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Execute the "getUserPlaces" function and store its results in a List | public List<uclm.esi.cardroid.data.oracle.Place> getUserPlacesList(
uclm.esi.cardroid.data.oracle.User usr, Current current) {
return resultSetToList(getUserPlaces(usr, current),
uclm.esi.cardroid.data.oracle.Place.class);
} | [
"java.util.List<net.iGap.proto.ProtoGeoGetNearbyCoordinate.GeoGetNearbyCoordinateResponse.Result> \n getResultList();",
"Place[] getPlaces();",
"@Override\n public Collection<TP> getAllPlaces()\n ;",
"public ResultSet getUserPlaces(uclm.esi.cardroid.data.oracle.User usr,\n\t\t\tCurrent current) {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Action Users.changePasswordByAdmin(): forbidden to change password of Oauth Google users | @Test
public void callChangePasswordByAdminGoogle() {
User userBla = testHelper.createAndPersistUserOAuthGoogle(TestHelper.BLA_EMAIL, "Bla Bla", "bla", false);
Map<String, String> formMap = new HashMap<>();
formMap.put(ChangePasswordModel.USERNAME, TestHelper.BLA_EMAIL);
formMap.put... | [
"void changeUserPassword();",
"ActionResponse changePassword(String userId, String password);",
"@Test\n public void callchangePasswordByUserGoogle() {\n User userBla = testHelper.createAndPersistUserOAuthGoogle(TestHelper.BLA_EMAIL, \"Bla Bla\", \"bla\", false);\n\n Map<String, String> formMap... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method corresponds to the database table d_notifica_priorita | @Select({ "select", "priorita_id, priorita_cod, priorita_desc, validita_inizio, validita_fine, utente_operazione, ",
"data_creazione, data_modifica, data_cancellazione", "from d_notifica_priorita",
"where priorita_id = #{prioritaId,jdbcType=INTEGER}" })
@Results({ @Result(column = "priorita_id", property = "prio... | [
"@Select({ \"select\", \"priorita_id, priorita_cod, priorita_desc, validita_inizio, validita_fine, utente_operazione, \",\n\t\t\t\"data_creazione, data_modifica, data_cancellazione\", \"from d_notifica_priorita\" })\n\t@Results({ @Result(column = \"priorita_id\", property = \"prioritaId\", jdbcType = JdbcType.INTEG... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
overridden method, returns a move based on difficulty | @Override
public Point resolveMove(Point point) {
if (difficulty == 0) {
return difficulty0();
}
else if(difficulty == 1){
return difficulty1();
} else if (difficulty == 2) {
return difficulty2();
}
return new Point(-1, -1);
} | [
"@Override\n public Move move() {\n\n MoveManager tmpMove;\n MoveManager bestMove = null;\n double alpha = Double.NEGATIVE_INFINITY;\n double beta = Double.POSITIVE_INFINITY;\n\n int depth; // for minimax search\n\n if (this.gameBoard.getPlayerHLocations().size() <= 2 &&... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "entryRuleXorOpExp" $ANTLR start "ruleXorOpExp" InternalDOcl.g:1257:1: ruleXorOpExp returns [EObject current=null] : (this_OrOpExp_0= ruleOrOpExp ( () ( (lv_name_2_0= ruleXorOperator ) ) ( (lv_target_3_0= ruleOrOpExp ) ) ) ) ; | public final EObject ruleXorOpExp() throws RecognitionException {
EObject current = null;
EObject this_OrOpExp_0 = null;
AntlrDatatypeRuleToken lv_name_2_0 = null;
EObject lv_target_3_0 = null;
enterRule();
try {
// InternalDOcl.g:1263:2: ( (this_OrOpE... | [
"public final EObject entryRuleXorOpExp() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleXorOpExp = null;\n\n\n try {\n // InternalDOcl.g:1250:49: (iv_ruleXorOpExp= ruleXorOpExp EOF )\n // InternalDOcl.g:1251:2: iv_ruleXorOpExp= ruleXorOpExp EOF... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the first user rank in the ordered set where uuid = &63; and companyId = &63;. | public static UserRank fetchByUuid_C_First(
String uuid, long companyId,
OrderByComparator<UserRank> orderByComparator) {
return getPersistence().fetchByUuid_C_First(
uuid, companyId, orderByComparator);
} | [
"public static List<UserRank> findByUuid_C(String uuid, long companyId) {\n\t\treturn getPersistence().findByUuid_C(uuid, companyId);\n\t}",
"public static UserRank findByUuid_C_First(\n\t\t\tString uuid, long companyId,\n\t\t\tOrderByComparator<UserRank> orderByComparator)\n\t\tthrows User.Rank.Poisition.Service... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method tries to provide KingdomKey.ALGORITHM_RNG random number generator (RNG). If not available it returns first RNG found among other providers. If no RNG found it returns Java default RNG. | private static SecureRandom getSecureRandom() {
SecureRandom random = new SecureRandom();
try {
random = SecureRandom.getInstance(KingdomKey.ALGORITHM_RNG);
} catch (NoSuchAlgorithmException e) {
log.severe("Yubikey: Preferred " + KingdomKey.ALGORITHM_RNG + " algorithm is... | [
"cl.nic.siiDte.TedBarcodeDocument.TedBarcode.TED.DD.CAF.DA.RNG getRNG();",
"public final Random getDefaultRNG()\r\n\t{\r\n\t\treturn new MersenneTwisterRNG();\r\n\t}",
"private static SecureRandom method_788() {\n try {\n return SecureRandom.getInstance(\"SHA1PRNG\");\n } catch (NoSuchA... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Find all posts for type. | PaginatedSearchResponseModel findAllPostsForType(String type, Pageable page); | [
"public List<Post> getAllPosts();",
"public Collection<Entry> entries(final String type) {\n return findAll(this.entries.values(), new Filter<Entry>() {\n @Override\n public boolean accept(final Entry it) {\n return it.type.name.equals(type);\n }\n });... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Update the medal progress. | private void updateMedalProgress(String medal) {
trUpdateMedalProgress.setUser(user);
trUpdateMedalProgress.setMedalName(medal);
trUpdateMedalProgress.execute();
} | [
"private void updateProgressBar() {\n\t\tdouble current = model.scannedCounter;\n\t\tdouble total = model.fileCounter;\n\t\tdouble percentage = (double)(current/total);\n\t\t\n\t\t//Update Progress indicators\n\t\ttxtNumCompleted.setText((int) current + \" of \" + (int) total + \" Completed (\" + Math.round(percent... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional .alluxio.proto.journal.UpdateInodeDirectoryEntry update_inode_directory = 33; | public alluxio.proto.journal.File.UpdateInodeDirectoryEntry getUpdateInodeDirectory() {
if (updateInodeDirectoryBuilder_ == null) {
return updateInodeDirectory_;
} else {
return updateInodeDirectoryBuilder_.getMessage();
}
} | [
"alluxio.proto.journal.File.UpdateInodeDirectoryEntry getUpdateInodeDirectory();",
"public alluxio.proto.journal.File.UpdateInodeDirectoryEntryOrBuilder getUpdateInodeDirectoryOrBuilder() {\n return updateInodeDirectory_;\n }",
"public Builder setUpdateInodeDirectory(alluxio.proto.journal.File.UpdateIno... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GET /peopleroles/:id : get the "id" peopleRole. | @GetMapping("/people-roles/{id}")
@Timed
public ResponseEntity<PeopleRole> getPeopleRole(@PathVariable Long id) {
log.debug("REST request to get PeopleRole : {}", id);
PeopleRole peopleRole = peopleRoleService.findOne(id);
return ResponseUtil.wrapOrNotFound(Optional.ofNullable(peopleRole... | [
"@GetMapping(\"/people-roles\")\n @Timed\n public List<PeopleRole> getAllPeopleRoles() {\n log.debug(\"REST request to get all PeopleRoles\");\n return peopleRoleService.findAll();\n }",
"public SecRole getRoleById(Long role_Id);",
"public String getRole(int id) {\r\n return super.getR... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Maps geofence transition types to their humanreadable equivalents. | private String getTransitionString(int transitionType) {
switch (transitionType) {
case Geofence.GEOFENCE_TRANSITION_ENTER:
return "entered";
case Geofence.GEOFENCE_TRANSITION_EXIT:
return "exited";
default:
return "unknown";... | [
"private String getTransitionString(int transitionType) {\n switch (transitionType) {\n case Geofence.GEOFENCE_TRANSITION_ENTER:\n return \"Entered\";\n case Geofence.GEOFENCE_TRANSITION_EXIT:\n return \"Exited\";\n default:\n retu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the advertisement of the server providing this response. | public RdvAdvertisement getServerAdv() {
return serverAdv;
} | [
"public String getAdvert() {\n return advert;\n }",
"@Nullable\n public String getAdvertisement() {\n return myCompletionAdvertisement;\n }",
"Advertisement getAdvertisementById(int id);",
"public java.lang.String getAdvertiseId() {\n java.lang.Object ref = advertiseId_;\n if (!(r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set raw offset of this token. | public final void setRawOffset(int rawOffset) {
// if (rawOffset < -1) { // -1 is default value
// throw new IllegalArgumentException("Invalid rawOffset=" + rawOffset);
// }
this.rawOffset = rawOffset;
} | [
"void setRawOffset(int rawOffset);",
"void xsetRawOffset(org.apache.xmlbeans.XmlInt rawOffset);",
"protected abstract void setElementRawOffset(E elem, int rawOffset);",
"public void setOffset(int num) {\n offset = num;\n }",
"public void setOffset(int offset) {\r\n currOffset = offset;\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This class is a DAOservice for userdocs. | public interface UserDocDAO {
/**
* This method persist an userdoc. The maximum of userdoc for an user is 5.
*/
public boolean store(UserDoc userdoc);
/**
* Select the count of userdocs for an user.
*/
public int getCount(String username);
/**
* This method deletes an userdoc by the prima... | [
"public interface TitlesDao {\r\n\r\n /**\r\n * Get a list of Titles\r\n *\r\n * @return a list of Title\r\n */\r\n List<Title> view();\r\n\r\n /**\r\n * A count of the Title table\r\n *\r\n * @return int value representing the count of the table\r\n */\r\n int viewCount(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is used to get all lectures from DB. | @GetMapping
public ResponseEntity<List<Lecture>> getAllLectures() {
List<Lecture> lectures = (List<Lecture>) this.lectureDao.findAll(sortByIdAsc());
if (lectures.isEmpty()) {
return new ResponseEntity<>(HttpStatus.NOT_FOUND);
}
return new ResponseEntity<>(lectures, HttpSt... | [
"public List<Lecture> getAllLectures() {\n return lectureRepository.findAll();\n }",
"public List<Lecture> getAllLectures() {\t\n\t\t//Getting the list\n\t\tArrayList<Lecture> list = new ArrayList<>();\n\t\tfor (Lecture lecture : lecture_Map.values()) {\n\t\t\tlist.add(lecture);\n\t\t}\n\t\tif (list.siz... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates other Parameters that the mean or stdDev depends upon, such as the Component or StdDevType parameters. | protected void initOtherParams() {
// init other params defined in parent class
super.initOtherParams();
// the Component Parameter
// first is default, the rest are all options (including default)
componentParam = new ComponentParam(Component.AVE_HORZ, Component.AVE_HORZ,
Component.RANDOM_HORZ, Compone... | [
"protected void initOtherParams() {\n\n // init other params defined in parent class\n super.initOtherParams();\n\n // the Component Parameter\n // first is default, the rest are all options (including default)\n componentParam = new ComponentParam(Component.AVE_HORZ, Component.AVE_HORZ);\n\n // t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the pcmsys__Distribute_GP__c value for this Pcmsys__Journal_Entries__c. | public java.lang.Boolean getPcmsys__Distribute_GP__c() {
return pcmsys__Distribute_GP__c;
} | [
"public void setPcmsys__Distribute_GP__c(java.lang.Boolean pcmsys__Distribute_GP__c) {\n this.pcmsys__Distribute_GP__c = pcmsys__Distribute_GP__c;\n }",
"public java.lang.Boolean getPcmsys__Distribute_LP__c() {\n return pcmsys__Distribute_LP__c;\n }",
"public java.lang.String getDistribution... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
calculate the length of all children. | public int getLengthOfChildren() {
int length = 0;
IBiNode childTmp;
if (this.child != null) {
// length of first child
length += this.child.getLength();
childTmp = this.child.getSibling();
while (childTmp != null) {
// length of ... | [
"int childrenSize();",
"public int numChildren()\r\n\t{\r\n\t\treturn children.size();\r\n\t}",
"public int numberOfChildren() {\n\t\tif(children == null) return 0;\n\t\telse return children.size();\n\t}",
"public int childLen() { return childLen; }",
"public int getNumberOfChildren() {\n \t\n ret... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the result size. | public int getResultSize() {
return this.resultSize;
} | [
"public String numResults() {\n\t\tif (this.size == null) {\n\t\t\tparseProductCount();\n\t\t}\n\t\treturn this.size;\n\t}",
"public java.lang.Integer getMaximumResultSize()\r\n {\r\n return this.maximumResultSize;\r\n }",
"public long getMaxResultSize() {\n return maxResultSize_;\n }",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes a snippet from the documentation (and the repository) | @Override
public void removeSnippet(String id) {
log.info("Removing snippet " + id + " from repository");
Snippet snippet = snippets.get(id);
snippets.remove(id);
File[] files = snippet.getFiles(getSnippetsDirectory());
versionControl.remove(files, true, f... | [
"boolean unlinkFromSnippet(Tag t, Snippet s, User u);",
"public void removeEditDocumentationPage()\r\n {\r\n getSemanticObject().removeProperty(swpres_editDocumentationPage);\r\n }",
"public Documentation removeDocumentation(int index)\n {\n return (Documentation)_objDocumentation.remove(index)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts System ID URL (starting from file:) into file name. | private String systemId2fileName(String systemId)
{
if (systemId.startsWith(START_FILESCHEMA))
{
// Unix: file:/home/smth
// Windows: file:///D:\home\smth
systemId = systemId.replace(File.separatorChar, '/');
systemId = systemId.substring(START_... | [
"static String getFileNameFromFileUrl( final String url ) {\n\n\t\tString name = url.substring( url.lastIndexOf('/') + 1 );\n\t\tint index = name.lastIndexOf( '?' );\n\t\tif( index > 0 )\n\t\t\tname = name.substring( 0, index );\n\t\telse if( index == 0 )\n\t\t\tname = name.substring( 1 );\n\n\t\treturn name.replac... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
En toString metode som returnerer en String av regNr. | public String toString() {
return "\n\nDenne bilen har registreringnummer: " + regNr;
} | [
"@Override\n public String toString(){\n return \"R\"+getNumeroRegla()+\": \"+getCondicion()+\" --> \"+getAccion();\n }",
"@Override\n\tpublic String toString() {\n\t\treturn \"\"+RegName.values()[id];\n\t}",
"public java.lang.String getRegNumber() {\r\n return regNumber;\r\n }",
"public java.l... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Identifier of the line item (generally it is a sequence number 01, 02, 03, ...) | @Schema(description = "Identifier of the line item (generally it is a sequence number 01, 02, 03, ...)")
@NotNull
public String getId() {
return id;
} | [
"String getInvoiceItemSeqId();",
"String getOrderItemSeqId();",
"String getShipmentItemSeqId();",
"public int getLineItemNumber()\n {\n return lineItemNumber;\n }",
"public int getLineID()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Ensures the internal buffer has enough free slots to store expectedAdditions. Increases internal buffer size if needed. | protected void ensureBufferSpace(int expectedAdditions)
{
throw new UnsupportedOperationException(lengthChangeError);
} | [
"protected void ensureBufferSpace(int expectedAdditions) {\n final int bufferLen = (buffer == null ? 0 : buffer.length);\n if (elementsCount + expectedAdditions > bufferLen) {\n final int newSize = resizer.grow(bufferLen, elementsCount, expectedAdditions);\n assert newSize >= ele... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter method for the COM property "PrintTitles" | @VTID(97)
boolean getPrintTitles(); | [
"public String getTitles() {\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\r\n\t\tif (StringUtils.isNotEmpty(getTitleBefore())) {\r\n\t\t\tsb.append(getTitleBefore());\r\n\t\t}\r\n\t\tif (StringUtils.isNotEmpty(getTitleAfter())) {\r\n\t\t\tif (sb.length() > 0) sb.append(\", \");\r\n\t\t\tsb.append(getTitleAfte... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new BlockControlLabel that controls the given block that corresponds to blockID this must be added to the block by the method creating this Label. | BlockControlLabel(long blockID) {
this.blockID = blockID;
setFont(new Font("Courier", Font.BOLD, 14));
setForeground(Color.BLACK);
setBorder(BorderFactory.createEmptyBorder());
setOpaque(false);
setHorizontalAlignment(SwingC... | [
"public BlockIF newBlock(String label, SourceIF text) {\n\t\tif (text == null)\n\t\t\tthrow new NullPointerException(\"The argument text cannot be null\");\n\t\treturn new Block(label, text);\n\t}",
"@Override\n public void setBlockId(String blockId) {\n }",
"public Block(int id)\n {\n this.id =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the pattern metric | public void setPatternMetric(String patternMetric) {
patternMetricName = patternMetric;
this.pm = PatternMetricFactory.getPatternMetric(patternMetric, corpus, termPairSet);
pm.setAlpha(alpha);
} | [
"public void setPattern(String pattern);",
"public void setPattern(Pattern pattern) {\n this.pattern = pattern;\n }",
"public String setPattern(String pattern) {\r\n return vFormatter.setPattern(pattern);\r\n }",
"public void setPattern(String pattern){\n _patternObj = Pattern.compile(pattern); ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |