query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Notify the range of tab has been changed, and the TabIndicatorView should update to reflect the changes. | public final void notifyTabRangeChanged(int positionStart, int itemCount) {
mView.getAdapter().notifyItemRangeChanged(positionStart, itemCount);
} | [
"public void tabChanged()\n {\n super.tabChanged();\n }",
"public final void notifyTabChanged(int position) {\n mView.getAdapter().notifyItemRangeChanged(position, 1);\n }",
"protected abstract void updateTabState();",
"protected void tabChanged(boolean changed) {\n t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the ipv4Configuration property: The IPv4 configuration of the network adapter. | public Ipv4Config ipv4Configuration() {
return this.ipv4Configuration;
} | [
"io.particle.firmwareprotos.ctrl.Network.Ipv4Config getIpv4Config();",
"public Optional<Ip4Address> getDhcpGatewayIp4() {\n return Optional.ofNullable(gatewayIp4Addr);\n }",
"public java.util.List<String> getIpv4Addresses() {\n return ipv4Addresses;\n }",
"public static IPAddressFormatter<... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
updates the choices with info about a hit guess | private void updateChoiceMapHitInfo(int row, int col) {
//for all the plane positions that are valid and that contain the
//current position increment their score
m_pipi.reset();
while (m_pipi.hasNext()) {
//obtain index for position that includes Coordinate2D(row,col)
... | [
"private void updateChoiceMap(final GuessPoint gp) {\n //marks all the 4 positions in the choice map as guessed -2\n for(int i = 0; i < 4; i++) {\n Plane plane = new Plane(gp.m_row, gp.m_col, Orientation.values()[i]);\n int idx = mapPlaneToIndex(plane);\n m_choices.set... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convert integerbased permission values to stringbased permissions A value of 0 is silently ignored | private List<Permission> convertPermission(int value) {
List<Permission> permissions = new ArrayList<Permission>();
final int CHMOD = 1;
final int WRITE = 2;
final int READ = 4;
final int ALL = 7;
if (value == ALL) {
permissions.add(Permission.READ);
... | [
"public static String convertPermission(int level) {\n\t\tif (level == 1) {\n\t\t\treturn \"user\";\n\t\t} else {\n\t\t\tif (level == 2) {\n\t\t\t\treturn \"mod\";\n\t\t\t} else {\n\t\t\t\tif (level == 3) {\n\t\t\t\t\treturn \"admin\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn \"user\";\n\t}",
"String getPermission(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
get ImageProcessor object with name | public ImageProcessor getImageProcessor(String name) {
ImageProcessor ip = (ImageProcessor)imageCache.get(name);
if (ip==null) {
// need to create ImagePlus object
addImageProcessor(name);
ip = (ImageProcessor)imageCache.get(name);
}
return ip;
} | [
"public FeatureProcessor getFeatureProcessor(String name) {\n\treturn (FeatureProcessor) featureProcessors.get(name);\n }",
"public String getProcessorName();",
"public static ImageProcessor createIfSupported()\n \t{\n \t\tif (isSupported())\n \t\t{\n \t\t\treturn new ImageProcessor();\n \t\t}\n \t\treturn n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns iterator over dimension and metric byte buffers. | public Iterator<Pair<byte[], byte[]>> iterator(int startDocId, int endDocId) throws IOException {
final int length = endDocId - startDocId;
final long startOffset = (long) startDocId * totalSizeInBytes;
return new Iterator<Pair<byte[], byte[]>>() {
int pointer = 0;
@Override
public boolea... | [
"Iterator<DicomElement> datasetIterator();",
"public Iterator<Pair<Byte, Double>> iterator();",
"java.util.List<org.tensorflow.proto.util.MemChunk> \n getChunkList();",
"Iterator<DicomElement> iterator();",
"public Iterator iterator()\n {\n return new BitmapIterator();\n }",
"com.google.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a comparator given the sort property. | protected Comparator<T> getComparator(SortParam sort) {
if (sort == null || sort.getProperty() == null)
return null;
for (Property<T> property : getProperties()) {
if (sort.getProperty().equals(property.getName())) {
Comparator<T> comparator = property.getC... | [
"public static Comparator<Transfer> getSortComparator(String sortPropertyName) {\n if (sortPropertyName == null) return null;\n\n try {\n // translate field name to accessor to property\n final Method method = Transfer.class.getMethod(\"get\" + StringUtils.capitalize(sortProperty... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests OrValidator(String namespace) method with invalid configuration, RegistrationValidationConfigurationException should be thrown. | public void testOrValidator_UnknownNS() {
try {
new OrValidator("fail.namespace");
fail("testOrValidator_UnknownNS is failure.");
} catch (RegistrationValidationConfigurationException rvce) {
// pass
} catch (Exception e) {
fail("Unknown exc... | [
"public void testOrValidator_InvalidConfig1() {\r\n try {\r\n TestHelper.loadConfiguration(INVALID_CONFIG1);\r\n new OrValidator(\"OrValidator\");\r\n fail(\"testOrValidator_InvalidConfig1 is failure.\");\r\n } catch (RegistrationValidationConfigurationException rvce) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "entryRuleOperationModeBinding" $ANTLR start "ruleOperationModeBinding" InternalComponentDefinition.g:703:1: ruleOperationModeBinding : ( ( rule__OperationModeBinding__Group__0 ) ) ; | public final void ruleOperationModeBinding() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalComponentDefinition.g:707:2: ( ( ( rule__OperationModeBinding__Group__0 ) ) )
// InternalComponentDefinition.g:708:2: ( ( rule__OperationModeB... | [
"public final void rule__OperationModeBinding__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalComponentDefinition.g:4528:1: ( ( 'OperationModeBinding' ) )\n // InternalComponentDefinition.g:4529:1: ( 'Opera... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the size, in bytes, of the field 'parent' | public static int size_parent() {
return (8 / 8);
} | [
"public static int size_parent() {\n return (16 / 8);\n }",
"public int getSize() {\r\n\t\t// return getParentSize() + rawGetSize();\r\n\t\treturn getParentsSize() + rawGetSize(); \r\n\t}",
"public static int size_parentId() {\n return (16 / 8);\n }",
"public int childLen() { return childL... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Deletes a TRptType entity object from the persistent store | void deleteTRptType(Integer rptTypeId); | [
"public void deleteTg000003(Tg000003 entity) throws Exception;",
"@Transactional\r\n\tpublic void deleteDressType(DressType dressType){ \r\n\t\tht.delete(dressType); \r\n\t}",
"public void delete(Type type);",
"<T> void deleteEntity(T entity) throws JpaExecutionException;",
"public void delete(final Livro... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to print doctors list | public void printDoctorsList()
{
//Initialising string variables
console.nextLine();
String name = "";
String pet = "";
//Checks if there are any doctors in the system
if (doctor1 != null || doctor2 != null)
{
//Asks the user to input the doctor they would like to print a patient list for
... | [
"public void listDoctors() {\n\n\t\ttry {\n\n\t\t\tList<Map<String, String>> doctorList = doctorDao.list();\n\n\t\t\tString did = \"DoctorId\";\n\t\t\tString dname = \"Doctor Name\";\n\t\t\tString speciality = \"Speciality\";\n\n\t\t\tSystem.out.printf(\"%10s%15s%15s\\n\", did, dname, speciality);\n\t\t\tSystem.out... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set enabled the input component | public void setEnabledInput(final boolean enabled) {
super.setEnabled(enabled);
if (getInput() != null) {
getInput().setEnabled(enabled);
}
} | [
"void setInputEnabled(boolean state);",
"void setEnabled(boolean enabled);",
"private void enableInput(boolean enable) {\n txtInput.setEnabled(enable);\n btSend.setEnabled(enable);\n }",
"public void setEnabled(boolean enabled) {\r\n this.enabled = enabled;\r\n }",
"public void se... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new form CreateServerDialog | public CreateServerDialog(java.awt.Frame parent, boolean modal) {
super(parent, modal);
initComponents();
} | [
"private int startServerDialog() {\n Dialog<Integer> dialog = new Dialog<>();\n dialog.setTitle(\"Create server\");\n dialog.setHeaderText(\"Enter port number! (\" + MIN_PORT_RANGE + \"-\" + MAX_PORT_RANGE + \")\");\n\n // Set the button types.\n ButtonType createServerButton = ne... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Argument__ExtendedAttributesAssignment_0_1" $ANTLR start "rule__Argument__ExtendedAttributesAssignment_0_2_1" ../org.waml.w3c.webidl.ui/srcgen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:10356:1: rule__Argument__ExtendedAttributesAssignment_0_2_1 : ( ruleArgumentExtendedAttrib... | public final void rule__Argument__ExtendedAttributesAssignment_0_2_1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:10360:1: ( ( ruleArgument... | [
"public final void rule__Argument__ExtendedAttributesAssignment_0_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:10345:1: (... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of findMax method, of class BinarySearchTree. | @Test
public void testFindMax() {
System.out.println("findMax");
Node expResult = new Node();
expResult.setElement(10);
Node result = sevenBinarySearchTree.findMax();
assertEquals(expResult.getElement(), result.getElement());
} | [
"public void testFindMax() {\r\n assertNull(tree.findMax());\r\n tree.insert(\"apple\");\r\n tree.insert(\"bagel\");\r\n assertEquals(\"bagel\", tree.findMax());\r\n tree.remove(\"bagel\");\r\n assertEquals(\"apple\", tree.findMax());\r\n }",
"@Test\n public void te... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of interpreting the object as an instance of 'Pattern Statement'. This implementation returns null; returning a nonnull result will terminate the switch. | public T casePatternStatement(PatternStatement object) {
return null;
} | [
"public T casePattern(Pattern object)\n {\n return null;\n }",
"public T casePattern(Pattern object) {\n\t\treturn null;\n\t}",
"public T casePatternEntry(PatternEntry object)\n {\n return null;\n }",
"public T caseGraphPatternDeclaration(GraphPatternDeclaration object)\n {\n return null;\n }",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method verifies if there is an existing/running gameservers by a given port. | public boolean isExistingGameserver(int port) {
return gameservers.containsKey(port);
} | [
"public boolean isExistingStoppedGameserver(int port) {\n return stopped_gameservers.contains(port);\n }",
"private boolean checkPortExists(Bot b, int port) {\n return b.getServer(port) != null;\n }",
"private boolean portInUse(int port) {\n if (port == 0) return false; // Ephemeral\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Builds a iiwa_msgs.JointPositionVelocity message given a LBR iiwa Robot. The message header is set to current time. | public void getCurrentJointPositionVelocity(iiwa_msgs.JointPositionVelocity currentJointPositionVelocity, LBR robot) {
double[] position = robot.getCurrentJointPosition().getInternalArray();
currentJointPositionVelocity.getHeader().setStamp(time.getCurrentTime());
Conversions.vectorToJointQuantity(position... | [
"public void getCurrentJointVelocity(iiwa_msgs.JointVelocity currentJointVelocity, LBR robot) {\n Conversions.vectorToJointQuantity(computeVelocity(robot), currentJointVelocity.getVelocity());\n }",
"public void setJointVelocity(iiwa_msgs.JointVelocity velocity) {\r\n\t\tjv = velocity;\r\n\t}",
"public void... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "I" $ANTLR start "J" | public final void mJ() throws RecognitionException {
try {
// /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:536:11: ( ( 'j' | 'J' ) )
// /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/... | [
"public final void mJ() throws RecognitionException {\n try {\n // Z:\\\\Compiler\\\\CIP\\\\Aufgabe 3\\\\Sebastian\\\\AST_Symbolraetsel.g:54:12: ( 'J' )\n // Z:\\\\Compiler\\\\CIP\\\\Aufgabe 3\\\\Sebastian\\\\AST_Symbolraetsel.g:54:14: 'J'\n {\n match('J'); \n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
gets the string date from the tooltip and convert it to a date object | public Date getToolTipDateTimePicker(String date,String StartorEndDate)
{
Date redate = null;
try
{
//splits the date string from the tooltip using spaces
String [] k = date.split(" ");
//
//
//substrings the seconds from the date string from the... | [
"public Date IeredLinegetToolTipDateTimePicker(String date,String StartorEndDate)\n {\n Date redate = null; \n try\n {\n //splits the date string from the tooltip using spaces \n String [] k = date.split(\" \");\n //\n //substrings the seconds from the date ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'var154' field. | public java.lang.Integer getVar154() {
return var154;
} | [
"public java.lang.Integer getVar154() {\n return var154;\n }",
"public java.lang.Integer getVar159() {\n return var159;\n }",
"public java.lang.Integer getVar159() {\n return var159;\n }",
"public java.lang.CharSequence getVar153() {\n return var153;\n }",
"public java.lang.Integer getVa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates the instance of the SpotProperty hasshtable. | public SpotPropertyManager() {
super();
} | [
"public ShopPointTbl () {\n\t\tsuper();\n\t}",
"Property createProperty();",
"public HPPotion() {\n\t\tsuper();\n\t\tthis.hpRegen = 40;\n\t}",
"public HashTable(PROBING_METHOD hashingT){\n this();\n this.hashingT = hashingT;\n }",
"public PropertyIdentifier(){\r\n\t\tthis.props = new Proper... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
default is cargo if press it goes to hatch mode if press again back to cargo mode | public void cargoOrHatch()
{
if(oi.getBoxA())
{
yIsPressed = true;
}
if(yIsPressed && !(oi.getBoxA()))
{
yIsPressed = false;
hatch = !hatch;
}
} | [
"public void switchToClimber() {\r\n switcher.set(!ELEVATOR_MODE);\r\n }",
"public void mode() {\n if (mazeview.getMode() == MazeView.SELECT_MODE) {\n mazeview.setMode(MazeView.PENCIL_MODE);\n modeButton.setGraphic(cursorImage);\n modeButton.setTooltip(cursorToolt... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return a description of a room exit, for example, "Exits: north west" | public String getExitString()
{
return ("\nSaída(s):\n " + roomExits.keySet());
} | [
"public String getExitString()\n {\n String descripcion = \"\";\n // Itera sobre el hashMap, si la habitacion no es null\n // guarda la key de la dirección\n Iterator it = salidas.entrySet().iterator();\n while(it.hasNext())\n {\n Map.Entry<String, Room> pair ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Outputs info about a route table | public static void printRouteTable(RouteTable resource) {
StringBuilder info = new StringBuilder();
info
.append("Route table: ")
.append(resource.id())
.append("\n\tName: ")
.append(resource.name())
.append("\n\tResource group: ")
... | [
"static void printRouteTable(){\n\t\t//formatting title\n\t\tSystem.out.println(\"\\n Distance Routing Vector Table\");\n\t\tSystem.out.print(\"---------\");\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tSystem.out.print(\"--------\");\n\t\t}\n\t\tSystem.out.println();\n\t\t//end of title\n\n\t\tfor(int x = 0; x <= n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false]; | java.util.List<? extends prometheus.Types.LabelOrBuilder>
getLabelsOrBuilderList(); | [
"prometheus.Types.Label getLabels(int index);",
"prometheus.Types.LabelMatcher.Type getType();",
"Property addLabels(String... labels);",
"Property addLabels(Set<String> labels);",
"public void setLabels(String labels) {\n this.labels = labels;\n }",
"@Test\n public void labelsTest() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set an access rail | public void setAccess(Rail access) {
this.access = access;
} | [
"void setRightNeighbor(Lane ln);",
"public void setCanUseRail(boolean use) {\n canUseRail = use;\n }",
"public void setRoads(int value) {\r\n this.roads = value;\r\n }",
"public void setAccessRight(java.lang.String value);",
"public void setTunnelRail(Rail r, String d) {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
override PersistNodeCredentialsModule bindings, any better way to do it? | @Override
protected void install(Module module) {
if (module instanceof PersistNodeCredentialsModule) {
super.install(new PersistVagrantCredentialsModule());
} else {
super.install(module);
}
} | [
"public interface BaseCredentialsProvider {\n}",
"public Module persistModule(Module module) throws JHOVE2Exception;",
"public interface CredentialStore {\n\n /**\n * Initialize credential store.\n *\n * @param domainManager DomainManager instance for which is shared by the identity ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method used to get all the active event formatter configuration objects | public List<EventFormatterConfiguration> getAllActiveEventFormatterConfiguration(
AxisConfiguration axisConfiguration)
throws EventFormatterConfigurationException; | [
"public List<EventFormatterConfigurationFile> getAllInactiveEventFormatterConfiguration(\n AxisConfiguration axisConfiguration);",
"public String getActiveEventFormatterConfigurationContent(String eventFormatterName,\n AxisConfiguration axisC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets whether there should be caching used for the annotated text. Does not change the caching for previously returned annotated texts, only for future ones! | public static void enableCache(boolean useCache) {
OntologyTextProvider.useCache = useCache;
} | [
"public void setCached(boolean cached) { this.cached = cached; }",
"public void setUseCache(final boolean argUseCache) {\n mUseCache = argUseCache;\n }",
"void setCached(boolean b);",
"public void setCached(boolean cached)\n {\n synchronized (monitor())\n {\n check_orphaned()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Online authentication is triggered and the method de.persoapp.core.client.EAC_Info.getOptionalChat() is tested. Preconditions: A single basic card reader is connected to the eIDClient system. A single active test eIDCard is connected to the card reader. TestStep: The online authentication is triggered. The return value... | @Test
public void eac_infoTest_24() throws IOException, URISyntaxException,
GeneralSecurityException {
final TestSpy spy = new TestSpy();
final URL tcTokenURL = new URL(serviceURL);
MockUp<EAC_Info> mockUp = new MockUp<EAC_Info>() {
@Mock
public long getOptionalChat(mockit.Invocation inv) {
... | [
"@Test\r\n\tpublic void eac_infoTest_23() throws IOException, URISyntaxException,\r\n\t\t\tGeneralSecurityException {\r\n\t\tfinal TestSpy spy = new TestSpy();\r\n\r\n\t\tfinal URL tcTokenURL = new URL(serviceURL);\r\n\r\n\t\tMockUp<EAC_Info> mockUp = new MockUp<EAC_Info>() {\r\n\t\t\t@Mock\r\n\t\t\tpublic long get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
System.out.println( "getValueAt: (" + row + "," + col + "): " + records[row][col]); | @Override
public Object getValueAt(int row, int col) {
return records[row][col];
} | [
"@Test\n public void testGetValueAt() {\n System.out.println(\"getValueAt\");\n int rowIndex = 0;\n int columnIndex = 0;\n\n Object expResult = \"Vlakna hypercasu\";\n Object result = testLibraryLibraryTableModel.getValueAt(rowIndex, columnIndex);\n assertEquals(expResul... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Devuelve el identificador del rol | Integer getIdRole(); | [
"@Override\n public long getRolId() {\n return _rol.getRolId();\n }",
"java.lang.String getRoleid();",
"public int getAccesoMenuRolId() throws DataStoreException {\r\n\t\treturn getInt(ACCESO_MENU_ROL_ID);\r\n\t}",
"UsuarioRol getUsuarioRolById(Integer id);",
"@Override\r\n\tpublic Integer getI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Imports a static field on demand. | public boolean importStaticFieldOnDemand(VariableSymbol[] fields) {
return importedFields.importStaticMemberOnDemand(fields);
} | [
"public _import setStatic(){\n return setStatic(true);\n }",
"public boolean importStaticField(String name, VariableSymbol[] fields) {\n return importedFields.importStaticMember(name, fields);\n }",
"int unsafeExperimentalStaticField() {\n return AnnotatedJavaMembers.FIELD_STATIC;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if field serviceConfig is set (has been assigned a value) and false otherwise | public boolean isSetServiceConfig() {
return this.serviceConfig != null;
} | [
"public boolean isSetConfig() {\n return this.config != null;\n }",
"public boolean isSetServiceId() {\n return this.serviceId != null;\n }",
"boolean isSetServiceConfigurationList();",
"public boolean isSetServiceId() {\n return this.serviceId != null;\n }",
"public boolean configSet() {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
SEND NOTIFICATION Send a notification with accompanying title and text | public void sendNotification(String notifTitle, String notifText) {
} | [
"private void simpleNotification() {\n mBuilder.setSmallIcon(R.drawable.ic_launcher);\n mBuilder.setContentTitle(\"Simple Notification\");\n mBuilder.setContentText(\"I am Content text , you can change me.\");\n int notificationId = 1;\n mManager.notify(notificationId, mBuilder.bu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns all the broker message listeners. | @Override
public List<BrokerMessageListener> findAll() throws SystemException {
return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
} | [
"public synchronized List<EventListener> getListeners() {\n \treturn listeners;\n }",
"public Iterator<Object> listeners() {\n return Arrays.asList(fListeners).iterator();\n }",
"protected ServerListener[] getListeners () {\n ServerListener[] array;\n synchronized (listeners) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
void HTLCOutputInCommitment_set_payment_hash(struct LDKHTLCOutputInCommitment NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); | public static native void HTLCOutputInCommitment_set_payment_hash(long this_ptr, byte[] val); | [
"public static native void UpdateAddHTLC_set_payment_hash(long this_ptr, byte[] val);",
"public static native byte[] HTLCOutputInCommitment_get_payment_hash(long this_ptr);",
"public static native void UnsignedChannelAnnouncement_set_chain_hash(long this_ptr, byte[] val);",
"public static native byte[] Update... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ negative test cases no category specified 1) valid base price (assume must be positive) 2) valid person count 3) null category (assume a product can only be in one category) | @Test(expected = ProductCategoryNotSpecifiedException.class)
public void testEmptyCategory() throws BasePriceMustBePositiveException,
NegativePersonCountException, ProductCategoryNotSpecifiedException {
NuPackEstimator estimator = new NuPackEstimator(new BigDecimal("100"), 1, "");
estimator.estimateFina... | [
"@Test(expected = ProductCategoryNotSpecifiedException.class)\r\n\tpublic void testNullCategory() throws BasePriceMustBePositiveException, \r\n\t NegativePersonCountException, ProductCategoryNotSpecifiedException {\r\n\t\tNuPackEstimator estimator = new NuPackEstimator(new BigDecimal(\"100\"), 1, null);\r\n\t e... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__SpecialEntity__Group__0" $ANTLR start "rule__SpecialEntity__Group__0__Impl" InternalMyDsl.g:3252:1: rule__SpecialEntity__Group__0__Impl : ( 'specialEntity' ) ; | public final void rule__SpecialEntity__Group__0__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalMyDsl.g:3256:1: ( ( 'specialEntity' ) )
// InternalMyDsl.g:3257:1: ( 'specialEntity' )
{
// InternalMyDsl.g... | [
"public final void rule__SpecialEntity__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMyDsl.g:3244:1: ( rule__SpecialEntity__Group__0__Impl rule__SpecialEntity__Group__1 )\n // InternalMyDsl.g:3245:2: rule__Spec... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Send a move (made by the client) to the server | public void sendMove(int pos) {
this.sendMessageToServer("move " + pos);
} | [
"private void sendMove(String newMove){\n\t\t\n\t\tmessage = new Message(0,null, null, false, newMove);\n\t\ttry {\n\t\t\toos.reset();\n\t\t\toos.writeObject(message);\n\t\t\tmyTurn = false;\n\t\t\tcheckTurn();\n\t\t\t\n\t\t} catch (IOException e1) {\n\t\t\tJOptionPane.showMessageDialog(null,\"Connection Error: Mov... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new instance of deleteAndModifyEvent | public deleteAndModifyEvent() {
} | [
"Events<T> create();",
"Event createEvent();",
"org.purl.atompub.tombstones.x10.DeletedEntryDocument.DeletedEntry addNewDeletedEntry();",
"Delete createDelete();",
"void deleteEvent(Long id);",
"public void onDelete(TimelineModificationEvent e) {\n\t\tevent = e.getTimelineEvent();\n\t}",
"public boolean... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column t_order.orderExt | public String getOrderExt() {
return orderExt;
} | [
"public void setOrderExt(String orderExt) {\n\tthis.orderExt = orderExt == null ? null : orderExt.trim();\n }",
"public BigDecimal getEXTENSION_NO()\r\n {\r\n\treturn EXTENSION_NO;\r\n }",
"public Integer getExtid() {\r\n return extid;\r\n }",
"public String getExt2() {\n return ext2... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A method testing the thrustmethod with a negative value. | @Test
public void thrustIllegalCaseNegative() throws IllegalComponentException {
movingShip1.setVelocity(10, -8);
movingShip1.thrust(-10*Math.sqrt(2));
assertEquals(10, movingShip1.getXVelocity(), Util.EPSILON);
assertEquals(-8, movingShip1.getYVelocity(), Util.EPSILON);
} | [
"@Test\r\n\tpublic void testNegativeRamp() {\r\n\t\tforwardInput = -1;\r\n\t\twheelSystem.run();\r\n\t\tAssert.assertTrue(forwardOutput == -0.75);\r\n\t}",
"@Test\n\tpublic void thrustLegalCase() throws IllegalComponentException {\n\t\tmovingShip1.setDirection((Math.PI)/4);\n\t\tmovingShip1.setVelocity(10, -8);\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets if the macro context is trusted or not. | public boolean isTrusted() {
return trusted;
} | [
"Boolean getIsTrusted();",
"public boolean isPreTrusted(){\n\t\treturn (this.pre_trusted);\n\t}",
"boolean isUnderSafetyDirectives();",
"final boolean hasContext()\r\n {\r\n return StringUtils.isNotEmpty(this.context);\r\n }",
"@Override\n\tpublic boolean isTrustedSession();",
"public boolean... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The init function, not dissimilar to list comprehensions, which is used to return a new finite sequence whose contents are determined by successive calls to the function f. init: (int > T) > int > T seq | public static <T> Iterable<T> init(final Function<Integer, ? extends T> f, final int howMany) {
if (f == null) throw new IllegalArgumentException("f");
if (howMany < 1) throw new IllegalArgumentException("howMany");
return new Iterable<T>() {
private final Atomi... | [
"public static <T> Iterable<T> init(final Function<Integer, ? extends T> f) {\r\n if (f == null) throw new IllegalArgumentException(\"f\");\r\n\r\n return new Iterable<T>() {\r\n private final AtomicBoolean haveCreatedIterator = new AtomicBoolean(false);\r\n\r\n p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The time at which this processor version will be deprecated. .google.protobuf.Timestamp deprecation_time = 1; | @java.lang.Override
public com.google.protobuf.Timestamp getDeprecationTime() {
return deprecationTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: deprecationTime_;
} | [
"com.google.protobuf.Timestamp getDeprecationTime();",
"com.google.protobuf.TimestampOrBuilder getDeprecationTimeOrBuilder();",
"public com.google.protobuf.Timestamp getDeprecationTime() {\n if (deprecationTimeBuilder_ == null) {\n return deprecationTime_ == null\n ? com.google.prot... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test the default Constructor. | @Test
public void testDefaultConstructor() {
Assert.assertNull(this.c.getSetupFile());
Assert.assertNull(this.c.getExecutable());
Assert.assertNull(this.c.getJobType());
Assert.assertNull(this.c.getName());
Assert.assertNull(this.c.getStatus());
Assert.assertNull(this... | [
"public void testConstructor() {\r\n assertNotNull(\"unable to create instance\", instance);\r\n }",
"public CompteurInstanceTest()\n {\n }",
"@Test\n public void testDefaultConstructor() {\n Assert.assertNull(this.a.getSetupFile());\n Assert.assertNull(this.a.getStatus());\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if there are at least 2 candles disconnected from average, in the correct direction of the trend. | private boolean arePrevCandlesFarFromAverage(JapaneseCandleBar[] previousCandles, int index, boolean isLongTrend) {
if (index < 2) {
return false;
}
boolean prevCandleAboveAverage;
boolean twoBeforeCandleAboveAverage;
if (isLongTrend) {
prevCandleAboveAverage = previousCandles[index - 1].getLow() > prev... | [
"static boolean isBalanced() {\n int v = counts[0].get();\n for (int i=0; i<WIDTH; i++)\n if (v-counts[i].get() > 1) return false;\n return true;\n }",
"private void checkOverlapTreats() {\n // Eat any overlapping treats.\n for (int i = 0; i < treats.size(); i++) {\n if (winnie.overlaps(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Finds the protocol session file identified by the test name, and builds protocol elements from it. All elements from the definition file are added to the supplied ProtocolSession. | protected void addTestFile(String fileName, ProtocolSession session) throws Exception {
fileName = scriptDirectory + fileName;
// Need to find local resource.
InputStream is = this.getClass().getResourceAsStream(fileName);
if (is == null) {
throw new Exception("Tes... | [
"public void createXmlFromSession() {\n System.out.println(\"createXmlFromSession\");\n Session session = null;\n File outputFile = null;\n IGVSessionReader instance = null;\n String expResult = \"\";\n //String result = instance.createXmlFromSession(session, outputFile);\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set method for struct member 'followflag'. | public void setFollowflag(int followflag) throws IOException
{
if ((__io__pointersize == 8)) {
__io__block.writeInt(__io__address + 16, followflag);
} else {
__io__block.writeInt(__io__address + 12, followflag);
}
} | [
"public void setFollowUp(final String followID) \n {\n followUp = followID;\n }",
"public void setFollower(FollowingType follower) {\n\t\tthis.follower = follower;\n\t}",
"public void setFKeepFollow( boolean value )\n {\n field_13_widthAndFitsFlags = fKeepFollow.setBoolean(\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column TRSDEAL_PROMISSORY_FX.ACTUAL_RATE_OF_RETURN | public BigDecimal getACTUAL_RATE_OF_RETURN()
{
return ACTUAL_RATE_OF_RETURN;
} | [
"public void setACTUAL_RATE_OF_RETURN(BigDecimal ACTUAL_RATE_OF_RETURN)\r\n {\r\n\tthis.ACTUAL_RATE_OF_RETURN = ACTUAL_RATE_OF_RETURN;\r\n }",
"public BigDecimal getEXPECTED_RATE_OF_RETURN()\r\n {\r\n\treturn EXPECTED_RATE_OF_RETURN;\r\n }",
"public BigDecimal getPROFIT_RATE_OLD() {\r\n retur... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Getter do Map da Faturacao | public Map<String,NodoFatura> getFaturas()
{
return this.faturas
.entrySet()
.stream()
.collect(Collectors.toMap(Map.Entry::getKey, e -> e.getValue().clone()));
} | [
"java.util.Map<String, Float>\n getS2FMapMap();",
"java.util.Map<Integer, Float>\n getI2FMapMap();",
"java.util.Map<Long, Float>\n getL2FMapMap();",
"public static Map<String, Flight> getFlightMap() {\r\n return flightMap;\r\n }",
"public String getMapping();",
"public FrecuenciaCoordenadas()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Verifies the presence of Skip button while skipping Phone verification. | public void verifySkip()
{
Assert.assertEquals(continueButton.getText(), "Skip");
} | [
"public MailPage checkPhoneNumberAskAndSkip() {\n try {\n SelenideElement element = $(PHONE_NUMBER_ALERT_TITLE);\n if (element.exists()) {\n $$(BUTTON).get(1).click();\n }\n } catch (NoSuchElementException e) {\n // ignored.\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method how to get the message history from a given channel (by default, 1000 max messages are fetched) | public void fetchSomeMessagesFromChannelHistory(SlackSession session, SlackChannel slackChannel) {
// build a channelHistory module from the slack session
ChannelHistoryModule channelHistoryModule = ChannelHistoryModuleFactory.createChannelHistoryModule(session);
List<SlackMessagePosted> messages = channelHistor... | [
"public void fetchTenLastMessagesFromChannelHistory(SlackSession session, SlackChannel slackChannel) {\n\t\t// build a channelHistory module from the slack session\n\t\tChannelHistoryModule channelHistoryModule = ChannelHistoryModuleFactory.createChannelHistoryModule(session);\n\n\t\tList<SlackMessagePosted> messag... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Display Operations Available for GP2 | public void displayOperations() {
System.out.println("" +
"Select Operation for GasPump 2 : \n" +
"0.) Activate \n" +
"1.) Start \n" +
"2.) PayCredit \n" +
"3.) Reject \n" +
"4.) PayDebit \n" +
"5.) ... | [
"public String toString () {\r\n\t\treturn allOps;\r\n\t}",
"public String toString()\n {\n RegionOp.Operation op;\n Region region;\n String result = \"\"; \n\n for ( RegionOp regionOp:regionOpList )\n {\n op = regionOp.getOp();\n region = regionOp.getRegion();\n result += \"\\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Is type of poll | public static boolean isPoll(Node content) {
return isContentOfType(content, POLL);
} | [
"public String getPollType() {\n return pollType;\n }",
"public boolean isPolling();",
"int getThreadHasPoll();",
"public abstract int getPollStatusInterval();",
"public boolean isTimeToSelect();",
"@Override\r\n protected boolean handleIsTimeType()\r\n {\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new instance with the given format string and the given locale. | public abstract DataType<T> newInstance(String format, Locale locale); | [
"private ARXDate(String formatString, Locale locale) {\r\n if (formatString == null || formatString.equals(\"Default\")) {\r\n this.string = \"dd.MM.yyyy\";\r\n this.format = new SimpleDateFormat(string, locale);\r\n this.locale = locale;\r\n } else... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Executes an update using provided mapper. | Object update(IDynamoDBMapper mapper, AmazonDynamoDB client); | [
"UpdateItemRequest resolveExpression(IDynamoDBMapper mapper);",
"protected void update(ResourceMapping mapper, LocalOption[] options) throws Exception {\n SyncInfoTree incomingSet = getIncoming(mapper.getProjects());\n update(new ResourceMapping[] { mapper }, options);\n assertUpdate(mappe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create the NFC Manager and the NFC listener | private void createNfcManager() {
nfcManager = new NfcManager(this);
nfcManager.onActivityCreate();
nfcManager.setOnTagReadListener(new NfcManager.TagReadListener() {
@Override
public void onTagRead(String tagId) {
tagWasScanned(tagId);
}
... | [
"public void initializeDiscoveryListener() {\n mDiscoveryListener = new NsdManager.DiscoveryListener() {\n\n @Override\n public void onDiscoveryStarted(String regType) {\n log(\"Discovery started\");\n }\n\n @Override\n public void onServi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if OnChannelGotListModes ever been called for this channel. | public boolean hasGotListModes() {
return hasGotListModes;
} | [
"public boolean hasAskedForListModes() {\n return askedForListModes;\n }",
"public boolean isSetLstChannel() {\n return this.lstChannel != null;\n }",
"public boolean isSetLstManageChannel() {\n return this.lstManageChannel != null;\n }",
"public void setHasGotListModes(final boolean newValu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the update flag. | public String getUpdateFlag() {
return updateFlag;
} | [
"public Integer getUpdateflag() {\n return updateflag;\n }",
"public Integer getIsUpdate() {\n return isUpdate;\n }",
"boolean getIsUpdate();",
"public String getUPD_FLAG() {\r\n return UPD_FLAG;\r\n }",
"public boolean getUpdateStatus() {\n\t\treturn this.updated;\n\t}",
"bo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
System.err.println("In generateFieldCode: " + child); First process children... | private void generateFieldCode(XMLElement child, XMLElement mout, String filename, boolean isMethod) throws Exception {
if ( child.getChildren().size() > 0 && !child.getFirstChild().getName().equals("value") ) {
Vector<XMLElement> vc = child.getChildren();
for (int vci = 0; vci < vc.size(); vci++) {
if ( ch... | [
"public anywheresoftware.b4j.objects.NodeWrapper.ConcreteNodeWrapper _getparent() throws Exception{\nif (true) return _mbase.getParent();\n //BA.debugLineNum = 223;BA.debugLine=\"End Sub\";\nreturn null;\n}",
"public void createFuncGetChildList(){\n//\t\tString func = \"ghj_func_currval\";\n//\t\tString sql1 = \... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Basic test of getProcedure() method. It creates the instance of MockActionAbstractImpl for several times, then gets the procedure for test, like a stress test. Note: Because the ActionAbstractImpl class is abstract, we use MockActionAbstractImpl instead. | public void testgetProcedure_Basic_Complex() {
for (int i = 0; i < 3; i++) {
ActionAbstractImpl action = new MockActionAbstractImpl();
assertNull("The procedure should be null", action.getProcedure());
}
} | [
"public void testsetProcedure_Detail() {\n for (int i = 0; i < 3; i++) {\n ActionAbstractImpl action = new MockActionAbstractImpl();\n // set the procedure to the action.\n action.setProcedure(procedure);\n // equal value expected.\n assertEquals(\"The ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes the given TMX 1.4 element from the segment. is special since it does not only surround embedded tags but also text, which must be pulled out of the and added to the parent tag. | private void removeSubElement(Element p_element)
{
Element parent = p_element.getParent();
int index = parent.indexOf(p_element);
// We copy the current content, clear out the parent, and then
// re-add the old content, inserting the <sub>'s textual
// content instead of the... | [
"private Element removeSubElements(Element p_seg)\n {\n ArrayList elems = new ArrayList();\n\n findSubElements(elems, p_seg);\n\n for (int i = 0; i < elems.size(); i++)\n {\n Element sub = (Element)elems.get(i);\n\n removeSubElement(sub);\n }\n\n re... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the relocation information. This is an array of ints where where each entry discribes one offset into the code where relocation is required. The format of each entry is such that the top 8 bits is a code indicating the type of relocation required and the low 24 bits is the offset. Stack: _ > _ | public int[] getRelocationInfo(); | [
"public int getRelocInstrOffset() {\n\t\treturn relocInstrOffset;\n\t}",
"public int getRelocType() {\n return rtype;\n }",
"public static int offset_infos_seq_num() {\n return (64 / 8);\n }",
"public int getRelocSectionCount() {\n\t\treturn relocSectionCount;\n\t}",
"public int getLinke... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the count of polleronly votes for this peer. | public abstract long getPollerOnlyVotes(); | [
"public long getVotesCount() {\r\n\t\treturn votesCount;\r\n\t}",
"public int getNumVotes()\r\n\t{\r\n\t\treturn numVotes;\r\n\t}",
"public int getVoteCount() {\n return votes.size();\n }",
"int getNumberOfVotes();",
"public int getNumVotes() {\n return numVotes;\n }",
"public int getV... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column z_water_record.water_fee | public Integer getWaterFee() {
return waterFee;
} | [
"public void setWaterFee(Integer waterFee) {\n this.waterFee = waterFee;\n }",
"public Integer getFee() {\n return fee;\n }",
"public BigDecimal getJP_BankTransferFee()\n\t{\n\t\tBigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_JP_BankTransferFee);\n\t\tif (bd == null)\n\t\t\t return Env.ZER... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The getter method to get the number of fifties in ATM | public int getFifties() {
return fifties;
} | [
"public abstract int getCntFtc();",
"int getGiftdeallistCount();",
"public int getFoodCount()\r\n\t{\r\n\t\treturn foodCount;\r\n\t}",
"public int getFlechas(){ return this.numFlechas; }",
"public int getNumFlights() {\n return numFlights;\n }",
"public static int getNumFoods() { return numFoods... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Module__Group__2__Impl" $ANTLR start "rule__Module__Group__3" ../fr.tpt.aadl.ramses.transformation.trc.xtext.ui/srcgen/fr/tpt/aadl/ramses/transformation/trc/xtext/ui/contentassist/antlr/internal/InternalTRC.g:1533:1: rule__Module__Group__3 : rule__Module__Group__3__Impl rule__Module__Group__4 ; | public final void rule__Module__Group__3() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../fr.tpt.aadl.ramses.transformation.trc.xtext.ui/src-gen/fr/tpt/aadl/ramses/transformation/trc/xtext/ui/contentassist/antlr/internal/InternalTRC.g:1537:1: ( rul... | [
"public final void rule__Module__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:2694:1: ( rule__Module__Group__3__Impl rule__Module__Group__4 )\n // InternalOCLlite.g:2695:2: rule__Module__Group__3__Imp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Delete the given version from the database. After deleting, the Data Access Object will set the ID of the given version to null. | public void delete(Version version) throws Exception {
Object[] values = {
version.getOid()
};
if (version.getOid() == null) {
throw new IllegalArgumentException("Version is not created yet, so the version OID cannot be null.");
}
Connection connect... | [
"public void deleteVersionFromDataset(String versionUri) {\n String update = \"sparql delete where {\\n\"\n + \"graph <\" + datasetsGraph + \"> { \\n\"\n + \"<\" + datasetURI + \"> rdfs:member <\" + versionUri + \">.\\n\"\n //+ \"OPTIONAL {<\" + versionUri + \"> r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create an empty template item for this collection. If one already exists, no action is taken. Caution: Make sure you call update on the collection after doing this, or the item will have been created but the collection record will not refer to it. | @Override
public Item createTemplateItem(Context context, Collection collection) throws SQLException, AuthorizeException
{
if(collection == null || collection.getTemplateItem() != null)
{
throw new IllegalArgumentException("Collection is null or already contains template item.");
... | [
"public com.walgreens.rxit.ch.cda.II addNewTemplateId()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.II target = null;\n target = (com.walgreens.rxit.ch.cda.II)get_store().add_element_user(TEMPLATEID$4);\n return targ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the value related to the column: hic_code | public void setHicCode (java.lang.String hicCode) {
this.hicCode = hicCode;
} | [
"public void setHsCode(String value) {\r\n this.hsCode = value;\r\n }",
"void setCodeColumn(String codeColumn);",
"public void setIcaoCode(String icaoCode)\n {\n this.icaoCode = icaoCode;\n }",
"public void setIns_code(int ins_code) {this.ins_code=ins_code;}",
"public void setCode(Str... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Used to process events that will not have usage, such as Create event with specified hosts. | public void processZeroUsageEvent(LoadBalancer lb, UsageEvent event, Calendar eventTime) throws UsageEventCollectionException {
List<Host> hosts = null;
try {
hosts = gatherHostsData(lb);
} catch (EntityNotFoundException e) {
LOG.error(String.format("On %s event, load bal... | [
"protected void processEvents() {\n Object event;\n while (true) {\n synchronized (eventQueue) {\n if (eventQueue.isEmpty() || !isAlive) {\n eventProcessor = null;\n return;\n }\n event = eventQueue.removeFir... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Service Interface for managing Classroom. | public interface ClassroomService {
/**
* Save a classroom.
*
* @param classroomDTO the entity to save
* @return the persisted entity
*/
ClassroomDTO save(ClassroomDTO classroomDTO);
/**
* Get all the classrooms.
*
* @return the list of entities
*/
List<C... | [
"private void updateClassroom() {\n\n if(clientSession.isTeacherRole())\n return;\n\n LinkedTreeMap classroomMap = (LinkedTreeMap) packet.getArgument(\"classroom\");\n\n Classroom classroom = Classroom.parse(classroomMap);\n\n if(clientDatabase.updateClassroom(classroom)) {\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The supported IP address types. | public java.util.List<String> getSupportedIpAddressTypes() {
if (supportedIpAddressTypes == null) {
supportedIpAddressTypes = new com.amazonaws.internal.SdkInternalList<String>();
}
return supportedIpAddressTypes;
} | [
"public void setSupportedIpAddressTypes(java.util.Collection<String> supportedIpAddressTypes) {\n if (supportedIpAddressTypes == null) {\n this.supportedIpAddressTypes = null;\n return;\n }\n\n this.supportedIpAddressTypes = new com.amazonaws.internal.SdkInternalList<Strin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Draw a single line string within the given bounds, rotated to the given angle | public void drawRotatedString(String string, Rectangle bounds, int x, int y, float angle, boolean antiAlias) {
if (iFont == null)
throw new SWTException("font not set"); //$NON-NLS-1$
TextRendering.drawRotatedString(this, string, bounds, x, y, angle, antiAlias);
} | [
"public void drawAngleIndicator(){\n\t\tfloat bottomLineHyp = 60;\n\t\tfloat topLineHyp = 100;\n\t\t\n\t\tfloat bottomXCoord = (float) ((Math.cos(Math.toRadians(angle) ) ) * bottomLineHyp);\n\t\tfloat bottomYCoord = (float) ((Math.sin(Math.toRadians(angle) ) ) * bottomLineHyp);\n\t\t\n\t\tfloat bottomX = Player.get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
System.out.println("Setting isLifting to: " + choice); | public void setIsLifting(boolean choice){
this.isLifting = choice;
} | [
"public void setChoice(boolean choice) {\r\n isChoice = choice;\r\n }",
"public void recipeSelection(){\n System.out.println(\"Select a potion to learn more about:\");\n System.out.println(\"(1) Health potion\");\n if(strengthRecipe){\n System.out.println(\"(2) Strength p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Go to form Abstract Page. | public abstract void goToFormPageAbstract(); | [
"public static void goToFormPage() throws MalformedURLException {\n\t\tCommonUtils.homeFabClick();\n\t\tHomepageAction.select_dialog_list(\"Form\");\n\t}",
"public MyAccountPage goToMyAccountPage(){\n clickContinueButton();\n return new MyAccountPage(driver);\n }",
"public abstract AbstractPage open();",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates or finds a RestoreDetailsName from its string representation. | @JsonCreator
public static RestoreDetailsName fromString(String name) {
return fromString(name, RestoreDetailsName.class);
} | [
"@JsonCreator\n public static DatabasePrincipalRole fromString(String name) {\n return fromString(name, DatabasePrincipalRole.class);\n }",
"@Nullable\n static MaterialVariantId tryParse(String string) {\n int index = string.indexOf('#');\n String variant = \"\";\n if (index >= 0) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
CONSTRUCTOR DE LA CLASE Cgg_tct_agencia_contacto | public Cgg_tct_agencia_contacto(
String inCtagc_codigo,
String inCtagv_codigo,
String inCrtco_codigo,
String inCtagc_descripcion,
String inCtagc_contacto,
boolean inCtagc_estado,
String inCtagc_usuario_insert,
String inCtagc_usuario_update
){
this.setCTAGC_CODIGO(inCtagc_codigo);
this.setCTAGV_CODI... | [
"public Cgg_tct_agencia_contacto(){}",
"public AgendaTelefonica()\n {\n contactos = new HashMap<>();\n }",
"public ContactVTO() {\r\n }",
"public Contacto(String nombre, String Apellido, String email, String telefono) {\n this.nombre = nombre;\n this.Apellido = Apellido;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Update assigned date for the specified task id | public void updateDateByID(final int tid, final Date newDate){
TaskDatabase.databaseWriteExecutor.execute(new Runnable() {
@Override
public void run() {
dao.updateDateByID(tid, newDate);
}
});
} | [
"void updateTaskDueDate(int id, LocalDateTime dueDate);",
"void updateTaskDueDate();",
"public void changeTaskDate(Long taskID, Date dateOfTask) {\n CalibrationTask task = taskRepository.findOne(taskID);\n if (task == null || dateOfTask == null) {\n throw new IllegalArgumentException();... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Attempts to open a serial connection and streams using the parameters in the SerialParameters object. If it is unsuccesfull at any step it returns the port to a closed state, throws a SerialConnectionException, and returns. Gives a timeout of 30 seconds on the portOpen to allow other applications to reliquish the port ... | public void openConnection() throws SerialConnectionException {
// Obtain a CommPortIdentifier object for the port you want to open.
logger.debug("In openConnection(): " + parameters.getPortName());
try {
logger.debug("In openConnection(): inside try..catch block "
... | [
"public void openConnection() throws SerialConnectionException\n {\n\n\t// Obtain a CommPortIdentifier object for the port you want to open.\n\ttry\n\t{\n ezlink.info(\"openConnection Request received in \" + SerialConnection.class.getName());\n ezlink.info(\"PortName= : \"+parameters.getPo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column T_IM_MANUFACTURERECBILLENTRY.FSUPPLIERID | public String getFsupplierid() {
return fsupplierid;
} | [
"public int getLBR_FiscalGroup_Vendor_ID();",
"public void setFsupplierid(String fsupplierid) {\n this.fsupplierid = fsupplierid;\n }",
"public int getHrbusiness_partner_wkf_id() {\r\n return getAsNumber(\"hrbusiness_partner_wkf_id\").intValue();\r\n }",
"public String getSupplierCode()\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "entryRuleOpPostfix" $ANTLR start "ruleOpPostfix" ../org.xtext.scripting/srcgen/org/xtext/scripting/parser/antlr/internal/InternalScripting.g:1553:1: ruleOpPostfix returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (kw= '++' | kw= '' ) ; | public final AntlrDatatypeRuleToken ruleOpPostfix() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
Token kw=null;
enterRule();
try {
// ../org.xtext.scripting/src-gen/org/xtext/scripting/parser/antlr/internal/Inte... | [
"public final AntlrDatatypeRuleToken ruleOpPostfix() throws RecognitionException {\n AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();\n\n Token kw=null;\n\n enterRule(); \n \t\tHiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens(\"RULE_SL_COMMENT\",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the current session for the subject or null if it does not currently exist. | Optional<SecuritySession> currentSession(); | [
"public IRODSSession getCurrentSession()\n\t{\n\t\tPair<IRODSSession, IRODSAccessObjectFactory> sessionPair = this.sessions.get(Thread.currentThread());\n\t\tif (sessionPair == null)\n\t\t\treturn null;\n\t\treturn sessionPair.getKey();\n\t}",
"public Session getSession() {\n return Session.getInstance(thi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the autori of this my library. | public java.lang.String getAutori() {
return _myLibrary.getAutori();
} | [
"public java.util.List<com.appuntivari.mylibrary.model.MyLibrary> findByAutori(\n\t\tjava.lang.String autori)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public void setAutori(java.lang.String autori) {\n\t\t_myLibrary.setAutori(autori);\n\t}",
"public int getCAlmacen() {\n return... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Applications Retrieves client application database id from a given token. | private long getApplicationIdByToken(String appToken) {
// get read access to db
final SQLiteDatabase db = mDbHelper.getReadableDatabase();
// query id
final Cursor appCursor = db.query(
FullContract.Apps.TABLE_NAME,
new String[]{
F... | [
"private static String getAppTokenId() {\n if (appTokenId == null) {\n synchronized (DefaultEntityManagerImpl.class) {\n if (appTokenId == null) {\n try {\n if (OAuthProperties.isServerMode()) {\n appTokenId = OAuthServiceUtils.getAdminTokenId();\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Evaluates the object projection expression. This will create a list of the values of the JSON object(lhs), and project the right hand side of the projection onto the list of values. | @Override
public JsonNode visit(JmesPathValueProjection valueProjection, JsonNode input) throws InvalidTypeException {
JsonNode projectedResult = valueProjection.getLhsExpr().accept(this, input);
if (projectedResult.isObject()) {
ArrayNode projectedArrayNode = ObjectMapperSingleton.getOb... | [
"private ParseTree parseObjectLiteral() {\n SourcePosition start = getTreeStartLocation();\n ImmutableList.Builder<ParseTree> result = ImmutableList.builder();\n\n eat(TokenType.OPEN_CURLY);\n Token commaToken = null;\n while (peek(TokenType.ELLIPSIS) || peekPropertyNameOrComputedProp(0) || peek(Toke... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a map of internal symbol > (external symbol, value) | private Map<Symbol, Entry<T>> getInternalTable() {
if (internalTable == null) {
// Iterate table [external -> (internal, value) list] and build new map [internal -> (external, value)]
internalTable = new HashMap<Symbol, Entry<T>>();
List<Table.Entry<Symbol, List<Entry<T>>>> entries = table.toList();
for (... | [
"Map<String, FileModule> getSymbolMap() {\n Map<String, FileModule> out = new LinkedHashMap<>();\n for (FileModule module : fileToModule.values()) {\n for (String symbol : module.importedNamespacesToSymbols.keySet()) {\n out.put(symbol, module);\n }\n }\n return out;\n }",
"public Na... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add two vectors and return the resultant Vector. | public static Vector add(Vector first, Vector second) {
return new Vector(first.x + second.x, first.y + second.y);
} | [
"public Vector addingVector(Vector a, Vector b){\r\n\t\tfor (int i=0; i<b.size(); i++){\r\n\t\t\ta.addElement(b.elementAt(i));\r\n\t\t}\r\n\t\treturn a;\r\n\t}",
"Vector add(Vector vector1, Vector vector2);",
"static RVector add(RVector a, RVector b) {\n RVector c = new RVector(a.x+b.x, a.y+b.y);\n return... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Assumes a next group should be onboarded This method is not responsible for removing items from the activePayloadGroups | protected PayloadGroup onboardNextPayloadGroup(Workspace workspace, PayloadGroup payloadGroup) {
if (payloadGroup == null) {
return null;
}
PayloadGroup candidatePayloadGroup = payloadGroup.getNextPayloadGroup();
if (candidatePayloadGroup == null) {
// payloadGr... | [
"public void concludeQueue() {\n\t\t//form new group\n\t\tint rows = queue.getDuration() / 30;\n\t\tCalendarGridGroup group = group(rows, 1);\n\t\tgroup.concludeQueue();\n\t}",
"protected synchronized void clearAvailableItems()\r\n {\r\n if (availableItems.size() == 0)\r\n return;\r\n \r\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Cria e grava Pedido > Cliente (Many to One) | private String pedidoCliente() {
Cliente cliente = new Cliente("Marcelo");
Set<Pedido> pedido = new HashSet<Pedido>();
pedido.add(criaPedido(cliente, "xyz123"));
pedido.add(criaPedido(cliente, "999999"));
pedido.add(criaPedido(cliente, "AAAAAAA"));
pedido.add(criaPedido(cliente, "12345-A")... | [
"public void novoCadastro() {\r\n\t\tpreparaTela();\r\n\t\tclienteEdicao = new Cliente();\r\n\t}",
"private void createClient(){\n client = new PhoneEntity(namesGen.getName(), namesGen.getLastName(), namesGen.getPatronymic());\n client.setId(id++);\n addAdress();\n addCard();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
find the first dependency in F that has a redundant left hand attribute and replace it in F with one that has the redundant attribute removed return the number of replacements done return 0 if no change (improvement) has been made | private int removeRedundantLeftHandAttributes(DependencySet F){
for(FunctionalDependency fd : F.copy().getElements()){
if(fd.getLHS().size() > 1){
//compound left hand side.
AttributeSet leftAttributesToCheck = fd.getLHS().copy();
for(Attribute a: ... | [
"public abstract Change annotateUpdateAttribute (TreeNode nodeA, TreeNode nodeB, String attributeName, Element diffNode, ChangeFactory changeFac);",
"private void updatingOptionalFeature(ArrayList<String>\tOnlyInLeft, ArrayList<String>\tOnlyInRight, Model splModel, Model newModel){\r\n//STEP 1 -------------------... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Closes a Cursor object (Cursor is used to read data) | private void closeCursor(Cursor c) { // TEMPORARILY PUBLIC
if (c != null) {
c.close();
}
} | [
"private void closeCursor(Cursor cursor) {\n try {\n if (cursor != null)\n cursor.close();\n } catch (Exception e) {\n }\n }",
"public void closeCursor(Cursor cursor) {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get folder name from the filepath | public static String getFolderName(String filePath) {
if (isFileExist(filePath)) {
return filePath;
}
int filePosi = filePath.lastIndexOf(File.separator);
return (filePosi == -1) ? "" : filePath.substring(0, filePosi);
} | [
"public static String getFolderName(String filePath) {\n if (stringIsBlank(filePath)) return filePath;\n int filePosition = filePath.lastIndexOf(File.separator);\n return (filePosition == -1) ? \"\" : filePath.substring(0, filePosition);\n }",
"public static String getFolderName(String fil... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a randomized int[] of indices for given size | private int[] randomizeIndices(int size) {
int[] array = new int[size];
for (int j = 0; j < size; j++) {
array[j] = j;
}
// Fisher–Yates shuffle
int index;
Random random = new Random();
for (int i = array.length - 1; i > 0; i--) {
index = r... | [
"private Integer[] randomIntArray(int size) {\n Integer[] intArray = new Integer[size];\n for (int i = 0; i < size; i++) {\n intArray[i] = (int)(Math.random() * 1000000) + 1;\n }\n return intArray;\n }",
"public int[] randomize(int inputSize){\n int[] list = new int[inputSize];\n f... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
7 Count number of different types of appointments per doctors and list them in descending order | public static void ListStatusNumberOfAppointmentsPerDoctor(DBproject esql) {
try {
String query = "SELECT d.doctor_ID, COUNT(DISTINCT a.status) AS count FROM Doctor d INNER JOIN has_appointment ha ON d.doctor_ID = ha.doctor_id INNER JOIN Appointment a ON ha.appt_id = a.appnt_ID GROUP BY d.doctor_... | [
"private void appointmentReport() {\n Set<String> types = new HashSet<>();\n Set<Month> months = new HashSet<>();\n HashMap<String, Integer> numberByType = new HashMap<>();\n HashMap<Month, Integer> numberByMonth = new HashMap<>();\n\n for (Appointment appointment: Data.getAppoint... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
void saveSelectionList() stub routine for saving the selectionList to a disk file | private void saveSelectionList() {
// Enter the code here to append the contents of the
// TextArea selectionList onto the end of a file
DateFormat dateFormat = new SimpleDateFormat("MM/dd/yyy");
Date date = new Date();
String list = "========\n" +
lblTitle.ge... | [
"protected void saveSelection ()\t{\n\t\t//\tAlready disposed\n\t\tif (m_table == null)\n\t\t\treturn;\n\n\t\tm_results.addAll(getSelectedRowKeys());\n\n\t\t//\tSave Settings of detail info screens\n//\t\tsaveSelectionDetail();\n\t\t\n\t}",
"private void saveFeatureList() \n {\n final JFrame frame = owner.get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |