query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Return true if the class is an inner class. Equivalent to kind() == MEMBER || kind() == LOCAL || kind() == ANONYMOUS. | boolean isInner(); | [
"boolean isInnerClass();",
"public boolean isInnerClass() {\n return this.reflection().isInnerClass();\n }",
"public boolean isInnerClass() {\r\n\t\treturn type.components().size() > 1;\r\n\t}",
"boolean hasEnclosingInstance(ClassType encl);",
"boolean hasEnclosingInstanceImpl(ClassType en... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
System.setProperty("org.apache.activemq.SERIALIZABLE_PACKAGES","java.util, java.lang,br.com.caelum.modelo"); para permitir todos os pacotes | public static void main(String[] args) throws Exception {
System.setProperty("org.apache.activemq.SERIALIZABLE_PACKAGES","*");
InitialContext context = new InitialContext();
ConnectionFactory factory = (ConnectionFactory) context.lookup("ConnectionFactory");
Connection connection = fact... | [
"private void setup(){\n\t\t\n\t\ttry {\n\t\t\tcontext = UrlLoader.getContext();\t\t\t\n\t\t\tjmsContext= ((ConnectionFactory) context.lookup(\"java:comp/DefaultJMSConnectionFactory\")).createContext();\n\t\t\tURLQueue = (Queue) context.lookup(\"URLQueue\");\n\t\t\tjmsProducer = jmsContext.createProducer();\n\n\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns list of orders which are currently open against a billing account | public static List<GenericValue> getBillingAccountOpenOrders(Delegator delegator, String billingAccountId) throws GenericEntityException {
return EntityQuery.use(delegator).from("OrderHeader")
.where(EntityCondition.makeCondition("billingAccountId", EntityOperator.EQUALS, billingAccountId),
... | [
"List<Order> getActiveOrders ();",
"private List<Order> getActiveOrders() {\n\t\tList<Order> list = OrderDb.retrieveAllItem();\n\n\t\tif (list == null || list.size() < 1) {\n\t\t\treturn Collections.emptyList();\n\t\t}\n\t\tList<Order> activeList = new ArrayList<Order>();\n\t\tfor (Order item : list) {\n\t\t\tif ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this method is used to intersect each month's telephone set | private Set<String> intersection(List<Set<String>> cacheList){
// 所有月份的电话号码(交集)
Set<String> interTels = null;
if (cacheList.size()==1){
interTels = cacheList.get(0);
}else if (cacheList.size() > 1){
interTels = new HashSet<String>(CollectionUtils.intersection(cach... | [
"private void initializeMonthlyAppts(List<Appointment> sortedAppts) {\n LocalDateTime min = sortedAppts.get(0).getStart();\n LocalDateTime max = sortedAppts.get(sortedAppts.size()-1).getEnd();\n List<LocalDate> monthsBetween = new ArrayList<>();\n LocalDate temp = LocalDate.of(min.getYea... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Accessor that sets the number of gridlines for paint. | public void setNumberOfXGridLines(int xGrid) {xGridLines = xGrid;} | [
"public int getNumberOfXGridLines() {return xGridLines;}",
"public int getNumberOfYGridLines() {return yGridLines;}",
"public void setNumberOfYGridLines(int yGrid) {yGridLines = yGrid;}",
"final public int getYMajorGridLineCount()\n {\n return ComponentUtils.resolveInteger(getPropert... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
If enabled then processing each split messages occurs concurrently. Note the caller thread will still wait until all messages has been fully processed, before it continues. It's only processing the sub messages from the splitter which happens concurrently. When parallel processing is enabled, then the Camel routing eng... | public SplitDefinition parallelProcessing(boolean parallelProcessing) {
return parallelProcessing(Boolean.toString(parallelProcessing));
} | [
"public SplitDefinition parallelProcessing() {\n return parallelProcessing(true);\n }",
"@Override\n public void configure() {\n from(\"direct:processCSV\")\n //Unmarshal CSV files. The resulting message contains a List<List<String>>\n .unmarshal().csv()\n //Split th... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the color the player two selected. | public String getPlayerTowColor(){
return playerTwoColor;
} | [
"public static String getPlayerTwoColor() { \r\n return PLAYER_TWO_COLOR;\r\n }",
"public Color getColorPlayerTwo() {\n return colorPlayerTwo;\n }",
"public String getPlayer2Color() {\r\n return this.player2Color;\r\n }",
"HantoPlayerColor currentColor();",
"HantoPlayerColor getColor... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
because the list of features we might calculate can change, we also store in a hash map to make it simpler to collectively pass information | public void buildFeatureSet(){
featureSet=new HashMap();
featureSet.put("preRNA_sequence", this.getSeq());
featureSet.put("preRNA_structure", this.getStructureStr());
featureSet.put("preRNA_energy", this.getEnergy());
featureSet... | [
"private static Map<String, FeatureType> buildAvailableFeatureMap(List<FeatureType> features){\r\n\t\tMap<String, FeatureType> featureMap = new HashMap<String, FeatureType>();\r\n\t\tfor(FeatureType feature : features){\r\n\t\t\tfeatureMap.put(feature.getExternalId(), feature);\r\n\t\t}\r\n\t\treturn featureMap;\r\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Launches the application with entry point defined in properties and no main arguments. Note: this launch method is applicable only when properties have been set to determine entry point method and class. | public static void launchApplication() {
withMainArgs().launchApplication();
} | [
"private void launch() {\r\n\t\tfinal Class<?> mainClass = getMainClass();\r\n\t\tfinal Method mainMethod = getMainMethod(mainClass);\r\n\r\n\t\ttry {\r\n\t\t\tmainMethod.invoke(null, (Object) mainArgs); // new String[0] by default\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t\tthrow new AssertionError(e);\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
set a list of connectors of the element | public void setConnectors(List<Connector> connectors) {
Connectors = connectors;
} | [
"public Vector getConnectors();",
"T setConnections(Collection<V> connections);",
"public void relocateAllConnectors() {\n connectorModel.relocateLeftConnector();\n connectorModel.relocateRightConnector();\n connectorModel.relocateTopConnector();\n connectorModel.relocateBottomConnec... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Verifies if name is unique in Directory | private void checkFileUnique(String name) {
if(hasFile(name)) throw new FileExistsException(name);
} | [
"abstract public boolean isUniqueName ();",
"private boolean alreadyExists(Directory dir, String name)\r\n {\r\n String[] dirNames = dir.getDirectoryNames();\r\n String[] fileNames = dir.getFileNames();\r\n for (String d: dirNames)\r\n {\r\n if(d.equals(name))\r\n {\r\n return true;\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
marks project as needing rebuild | public final void markProjectForRebuild() {
forceNonIncremental = true;
// rbLogic.forceNonIncremental();
} | [
"public void projectBuildDirChanged() { }",
"private void continueRebuilding() {\n PackagerBuilder.rebuild (recompiledWhenRebuilding, toBeAddedWhenRebuilding, toBeRemovedWhenRebuilding,\n initDir,userDir,rebuildTmpDir, rebuildTarget, \n processDialog, outputArea, tabbedPanel,frame);\n }",
"pr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the X for given char index. | public double getXForCharIndex(int charIndex)
{
// Weirdo
if (charIndex < 0) {
double charX = getX();
double charsW = getWidthForLineRange(_startCharIndex + charIndex, _startCharIndex, false);
return charX - charsW;
}
// Normal version
dou... | [
"public char getChar(int index);",
"public char charAt(int index);",
"private static char getCharFromIndex(int index) {\n\t\treturn charIndex.get(index);\n\t}",
"public char charAt(int index) {\r\n\t\treturn source.toString().charAt(begin+index);\r\n\t}",
"short getCharIndex();",
"private int findIndex(ch... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
drop th epiece in any gven column at appropriate place as per the game req | public void dropPieces(int column, char gamePiece) {
int row = 0;
column = column - 1;
// System.out.println(column+"see the value");
if (column >= 0 && column < sizeBoard[1]) {
// this explores from boton to up n finds first empty place to fill
// with the piece.
while (row < sizeBoard[0]) {
if (C... | [
"public boolean drop(int column, int player) {\n //check for vetoed column, reset veto if necesary\n if (column == veto) return false;\n if (vetocount > 0) {\n --vetocount;\n if (vetocount == 1) veto = -1;\n }\n for (int i = 4; i >= 0; i--) {\n if ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Takes the scheme specific part of a servlet service URI (the scheme is the responsibilty of the ServletSource) and resolve it with respect to the servlets mount point. | public URI absolutizeURI(URI uri) throws URISyntaxException {
String servletServiceName = uri.getScheme();
ServletServiceContext servletServiceContext;
if (servletServiceName == null) {
// this servlet service
servletServiceContext = this;
} else {
// ... | [
"protected abstract URL resolve(NamespaceId namesapace, String resource) throws IOException;",
"public MountPoint resolveMountPoint(String url);",
"public URI getInitialContextURL(ServerInfo serverInfo, String serviceName) throws URISyntaxException, MalformedURLException {\n\t\tString\tscheme = null,\n\t\t\t\td... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reads in a vector from the line. Index shows which index the vector length is given. | public double[] readVector(String line, int index) {
String[] list = line.split(" ");
int numColumns = Integer.parseInt(list[index]);
double[] res = new double[numColumns];
int num = index + 1;
for (int j = 0; j < numColumns; j++) {
res[j] = Double.parseDouble(list[... | [
"static public DoubleList readVector(BufferedReader reader) throws IOException {\r\n int dim = Integer.parseInt(reader.readLine());\r\n DoubleList vector = new DoubleArrayList(dim);\r\n for (int i = 0; i < dim; i++) {\r\n double v = Double.parseDouble(reader.readLine());\r\n vector.add(v);\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
calcula las habitaciones que tiene ese hotel | public ArrayList<HabitacionHotel> Estancias() {
ArrayList<HabitacionHotel> habitaciones = new ArrayList<HabitacionHotel>();
int codigo = miModelo.reservaHotel.getHotelReservado().getCod_hotel();
try {
habitaciones =miModelo.misFuncionesHotel.leerHabitaciones(codigo);
} catch (SQLException... | [
"public void ReservaEfetivadas () {\n Date hoje = new Date ();\n for (int z = 0; z < vecReserva.size(); z++) {\n if (((int) ((((entReserva)vecReserva.elementAt(z)).getDatain().getTime() - (hoje.getTime())) / 86400000L)) == 0){// Reserva será relaizada hj\n if (((entReserva)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts a string representation of a resource to an object. | public static Resource fromString(final String str) {
final String[] values = str.split(" ");
return new Resource(Integer.parseInt(values[0]), Double.parseDouble(values[1]), Double.parseDouble(values[2]),
Double.parseDouble(values[3]), Double.parseDouble(values[4]));
} | [
"private static OSecurityResource getResourceFromString(String resource) {\n return OSecurityResource.getInstance(resource);\n }",
"Object deserialize(String string);",
"private static Resource parseResource(String value) {\n if (value.startsWith(\"http://\")) {\n return new ExternalResour... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the type of the Comment. The commentType argument may be null. | public void setCommentType(CommentType commentType) {
this.commentType = commentType;
} | [
"public void setCommentType(Integer commentType) {\r\n this.commentType = commentType;\r\n }",
"public void setComment(Address address, int commentType, String comment);",
"public void resetCommentType() {\n commentType = null;\n }",
"public CommentType getCommentType() {\n return c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
string captchaToken = 12; | public com.google.protobuf.ByteString
getCaptchaTokenBytes() {
java.lang.Object ref = captchaToken_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
captchaTok... | [
"java.lang.String getCaptchaToken();",
"public java.lang.String getCaptchaToken() {\n java.lang.Object ref = captchaToken_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
signature of the message optional bytes signature = 2; | com.google.protobuf.ByteString getSignature(); | [
"com.google.protobuf.ByteString getSignatureS();",
"com.google.protobuf.StringValue getSignature();",
"com.google.protobuf.StringValueOrBuilder getSignatureOrBuilder();",
"com.google.protobuf.ByteString getSignatureR();",
"public String GetSignature() {\r\n\t\treturn messageSignature;\r\n\t}",
"java.lang.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Envio de comando para porta 37Ah, geracao do Chip Select para o registro permanente de dados | public void envioComando() {
portaParalela.Addr = 0x37A; // bit 0, NL1, 0X37A
portaParalela.datum = 0x0E; // CUIDADO COM OS OUTROS BITS
portaParalela.writeData();
portaParalela.datum = 0x0F;
portaParalela.writeData();
portaParalela.datum = 0x0E;
portaParalela... | [
"public void sendSerLcdCmdFlag() throws IOException { \n\t\tthis.sendByte(0x7C);\n\t}",
"private void selectISOCard() throws CardTerminalException {\n\n byte[] SelectIsoRequest = new byte[] { (byte)0x17,(byte)0x02};\n byte[] response = null;\n\n try {\n\n response = protocol.transmit(HOST_ID, TERMIN... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
seleccionar los del mes Devuelve la cantidad de alertas del sistema con un rango de 8 dias de caducidad | public int ultimasAlertasDelSistema(Connection conn) {
int cantidad = 0;
try {
PreparedStatement statement = conn
.prepareStatement("select"
+ " count(ID_ALERTA)"
+ " from alertas "
+ " where fecha_fin "
+ " BETWEEN DATE_SUB(CURRENT_DATE(), INTERVAL 8 DAY) AND CURRENT... | [
"void seleccionarEmisora(int boton);",
"private int diasMes(int meses, int anyos) {\r\n int[] diasDelMes = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\r\n if (meses == 2 && bisiesto()) {\r\n diasDelMes[1] = 29;\r\n }\r\n return diasDelMes[meses - 1];\r\n }",
"private int getTipoReinscrip... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Formats the given region with the strategy registered for the default content type. The strategy is informed about the start, the process, and the termination of the formatting session. | private void formatRegion(final IRegion region) {
final IFormattingStrategy strategy = getFormattingStrategy(IDocument.DEFAULT_CONTENT_TYPE);
if (strategy != null) {
strategy.formatterStarts(getIndentation(region.getOffset()));
format(strategy, new TypedPosition(region.getOffset... | [
"private void formatPartitions(final IRegion region) {\n\n addPartitioningUpdater();\n\n try {\n\n final TypedPosition[] ranges = getPartitioning(region);\n if (ranges != null) {\n start(ranges, getIndentation(region.getOffset()));\n format(ranges);\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the number of DeltaWye transformations contained in the specified reduction sequence. | public int deltaWyeCount(List<String> sequence); | [
"public int wyeDeltaCount(List<String> sequence);",
"public int num_reductions() {return _num_reductions;}",
"int wkhtmltoimage_phase_count(PointerByReference converter);",
"int getNumLayersBeforePredictor();",
"public static int getAmountOfTransformationStages() {\n return 6;\n }",
"int getDura... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reads the number of records header from the file. | protected int readNumRecordsHeader() throws IOException {
file.seek(NUM_RECORDS_HEADER_LOCATION);
return file.readInt();
} | [
"public long getSizeOfHeaders()\n throws IOException, EndOfStreamException\n {\n return peFile_.readUInt32(relpos(Offsets.SIZE_OF_HEADERS.position));\n }",
"public long getNumberOfRecords() throws IOException\n {\n return studentFile.length() / RECORD_SIZE;\n }",
"public int getNumHeaderByt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get operation type list. | public List<OperationType> getOperationTypeList() {
List<OperationType> operationType = new ArrayList<OperationType>();
try{
init();
// Start UOC
OperationTypeDao operationTypeDao = new OperationTypeDao(conn);
operationType = ... | [
"public String getOperationType();",
"java.util.List<yandex.cloud.api.operation.OperationOuterClass.Operation> \n getOperationsList();",
"public Class<T> getSupportedOperationType();",
"List<CmdType> getSupportedTypes();",
"ListIterable<Operation<Handler>> getOperations();",
"Collection getOperatio... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the connectionString property: The connection string. Type: string, SecureString or AzureKeyVaultSecretReference. | public Object connectionString() {
return this.innerTypeProperties() == null ? null : this.innerTypeProperties().connectionString();
} | [
"public String connectionString() {\n return this.innerProperties() == null ? null : this.innerProperties().connectionString();\n }",
"public String getConnectionString()\n\t{\n\t\treturn connectionString;\n\t}",
"public String connectionString() {\n return this.connectionString;\n }",
"pu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Implements a forEach() method for lists using a Consumer for the behaviour. | public static <T> void forEach(List<T> list, Consumer<T> c) {
for (T t : list) {
c.accept(t);
}
} | [
"public void forEach(Consumer<Fn> fnConsumer);",
"@Override\n public void forEach(Consumer<? super T> action) {\n items.forEach(action);\n }",
"public void forEach(Consumer<T> consumer) {\n collected.forEach(consumer);\n }",
"default void forEach(VectorElementConsumer consumer) {\n i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
set the Value for the given timestamp | public void setValue(ValueType value, Date timeStamp) {
setValue(-1, value, timeStamp);
} | [
"public void set(Timestamp value)\n\t{\n\t\tSimpleDateFormat fmt = (SimpleDateFormat) Application.getInstance().get(\"timeformatobj\") ;\n\t\t\n\t\t//Convert the value\n\t\tString temp = fmt.format(value) ;\n\t\t\n\t\t//Set the value\n\t\tset(temp) ;\n\t}",
"public void setTimestamp(long value) {\n this.timest... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Run the void merge(Account) method test. | @Test
public void testMerge_2()
throws Exception {
SimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();
fixture.setSimpleRoles(new HashSet());
Account otherAccount = new SimpleAuthorizingAccount();
fixture.merge(otherAccount);
// add additional test code here
} | [
"@Test\n\tpublic void testMerge_1()\n\t\tthrows Exception {\n\t\tSimpleAuthorizingAccount fixture = new SimpleAuthorizingAccount();\n\t\tfixture.setSimpleRoles(new HashSet());\n\t\tAccount otherAccount = new SimpleAuthorizingAccount();\n\n\t\tfixture.merge(otherAccount);\n\n\t\t// add additional test code here\n\t}... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks whether the 'VALID_SHOW_IND' field has been set. | public boolean hasVALIDSHOWIND() {
return fieldSetFlags()[33];
} | [
"public org.LNDCDC_NCS_TCS.SHOWS.apache.nifi.LNDCDC_NCS_TCS_SHOWS.Builder setVALIDSHOWIND(java.lang.CharSequence value) {\n validate(fields()[33], value);\n this.VALID_SHOW_IND = value;\n fieldSetFlags()[33] = true;\n return this;\n }",
"public java.lang.CharSequence getVALIDSHOWIND() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Allocate a new stack chunk. | int newStackChunk(int minsize) {
int size = minsize;
int chunk;
if (getVeryExcessiveGCEnabled() == false && size < REGULAR_CHUNK_SIZE) {
size = REGULAR_CHUNK_SIZE;
}
chunk = newArray(getClassFromCNO(CNO.LOCAL_ARRAY), size);
if (chunk != 0) {
incSta... | [
"public Chunk allocate(int bytes) throws Exception;",
"private void createNewStack(){\n\t\taltStack = new ImageStack(width, height);\n\t\t\n\t\tfor(int i = 1 ; i <= depth ; i++){\n\t\t\tbyte[] slice = new byte[height * width];\n\t\t\tSystem.arraycopy(raw, (i-1) * height * width, slice, 0, height * width);\n\t\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method returns the first initial of the first name followed by a dot, space, and then the last name. Example: fName = "George", lName = "Pearson", output = "G. Pearson" | public String getFormattedName() {
return getFirstNameInitial() + ". " + getLastName();
} | [
"public final String getNameFirst()\n\t{\n\t\treturn nameFirst;\n\t}",
"public String getEnFirstName(){\n\n String[] fullName = getEn_name().split(\" \");\n String charaName = fullName[1];\n\n return charaName;\n }",
"public void getFirstAndLastName( String name ){//\r\n String na... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Given a string when valid i ds are contained then return the first valid id. | @Test
@DisplayName("ExtractID should return the first valid ID from a string with multiple concatenated valid IDs")
void givenAStringWhenValidIDsAreContainedThenReturnTheFirstValidID() {
String test = "u11111111u22222222";
assertEquals("u11111111", Util.extractId(test),
"ID retur... | [
"@Test\n @DisplayName(\"ExtractID should return the first valid ID from a String with multiple concatenated IDs\")\n void givenAStringWhenValidAndInvalidIDsAreContainedThenReturnTheFirstValidID() {\n String test = \"u12345678u123\";\n assertEquals(\"u12345678\", Util.extractId(test),\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This will update the pizza detail, as provided | void update(Pizza pizza); | [
"public void editPizza(String pizza_name, int pizza_price, int id)\n\t{\n\t\tString sql = \"UPDATE PIZZA SET pizza_name = ?, pizza_price = ? WHERE pizza_id = ?;\";\n\t\tgetJdbcTemplate().update(sql, new Object[] { pizza_name, pizza_price, id });\n\t}",
"public void addPizza(Pizza pizza) {\r\n OrderedItem i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the lich chi tiet ID of this lich chi tiet. | public long getLichChiTietId(); | [
"public long getYeuCauGiaiTrinhId();",
"@Override\r\n\tpublic long getId() {\r\n\t\treturn _tthcBieuMauHoSo.getId();\r\n\t}",
"@Override\n\tpublic long getId() {\n\t\treturn _cholaContest.getId();\n\t}",
"@Override\n\tpublic int getId() {\n\t\treturn _keHoachKiemDemNuoc.getId();\n\t}",
"@Override\n\tpublic ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
remembers and animates the last viewed inner graph fragment | public void pageSelected() {
if (lastChildFragmentShown == 0) {
((PieChartFragment) fragments[0]).animateChart();
}
else if (lastChildFragmentShown == 1) {
((BarChartFragment) fragments[1]).animateChart();
}
} | [
"@Override\r\n \tpublic void postUpdate()\r\n \t{\t\t\r\n \t\tsuper.postUpdate();\r\n \t\tupdateAnimation();\r\n \t}",
"@Override\n protected void finalRender() {\n finishTraversalAnimation();\n placeTreeNodes();\n placeNodesAtDestination();\n render();\n\n }",
"private void se... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor to create a new featurePath object with a given featurePath string. | public FeaturePath_impl(String featurePath) {
this.featurePathString = featurePath;
this.featurePathElementNames = new ArrayList<String>();
this.featurePathElements = null;
} | [
"public Feature(String name) {\n\t\tthis(name.split(\"\\\\.\"));\n\t}",
"public TokenizedPath(String path) {\n this(path, SelectorUtils.tokenizePathAsArray(path));\n }",
"public void initialize(Type type) throws RegexAnnotatorConfigException {\n\n // initialization must only be done if a featureP... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get OS specific extra JVM parameters string | public static String getOSExtraVMParams()
{
final String os = SystemUtil.getOSNameId();
// we have different default extra VM parameters depending OS
if (os.equals(SystemUtil.SYSTEM_WINDOWS))
return prefGeneral.get(ID_OS_EXTRA_VMPARAMS + SystemUtil.SYSTEM_WINDOWS, "-Dsun.j... | [
"public static String getOSExtraVMParams()\r\n {\r\n final String os = SystemUtil.getOSNameId();\r\n\r\n // we have different default extra VM parameters depending OS\r\n if (os.equals(SystemUtil.SYSTEM_WINDOWS))\r\n return preferences.get(ID_OS_EXTRA_VMPARAMS + SystemUtil.SYSTEM_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the border radius at the given corner | public float getBorderRadius(Corner corner) {
switch (corner) {
case TOP_LEFT:
return borderRadius.x;
case TOP_RIGHT:
return borderRadius.y;
case BOTTOM_LEFT:
return borderRadius.z;
case BOTTOM_RIGHT:
... | [
"int getCornerRadius();",
"int getDefaultCornerRadius();",
"public Vector4f getCornerRadius() {\n return cornerRadius;\n }",
"private float helperGetBorderRadius() {\n if(!mBorder)\n return 0;\n return mTheme.borderRadius;\n }",
"int getCorner();",
"public float getTo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets account number format. | public String getAccountNumberFormat() {
return accountNumberFormat;
} | [
"java.lang.String getAccountNumber();",
"public java.lang.String getAccountNumberString()\r\n\t{\r\n\t\t\r\n\t}",
"int getFormat();",
"public String getAccountNumber() {\n\t\tthis.setAccountNumber(this.account);\n\t\treturn this.account;\n\t}",
"public String getAccountInfo(){\n NumberFormat currency... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this method send a request to server , receive the response and return it. | public RequestResponse run() {
try (Socket client = new Socket(ip, port)) {
System.out.println("Connected to server.");
OutputStream out = client.getOutputStream();
ObjectOutputStream writer = new ObjectOutputStream(out);
writer.writeObject(request);
S... | [
"public String send(String request) {\n String res = \"Empty\";\n try {\n socket = new Socket(\"127.0.0.1\",port);\n DataOutputStream writer = new DataOutputStream(socket.getOutputStream());\n DataInputStream reader = new DataInputStream(new BufferedInputStream(socket.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
return the subMaps separated by player nodes on the circle | public ArrayList<SortedMap<Long, HashNode>> getSubMaps() {
try {
subMaps.clear();
subMaps.add(circle.headMap(workersHash.get(0)));
for (int i = 0; i < workersHash.size() - 1; i++) {
long hash1 = workersHash.get(i);
long hash2 = workersHash.get(i + 1);
SortedMap<Long, HashNode> subMap = circle.sub... | [
"private void buildMap() {\r\n\t\t\tint minX = 40;\r\n\t\t\tint minY = 60;\r\n\t\t\tint gapX = (sizeX/6-60)/7;\r\n\t\t\tint gapY = (sizeY-130)/66;\r\n\t\t\tint vind = 0;\r\n\t\t\tfor(int indA = 0; indA < 6; indA++) {\r\n\t\t\t\tfor(int indB = 0; indB < 11; indB++) {\r\n\t\t\t\t\tif(indB%2 == 0 && indB != 10) {\r\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the original declaration of this variable | public GlobalVariable getOriginalVariable() {
return originalVariable;
} | [
"public VariableDeclarator getVariableDeclNoTransform() {\n return (VariableDeclarator) getChildNoTransform(2);\n }",
"String getDeclare();",
"String getVarDeclare();",
"public /*@Nullable*/ VariableTree getDeclaration() {\n return decl;\n }",
"Declaration getReferred();",
"declaration getDe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function retrieves the Volunteer info using the user id | public Volunteer retrieveVolunteerUsingUserId(final String userId){
final Object[] args = new Object[]{userId};
final String query = "SELECT volunteer_id, api_token FROM users INNER JOIN volunteers ON " +
"users.user_id = volunteers.user_id WHERE users.user_id = ?";
return jdbcT... | [
"public Volunteer findVolunteer(String name){\n\t\t// TODO: implement this method\n\t\treturn null;\n\t}",
"public List<Volunteer> getAllVolunteers()\n {\n return volunteerBll.getAllVolunteers();\n }",
"public String[] getVolunteerProfile(int i)\r\n {\r\n return volunteers.get(i).getP... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the running total of inferences made so far. | public long getNumInferences() {
return totalInferences;
} | [
"int getTotalRunCount();",
"public int getTotalRunCount() {\n return totalRunCount_;\n }",
"public int getTotalRunCount() {\n return totalRunCount_;\n }",
"Integer getTotalStepCount();",
"int getNoOfRuns();",
"public int getTotalRunTime() {\n return totalRunTime;\n }",
"lon... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column dt_login_history.LOGIN_ID | public Integer getLoginId() {
return loginId;
} | [
"public Integer getLoginId() {\n return loginId;\n }",
"public Integer getLoginid() {\n return loginid;\n }",
"int getLoginId();",
"java.lang.String getLoginId();",
"public Integer getLoginUserId() {\n return loginUserId;\n }",
"long getUserId(String login) throws DaoExceptio... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ IM_FONT_CONFIG>GlyphRanges = glyphRanges != NULL ? (ImWchar)&glyphRanges[0] : NULL; Minimum AdvanceX for glyphs, set Min to align font icons, set both Min/Max to enforce monospace font | public native float getGlyphMinAdvanceX(); | [
"public native void setGlyphMinAdvanceX(float glyphMinAdvanceX);",
"public native void setGlyphMaxAdvanceX(float glyphMaxAdvanceX);",
"public native float getGlyphMaxAdvanceX();",
"public native float getGlyphExtraSpacingX();",
"public native void setGlyphExtraSpacing(float x, float y);",
"public abstract... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get all the applications | public HttpResponse getAllApplications() throws APIManagerIntegrationTestException {
try {
checkAuthentication();
return HTTPSClientUtils.doGet(
backendURL + "store-old/site/blocks/application/application-list/ajax/" +
"application-list.jag?action=... | [
"public List<Application> getApplications();",
"@Override\n\tpublic List<Application> getAllApplications() {\n\t\treturn applicationRepo.findAll(new Sort(Sort.Direction.ASC, \"codeCCX\"));\n\t}",
"public ArrayList<Application> getApplications() { // it will come back and call this to get the applications\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns the number of figure in the collection | @Override
public int getFigureCount() {
return this.figures.size();
} | [
"public Integer size(){\n\t\treturn this.collection.size();\n\t}",
"public int getSize() {\n\t\treturn collection.size();\n\t\t\n\t}",
"public int size() {\n return collection.size();\n }",
"public int itemCount() {\n return (this.collection == null ? 0 : this.collection.size());\n }",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Helper method to link the data in the tables for all dates | private void linkTables() throws SQLException {
Timestamp oLocationTimeStamp, oNextLocationTimeStamp, oEventDurationTimeStamp;
long iTimeDuration, iTimeEnd, iTimeStart;
java.text.DateFormat oMonthFormat = java.text.DateFormat.getDateInstance(DateFormat.MEDIUM);
// KML date format includes T between date and tim... | [
"public void getDateEvents(Connection connection, StoreData data){\n\t\t//The following code is used to prepare a sql statement to get all the events\n\t\tdata.resetSingle();\n\t\tPreparedStatement preStmt=null;\n\t\tString stmt = \"SELECT * FROM Event\";\n\t\t//prepares the date given to this method to be used to ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieve the total number of expressions in the repository. | long getExpressionCount(); | [
"long getEvaluationCount();",
"public int size(){\n return repository.size();\n }",
"public static ReturnExpression.ReturnAggregate count()\n {\n ReturnExpression.ReturnAggregate returnAggregate = new ReturnExpression.ReturnAggregate();\n returnAggregate.function = \"count\";\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the samples counter for instantiations of X,Y variables (just raw counters). | public Factor getSamplesCounter() {
return this.sampleCounter;
} | [
"prometheus.Types.Sample getSamples(int index);",
"int getSamples();",
"public Factor getSamplesCounterNormalized() {\n return this.sampleCounter.normalizeByFirstNVariables(this.sharedSampleProducer.XVars.length);\n }",
"edgify.Samples.DataSample getSample();",
"org.tensorflow.proto.profiler.XStat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GENLAST:event_fractionsSelectAllLabelMouseClicked Change the cursor back to a hand icon. | private void fractionsSelectAllLabelMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_fractionsSelectAllLabelMouseEntered
this.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
} | [
"private void fractionsSelectAllLabelMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_fractionsSelectAllLabelMouseExited\r\n this.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\r\n }",
"private void fractionsDeselectAllLabelMouseEntered(java.awt.event.MouseEvent evt) {//GEN... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get current selected element action | public int getSelectedElementAction() {
return selectedElementAction;
} | [
"public Action getSelectedAction() {\n return selectedAction;\n }",
"public abstract Action selectedAction();",
"public AbstractAction getCurrentAction () {\n\t\treturn curNode.getAction();\n\t}",
"public String getAction() {\n\t\treturn action.get();\n\t}",
"int getActionCommand();",
"public vo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the pitch of living sounds in living entities. | protected float getSoundPitch() {
return super.getSoundPitch() * 0.95F;
} | [
"public float getSoundPitch() {\n return _soundPitch;\n }",
"protected float getSoundPitch() {\n return SoundUtil.randomReal(0.2F) + 1F;\n }",
"protected float getSoundPitch()\n {\n return 4.0F-3.0F * (float)this.getDinoAge()/(float)this.SelfType.MaxAge+this.rand.nextFloat()*0.2F;\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Switch To Frame With name or id | public static void switchToFrameWithNameOrId(String value) {
driver.switchTo().frame(value);
} | [
"public static void switchtoframebyidorname(String idorname)\n {\n driver.switchTo().frame(idorname);\n Log.info(\"Switched to frame\");\n }",
"public void switchToFrame(String name){\n\n\t\ttry {\n\t\t\tWebDriverWait wait = new WebDriverWait(driver,60);\n\t\t\twait.until(ExpectedConditions.f... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "generic_at_rule" $ANTLR start "moz_document" /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:500:1: moz_document : MOZ_DOCUMENT_SYM ( ws )? ( moz_document_function ( ws )? ) ( COMMA ( ws )? moz_document_function ( ws )? ) LBRACE ( ws )? ( body )? RBRACE ; | public final void moz_document() throws RecognitionException {
try { dbg.enterRule(getGrammarFileName(), "moz_document");
if ( getRuleLevel()==0 ) {dbg.commence();}
incRuleLevel();
dbg.location(500, 0);
try {
// /home/matthias/src/netbeans/ide/css.lib/src/org/netbeans/modules/css/lib/Css3.g:501:2: ( MOZ_D... | [
"public final void moz_document_function() throws RecognitionException {\n\t\ttry { dbg.enterRule(getGrammarFileName(), \"moz_document_function\");\n\t\tif ( getRuleLevel()==0 ) {dbg.commence();}\n\t\tincRuleLevel();\n\t\tdbg.location(508, 0);\n\n\t\ttry {\n\t\t\t// /home/matthias/src/netbeans/ide/css.lib/src/org/n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
idDocPrincipal: with specific test context and state. .id : idDocPrincipal .title : .class : Html.DIV .classIndex : 0 | protected GuiTestObject html_idDocPrincipal(TestObject anchor, long flags)
{
return new GuiTestObject(
getMappedTestObject("html_idDocPrincipal"), anchor, flags);
} | [
"protected GuiTestObject html_idDocPrincipal() \r\n\t{\r\n\t\treturn new GuiTestObject(\r\n getMappedTestObject(\"html_idDocPrincipal\"));\r\n\t}",
"protected GuiTestObject html_idTmpBIdPnBorLayPrincipal() \r\n\t{\r\n\t\treturn new GuiTestObject(\r\n getMappedTestObje... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Caches the backgrounds in the entity cache if it is enabled. | public void cacheResult(
java.util.List<org.politaktiv.map.infrastructure.model.Background> backgrounds); | [
"public void preCacheEntity(Entity entity) {\n Location location = entity.getLocation();\n Collection<Entity> entities = this.entityCache.getIfPresent(new ChunkLocation(entity.getWorld(), location.getBlockX() >> 4, location.getBlockZ() >> 4));\n if (entities != null)\n entities.add(e... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the groupMembersAll value for this GroupDataResponse. | public void setGroupMembersAll(java.lang.String[] groupMembersAll) {
this.groupMembersAll = groupMembersAll;
} | [
"public void setGroupMembersCuidAll(java.lang.String[] groupMembersCuidAll) {\n this.groupMembersCuidAll = groupMembersCuidAll;\n }",
"public java.lang.String[] getGroupMembersAll() {\n return groupMembersAll;\n }",
"public void setAllGroups(String groups)\n {\n m_allGroups = gr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates the gen/kill Sets of all jumps in this block. | void updateGenKill(VariableSet gens, SlotSet kills) {
/* Merge the locals used in successing block with those written
* by this blocks.
*/
in.merge(gens);
/* The gen/kill sets must be updated for every jump
* in the other block */
Iterator i = success... | [
"private void resetJumps(){\n\t\tunusedJumps.addAll(jumps);\n\t\tjumps.clear();\n\t}",
"public void resetJumps() {\n this.numJumps = 0;\n this.lightRecovery = false;\n this.heavyRecovery = false;\n }",
"public void jumped(){\n\t\tstats.setJumps(stats.getJumps()+1);\n\t}",
"public void jumpList(){\r\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of createStatus method, of class StatusDaoImpl. | @Test
public void testCreateStatus() {
System.out.println("createStatus");
Status status = null;
StatusDaoImpl instance = new StatusDaoImpl();
Long expResult = null;
Long result = instance.createStatus(status);
assertEquals(expResult, result);
// TODO ... | [
"@Test\r\n public void testRetrieveallStatus() {\r\n System.out.println(\"retrieveallStatus\");\r\n Status status = null;\r\n StatusDaoImpl instance = new StatusDaoImpl();\r\n Long expResult = null;\r\n // Long result = instance.retrieveallStatus(status);\r\n //assertEqua... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates the Unique Key from the columns | public SQLTableIndex createUniqueKey() {
List<String> names = new ArrayList();
List<SQLTableColumn> colList = columns.getColumnSet();
for (SQLTableColumn col : colList) {
if (col.isUQ()) {
names.add(col.getName());
}
}
if (!names.isEmpty())... | [
"public String createUniqueConstraint(DbEntity source, Collection columns);",
"public SQLTableIndex createPrimaryKey() {\n List<String> names = new ArrayList();\n List<SQLTableColumn> colList = columns.getColumnSet();\n for (SQLTableColumn col : colList) {\n if (col.isPK()) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Flips the bitmap horizontally. | public static Bitmap[] flipHorizontally(Bitmap[] bitmaps) {
Bitmap[] newBitmaps = new Bitmap[bitmaps.length];
for(int i = 0; i < bitmaps.length; i++){
Matrix matrix = new Matrix();
matrix.postScale(-1, 1, bitmaps[i].getWidth() / 2, bitmaps[i].getHeight() / 2);
newBitm... | [
"public static Bitmap flipHorizontally(Bitmap bitmap) {\n Matrix matrix = new Matrix();\n matrix.postScale(-1, 1, bitmap.getWidth() / 2, bitmap.getHeight() / 2);\n return Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true);\n }",
"public void flip(){\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
By default , the normalised values are stored in a set file and loaded when run again. This allows the user to reuse the same values when testing different test sets. | private void loadNormalisedValues() {
// Check if the min and max files exist.
File normalisedMinFile = new File(NORMALISED_MIN_VALUES_FILE);
File normalisedMaxFile = new File(NORMALISED_MAX_VALUES_FILE);
if ( ! normalisedMinFile.exists() || ! normalisedMaxFile.exists() ) {
... | [
"public void resetNormalisationValues() {\n minValues = null;\n maxValues = null;\n\n // Check if the min and max files exist.\n File normalisedMinFile = new File(NORMALISED_MIN_VALUES_FILE);\n File normalisedMaxFile = new File(NORMALISED_MAX_VALUES_FILE);\n\n if ( ! normal... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves all borrowers for specific MFI. Designed to be called from render phase. | public static List<Borrower> getBorrowers(RenderRequest request) {
//TODO
return null;
} | [
"public synchronized List<String> borrowerList(String borrower){\n List<String> list = new LinkedList<>();\n for (int i = 0; i < titleList.size(); i++){\n for (String name : borrowerList.get(i)){\n if (name.equals(borrower))\n list.add(titleList.get(i));\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Go to the Add Employees Scene | private void doNewEmployee() {
ApplicationFactory.INSTANCE.showAddEmployeeScene();
} | [
"@FXML\n private void addEmployee(ActionEvent event) throws IOException { // the stage cannot be sent from main like in properClose because this is an action from a Button\n BusinessLayer bl = new BusinessLayer();\n bl.switchScene(event, \"InsertForm.fxml\"); //... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
From selected levels, get those that are valid. | public String[] getValidLevelSelections(String[] selectedLevels); | [
"private String[] getLevelsFound() {\r\n String[] levelsFound = new String[levels.size()];\r\n Iterator<NetworkLevels> iterator = levels.iterator();\r\n int i = 0;\r\n while (iterator.hasNext()) {\r\n levelsFound[i++] = iterator.next().name().toLowerCase();\r\n }\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Command the robot to make a square by first going backwards, then to its right, forwards, and finally to left. If the square is finished, it should report a MappingEvent of type SQUARE_COMPLETED. If a collision is detected before the square is completed, then a MappingEvent of type COLLISION must be reported. The robot... | public void makeRightSquare(float collisionAngle); | [
"public void makeLeftSquare(float collisionAngle);",
"public AutoTurnASquare() {\n\n /**\n // Add your commands in the super() call, e.g. super(new FooCommand(), new BarCommand());\n super( new AutoDriveStraightTime(0.45, 2.0).andThen(new WaitCommand(0.4)), // go forward\n new AutoTurnToAngle(-90.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a connection with server by initializing socket | private void openSocket() {
try {
socket = new Socket(host, port);
} catch (IOException e) {
throw new ClientSocketException("Client socket binding failed");
}
} | [
"private void initSocketConnection() throws IOException {\n\t\tthis.myService = new ServerSocket(2442);\n\t}",
"private static void setupSocket() throws UnknownHostException, IOException {\n\t\tif (socket == null) {\n\t\t\tif (isServer) {\n\t\t\t\tserverSocket = new ServerSocket(PORT);\n\t\t\t\tsocket = serverSoc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Write a tar/gzipbased FileInputStream to disk. | static public void writeFileStructure(FileInputStream fis, String destTopDirectory) throws IOException {
TarArchiveInputStream tais = new TarArchiveInputStream(new GZIPInputStream(fis));
TestUtility.writeFileStructure(tais, destTopDirectory);
} | [
"public static void write(InputStream is, File file) throws IOException {\n OutputStream os = null;\n try {\n os = new FileOutputStream(file);\n byte[] buffer = new byte[BUFFER_SIZE];\n int count;\n while ((count = is.read(buffer)) != -1) {\n os.write(buffer, 0, count);\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Instantiates a new trouble maker. | public TroubleMaker() {
// TODO Auto-generated constructor stub
} | [
"public TroubleMaker(int ID) {\r\n\t\tthis.setTm_id(ID);\r\n\t\tthis.setArea_id(0);\r\n\t\tthis.setActive(true);\t\t\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}",
"public Problem() {\n\t\tsuper();\n\n\t}",
"public MathProblemFactory() {\n\t\tmathProblemTypes = new ArrayList<Class<?>>();\n\n\t\tmathPro... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated .cfwf.client_conn.school.WeikeCountMap weike_count = 2; | int getWeikeCountCount(); | [
"com.cfwf.cb.business_proto.ClientConnSchool.WeikeCountMap getWeikeCount(int index);",
"com.cfwf.cb.business_proto.ClientConnSchool.WeikeCountMapOrBuilder getWeikeCountOrBuilder(\n int index);",
"int getWeikeCount();",
"java.util.List<com.cfwf.cb.business_proto.ClientConnSchool.WeikeCountMap> \n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get all gradebooks on this server, including primary and secondary copies requirement: (title and id only) | @RequestMapping(path = "/gradebook", method = RequestMethod.GET,
produces={"text/xml;charset=utf-8"})
public AllGradebooks getGradebooks()
{
return new AllGradebooks(gradebookService.getGradebooks());
} | [
"Collection<Book> getAll();",
"public Collection<ReservationDetails> getBookCopies(int bookId) throws RemoteException;",
"public static List<Book> allBook() {\r\n\t\tDataAccess da = new DataAccessFacade();\r\n\t\tCollection<Book> copies = da.readBooksMap().values();\r\n\t\tList<Book> copy = new ArrayList<>();\r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'employeeCode' field. | public java.lang.String getEmployeeCode() {
return employeeCode;
} | [
"public java.lang.String getEmployeeCode() {\n return employeeCode;\n }",
"public String getEmp_code() {\n\t\treturn emp_code;\n\t}",
"public void setEmployeeCode(String employeeCode) {\n this.employeeCode = employeeCode;\n }",
"public java.lang.String getEmpCod() {\r\n return empCod;\r\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Compares 2 processes priorities. | @Override
public int compare(Process p1, Process p2) {
if (p1.get_priority() < p2.get_priority()){
return +1;
}
else if (p1.get_priority() > p2.get_priority()){
return -1;
}
else if (p1.get_priority() == p2.get_priority()){
return 0;
}
return 0;
} | [
"@Override\n public int compare(ProcessEntity process, ProcessEntity otherProcess) {\n return process.getPriority() - otherProcess.getPriority();\n }",
"public int compareTo(Process other) {//Here we run through a series of variable comparisons to determine how two processes compare\n if (arri... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor for MultimediaMetadataDescriptor which can be used to create a MultimediaMetadataDescriptor from a Map containing the fieldnames as keys and the PrimitiveTypeProviders as value. Maps like this are usually returned by DB lookup classes. | public MultimediaMetadataDescriptor(Map<String, PrimitiveTypeProvider> data)
throws DatabaseLookupException {
if (data.get(FIELDNAMES[0]) != null
&& data.get(FIELDNAMES[0]).getType() == ProviderDataType.STRING) {
this.objectId = data.get(FIELDNAMES[0]).getString();
} else {
throw new D... | [
"public QNameMultiMapShortFormProvider() {\r\n this(new HashMap<String, String>());\r\n }",
"@SuppressWarnings(\"unchecked\")\n public static JvmMetadata fromMap(Map<String, Object> map) {\n JvmMetadata metadata = new JvmMetadata();\n Metadata.fillFromMap(metadata, map);\n metada... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
factory method to create a BPASITypeStabilizer object | public static BPASITypeStabilizer createBpaSITypeStabilizer(String id, String name, Machine machine) {
BPASITypeStabilizer pss = new BPASITypeStabilizer(id, name, "InterPSS");
pss.setMachine(machine);
return pss;
} | [
"public static BPASSTypeStabilizer createBpaSsTypeStabilizer(String id, String name, Machine machine) {\r\n\t\tBPASSTypeStabilizer pss = new BPASSTypeStabilizer(id, name, \"InterPSS\");\r\n\t\tpss.setMachine(machine); \r\n\t\treturn pss;\r\n \t}",
"public static BPASGTypeStabilizer createBpaSgTypeStabilizer(Stri... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
read the header of input file and parsing the WMO part | int readWMO(ucar.unidata.io.RandomAccessFile raf) throws IOException {
int pos = 0;
// long actualSize = 0;
raf.seek(pos);
int readLen = 35;
// Read in the contents of the NEXRAD Level III product head
byte[] b = new byte[readLen];
int rc = raf.read(b);
if (rc != readLen) {
// out... | [
"public static Header parseHeader(Reader reader) throws IOException{\n\t\tHeader header=new Header();\n \tHeaderParser headerParser=new HeaderParser(); \n\t\tBufferedReader br = new BufferedReader(reader);\n String strLine;\n try { \n while ((strLine=br.readLin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
f0 ::= "" f1 ::= MultiplicativeExpression() | @Override
public Type visit(MultiplicativeMultiExpression n) {
return n.getF1().accept(this);
} | [
"MultiplicativeExpression createMultiplicativeExpression();",
"private static Expression matchMultiplicative()\n {\n Expression left = matchConcatenation();\n\n while (ScriptParser.tokenizer.tokenIs('*') || ScriptParser.tokenizer.tokenIs('/') || ScriptParser.tokenizer.tokenIs('%'))\n {\n String ope... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
CONSTRUCTOR Creates a new loading cog | public LoadingCog() {
//get the sprite
sprite = (Sprite) ResourceManager.getRenderable("loading_cog");
//scale
sprite.setScale(new Vector3(0.5f, 0.5f, 1.0f));
//add to the renderer
OmicronRenderer.add(sprite);
} | [
"public BasicLoader() {\n }",
"public WallLoader() {\n //Nothing to do.\n }",
"public Load()\n {\n super(\"Load\" );\n }",
"public Loader(){\n\t\tthis(PLANETS, NEIGHBOURS);\n\t}",
"public ObjectLoader () {\r\n\t}",
"Load createLoad();",
"private ObjectLoaderFlyWheel() {\n }"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reads an existing playlist and compares with it's expected name | @Test
public void readPlaylistByName_returnsValidPlaylist() throws PersistenceException {
assertEquals(playlistDAO.readAll().contains(validPlaylist), false);
List<PlaylistDTO> playlist;
playlistDAO.persist(validPlaylist);
playlist = playlistDAO.readByName("DaoPlaylistTest");
... | [
"@Override\n public void updatePlaylist(Playlist modified) throws IOException {\n String formattedName = String.format(\"%-\" + PLAYLISTNAMESIZE + \"s\",modified.getPlayListName()).substring(0,PLAYLISTNAMESIZE);\n try(RandomAccessFile raf = new RandomAccessFile(new File(LOCAL_PLAYLIST_PATH),\"rw\")... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns index of first normal data point. Returns 1 if no normal data points | public int firstNormal() {
for (int index = 0; index < channel.getData().length; index++)
if (!isArtifact(index))
return index;
return -1;
} | [
"@Override\n\tpublic double[] getFirstNormal(double[] pos0, double[] pos1) {\n\t\tresult = baseShape.getFirstNormal(toBaseCoordinate(pos0), toBaseCoordinate(pos1));\n\t\t// Convert the normal vector portion back to our coordinate system.\n\t\tfinal double[] normv = directionFromBaseCoordinate(result);\n\t\t// Repac... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the DoNotDestroy field. | private void setDoNotDestroy(java.lang.Boolean value) {
__getInternalInterface().setFieldValue(DONOTDESTROY_PROP.get(), value);
} | [
"public void setDoNotDestroy(java.lang.Boolean value) {\n __getInternalInterface().setFieldValue(DONOTDESTROY_PROP.get(), value);\n }",
"public synchronized void setDestroyed(boolean value) {\n this.destroyed = value;\n }",
"public void notDestroyable()\n\t{\n\t\tdestroyable = false;\n\t}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the number of ontology terms where ontologySpaceId = &63;. | public int countBySpaceId(long ontologySpaceId)
throws com.liferay.portal.kernel.exception.SystemException; | [
"public java.util.List<com.ext.portlet.model.OntologyTerm> findBySpaceId(\n long ontologySpaceId)\n throws com.liferay.portal.kernel.exception.SystemException;",
"int getNumberOfTerms();",
"public int countByParentIdSpaceId(long parentId, long ontologySpaceId)\n throws com.liferay.portal.ke... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of interpreting the object as an instance of 'Audit Event Participant Network Type'. This implementation returns null; returning a nonnull result will terminate the switch. | public T caseAuditEventParticipantNetworkType(AuditEventParticipantNetworkType object) {
return null;
} | [
"public T caseNetworkType(NetworkType object) {\r\n\t\treturn null;\r\n\t}",
"public T caseAuditEventNetwork(AuditEventNetwork object) {\n\t\treturn null;\n\t}",
"@java.lang.Override\n public com.techxmind.el.Message.EventLog.Network getNetwork() {\n @SuppressWarnings(\"deprecation\")\n com.t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
loads sample stocks data (of exercise) | private void loadSampleStocks() {
// symbol, lastDividend, fixedDividend, parValue, stockType
Stock stock1 = new Stock("TEA", 0, 0, 100, StockType.COMMON);
Stock stock2 = new Stock("POP", 8, 0, 100, StockType.COMMON);
Stock stock3 = new Stock("ALE", 23, 0, 60, StockType.COMMON);
Stock stock4 = new Stock("GIN... | [
"private void loadData() {\n\t\t/*\n\t\t * Load data\n\t\t */\n\t\tTestEnvironment env = getEnv();\n\t\tenv.getStorage().reset();\n\t\t\n\t\t// Load data from each category without considering pos/neg\n\t\tList<List<String>> musicCategory = env.getReader().getItemsByCategory(\"music\");\n\t\tList<List<String>> dvdC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__ActionDispatcher__Group__4__Impl" $ANTLR start "rule__ActionDispatcher__Group_3__0" InternalMyDsl.g:11750:1: rule__ActionDispatcher__Group_3__0 : rule__ActionDispatcher__Group_3__0__Impl rule__ActionDispatcher__Group_3__1 ; | public final void rule__ActionDispatcher__Group_3__0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalMyDsl.g:11754:1: ( rule__ActionDispatcher__Group_3__0__Impl rule__ActionDispatcher__Group_3__1 )
// InternalMyDsl.g:11755:2: rule__A... | [
"public final void rule__ActionDispatcher__Group__3__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:11712:1: ( ( ( rule__ActionDispatcher__Group_3__0 )* ) )\n // InternalMyDsl.g:11713:1: ( ( rule__ActionDispa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the mainEntry property. | public boolean isMainEntry() {
return mainEntry;
} | [
"public String getEntryValue() {\n return entryValue;\n }",
"public String getEntryID() {\r\n\r\n\t\treturn getStringProperty(\"EntryID\");\r\n\t}",
"public Object getEntry() {\n return entry;\n }",
"public Entry getEntry () {\n return entry;\n }",
"public List<ArchiveEntry> getMainE... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Unescapes a string that contains standard Java escape sequences. (source: | public static String unescapeString(String string) {
StringBuilder sb = new StringBuilder(string.length());
for (int i = 0; i < string.length(); i++) {
char ch = string.charAt(i);
if (ch == '\\') {
char nextChar = (i == string.length() - 1) ? '\\' : string
... | [
"static String getJavaUnescaped(String s){\n return StringEscapeUtils.unescapeJava(s);\n }",
"public static String unEscapeString(String s) {\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < s.length(); i++) {\n switch (s.charAt(i)) {\n case '\\n':\n sb.append(\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of getLogin_usu method, of class Usuario. | @Test
public void testGetLogin_usu() {
System.out.println("getLogin_usu");
Usuario usuario = new Usuario(123, "Davi", "davi", "123", 001, "online");
String expResult = "davi";
String result = usuario.getLogin_usu();
assertEquals(expResult, result);
} | [
"@Test\r\n public void testCLogin() {\r\n System.out.println(\"login\");\r\n \r\n String userName = \"admin\";\r\n String contraseña = \"admin\";\r\n \r\n UsuarioDao instance = new UsuarioDao();\r\n \r\n Usuario result = instance.login(userName, contraseña)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
select from Documento where estatus | List<DocumentoConsulta> findByEstatus(int estatus); | [
"public SgfensPedidoProducto[] findWhereEstatusEquals(short estatus) throws SgfensPedidoProductoDaoException;",
"List<DocumentoConsulta> findByEstatusAndDepartamento(int estatus, Departamento departamento);",
"public Xfifbankdetl[] findWhereStatusEquals(String status) throws XfifbankdetlDaoException;",
"publi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
PortletSession portletSession=renderRequest.getPortletSession(); String name= (String) portletSession.getAttribute("name", PortletSession.APPLICATION_SCOPE); String email= (String) portletSession.getAttribute("email", PortletSession.APPLICATION_SCOPE); String mobilnum= (String) portletSession.getAttribute("mobilenum", ... | @Override
public void render(RenderRequest renderRequest, RenderResponse renderResponse)
throws IOException, PortletException { PortletSession portletSession=renderRequest.getPortletSession();
// String name= (String) portletSession.getAttribute("name", PortletSession.APPLICATION_SCOPE);
// String email= (Stri... | [
"protected static Object getSessionValues(PortletRequest request,String typeOfValue){\n \t PortletSession session = request.getPortletSession();\n \t\tif( session == null ){\n \t\t\tSystem.out.println(\"getSessionValues :: Session Null : \"+session);\n \t\t\treturn null;\n \t\t}else{\n \t\t return session.getAtt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Notify all spectators about movement made by a player. | private void notifyMove(Move move) {
for (Player e : spectators)
e.registerMove(move);
} | [
"private void\r\n\tnotifySpectatorsMoveMade(Move move)\r\n\t{\r\n\t\tfor (Spectator spectator : spectators)\r\n\t\t{\t\r\n\t\t\tspectator.onMoveMade(this,\r\n\t\t\t\t\t\t\t\t move);\r\n\t\t}\r\n\t}",
"public void informPlayerMoveAnywhere(Player player) {\n canvas.informPlayerMoveAnywhere(player);\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the eid flag. | public String getEidFlag() {
return eidFlag;
} | [
"public Long getEid() {\n return eid;\n }",
"public Long getEeiid() {\n return eeiid;\n }",
"public void setEidFlag(String eidFlag) {\r\n\t\tthis.eidFlag = eidFlag;\r\n\t}",
"public Integer geteId() {\n return eId;\n }",
"public Number getEpId() {\n return (Number) getAt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Remove all host IDs. | public void
clearHostIDs()
{
pProfile.remove("HostIDs");
} | [
"public void removeAllHosts()\n {\n synchronized (hostsUp) {\n hostsUp.clear();\n }\n }",
"public com.bbn.tc.schema.avro.cdm18.Host.Builder clearHostIdentifiers() {\n hostIdentifiers = null;\n fieldSetFlags()[2] = false;\n return this;\n }",
"@Override\n\tpublic void removeAll() t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Program__Group__0__Impl" $ANTLR start "rule__Program__Group__1" InternalMGPL.g:1174:1: rule__Program__Group__1 : rule__Program__Group__1__Impl rule__Program__Group__2 ; | public final void rule__Program__Group__1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalMGPL.g:1178:1: ( rule__Program__Group__1__Impl rule__Program__Group__2 )
// InternalMGPL.g:1179:2: rule__Program__Group__1__Impl rule__Program_... | [
"public final void rule__Program__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMGPL.g:1151:1: ( rule__Program__Group__0__Impl rule__Program__Group__1 )\n // InternalMGPL.g:1152:2: rule__Program__Group__0__Impl ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates the tra loi in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. | @Indexable(type = IndexableType.REINDEX)
@Override
public TraLoi updateTraLoi(TraLoi traLoi) throws SystemException {
return traLoiPersistence.update(traLoi);
} | [
"public void update(Trainee trainee);",
"private void addUpdateTrailToDB(String trail_id, Trail trail) {\n Timestamp currentTimestamp = new Timestamp(new Date().getTime());\n currentTrialRef = dRef.child(trail_id);\n currentTrialRef.setValue(trail);\n currentTrialRef.child(\"Trail Date... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |