query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Operations internes Methode qui indique si un deplacement correspond a une prise PRECONDITION: on suppose que le deplacement est valide | private boolean estPrise(Deplacement unDeplacement, Couleur couleurJoueur) {
Position[] positions = unDeplacement.toArray(new Position[0]);
if(positions.length > 2) {
return true;
}
Collection<Position> c = Position.diagonale(positions[0], positions[1]);
if (c.size() >= 1) {
Pion aDeplacer = obtenirPi... | [
"boolean needPlacement();",
"@Override\n\tpublic boolean estValide(Deplacement deplacement) {\n\t\t/*\n\t\t * Le mouvement du fou est une diagonale, ainsi si l'on fais la diff�rence des\n\t\t * valeurs absolu des d�palcements X et Y, le r�sultat devrait toujours �tre 0.\n\t\t */\n\t\treturn Math.abs(deplacement.g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test : 4 Test Objective: To catch an empty value Customer Name Inputs: CustomerName = " " Expected Output: Exception Message: "Customer Name NOT specified" | public void testOrder004() {
try {
Order.validateName(" ");
fail("Exception expected");
} catch (DaoExceptionHandler e) {
assertEquals("Customer Name NOT specified", e.getMessage());
}
} | [
"public void testOrder005() {\n\n try {\n Order.validateName(\"\");\n fail(\"Exception expected\");\n } catch (DaoExceptionHandler e) {\n assertEquals(\"Customer Name NOT specified\", e.getMessage());\n }\n\n }",
"@Test(groups = {\"All\"})\n\tpublic void R2... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updating medical billing API for billing statements. Execute the generate billing statement command. If an error occurs, the stack trace is printed and the system exits. | public Void call() throws SQLException {
Map<String, Object> values = new HashMap<>();
if (visitID != null) values.put("VisitID", visitID);
if (recipientSSN != null) values.put("RecipientSSN", recipientSSN);
if (billingAddress != null) val... | [
"public void updateBillingAccount(Scanner input) {\n\n System.out.println(\"Please enter patient ID, the patient must already be present in the database.\");\n int pId = 0;\n //Get the patient ID from input\n try {\n pId = Integer.parseInt(input.nextLine());\n } catch (... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Wipes the current matrix and deletes all columns | public void wipe() {
this.matrix.clear();
} | [
"public void clearMatrix() { matrix = null; }",
"public void clear() {\n rows = cols = 0;\n matrix.clear();\n }",
"private void cleanMatrix(){\n for(int i = 0; i < 4; i++){\n for(int j = 0; j < 4; j++){\n if(matrix[i][j] != null){\n root.getCh... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Note: randomizes sets in a way that there are the exact same amount of pokemon in each set. just redistributes which pokemon has which set flags | public void randomizeAllSets(boolean changePromos){
ArrayList<Byte> setList = new ArrayList<Byte>();
ArrayList<MonCardData> validMons = new ArrayList<MonCardData>();
//throw all set flags into an arraylist
for(int i = 0; i < mons.length; i++){
// 0x40 is promotional set. Other set info is in lowe... | [
"public void makeSet()\n\t{\n\t\tfor (int i = 1; i <= 12; i++)\n\t\t{\n\t\t\tif (i % 2 == 0 && i % 3 == 0)\n\t\t\t{\n\t\t\t\t// Any flavor number divisible by 2 AND 3 is vanilla chocolate\n\t\t\t\tthis.flavors[i - 1] = new Flavor(i, \"Vanilla Chocolate\", i * 2);\n\t\t\t}\n\t\t\telse if (i % 2 == 0)\n\t\t\t{\n\t\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creation of cross matrix | private static Map<String, String> createCrossMatrix() {
Map<String, String> crossMatrix = new HashMap<>();
crossMatrix.put("AUDAUD", "1:1");
crossMatrix.put("AUDCAD", "USD");
crossMatrix.put("AUDCNY", "USD");
crossMatrix.put("AUDCZK", "USD");
crossMatrix.put("AUDDKK", "USD");
crossMatrix.put("AUDEUR",... | [
"public Matrix cross(){\n\t\tcheckVectorDimensions(3);\n\t\tdouble wx = this.x[0];\n\t\tdouble wy = this.x[1];\n\t\tdouble wz = this.x[2];\n\t\tMatrix out = new Matrix(3,3);\n\t\tout.set(0, 1, -1.0*wz);\n\t\tout.set(0, 2, wy);\n\t\tout.set(1, 0, wz);\n\t\tout.set(1, 2, -1.0*wx);\n\t\tout.set(2, 0, -1.0*wy);\n\t\tou... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
12.10 The with Statement | private ParseTree parseWithStatement() {
SourcePosition start = getTreeStartLocation();
eat(TokenType.WITH);
eat(TokenType.OPEN_PAREN);
ParseTree expression = parseExpression();
eat(TokenType.CLOSE_PAREN);
ParseTree body = parseStatement();
return new WithStatementTree(getTreeLocation(start)... | [
"public boolean isWith() {\n return true;\n }",
"public interface BeforeWith<T extends BeforeWith<T>> extends QueryPart, QueryPartSQL<T>, QueryPartLinked<T> {\r\n\r\n\t/**\r\n\t * Continue query with WITH\r\n\t *\r\n\t * @param name The name of the with-block\r\n\t * @return The new WITH statement\r\n\t */\r\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ \brief Match a ConstantInt or splatted ConstantVector, binding the / specified pointer to the contained APInt. | @Converted(kind = Converted.Kind.AUTO,
source = "${LLVM_SRC}/llvm/include/llvm/IR/PatternMatch.h", line = 180,
FQN="llvm::PatternMatch::m_APInt", NM="_ZN4llvm12PatternMatch7m_APIntERPKNS_5APIntE",
cmd="jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/Transforms/Scalar/Early... | [
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/include/llvm/IR/PatternMatch.h\", line = 387,\n FQN=\"llvm::PatternMatch::m_ConstantInt\", NM=\"_ZN4llvm12PatternMatch13m_ConstantIntERy\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/Transf... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Uploads a file via SFTP | public static void sftpJSchUpload(String ipAddr, String username, String password, String destDir,
File uploadFile) throws JSchException, SftpException, IOException {
JSch jsch = new JSch();
Session session = null;
String saveFile = uploadFile.getName();
session = jsch.getSes... | [
"private void uploadFileUsingSFTPClient(Operation operation, String host,\n String ftpUserName, String ftpPassword,\n String uploadDirectory, String fileLocation, int serverPort)\n throws AndroidAgentException {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
.edu.umn.cse.geoproto.GeometryType type = 1; | edu.umn.cse.geoproto.GeoProto.GeometryType getType(); | [
"edu.umn.cse.geoproto.GeoProto.Type getType();",
"SpatialDomainType createSpatialDomainType();",
"public String getType() {\n return getGeometryType();\n }",
"private void setType(com.ndk.echart.Echart.EChart_GeoType value) {\n if (value == null) {\n throw new NullPointerException();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets value as the attribute value for the calculated attribute CustomerNameD. | public void setCustomerNameD(String value) {
setAttributeInternal(CUSTOMERNAMED, value);
} | [
"public void setCustomerName(String value)\n {\n customerName = value;\n }",
"public void setCustomerName(String value) {\n setAttributeInternal(CUSTOMERNAME, value);\n }",
"public void setCustomerName(String c) {\n customerName = c;\n }",
"public void setCustomerName(String c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Query DB table evalueting_list for records. The sql statement for this operation is select form_id, project_code, customer_id, customer_name, busi_license_no, level, year, audit_time, operator, audit_status, evalueting_type, is_prosecute, evalueting_institutions, evalueting_time, audit_img, audit_opinion1, audit_opinio... | public List<EvaluetingListDO> findWithCondition(EvaluetingListDO evaluetingList, long limitStart, long pageSize) throws DataAccessException; | [
"public List getERecord() throws EvaluateManageSysException\r\n {\r\n List list = dao.getERecord();\r\n\r\n return list;\r\n }",
"public EvaluetingListDO findById(long formId) throws DataAccessException;",
"public List query(WorkflowExpressionQuery e) throws WorkflowS... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a global access to the sleepMode variable | boolean getSleepMode()
{
return this.sleepMode; // Returns the value associated with the variable
} | [
"void setSleepMode(boolean sleep);",
"@SuppressWarnings(\"ALL\") // Supresses the warnings\n void setSleepMode(boolean sleepMode)\n {\n this.sleepMode = sleepMode; // Sets the variable appropriately\n }",
"protected void setSleeping() {\n isSleeping = true;\n }",
"void ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Compares the contents of two files to determine if they are equal or not. This method checks to see if the two files are different lengths or if they point to the same file, before resorting to bytebybyte comparison of the contents. Code origin: Avalon, org.apache.commons.io | public static boolean contentEquals(final File file1, final File file2) throws IOException {
int p = prolim(file1, file2);
if (p >= 0)
return p == 1;
try (InputStream input1 = new FileInputStream(file1); InputStream input2 = new FileInputStream(file2)) {
return contentEquals(input1, input2);
}
} | [
"protected boolean equalFileContents(FileObject file1, FileObject file2) throws HopFileException {\n // Really read the contents and do comparisons\n DataInputStream in1 = null;\n DataInputStream in2 = null;\n try {\n // Really read the contents and do comparisons\n\n in1 =\n new Data... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method responsible for drawing line of given length with suffix. | private static void drawLine(final Integer length, final Integer suffix) {
for (int i = 0; i < length; i++) {
System.out.print("--");
}
System.out.print(" " + suffix);
System.out.println();
} | [
"private static void drawLine(final Integer length) {\n for (int i = 0; i < length; i++) {\n System.out.print(\"--\");\n }\n System.out.println();\n }",
"public HLine(char paintCharacter, int length) {\r\n super(paintCharacter, length);\r\n }",
"private void drawSequ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This functionality is borrowed from struts, but I've removed some struts specific features so that this tag can be used both in a struts application, and outside of one. Locate and return the specified property of the specified bean, from an optionally specified scope, in the specified page context. | static public Object lookup(PageContext pageContext, String name, String property,
String scope, boolean useDecorator, String pageParam, Decorator dec, Properties prop) throws JspException {
if (useDecorator && dec != null) {
// First check the decorator, and if it doesn... | [
"static private Object lookup(PageContext pageContext, String name, \r\n String scope, String pageParam, Properties prop) throws JspException {\r\n\r\n Object bean = null;\r\n if (scope == null)\r\n bean = pageContext.findAttribute(name);\r\n else if (scope.equalsIgnoreCa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Hakee annetun kissan vanhemmat. | public void haeVanhemmat(){
isa = kantaja.getIsa();
emo = kantaja.getEmo();
} | [
"public void kast() {\n\t\t// vaelg en tilfaeldig side\n\t\tdouble tilfaeldigtTal = Math.random();\n\t\tvaerdi = (int) (tilfaeldigtTal * 6 + 1);\n\t}",
"public void keskeytaKaikki() {\n this.komentologiikka.keskeytaKaikki();\n }",
"public void heilen(){\r\n\t\taktuellerZustand=aktuellerZustand.heilen(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new read session. A read session divides the contents of a BigQuery table into one or more streams, which can then be used to read data from the table. The read session also specifies properties of the data to be read, such as a list of columns or a pushdown filter describing the rows to be returned. A partic... | default void createReadSession(
com.google.cloud.bigquery.storage.v1beta1.Storage.CreateReadSessionRequest request,
io.grpc.stub.StreamObserver<com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession>
responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
... | [
"public com.google.cloud.bigquery.storage.v1beta1.Storage.ReadSession createReadSession(\n com.google.cloud.bigquery.storage.v1beta1.Storage.CreateReadSessionRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getCreateReadSessionMethod(), getCallOptions(), r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Registers a smart translation for the given key | public static void registerTranslation(String key, ISmartTranslation translation) {
smartTranslations.put(key, translation);
} | [
"void setLocalizationKey(String key);",
"@Override\n\tpublic void setKey(String key) {\n\t\t_translation.setKey(key);\n\t}",
"public final void add(final TranslationKey key) {\n if (!key.isEmpty()) {\n this.keys.add(key);\n }\n }",
"void register(String name, K key,... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Places the character into a random empty position on the map | public void addCharacterAtRandomPosition(Character character) {
int x;
int y;
do {
x = (int) floor(Math.random() * this.getWidth());
y = (int) floor(Math.random() * this.getHeight());
} while (!this.positionIsEmpty(x, y));
setCharacter(character, x, y);
... | [
"private void setPlayerRandomLocation() {\n\t\tcurrentPlayerPosition = new Position();\n\t\tint randomNum = Tabela.getRandomInteger(tableRow * tableColumn);\n\t\tcurrentPlayerPosition.setCoordinateFromPosition(randomNum);\n\n\t\tfield[currentPlayerPosition.getX()][currentPlayerPosition.getY()] = new EmptySpace();\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Query a DOM node's accessibility subtree for accessible name and role. This command computes the name and role for all nodes in the subtree, including those that are ignored for accessibility, and returns those that mactch the specified name and role. If no DOM node is specified, or the DOM node does not exist, the com... | public jpuppeteer.util.XFuture<jpuppeteer.cdp.client.entity.accessibility.QueryAXTreeResponse> queryAXTree(jpuppeteer.cdp.client.entity.accessibility.QueryAXTreeRequest request) {
return connection.send("Accessibility.queryAXTree", request, jpuppeteer.cdp.client.entity.accessibility.QueryAXTreeResponse.class);
... | [
"AccessibilityNodeProvider getAccessibilityNodeProvider();",
"public List<AccessibleElement> getAccessibleChildren();",
"SerializablePrivilege[] getSupportedPrivileges(Node node) throws InternalException;",
"Access getAccess(Hierarchy hierarchy);",
"Map<Principal, AccessRights> getDeclaredAccessRights(Node ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method used to deserialize a JSON array into an object or type mil.nga.rod.model.QueryRequestAccelerator | public QueryRequestAccelerator deserializeToQueryRequestAccelerator(String json) {
QueryRequestAccelerator deserialized = null;
try {
if (json != null) {
ObjectMapper mapper = new ObjectMapper();
mapper.setDateFormat(dateForm... | [
"void decodeObjectArray();",
"private Object[] fromJSON(){\r\n Object[] objs = new Object[argumentJSON.length];\r\n for(int i = 0; i<argumentJSON.length; i++){\r\n try {\r\n Class klass = Class.forName(argTypes[i]);\r\n objs[i] = Jsonifier.fromJson(argumentJS... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method initializes jtxtFileName | private JTextField getJtxtFileName()
{
if (jtxtFileName == null)
{
jtxtFileName = new JTextField();
jtxtFileName.setText("Inserisci qui il nome del file");
jtxtFileName.selectAll();
jtxtFileName.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(java.awt.event.Ac... | [
"public void fillFilenames() {\r\n if (this.pl_LastFiles.getParam(\"nodelist-file\") != null\r\n && this.pl_LastFiles.getParam(\"edgelist-file\") != null) {\r\n this.nodefileText.setText(this.pl_LastFiles.getParam(\"nodelist-file\"));\r\n this.edgeFileText.setText(this.pl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Scroll to the navigation of content view depending on whichever one the offset is closer to. | private void scrollToNavigationOrContentView(int x) {
if (mShowingNavigation && x > getNavigationViewWidth()) {
showContentView();
} else if (mOffsetX < (getNavigationViewWidth() / 2)) {
showContentView();
} else {
showNavigationView();
}
} | [
"public static ViewAction scrollTo() {\n return actionWithAssertions(new ScrollToAction());\n }",
"IWebElementWrapper scrollTo();",
"@Listen(\"onClick = #scroll\")\n\tpublic void scrollIntoView() {\n\t\ttreeModel.setOpenObjects(treeModel.getRoot().getChildren());\n\t\tTreeitem[] items = tree.getItems().toAr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Public access to the sensor id. | public int getSensorId() {
return sensorid;
} | [
"Pointer urg_sensor_serial_id(urg_t urg);",
"UUID getDeviceId();",
"java.lang.String getDeviceid();",
"String getDeviceId();",
"String getStor_id();",
"public String getDeviceUID();",
"int getSnId();",
"long getId();",
"public static String sensorKey(SinglePixelSensorReading reading) {\n return r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a button with the specified icon, action, and argument. | public Button (GlContext ctx, Icon icon, String action, Object argument)
{
this(ctx, icon, null, action, argument);
} | [
"JButton createButton(String text, String iconPath, ActionListener actionListener);",
"JButton createButton(String text, ImageIcon icon, ActionListener actionListener);",
"public buttonAction(ImageIcon icon, button b)\n {\n super(\"\",icon);\n button = b;\n }",
"JButton cre... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
getter for Column bg_pay_record.pay_total | public BigDecimal getPayTotal() {
return payTotal;
} | [
"public BigDecimal getTotalPayment() {\n return totalPayment;\n }",
"public BigDecimal getAmountTotal() {\n return amountTotal;\n }",
"public java.math.BigDecimal getTotalAP() \r\n {\r\n return get_ValueAsBigDecimal(\"TotalAP\");\r\n \r\n }",
"public double getTotal (){... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor for creating a new Deadline object. Requires a name and a dueDate. | public Deadline(String name, String dueDate) throws DukeException {
super(name);
SimpleDateFormat formatter = new SimpleDateFormat("dd MM yyyy");
try {
this.dueDate = formatter.parse(dueDate);
} catch (ParseException e) {
throw new DukeException("Date form... | [
"public Deadline(String name, LocalDateTime deadline) {\n super(name, deadline);\n }",
"public Deadline(String details, LocalDateTime date) {\n super(details);\n this.date = date;\n }",
"public Deadline(String details, boolean isDone, LocalDateTime date) {\n super(details, isDo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the added app key index | private int getAppKeyIndexInt() {
return ByteBuffer.wrap(appKeyIndex).order(ByteOrder.BIG_ENDIAN).getShort();
} | [
"int getAppids(int index);",
"public List<Integer> getBoundAppKeyIndexes() {\n return Collections.unmodifiableList(mBoundAppKeyIndexes);\n }",
"int getAllowedAppIds(int index);",
"private int getRecordIndexByKey(String key) {\n return binarySearchPairList(keyAddressList, key);\n }",
"public in... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Flip a board horizontally based on the n (numRows) x m (numColumns) grid editing the provided board in place. If we consider a 3x3 board 1 | 2 | 3 4 | 5 | 6 7 | 8 | 9 The updated horizontally flipped board would be 7 | 8 | 9 4 | 5 | 6 1 | 2 | 3 If the transformation was successful return true, if not return false; | public static boolean horizontalFlip(int numRows, int numColumns, int[] board) {
if (!canFlip(numRows, numColumns, board)) {
return false;
}
int tmp;
for (int i = 0; i < (numRows/2); i++) {
for (int j=0 ; j< numColumns; j++) {
tmp = board[(numRows-i-1)*numColumns + j];
board... | [
"public void flipHorizontally() {\n\t\tfor (int i = 0; i < height / 2; i++) {\n\t\t\tfor (int j = 0; j < width; j++) {\n pieceGrid[i][j] = pieceGrid[i][j] ^ pieceGrid[height - i - 1][j];\n pieceGrid[height - i - 1][j] = pieceGrid[i][j] ^ pieceGrid[height - i - 1][j];\n pieceGrid[i][j] = pieceGr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GeoData objects are used in a large number of places throught GeoTools. The role of a GeoData object is to associate id values with data values. Examples of use include matching feature ids to data values for thematic mapping, Storing tool tip texts for displaying with features and for providing data to be graphed or o... | public interface GeoData{
/**
* Most geodata sets contain features for which there is no data, or the data is missing.<br>
* In these cases a specific value is often used to represent these special cases.<p>
* The static final value MISSING is the default value used by GeoDatas to represent
... | [
"protected DefaultGeometryData buildGeometryData(DataTime time, Level level,\n Geometry geometry, String locationName,\n Map<String, Object> attributes, int dataIndex, Object[] data,\n String[] paramNames) {\n DefaultGeometryData geometryData = new DefaultGeometryData();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new RequiredObjectsImpl object. | public RequiredObjectsImpl(Engine engine, BPELInterpreter interp,
BPELProcessManager procManager) {
mEng = engine;
mInterp = interp;
mProcessManager = procManager;
} | [
"Requires createRequires();",
"protected void createRequiredAnnotations() {\n\t\tString source = \"Required\";\t\n\t\taddAnnotation\n\t\t (parameterEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (behavioredClassifierEClass, \n\t\t source, \n\t\t new String[] {\n\t\t ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method is called when the Team B FreeThrow button is clicked. | public void Team_B_Freethrow(View v) {
teamBScore = teamBScore + 1;
displayForTeamB(teamBScore);
} | [
"public void Team_A_Freethrow(View v) {\n teamAScore = teamAScore + 1;\n displayForTeamA(teamAScore);\n }",
"@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tPlayer player = appFrame.getSelectedPlayer(gameEngine);\r\n\t\tappFrame.placeBet(gameEngine, player);\r\n\t\tappFrame.setSt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Clears the 'amountRemaining' field, the 'has' method for this field will now return false | public void clearAmountRemaining() {
genClient.clear(CacheKey.amountRemaining);
} | [
"public boolean hasAmountRemaining() {\n return genClient.cacheHasKey(CacheKey.amountRemaining);\n }",
"public boolean isNotNullAmountRemaining() {\n return genClient.cacheValueIsNotNull(CacheKey.amountRemaining);\n }",
"public DisplayOrder setAmountRemaining(java.lang.String amountRemaining) {\n ret... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
set custom action bar color | public void setCustomActionBarColor(String colorCode) {
ActionBar actionBar = getSupportActionBar();
actionBar.setBackgroundDrawable(new ColorDrawable(Color.parseColor(colorCode)));
} | [
"public static void setActionBarColor(int color) {\n mainActivity.getSupportActionBar().setBackgroundDrawable(new ColorDrawable(color));\n }",
"@SuppressLint(\"NewApi\")\n\tprivate void changeActionBarBackground() {\n\t\tif (AppStartupManager.getTopbarStylingInfoBean() != null) {\n\t\t\trunOnUiThread(ne... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setup the dropdown spinner that allows the user to select the supplier of the sold product. | private void setupSpinner() {
// Create adapter for spinner. The list options are from the String array it will use
// the spinner will use the default layout
ArrayAdapter supplierSpinnerAdapter = ArrayAdapter.createFromResource( this,
R.array.array_supplier_options, android.R.la... | [
"private void setupSpinner() {\n // Create adapter for spinner. The list options are from the String array it will use\n // the spinner will use the default layout\n ArrayAdapter supplierSpinnerAdapter = ArrayAdapter.createFromResource(this,\n R.array.array_supplier_options, andr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Optional. Whether or not to enable Alias IPs in the GKE cluster. If `true`, a VPCnative cluster is created. This field is only supported for Cloud Composer environments in versions composer1..airflow... Environments in newer versions always use VPCnative GKE clusters. bool use_ip_aliases = 1 [(.google.api.field_behavio... | @java.lang.Override
public boolean getUseIpAliases() {
return useIpAliases_;
} | [
"public Builder setUseIpAliases(boolean value) {\n\n useIpAliases_ = value;\n bitField0_ |= 0x00000001;\n onChanged();\n return this;\n }",
"public Builder clearUseIpAliases() {\n bitField0_ = (bitField0_ & ~0x00000001);\n useIpAliases_ = false;\n onChanged();\n return t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Hash the given buffer and return a sha512 checksum. | protected String hashBuffer(Buffer buffer) {
return FileUtils.generateSha512Sum(buffer);
} | [
"public static String hash512(String toHash) {\n StringBuilder sb = new StringBuilder();\n\n try {\n MessageDigest md = MessageDigest.getInstance(\"SHA-512\");\n byte[] digest = md.digest(toHash.getBytes());\n for (byte b : digest) {\n sb.append(Integer.toString((b & 0xff) + 0x100, 16).s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Unsets the "negationInd" attribute | public void unsetNegationInd()
{
synchronized (monitor())
{
check_orphaned();
get_store().remove_attribute(NEGATIONIND$44);
}
} | [
"public void setNegationInd(boolean negationInd)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NEGATIONIND$44);\n if (tar... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
XWiki's Listener model doesn't support authors. Don't do anything. | @Override
public void author_()
{
} | [
"@Override\n public void author()\n {\n }",
"public void addAuthorAction()\n\t{\n\t\tViewNavigator.loadScene(\"Add Author\", ViewNavigator.ADD_AUTHOR_SCENE);\n\t}",
"protected abstract void changeAuthorForDomain(IMessage message, IUser user);",
"Reference getAuthor();",
"private void viewAuthors() ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Provide a new builder for creating a stream processor. | public static StreamProcessor.Builder newBuilder(NakadiClient client) {
return new StreamProcessor.Builder().client(client);
} | [
"private StreamDesc(Builder builder) {\n super(builder);\n }",
"public interface JPPFObjectStreamBuilder\n{\n\t/**\n\t * Obtain an input stream used for deserializing objects.\n * @param\tin input stream to read from.\n\t * @return an <code>ObjectInputStream</code>\n\t * @throws Exception if an error is... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Stops the movie thread. | public synchronized void stop () {
Thread myThread = movieThread;
if (movieThread == null || Ripple.isJS) {
movieThread = null;
return;
}
if (myThread != null) {
//myThread.stop();
movieThread = null; // no need to call stop. ... | [
"public void stopThread() {\n\t\tm_running = false;\n\t}",
"public void stopThread() {\n\t\tThread.currentThread().stop();\n\t}",
"public void stop() {\n\t\tthread.requestStop = true;\n\t\tlong start = System.currentTimeMillis()+timeout;\n\t\twhile( start > System.currentTimeMillis() && thread.running )\n\t\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
For each date, averageOfSummarizedHR22val = (0 + 4 + 8) / 3 = 12 / 3 = 4 | @Test
void historicalPrecipitationDataSummarizerTestsForAverageOfSummarizedHR22val() throws Exception {
assertEquals(4.0, main.HistoricalPrecipitationDataSummarizer.summarizeHistoricalPrecipitationData("src/example/Example Station 1.csv").get("02-26").get(0 + 6 * 22));
assertEquals(4.0, main.HistoricalPrecipitatio... | [
"@Test\n\tvoid historicalPrecipitationDataSummarizerTestsForAverageOfSummarizedHR04val() throws Exception {\n\t\tassertEquals(4.0, main.HistoricalPrecipitationDataSummarizer.summarizeHistoricalPrecipitationData(\"src/example/Example Station 1.csv\").get(\"02-26\").get(0 + 6 * 4));\n\t\tassertEquals(4.0, main.Histor... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get an Organization's list of Presence Definitions | public OrganizationPresenceEntityListing getPresencedefinitions(GetPresencedefinitionsRequest request) throws IOException, ApiException {
try {
ApiResponse<OrganizationPresenceEntityListing> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<OrganizationPresenceEntityListing>() {});
... | [
"public ApiResponse<OrganizationPresenceEntityListing> getPresencedefinitions(ApiRequest<Void> request) throws IOException {\n try {\n return pcapiClient.invoke(request, new TypeReference<OrganizationPresenceEntityListing>() {});\n }\n catch (ApiException exception) {\n @SuppressWarnings(\"unchec... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tries to get object from the buffer. If unavailable, tries to deserialize an object. | public static Object getObj(String path){
int index = Integer.parseInt(path.substring(6).split("\\.")[0]) % maxBufferSize;
if (buffer[index] != null && buffer[index].getPath().equals(path)) {
return buffer[index];
}
return deserialize(path);
} | [
"public static Object readObject(ChannelBuffer buffer, int length)\n\t{\n\t\tChannelBuffer objBuffer = buffer.readSlice(length);\n\t\tObject obj = null;\n\t\ttry{\n\t\t\tobj = OBJECT_DECODER.decode(objBuffer);\n\t\t}catch(Exception e){\n\t\t\tLOG.error(\"Error occurred while trying to read string from buffer: {}\",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of getBy method, of class DAOAdmLogin. | @Test
public void testGetBy() {
System.out.println("getBy");
String aName = "test";
String aEmail = "test";
String aPass = "test";
DAOAdmLogin instance = new DAOAdmLogin();
List<Admin> result = instance.getBy(aName, aEmail, aPass);
assertThat(r... | [
"@Test\n public void testGetBy() {\n System.out.println(\"getBy\");\n String uName = \"\";\n String aPass = \"\";\n DAOAdmin instance = new DAOAdmin();\n List<TblAdmin> expresult = instance.getBy(uName, aPass);\n List<TblAdmin> result = instance.getBy(uName, aPass);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
To be called by plugins. Adds a new parser type listening on a specific MIMEType | public void addParserType(String contentType, Function<NodeTypeFactory, Parser> factory) {
System.out.printf("Adding parser for type %s\n", contentType);
parserFactories.put(contentType, factory);
} | [
"public void addParser(String extension, Class<? extends FileParser> parser) {\n parsers.put(extension, parser);\n }",
"void addTypesChangedListener(TypesChangedListener listen);",
"void registerParser(BaseParser parser);",
"void add(MimeType type) {\n // Update the magics index...\n i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Disable all sublemements of the composite recusively. | public static void disableAll(Composite parent)
{
setEnabledRecursive(parent, false, true);
} | [
"void disableAllLevels();",
"public void disable()\n {\n // Disable all the buttons one by one\n for (int col = 0; col < COLUMNS; col++ )\n {\n drop[col].setEnabled(false);\n }\n }",
"public void disable();",
"public static void disableDirectChildren(Composite parent)\n {\n setEnabledRe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Se recupera la respuesta del webService en formato JSONArray | public static JSONArray getJSONArrayResponse(WebService webService, WSFunctionAbstract webServiceFunction) throws IOException {
try (Response response = webService.getResponse(webServiceFunction)) {
String string = response.body()
.string();
if (string.startsWith("{")) {
JSONObject jsonObject = new JS... | [
"public static JSONArray requestWebServiceArray(String serviceUrl) throws IOException, JSONException {\r\n disableConnectionReuseIfNecessary();\r\n\r\n HttpURLConnection urlConnection = null;\r\n JSONArray resultJSONArray = null;\r\n int statusCode;\r\n String exceptionJSON = \"{%... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks whether the 'var158' field has been set. | public boolean hasVar158() {
return fieldSetFlags()[159];
} | [
"public boolean hasVar159() {\n return fieldSetFlags()[160];\n }",
"public boolean hasVar139() {\n return fieldSetFlags()[140];\n }",
"public boolean hasVar113() {\n return fieldSetFlags()[114];\n }",
"public boolean hasVar130() {\n return fieldSetFlags()[131];\n }",
"public ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method will create the generic Audit Log Message from a subscribe response. | public LogEventRequestType logSubscribeResponse(SubscribeResponseMessageType message, String direction,
String _interface) {
LOG.debug("Entering AuditRepositoryLogger.logSubscribeResponse(...)");
LogEventRequestType auditMsg = null;
LogSubscribeResponseType logReqMsg = new LogSub... | [
"protected SubscriptionMessage generateGenericSubscriptionMessage() {\n \n SubscriptionMessage subMessage = new SubscriptionMessage();\n subMessage.setRules(this.rules);\n subMessage.setMessageType(SubscriptionMessage.SUBSCRIPTION_MESSAGE_ID);\n \n return subMessage;\n }",
"@Override\n public v... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
DELETE /freecfdis/:id : delete the "id" free_cfdi. | @RequestMapping(value = "/free-cfdis/{id}",
method = RequestMethod.DELETE,
produces = MediaType.APPLICATION_JSON_VALUE)
@Timed
public ResponseEntity<Void> deleteFree_cfdi(@PathVariable Long id) {
log.debug("REST request to delete Free_cfdi : {}", id);
free_cfdiService.delete(id);... | [
"@DeleteMapping(\"/discapates/{id}\")\n @Timed\n public ResponseEntity<Void> deleteDiscapate(@PathVariable Long id) {\n log.debug(\"REST request to delete Discapate : {}\", id);\n discapateRepository.delete(id);\n discapateSearchRepository.delete(id);\n return ResponseEntity.ok().h... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds the given element to the Modifiers array. This is achieved by setting the parent foreign key to this entity instance. | public void addToModifiers(entity.GL7SublineTypeMod element); | [
"public void addToEffDatedRegistry(entity.PolicyEffDatedRegistry element) {\n __getInternalInterface().addArrayElement(EFFDATEDREGISTRY_PROP.get(), element);\n }",
"public void addToPolicyTransactions(entity.AppCritPolicyTransaction element);",
"public void addToGL7ExposureMods(entity.GL7ExposureMod ele... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the logical number of hexes moved the path (does not count turns, etc). | public int getHexesMoved() {
if (getLastStep() == null) {
return 0;
}
return getLastStep().getDistance();
} | [
"public int getNumSegmentMoves() {\n return numSegmentMoves;\n }",
"int getPathsCount();",
"public int getNumMoves(){\n return allMoves.size();\n }",
"private int numPaths(){\n if (src == dst) return 1;\n dfs(adjlist, src, dst);\n return pathCount;\n }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
parse the uploaded file get all Association Notice: still need to get all independent class | public void parseFile() {
String lastClassName = "";
FileInputStream fstream;
DataInputStream in;
BufferedReader br;
try {
// open file
fstream = new FileInputStream(this.fileName);
in = new DataInputStream(fstream);
br = new BufferedReader(new InputStreamReader(in));
String strTmp;
while ((... | [
"public List getAssociationFiles();",
"void readAssociations() {\n // proxy the collections for lazy loading\n Class c = getClass();\n for (Field f : c.getDeclaredFields()) {\n for (Annotation a : f.getAnnotations()) {\n if (a.annotationType().equals(HasMany.class)) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create NFLPlayer with no args | public NFLPlayer(){
} | [
"public void createPlayer() {\n mainHandler = new Handler();\n videoTrackSelectionFactory = new AdaptiveTrackSelection.Factory(bandwidthMeter);\n trackSelector = new DefaultTrackSelector(videoTrackSelectionFactory);\n player = ExoPlayerFactory.newSimpleInstance(this, trackSelector);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
one method that does all boundchecking. returns the actual value at the row col, or returns 0 if the row col is out of bounds. | private static int getCellValue(int[][] aa, int row, int col) {
// check all bounds to make sure it doesn't run off
// the top, the left, the bottom or the right.
if (row < 0 || col < 0 || row >= aa.length || col >= aa[row].length) {
return 0;
}
// must be a safe acc... | [
"private void checkBounds(int row, int col) {\n row -= 1;\n col -= 1;\n // StdOut.printf(\"row: %d, col: %d - adjusted\\n\", row, col);\n if (row < 0 || col < 0 || row >= gridSize || col >= gridSize) throw new IndexOutOfBoundsException();\n// StdOut.println(\"checkBounds passed!\"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts Name to an int array | public int[] char2IntArray()
{
char[] tmp = gName.toCharArray();
int[] newName = new int[tmp.length];
for(int i = 0; i < tmp.length; i++)
{
newName[i] = (int)tmp[i];
}
return newName;
} | [
"public int[] getAttrIntArray(String name)\n{\n\treturn (int[])getAttr(name);\n}",
"public int[] getIntArray(String name) {\n\t\tDNNode node = getNode(name);\n\t\tif (node == null) throw new NoSuchNodeException(NoSuchNodeException.NODE_NOT_FOUND);\n\t\tif (node.length >= 0) {\n\t\t\tif (node.typ == DNHelper.INTEG... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column t_sup_info.init_amt | public BigDecimal getInitAmt() {
return initAmt;
} | [
"public float getInitMoney() {\n\t\treturn initMoney;\n\t}",
"public void setInitAmt(BigDecimal initAmt) {\n this.initAmt = initAmt;\n }",
"public int getInitialValue()\n {\n return _init;\n }",
"public KualiInteger getInitialRequestedAmount() {\n return initialRequestedAmount;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Find all of the nodes that are at or below this node. | public List<PlanNode> findAllAtOrBelow() {
return findAllAtOrBelow(Traversal.PRE_ORDER);
} | [
"public List<PlanNode> findAllAtOrBelow( Traversal order ) {\n assert order != null;\n LinkedList<PlanNode> results = new LinkedList<PlanNode>();\n LinkedList<PlanNode> queue = new LinkedList<PlanNode>();\n queue.add(this);\n while (!queue.isEmpty()) {\n PlanNode aNode ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get current balance in account. | public double returnCurrentBalance() {
return accountBalance;
} | [
"public double getBalance() {\n\t\treturn currentAccount.getBalance();\n\t}",
"public Amount getCurrentBalance() { return balance; }",
"public BigDecimal getAccountBalance() {\n return accountBalance;\n }",
"@JsonIgnore\n public BigDecimal getAccountBalance(String account) {\n return accou... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get EhpePresent bit field value. | public int getEhpePresent() {
return getValue(3, 3);
} | [
"public int getEvpePresent() {\n return getValue(4, 4);\n }",
"Boolean getPresentFlag();",
"public int getVdopPresent() {\n return getValue(6, 6);\n }",
"public int getHdopPresent() {\n return getValue(5, 5);\n }",
"public boolean hasField255() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the busHz value for this HostCpuPackage. | public void setBusHz(long busHz) {
this.busHz = busHz;
} | [
"public void setHz(long hz) {\n\t\tthis.hz = hz;\n\t}",
"public long getBusHz() {\n\t\treturn busHz;\n\t}",
"T setAudioSamplingRateHz(int val);",
"public void setMeasFrequencyHz(long value) {\r\n this.measFrequencyHz = value;\r\n }",
"public long getHz() {\n\t\treturn hz;\n\t}",
"@AutoGUIAnnotat... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the dashbuilder's default nav tree | private void initNavBar() {
navigationManager.setDefaultNavTree(NavTreeDefinitions.NAV_TREE_DEFAULT);
// Allow links to core perspectives only under the top menu's nav group
navigationExplorerScreen.getNavTreeEditor()
.setOnlyRuntimePerspectives(NavTreeDefinitions.GROUP_APP, fal... | [
"public void setDefaultNavigationTree(String name)\n {\n navigationTrees.setDefaultTree(name);\n }",
"public void setParentMenu(String name);",
"private void createDefaultTree() {\n\t\tSelectionViewerPane selectionViewerPane = new SelectionViewerPane(this);\n\t\tselectionViewerPane.createControl(ge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
string field_1631 = 1631; | java.lang.String getField1631(); | [
"java.lang.String getField1665();",
"java.lang.String getField1677();",
"java.lang.String getField1636();",
"java.lang.String getField1634();",
"java.lang.String getField1697();",
"java.lang.String getField1663();",
"java.lang.String getField1307();",
"java.lang.String getField1616();",
"java.lang.S... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the "durationToWaitForJoinSimulationResponseMSecs" attribute | long getDurationToWaitForJoinSimulationResponseMSecs(); | [
"org.apache.xmlbeans.XmlLong xgetDurationToWaitForJoinSimulationResponseMSecs();",
"void setDurationToWaitForJoinSimulationResponseMSecs(long durationToWaitForJoinSimulationResponseMSecs);",
"long getDurationToWaitForStartSimulationDirectiveMSecs();",
"boolean isSetDurationToWaitForJoinSimulationResponseMSecs... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method checks the service name against the list of services to be exposed in HTTP | private boolean isHttpAdminService(String serviceName) {
if (!isFirstCheck && !allAdminServicesHttp && httpAdminServicesList == null) {
return false;
}
// set all admin services to http
if (allAdminServicesHttp) {
return true;
}
// in this if bloc... | [
"HostedServiceCheckNameAvailabilityResponse checkNameAvailability(String serviceName) throws IOException, ServiceException, ParserConfigurationException, SAXException;",
"@Override\n public boolean isServiceSupported(String serviceName) {\n return serviceEndpoints.containsKey(serviceName);\n }",
"p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests if this individual touches the specified individual. Two line segments touch if these have the same codescriptor and share an endpoint that is not a starting, or ending, point to both segments. | public boolean touches(Individual other) {
return ((other instanceof LineSegment) && (this.tail.equals(((LineSegment)other).head) ||
this.head.equals(((LineSegment)other).tail)));
} | [
"public boolean intersects(GLineSegment lineSegment) {\n if(this.equals(lineSegment)) return(true);\n else if(this.slope()==lineSegment.slope()) return(false);\n else {\n //complicated stuff here.\n return(false);\n }\n }",
"public boolean aligns(Individual other) {\r\n return ((othe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A helper method to compute the output schema in that use cases where an input schema is explicitly given | public Schema getOutputSchema(Schema inputSchema) {
List<Schema.Field> fields = new ArrayList<>();
fields.add(Schema.Field.of("ante_token", Schema.of(Schema.Type.STRING)));
fields.add(Schema.Field.of("ante_tag", Schema.of(Schema.Type.STRING)));
fields.add(Schema.Field.of("cons_token", Schema.of(Schema.Ty... | [
"public abstract TableSchema getOutputSchema();",
"void computeSchema() {\n this.schema = Schema.createUnion(schemaOptions);\n }",
"abstract protected Schema loadInputSchema(String input, String inputType);",
"private Schema generateDirectiveOutputSchema(Schema inputSchema)\n throws RecordConvertorExce... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convert dungeon.txt to a matrix | public static Integer[][] convertToArray(InputStream is) throws IOException {
/*
* To convert the InputStream to String we use the
* BufferedReader.readLine() method. We iterate until the BufferedReader
* return null which means there's no more data to read. Each line will
... | [
"public int[][] readLevel(String level) {\n this.map = new int[ROWS][COLS]; //TODO unconstrained the maze size, keeping at 15x15 for now\n\n try {\n Scanner scan = new Scanner(new FileReader(level));\n\n int row = 0;\n while (scan.hasNextLine()) {\n Stri... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Register the listener as a weak reference. | @Override
public void registerWeak(L listener) {
synchronized (listeners) {
weak.put(listener, "");
}
} | [
"@Override\r\n public void register(L listener) {\r\n if (weakHandler) {\r\n registerWeak(listener);\r\n return;\r\n }\r\n synchronized (listeners) {\r\n if (!contains(listener)) listeners.put(listener, \"\");\r\n }\r\n }",
"void setListener(Liste... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Unsets the "Keyword" element | public void unsetKeyword()
{
synchronized (monitor())
{
check_orphaned();
get_store().remove_element(KEYWORD$16, 0);
}
} | [
"public void unsetKeywords()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(KEYWORDS$10, 0);\n }\n }",
"private void clearKeywords() {\n this.vigenere.getKeywords().clear(); // Clears the loade... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Field setups Setup a nonexisting key fields only | @Override
public void setupNonExistKeyFields(EquationStandardTransaction transaction)
{
transaction.setFieldValue("GZAB", "0000"); // Account branch
transaction.setFieldValue("GZAN", "500035"); // Account basic number
transaction.setFieldValue("GZAS", "102"); // Account suffix
transaction.setFieldValue("GZCAT... | [
"@Override\n\tpublic void setupNonExistKeyFields(EquationStandardTransaction transaction)\n\t{\n\t\ttransaction.setFieldValue(\"GZBRNM\", \"LOND\"); // Branch mnemonic\n\t\ttransaction.setFieldValue(\"GZPBR\", \"JUNIT \"); // Posting group id or user id\n\t\ttransaction.setFieldValue(\"GZPSQ7\", \"99999\"); // Post... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a menu item with no text. | public ActionMenuItem() {
this("");
} | [
"public static MenuItem menuLabel(String text) {\n MenuItem menuItem = new MenuItem(text);\n menuItem.setDisable(true);\n return menuItem;\n }",
"public JMenuItem createNewItemText(String label) {\n\t\tJMenuItem item = new JMenuItem(label);\n\t\titem.addActionListener(this);\n\t\treturn item;\n\t}",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the searching package name for UID battery type. | public String getPackageName() {
final String packageName = mDefaultPackageName != null
? mDefaultPackageName : mBatteryHistEntry.mPackageName;
if (packageName == null) {
return packageName;
}
// Removes potential appended process name in the PackageName.
... | [
"public Deferred<String> getUidName(UniqueIdType type, byte[] uid);",
"java.lang.String getPackageName();",
"public String getChunleiUid() {\n String info = null;\n try {\n Uri queryurl = Uri.parse(REGINFO_URL + CHUNLEI_ID);\n ContentResolver resolver = mContext.getContentRes... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This function is called by the io.binroot.regression.Minimizer and calculates the sum of squared residuals for given parameters. To improve the efficiency, simple linear dependencies are solved directly by linear regression; in that case the corresponding parameters are modified. This effectively reduces the number of ... | public final double userFunction(double[] params, double dummy) {
double sumResidualsSqr = 0.0;
if (numRegressionParams == 0) { // simply calculate sum of residuals
for (int i=0; i<numPoints; i++) {
double fValue = f(params,xData[i]);
sumResidualsSqr += sqr(f... | [
"public double getSumResidualsSqr() {\n return getParams()[numParams];\t// value is stored as last element by the minimizer\n }",
"private void doRegression(double[] params) {\n double sumX=0, sumX2=0, sumXY=0; //sums for regression; here 'x' are function values\n double sumY=0, sumY2=0;\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Trigger document initialization if XSLT processor failed to fire the startDocument event. | private void ensureInitialization() throws SAXException {
if (this.startDocumentReceived == false) {
this.startDocument();
}
} | [
"public void startDocument()\r\n {\r\n logger.debug(\"startDoc\");\r\n }",
"public void init() { \n\t\ttry { \n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); \n\t\t\tDocumentBuilder builder = factory.newDocumentBuilder(); \n\t\t\tthis.document = builder.newDocument(); \n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
KB comment for $CycLNonAtomicTerm as of 2002/05/07: The collection of nonatomic denotational terms in the CycL language. A CycL term is _nonatomic_ if it constructible from other CycL terms via the syntax of CycL. A CycL term is said to be "denotational" if it is the type of term that can have a denotatum (or assigned ... | public interface CycLNonAtomicTerm extends CycLDenotationalTerm {
} | [
"public abstract Term getCanonicalVersion();",
"public interface Literal extends RDFTerm {\n\n /**\n * The lexical form of this literal, represented by a\n * <a href=\"http://www.unicode.org/versions/latest/\">Unicode string</a>.\n *\n * @return The lexical form of this literal.\n * @see <a... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of getPulkovo1995GKZone31N method, of class GaussKrugerPulkovo1995. | @Test
public void testPulkovo1995GKZone31N() {
testToWGS84AndBack(PROJ.getPulkovo1995GKZone31N());
} | [
"@Test\n public void testPulkovo1995GKZone32N() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone32N());\n }",
"@Test\n public void testPulkovo1995GKZone2N() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone2N());\n }",
"@Test\n public void testPulkovo1995GKZone10N() {\n testToWGS84AndBack(PROJ.getP... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the client id for this entry. This is important in identifying the cot off time for a particular entry based on the client settings. | public long getClientId() {
return clientId;
} | [
"public java.lang.String getClientID() {\n return clientID;\n }",
"public java.lang.String getClientID() {\n return clientID;\n }",
"public static String getClientID() {\n return getManager().getClientID();\n }",
"public int getClientID()\n\t{\n\t\treturn clientID;\n\t}",
"public String getC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method will return list of child details of a perticular ius using comma separated child ids as string | public List<ReportModel> getChildDetailsForIUS(String childs,String indicator); | [
"public List getChildIds();",
"List<String> getAllChildrenItextIDs();",
"public List<String> getChildIds() {\n return childIds;\n }",
"public IdList getChildIdList() {\n return _childIdList;\n }",
"List<CompositeOtoChild> findByMultipleIds(List<CompositeOtoParentId> compositeotochildIds, boole... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method retrieves the host object containing all the dynamic properties using web service call HostWSFacade.getHostsByName(hostname) | private void getHostDynamicProperties() throws GWPortalGenericException {
// LOGGER
// .error(
// "!!!!!!!!ACTION PORTLETTTTTTTTTTTTTTT !!!!!!!!!! Calling getHostDynamicProperties........"
// );
Host host = foundationWSFacade.getHostsById(String
.valueOf(selectedNodeId));
if (host == null) {
... | [
"private void gatherHosts() throws Exception\n {\n logger.fine(\"Entering VMwareInventory.gatherHosts()\");\n Folder rootFolder = this.si.getRootFolder();\n ManagedEntity[] hosts = new InventoryNavigator(rootFolder).searchManagedEntities(\n new String[][] { {\"HostSystem\", \"name\"}, }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the target sdk version number that the given packageName was built for in the given user. | private int getTargetSdk(String packageName, int userId) {
final ApplicationInfo ai;
try {
ai = mIPackageManager.getApplicationInfo(packageName, 0, userId);
return ai == null ? 0 : ai.targetSdkVersion;
} catch (RemoteException e) {
// Shouldn't happen
... | [
"private static int getMinimumTargetSDK(@NonNull Context context,\n @NonNull ApplicationInfo appInfo, @NonNull UserHandle user) {\n PackageManager pm = context.getPackageManager();\n\n int minimumTargetSDK = appInfo.targetSdkVersion;\n\n String[] uidPkgs = pm.getPackagesForUid(appInf... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Modify the cluster email notification settings. All input fields are optional, but one or more must be supplied. | @Test
public void updateClusterEmailTest() throws ApiException {
ClusterEmailExtended clusterEmail = null;
api.updateClusterEmail(clusterEmail);
// TODO: test validations
} | [
"public void updateMailConfig(MailConfig config) throws ApsSystemException;",
"public void setEmailNotification(boolean value) {\n this.emailNotification = value;\n }",
"protected abstract void updateClusterParameters();",
"protected void setConfigsFromInput(ExternalMailInput input) throws Exception... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
determines the greatest common factor of two numbers | public static int gCF(int a, int b){
if (a == 0) {
return b;
}
int smallNum = Math.min(a, b);
int bigNum = Math.max(a, b);
for(int x = smallNum; x < 0; x--){
if(isDivisible(smallNum, x) ||isDivisible(bigNum, x)){
return x;
}
}
return -1;
} | [
"public static int greatestCommonFactor(ArrayList<Integer> num1, ArrayList<Integer> num2)\n {\n //create an ArrayList to hold common factors\n ArrayList<Integer> commonFactors = new ArrayList<Integer>();\n int greatestFactor = 0;\n for(Integer i : num1)\n {\n if(num2... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use TradeMsgChargeEnd.newBuilder() to construct. | private TradeMsgChargeEnd(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
} | [
"private TradeMsgChargeEnd_Inf(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private TradeMsgChargeInfo2(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private TradeMsgChargeBegin(com.google.protobuf.GeneratedMessageV... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Instantiates a new yarn submit command using a default command name, command description and option handler. | public YarnSubmitCommand() {
super(DEFAULT_COMMAND, DEFAULT_DESC, new SubmitOptionHandler());
} | [
"public YarnSubmitCommand(String name, String description, SubmitOptionHandler handler) {\n\t\tsuper(name, description, handler);\n\t}",
"public BuyCommand()\n {\n }",
"Command createCommand();",
"public YarnClientBuilder() {}",
"long submitCmdlet(String cmd) throws IOException;",
"public ConsumerCo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructs an instance of AutocompleteTextField. The analyzing task will be made in the JavaFX Application Thread. The maximum of suggestions the context menu can show is five, or less if the list of items passed by argument is smaller than five. Any representation of items is not saved in memory. | public AutocompleteTextField(List<T> items) {
this(items, 5, Integer.MAX_VALUE, false);
} | [
"public AutoSuggestTextField() {\n super();\n\n /**\n Обобщенный класс TreeSet<E> представляет структуру данных в виде дерева, в котором все объекты хранятся в\n отсортированном виде по возрастанию.\n TreeSet является наследником класса AbstractSet и реализует интерфейс Navigab... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the value of showNumber. | public boolean getShowNumber() {
return showNumber;
} | [
"public java.lang.Long getSHOWNUMBER() {\n return SHOW_NUMBER;\n }",
"public java.lang.Long getSHOWNUMBER() {\n return SHOW_NUMBER;\n }",
"@Accessor(qualifier = \"numberToDisplay\", type = Accessor.Type.GETTER)\n\tpublic int getNumberToDisplay()\n\t{\n\t\treturn toPrimitive((Integer)getPersistenceCo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Remove the column represented by its name | public void removeColumn (String columnName) {
if (columnName == null) {
return;
}
int colIndex = header.indexOf(columnName);
removeColumn(colIndex);
} | [
"Column removeColumnAt(int index);",
"public void removeGridColumn(String name)\r\n {\r\n\t\tString methodName = MODULE_NAME + \"removeGridColumn(String)\";\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tIGridColumn col = getGridColumn( name );\r\n\t\t\tif( col != null )\r\n\t\t\t{\r\n\t\t\t\tcol.setParent( null );\r\n\t\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets (as xml) the "stopTime" attribute | public org.landxml.schema.landXML11.GPSTime xgetStopTime()
{
synchronized (monitor())
{
check_orphaned();
org.landxml.schema.landXML11.GPSTime target = null;
target = (org.landxml.schema.landXML11.GPSTime)get_store().find_attribute_us... | [
"public java.lang.String getStopTime() {\r\n return stopTime;\r\n }",
"public int getStopTime() {\n\t\treturn stopTime;\n\t}",
"public double getStopTime();",
"long getStopTimeMillis();",
"public long getStopTimestamp() {\n return stopTimestamp;\n }",
"public synchronized long stopTime... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column TRANSACTION_DETAIL.userDestinySsn | public void setUserDestinySsn(String userDestinySsn) {
this.userDestinySsn = userDestinySsn;
} | [
"public String getUserDestinySsn() {\n return userDestinySsn;\n }",
"public void setUserDestinyName(String userDestinyName) {\n this.userDestinyName = userDestinyName;\n }",
"public void addShipmentDetails(String streetAddress, String suburb, int postCode, String state, int userAccountID) th... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the shipEndOffset value for this Account. | public java.lang.String getShipEndOffset() {
return shipEndOffset;
} | [
"public final int getEndOffset() {\n try {\n return endMark.getOffset();\n } catch (InvalidMarkException e) {\n return 0;\n }\n }",
"public int getEndOffset()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xm... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Interface definition for a callback to be invoked when the checked state of a compound button changed. | public interface OnCheckedChangeListener {
/**
* Called when the checked state of a compound button has changed.
*
* @param buttonView The compound button view whose state has changed.
* @param isChecked The new checked state of buttonView.
*/
void onChecked... | [
"public interface OnCheckedChangeListener {\n /**\n * Called when the checked state of a compound button has changed.\n *\n * @param checkable The compound button view whose state has changed.\n * @param isChecked The new checked state of buttonView.\n */\n void onCheckedChanged(Checkable ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Drone__Group_2_1__0" $ANTLR start "rule__Drone__Group_2_1__0__Impl" InternalDronesDsl.g:960:1: rule__Drone__Group_2_1__0__Impl : ( ( rule__Drone__SupportedActionsAssignment_2_1_0 ) ) ; | public final void rule__Drone__Group_2_1__0__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalDronesDsl.g:964:1: ( ( ( rule__Drone__SupportedActionsAssignment_2_1_0 ) ) )
// InternalDronesDsl.g:965:1: ( ( rule__Drone__SupportedAc... | [
"public final void rule__Drone__Group_2_1_1__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDronesDsl.g:1044:1: ( ( ( rule__Drone__SupportedActionsAssignment_2_1_1_1 ) ) )\n // InternalDronesDsl.g:1045:1: ( ( rule... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
const uint8_t (FundingLocked_get_channel_id(const struct LDKFundingLocked NONNULL_PTR this_ptr))[32]; | public static native byte[] FundingLocked_get_channel_id(long this_ptr); | [
"public static native byte[] FundingSigned_get_channel_id(long this_ptr);",
"public static native byte[] UpdateFulfillHTLC_get_channel_id(long this_ptr);",
"public static native byte[] FundingCreated_get_temporary_channel_id(long this_ptr);",
"public static native byte[] ClosingSigned_get_channel_id(long this... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new form CheckAvailability | public CheckAvailability() {
initComponents();
} | [
"Check createCheck();",
"Booking createBooking();",
"@OnClick(R.id.bt_check_in)\n protected void onAddCheckInClicked() {\n\n // get the start time of the lecture\n LectureResponse.StartTime time = mLecturesList.get(selectedLecture).getStartTime();\n String timeStr = time.getHours() + \":... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
count the number of Carriage Return CR | private int countCR(String str) {
int count = 0;
for (int i = 0; i < str.length(); i++) {
if (str.charAt(i) == CR) {
count++;
}
}
return count;
} | [
"private int countLines(String str)\n {\n if(str == null || str.isEmpty())\n {\n return 0;\n }\n int lines = 1;\n int pos = 0;\n while ((pos = str.indexOf(\"\\n\", pos) + 1) != 0)\n {\n lines++;\n }\n return lines;\n }",
"p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Status. Returns true if all running games have ended. | public boolean allGamesEnded() {
// TODO p.picheta to test
return gamesEndedForAgents() && gamesEndedForReplayObservers();
} | [
"private boolean gameEnds() {\n\t\tfor (int r = 0; r < isScoreUpdated.length; r++) {\n\t\t\tfor (int c = 0; c < isScoreUpdated[0].length; c++) {\n\t\t\t\tif (isScoreUpdated[r][c] == false)\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public Boolean isGameEnded() {\n\t\treturn ended;\n\t}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add or replace secrets. | private void addSecrets(ObjectNode launchConfig) {
if (secrets != null && secrets.length() > 0) {
// Copy existing secrets, skipping any that we want to add or overwrite.
Iterator<JsonNode> elements = null;
boolean hasOldSecrets = false;
if (launchConfig.has(OPT_SECRETS) && !launchConfig.get(OPT_SECRETS).... | [
"public void addKeySecretPair(String key, String secret) throws ClassicDatabaseException;",
"@Headers({\n \"Content-Type:application/json\"\n })\n @POST(\"secrets\")\n Call<Secret> addSecret(\n @retrofit2.http.Body Secret secret\n );",
"DBOOtpSecret storeSecret(Long userId, String secret);",
"public... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |