query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
/To transform Khan academy video to resource type video | public ArrayList<Resource> transformKAVideoIntoResource(ArrayList<KhanAcademyVideo> academyVideoList) {
ArrayList<Resource> resourceList = new ArrayList<>();
for (KhanAcademyVideo academyVideo : academyVideoList) {
Resource transformedResource = new Resource();
if (academyVide... | [
"Video createVideo();",
"String getVideoFormat();",
"VideoArchival archival();",
"abstract public VideoDefinition createVideoDefinitionFromName(String name);",
"public String toString() {\n\treturn \"H.261 video format\";\n }",
"private void subirVideojuego(){\n/**\n * Con esta funcion podremos Actuliz... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this mnemonic was just made up, the checksum should definitely not match | @Test
@DisplayName("Mnemonic.validate() throws on checksum mismatch")
void checksumMismatch() {
Mnemonic mnemonic = new Mnemonic(Arrays.asList(
"abandon",
"ability",
"able",
"about",
"above",
"absent",
"absorb",
... | [
"java.lang.String getChecksum();",
"String getChecksum();",
"String dest(String mnemonic) {\n Arrays.fill(destBit, '0');\n if (mnemonic == null)\n return new String(destBit);\n codeMatcher = destPattern.matcher(mnemonic);\n codeMatcher.find();\n\n\n if (codeMatc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Loads app state from preferences | private void loadAppState(Context context) {
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(context);
mTwoPane = settings.getBoolean(PREF_TWO_PANE, false);
LogHelper.v(LOG_TAG, "Loading state.");
} | [
"private void loadPreferences() {\n SharedPreferences sp = getActivity().getSharedPreferences(SETTINGS, Context.MODE_PRIVATE );\n boolean lm = sp.getBoolean(getString(R.string.live_match), true);\n boolean ls = sp.getBoolean(getString(R.string.live_score), true);\n\n if(lm) live_match.se... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a List of ApplicationUser objects that have a matching enabled | public List<ApplicationUser> listApplicationUserByEnabled(Boolean enabled)
{
List<ApplicationUser> result = this.getApplicationUserDao().listApplicationUserByEnabled(enabled);
return result;
} | [
"public List<User> getEnabledUsers();",
"public boolean[] getUserByUserIdEnableds() {\r\n\t\treturn userByUserIdEnableds;\r\n\t}",
"public List<User> getDisabledUsers();",
"@Query(value = \"FROM User u WHERE u.isActive=1\")\n\tArrayList<User> getAllActiveUsers();",
"public List<org.openforis.users.jooq.tabl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Change chapters numbers according to project list | public void numberChapters(){
for(int i = 0; i< chapters.size(); i++)
chapters.get(i).setNumber(i+1);
} | [
"public void setChapters(int chapters) {\r\n this.numberOfChapters = chapters;\r\n }",
"public void setChapterNumber(int value) {\n this.chapterNumber = value;\n }",
"void chaptersButtonClicked();",
"public int getChapters() {\r\n return this.numberOfChapters;\r\n }",
"public v... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add a webhook to the store for future dispatch | public void add(Webhook webhook); | [
"void addWebHook(URL repositoryUrl, String notificationUrl, String webHookName);",
"public void webhooksPost (Webhook webhook) throws ApiException {\n Object postBody = webhook;\n byte[] postBinaryBody = null;\n \n // verify the required parameter 'webhook' is set\n if (webhook == null) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
consulta una actividad presupuestal dado su id | public ActividadPresupuestalDto consultarActividadPresupuestal(int idActPresupuestal){
ActividadPresupuestalDto actividadP = null;
Connection con=null;
PreparedStatement ps=null;
try{
if(conexion==null) conexion= new Conexion();
if(conexion.getConnection()==nul... | [
"public Long darCitasActivasPunto(String id) \r\n\t{ \r\n\t\tlog.info(\"Buscando cantidad de citas activas de un Punto id: \"+id); \r\n\t\tLong activas = pp.darCitasActivasPunto(id); \r\n\t\tlog.info(\"Citas activas del punto encontrada: \"+activas); \r\n\t\treturn activas; \r\n\t}",
"ActivityHongbaoPrize selectB... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Local delta scheduleWork rejected | public void localDeltaScheduleWorkRejected(Address address)
{
if (trace)
log.tracef("LOCAL_DELTA_SCHEDULEWORK_REJECTED(%s)", address);
WorkManagerCoordinator wmc = WorkManagerCoordinator.getInstance();
DistributedWorkManager dwm = wmc.resolveDistributedWorkManager(address);
if (dwm... | [
"public void localDeltaStartWorkRejected(Address address)\n {\n if (trace)\n log.tracef(\"LOCAL_DELTA_STARTWORK_REJECTED(%s)\", address);\n\n WorkManagerCoordinator wmc = WorkManagerCoordinator.getInstance();\n DistributedWorkManager dwm = wmc.resolveDistributedWorkManager(address);\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the cell for specified key. Non existing cell is created when createNew flag is set. | public ICell getCell(Key key, boolean createNew) {
ICell cell = data.get(key);
if (cell == null && createNew) {
cell = createNewCell(key, measureMap.size());
Key newKey = key.clone();
data.put(newKey, cell);
// check serialization mode
/*
* if (!serializeData && key.getClass() != ... | [
"public Cell getCell(String key) {\n return cells.get(key);\n }",
"public Cell (String key) {\n\t\tthis.key = key;\n\t}",
"public NodeT getNode(String key) {\n return nodeTable.get(key);\n }",
"private Cell getCell(String cellName) {\n CellReference cellRef = new CellReference(cellN... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get list of order promotion instances that belong to one of given promotion groups | List<PromotionData> getOrderPromotions(Collection<String> promotionGroups); | [
"List<PromotionData> getProductPromotions(Collection<String> promotionGroups);",
"List<PromotionData> getOrderPromotions(String promotionGroup);",
"List<ProductRelationship> getGroups(MerchantStore store);",
"public List<Promotion> getAllActivePromotions();",
"List<PromotionData> getProductPromotions();",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the ArgumentSource field. | public void setArgumentSource(java.lang.String value); | [
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getArgumentSource();",
"public void setSource(Object source) {\n\t\tthis.source = source;\n\t}",
"protected void set_source(Object source) { this.source = source; }",
"public void setSource(String source);",
"public void setArgumentSource... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the end tag character. | public void setEndTagChar(char end_tag) {
this.end_tag = end_tag;
} | [
"public char getEndTagChar() {\n\t\treturn (end_tag);\n\t}",
"public void setFontEndTag(String value) {\r\n\t\t_fontTagEnd = value;\r\n\t}",
"public void setFontEndTag(String value) {\r\n\t_fontTagEnd = value;\r\n}",
"void endTag(String tag) throws HTMLParseException;",
"public void setFontEndTag(String val... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the topupAccountSpecifier value for this ERSCommitTopupResponse. | public void setTopupAccountSpecifier(net.symbiosis.core.integration.voucher.glo.seamless.PrincipalAccountSpecifier topupAccountSpecifier) {
this.topupAccountSpecifier = topupAccountSpecifier;
} | [
"public net.symbiosis.core.integration.voucher.glo.seamless.PrincipalAccountSpecifier getTopupAccountSpecifier() {\n return topupAccountSpecifier;\n }",
"public void setTopupAmount(Amount topupAmount) {\n this.topupAmount = topupAmount;\n }",
"public void setTopupPrincipal(Principal topupPri... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Computes the column index of a longitude in the global tile grid corresponding to a specified grid interval. | public static int computeColumn(Angle delta, Angle longitude, Angle origin)
{
if (delta == null || longitude == null || origin == null)
{
String message = Logging.getMessage("nullValue.AngleIsNull");
Logging.logger().severe(message);
throw new IllegalArgumentExcep... | [
"public final ColRow getIndex(double lon, double lat) {\n Coord wgs84 = new CoordXY(lon, lat);\n Coord merc = Mercator.toMerc(wgs84);\n Coord tl = getTopLeft();\n double xDist = merc.getX() - tl.getX();\n double yDist = tl.getY() - merc.getY();\n double cellSize = getCellSize();\n int x = (int)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the sitemap of the application. This shouldn't be called too often and only by crawlers. Result is cached for 1 day (so we only regenerate the list every 1 day on request) Cache entry is wiped when a new module is added so it is included on next request | @Cached(key = SitemapServices.SITEMAP_CACHE_KEY, duration = 24 * 60 * 60)
public static Result sitemap()
{
List<Sitemap> list = SitemapServices.generateSitemap(request());
return ok(sitemap.render(list)).as("application/xml");
} | [
"@RequestMapping(path = \"/sitemap.xml\", produces = APPLICATION_XML_VALUE)\n public void getSitemap(HttpServletResponse response) throws IOException {\n response.setContentType(APPLICATION_XML_VALUE);\n\n WebSitemapGenerator sitemap = new WebSitemapGenerator(this.publicUrl);\n\n sitemap.add... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the value of relations | public void setRelations(ru.terralink.mvideo.sap.Relations value)
{
if (getRelations() != null)
{
if( !__relations.equals(value) )
{
_isDirty = true;
}
}
else if(value != null)
{
_isDirty = true;
}
... | [
"public void setRelation( Value inValue )\n throws Exception\n {\n if (getVariable() == inValue.getVariable())\n return;\n\n try {\n RelationMatrix mat = _var.getMatrixForVariable( inValue._var );\n mat.setRelation( this, inValue );\n }\n catch ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Con este metodo eliminaremos los managers | public void EliminarManager() {
sendSelect(DELETE_SQL_MANAGER);
} | [
"void cleanCommunityManager();",
"public void removeManager(Manager mg)\n {\n try\n {\n managerBll.removeManager(mg);\n }\n catch (SQLException ex)\n {\n ex.printStackTrace();\n }\n }",
"public static void removeManagerButton() {\n\t\tp.r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new X837Ins_2305_HSD_HealthCareServicesDelivery RecordBuilder by copying an existing Builder | public static net.explorys.samhat.z12.r837.X837Ins_2305_HSD_HealthCareServicesDelivery.Builder newBuilder(net.explorys.samhat.z12.r837.X837Ins_2305_HSD_HealthCareServicesDelivery.Builder other) {
return new net.explorys.samhat.z12.r837.X837Ins_2305_HSD_HealthCareServicesDelivery.Builder(other);
} | [
"public static net.explorys.samhat.z12.r837.X837Pro_2400_HSD_HealthCareServicesDelivery.Builder newBuilder(net.explorys.samhat.z12.r837.X837Pro_2400_HSD_HealthCareServicesDelivery.Builder other) {\n return new net.explorys.samhat.z12.r837.X837Pro_2400_HSD_HealthCareServicesDelivery.Builder(other);\n }",
"publ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the parentID value. | public Integer parentID() {
return this.parentID;
} | [
"public String getParentId() {\n return getProperty(Property.PARENT_ID);\n }",
"public Integer getParentid() {\r\n return parentid;\r\n }",
"public int getParentID()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue targ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
EFFECTS: adds action listener to get course button and returns button | public JButton addActionListenerGetCourseBtn(JTextField courseNameTxtField) {
JButton getCourseBtn = new JButton("Get Course");
getCourseBtn.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
HomeApp.playSound("src/main... | [
"public void clickCourse() {\r\n\t\tthis.clickcourse.click();\r\n\r\n\t}",
"private void createCreditsButton()\r\n {\r\n // Instantiate the CustomYellowButtons class and give it the text for the button.\r\n CustomBlueButtons checkCreditsButton = new CustomBlueButtons(\"CREDIT\");\r\n // Ad... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Indicates an encountered abnormality (sensor trouble, etc.). Fault encountered = 0x41, no fault encountered = 0x42 Data type : unsigned char Data size : 1 Set : undefined Get : optional | protected void onGetFaultStatus(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {} | [
"protected byte[] getFaultStatus() {\n\t\treturn null;\n\t}",
"String getFaultReason();",
"@Override\n protected void processFault(Fault fault) {\n }",
"String getFaultReasonValue();",
"public void fault() {\n fault[turn] = true;\n faultcount++;\n }",
"public static void resetFaultC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
add a layer of dead Cells to the top | public void addLayerBottom() {
Neighbourhood nb = new Neighbourhood(null, null, null, null, null, null, null, null);
for (int k = leftBorder; k <= rightBorder; k++) {
Pair p = new Pair(k, bottomBorder + 1);
Cell c = new Cell(20, 20, (byte) 0, (byte) 0, nb, k, bottomBorder + 1);
c.setFill(Color.WHITE);
c... | [
"public void addLayerTop() {\n\t\tSystem.out.println(\"add a layer2\");\n\t\tNeighbourhood nb = new Neighbourhood(null, null, null, null, null, null, null, null);\n\t\tfor (int k = leftBorder; k <= rightBorder; k++) {\n\t\t\tPair p = new Pair(k, topBorder - 1);\n\t\t\tCell c = new Cell(20, 20, (byte) 0, (byte) 0, n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Interface for tracing network traffic. | public interface Trace
{
String TRACE_PROPERTY = "org.asteriskjava.trace";
/**
* Writes data that has been received from the network to the trace.
* @param s the String that has been received.
*/
void received(String s);
/**
* Writes data that has been sent to the networ... | [
"public RequestResult trace() {\n request.setMethod(HTTPMethod.TRACE);\n ClientResponse<byte[], byte[]> response = run();\n return new RequestResult(injector, request, response, userAgent, messageObserver, port);\n }",
"void enableTracing();",
"public interface ITracer\n {\n\n /**\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new hashtable call "assignProjects" Loop the "table" hastable and each candidateAssignment object Use that object get the relevent Energy and add to the totalEnergy of all candidateAssignments Get the currentpreference of that object and check for replicated occurrences of the same project if its the first oc... | public int getEnergy(){
Enumeration students = table.keys();
int totalEnergy=0;
Hashtable<String,String> assignedProjects= new Hashtable<String,String>();
int totalpenalties =0;
while(students.hasMoreElements()) {
CandidateAssignment cand = table.get((String) students.nextElement());
... | [
"@FXML\n\tpublic void assignNewProjects() {\n\t\t\n\t\toutputArea = \"\";\n\t\tdatabase_output.setText(outputArea);\n\t\t\n\t\ttry {\n\t\t\ttotalHours = 0.0;\n\t\t\tString projectName = projects_comboBox.getSelectionModel().getSelectedItem().toString();\n\t\t\tdouble hours = Double.parseDouble(projectHours_input.ge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Expands the specified ZIP stream into appspecific directory. Returns true of the application is a selfcontained jar rather than an oar file. | private boolean expandZippedApplication(InputStream stream, ApplicationDescription desc)
throws IOException {
boolean isSelfContained = false;
ZipInputStream zis = new ZipInputStream(stream);
ZipEntry entry;
File appDir = new File(appsDir, desc.name());
if (!FilePathV... | [
"private void saveApplication(InputStream stream, ApplicationDescription desc,\n boolean isSelfContainedJar)\n throws IOException {\n String name = desc.name() + (isSelfContainedJar ? JAR : OAR);\n Files.write(toByteArray(stream), appFile(desc.name(), name));... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
open socket to server with address and port | public void openSocket(String address, int port) {
try {
socket = new Socket(address, port);
} catch (UnknownHostException e) {
println("This is not a known server host, closing program.");
} catch (IOException e) {
//Causes: server not running, using a bad address or port
print... | [
"private void openSocket() {\n try {\n socket = new Socket(host, port);\n } catch (IOException e) {\n throw new ClientSocketException(\"Client socket binding failed\");\n }\n }",
"Socket newSocket(IPAddr addr, int port) throws IOException;",
"public void openSocket(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleBinary" $ANTLR start "entryRuleUnit" InternalGaml.g:2116:1: entryRuleUnit : ruleUnit EOF ; | public final void entryRuleUnit() throws RecognitionException {
int entryRuleUnit_StartIndex = input.index();
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 147) ) { return ; }
// InternalGaml.g:2117:1: ( ruleUnit EOF )
// InternalGaml.g:2118:1: ruleUnit ... | [
"public final void entryRuleAstUnit() throws RecognitionException {\n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:117:1: ( ruleAstUnit EOF )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/conte... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handle adding a new app state. | private void addAppState() {
final EditorFXScene scene = JFX_APPLICATION.getScene();
final CreateSceneAppStateDialog dialog = new CreateSceneAppStateDialog(changeConsumer);
dialog.show(scene.getWindow());
} | [
"public void addAppState(@NotNull final SceneAppState appState) {\n appStates.add(appState);\n appState.setSceneNode(this);\n }",
"void addState(IState state);",
"public void addState(State state){\n\t\tstates.add(state);\n\t}",
"public void addState(State state) {\n states.add(state);... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method calls both method that creates the JPanel of the south of the frame. | private JPanel southContainer(){
JPanel ret = new JPanel();
ret.setLayout(new GridLayout(2,1));
ret.add(createCheckBoxOption());
ret.add(playButton());
return ret;
} | [
"private void eastSouthPanel() {\r\n\t\t//Create a new panel.\r\n\t\teastSouthPanel = new JPanel();\r\n\t\t\r\n\t\t//Create a border with a title\r\n\t\teastSouthPanel.setBorder(BorderFactory.createTitledBorder(\"Collate\"));\r\n\t\t\r\n\t\t//Set the layout.\r\n\t\teastSouthPanel.setLayout(new BorderLayout());\r\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This returns the test name set at beginning of test | public static String getTestName() {
return testName;
} | [
"public String getTestSetName() {\n return this.testSetName;\n }",
"static public String[] getTestNames() {\n\n\treturn new String[] { \"coordinateTest\", \"extractTest\" };\n }",
"public String getTestCaseName();",
"private String getTestName(Path pathTOTest) {\n\t\treturn pathTOTest.toString().... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Bezeichnung der BedingungsGruppe "ItemConditionGroupID" .dstore.values.StringValue item_condition_group_description = 10028; | io.dstore.values.StringValue getItemConditionGroupDescription(); | [
"io.dstore.values.StringValue getItemConditionDescription();",
"io.dstore.values.StringValue getItemConditionPartDescription();",
"io.dstore.values.StringValue getExtendedItemCondGroupDescr();",
"io.dstore.values.StringValueOrBuilder getItemConditionGroupDescriptionOrBuilder();",
"io.dstore.values.StringVal... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of getLocations method, of class DTO_Ride. | @Test
public void testGetLocations() {
System.out.println("getLocations");
DTO_Ride instance = dtoRide;
int locations = instance.getLocations().size();
assertEquals(1, locations);
} | [
"@Test\n public void testSetLocations() {\n System.out.println(\"setLocations\");\n List<DTO_Location> locations = new ArrayList<>();\n locations.add(new DTO_Location(new GregorianCalendar().toString(), 2L, 0.1, 0.2));\n DTO_Ride instance = dtoRide;\n instance.setLocations(loca... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
removes a tower from the grid. Used for selling towers. | void removeTower(); | [
"public static void removeTower(Tower t)\n\t{\n\t\ttowers.remove(t);\n\t}",
"public void removeTetrimino(Tetrimino tetrimino) {\n int[][] coords = tetrimino.getCoordinates();\n for (int[] coord : coords) {\n mGrid[coord[0]][coord[1]] = -1;\n }\n \n killTetrimino(tetri... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ square the values of the IntList recursion, creating new IntList | public static IntList square(IntList L){
if(L.rest == null){
return new IntList(L.first*L.first,null);
}else{
return new IntList( L.first*L.first, square(L.rest) );
}
} | [
"public int squaredSum() {\n // YOUR CODE HERE\n IntList sum = this;\n int total = 0;\n while(sum != null)\n {\n total += (sum.item)*(sum.item);\n sum = sum.next;\n }\n return total;\n }",
"public void square(List<Integer> numberArray){\n\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
function to find the translation of a phrase from dictionary | public static String translate(String phrase, String [][] d){
for(int i=0; i<d.length; i++){
if(d[i][0].equals(phrase)){
return (d[i][1]);
}
}
return "";
} | [
"private String getPhrase(String key) {\r\n if (\"pl\".equals(System.getProperty(\"user.language\")) && phrasesPL.containsKey(key)) {\r\n return phrasesPL.get(key);\r\n } else if (phrasesEN.containsKey(key)) {\r\n return phrasesEN.get(key);\r\n }\r\n return \"Transl... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__AbstractDirectDeclarator__Group_0__0__Impl" $ANTLR start "rule__AbstractDirectDeclarator__Group_0__1" ../org.ow2.mindEd.idt.editor.textual.ui/srcgen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:4324:1: rule__AbstractDirectDeclarator__Group_0__1 : rule__Abstrac... | public final void rule__AbstractDirectDeclarator__Group_0__1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFractalIdt.g:4... | [
"public final void rule__DirectDeclarator__Group_0_1__2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.ow2.mindEd.idt.editor.textual.ui/src-gen/org/ow2/mindEd/idt/editor/textual/ui/contentassist/antlr/internal/InternalFra... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor that injects the NumberStringValidator used for this implementation. | public NumberConverterImpl (NumberStringValidator numberStringValidator) {
this.numberStringValidator = numberStringValidator;
} | [
"public StringCalculator() {\n initializeNumberExtractor();\n initializeNegativeNumberValidator();\n initializeNumbersValidator();\n }",
"public IntegerValidator() {\r\n }",
"@Override\n public void postConstruct() {\n registerValidator(new StringNotEmpty());\n regist... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
If the Exam has no SubExam than the Exam will be displayed with Grades(if available). | public void outputExam(Long id) {
if (exs.getSubExamById(id).isEmpty()) {
exs.retrieveExam(id);
List<Grade> grade = gradedata.gradeByExamId(id);
grade.forEach(System.out::println);
} else {
// if Exam has SubExam than no Grade displayed for Parent Exam.
... | [
"public static void printGradesOfStudents() {\n if (Course.getCoursesList().size() > 0) {\n System.out.println(colour.TEXT_GREEN + \"Choose Course.\" + colour.TEXT_RESET);\n Course course = SelectCourses.selectOneCourse(Course.getCoursesList());\n if (course.getAssignmentPerC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
the function takes a point with position (x,y) and return a new point // with position (x+dx, y+dy). | public Point applyToPoint(Point p) {
return new Point(p.getX() + dx, p.getY() + dy);
} | [
"public Point applyToPoint(Point p) {\n double x = p.getX();\n double y = p.getY();\n Point p2 = new Point(x + dx, y + dy);\n return p2;\n}",
"public Point applyToPoint(Point p) {\n return new Point(this.dx + p.getX(), this.dy + p.getY());\n }",
"public Point applyToPoint(Point p) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new instance of InstrumentLoadException without detail message. | public InstrumentLoadException() {
} | [
"public InstrumentLoadException(String msg) {\n super(msg);\n }",
"public SpiLoadException(String message) {\r\n\t\tsuper(message);\r\n\t}",
"public LoadingException(String message) {\r\n super(message + \". Unable to load from file\");\r\n }",
"public StoreException() {\r\n super()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Run svn command in a batch. | private void runSvnBatch(String subCmd, File ws, List<String> files) throws IOException, ProcessingException {
while(!files.isEmpty()) {
// build up command line
StringBuilder cmd = new StringBuilder(buildSvnCommand(subCmd));
for( int i=0; i<20 && !files.isEmpty(); i++ ) {
... | [
"private String buildSvnCommand(final String subCmd) {\n final StringBuilder command = new StringBuilder(svn + ' ');\n command.append(subCmd);\n return command.toString();\n }",
"String svnRevision();",
"public abstract boolean verificacao(Maven mvn, Subversion svn, String repProtegido, ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a copy of given DataSet processed with given expressions. | public static DataSet getProcessedData(DataSet aDataSet, String exprX, String exprY, String exprZ)
{
// If both expressions empty, just return
boolean isEmptyX = exprX == null || exprX.length() == 0;
boolean isEmptyY = exprY == null || exprY.length() == 0;
boolean isEmptyZ = exprZ ==... | [
"public Dataset FilterDataset(Dataset dataset)\n {\n Dataset result = new Dataset();\n for(HashMap<String, Object> row : dataset.dataset){\n if(this.eventExpression.MatchExpression(row))\n result.addRow(row);\n }\n return result;\n }",
"abstract public D... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Output Only. The overall outcome of the test. Only set when the test matrix state is FINISHED. .google.devtools.testing.v1.OutcomeSummary outcome_summary = 14; | int getOutcomeSummaryValue(); | [
"com.google.devtools.testing.v1.OutcomeSummary getOutcomeSummary();",
"public void setOutcome() {\n\t\tlblOutcome.setText(outcome);\n\t}",
"private void printFinalSummary() {\n\t\tSystem.out.printf(\"\\nTotal Tests: %d, Passed: %d, Failed: %d\\n\", total, passes, failures);\n\t}",
"private void printFinalSu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts email file to a MAPI model representation | public MapiMessageDto fromFile(MapiMessageFromFileRequest request) throws ApiException
{
try {
// verify the required parameter 'request.format' is set
if (request.getFormat() == null) {
throw new ApiException(400, "Missing the required parameter 'request.format' when calling fro... | [
"private Message convertFileToMessage(File f) {\n\t\t\tString parentFolder = f.getParentFile().getPath();\n\t\t\tInputStream is = null;\n\t\t\tMessage m = null;\n\t\t\ttry {\n\t\t\t\tSession s = null;\n\t\t\t\tis = new FileInputStream(f);\n\t\t\t\tm = new MIMEMessageWithFolder(s, is);\n\t\t\t\tSystem.out.println(\"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the current scene. | public final Scene getScene() {
return activeScene;
} | [
"public Scene getCurrentScene()\r\n\t{\r\n\t\treturn _CurrentScene;\r\n\t}",
"public Scene getCurrentScene() \n {\n try\n {\n return scenes.get(currentScene);\n }\n catch(NullPointerException e)\n {\n return null;\n }\n \n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
getSplitKeys(6); String regionHash = getRegionHash("17868457605", "20190221", 6); String rowKey = getRowKey(regionHash, "17868457605", "20190221", "15064972307", "1234"); System.out.println(rowKey); | public static void main(String[] args) {
getSplitKeys(6);
System.out.println(getRegionHash("15961260092", "2019-02-21 13:13:13", 6));
System.out.println(getRowKey(getRegionHash("15961260092", "2019-02-21 13:13:13", 6), "15961260092", "2019-02-21 13:13:13", "17130206814", "","0180"));
} | [
"org.apache.hadoop.hbase.shaded.com.google.protobuf.ByteString getSplitkey();",
"String[] split(String hashKeyRangeKey);",
"String getPartitionKey(int index);",
"static byte[] startKeyFromRegionName(final byte[] region_name){\n int key_begin = 0;\n int key_end= 1;\n int comma = 0;\n for (/**/; key... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new installer gui and fills it with content from the given URL. | public InstallerGUI(String maryComponentURL)
{
this.languages = new TreeMap<String, LanguageComponentDescription>();
this.voices = new TreeMap<String, VoiceComponentDescription>();
initComponents();
customInitComponents();
if (maryComponentURL != null) {
se... | [
"public void prepareGui(){\n //adding sub-panel to main panel\n createRequest.add(URL(),BorderLayout.NORTH);\n createRequest.add(tab(),BorderLayout.CENTER);\n }",
"public GuiUrlGrabber() {\n initComponents();\n }",
"public NewSessionGui() {\n initComponents();\n c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks whether or not there is an edge from n1 to n2 | public boolean edgeExists (int n1, int n2) {
return adjacencies[n1][n2];
} | [
"@Override\n public boolean hasEdge(int node1, int node2) {\n if(_nodes.containsKey(node1) && _nodes.containsKey(node2)) {\n if (_edges.get(node1).containsKey(node2)&& _edges.get(node1).containsKey(node2)) {\n return true;\n }\n }\n return false;\n }",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts Integer into XMLTag with type xsd:int | public static String getXMLInteger(Integer integer) {
return DatatypeConverter.printInt(integer);
} | [
"public IntTag(int val) {\n set(val);\n }",
"IntegerT createIntegerT();",
"public void setIntegerValue(Integer value) {\r\n setTypeInteger(PROPERTY_IntegerValue , value);\r\n }",
"org.apache.xmlbeans.XmlString xgetNumber();",
"IntegerValue createIntegerValue();",
"EDataType getInteger(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the seconds from the textbox | public int getTheSeconds(EditText countdownBox)
{
int seconds;
if(countdownBox.getText().toString().length() > 2)
{
seconds = Integer.valueOf(countdownBox.getText().toString().substring(0, 3)); //Only get the first 3 chars in the string (Limits it from not making the int over th... | [
"private int getSecondsFromTimeString(String text) {\n int timeInSeconds = -1;\n if ( text != null && !\"\".equals(text) ) {\n int ipos = text.indexOf(\"Date:\");\n String txtDate = (ipos >= 0 ? text.substring(ipos+5).trim() : text.trim());\n ipos = text.lastIndexOf(\"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Stops observing audio recorder's recording progress. | private void stopObservingAudioRecorderRecordingProgress() {
// in case a schedualed audio recorder recording observer time task exists
if (audioRecorderRecordingObserver != null) {
// cancels the audio recorder recording observer time task
audioRecorderRecordingObserver.cancel()... | [
"public void stop() {\r\n\t\tisRecording = false;\r\n\t}",
"public void stopRecording();",
"private void stopRecording() {\n if (recorder == null) return;\n recordingInProgress.set(false);\n recorder.stop();\n recorder.release();\n recorder = null;\n recordingThread = n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new AESCMAC key for use in a keyset. If the format specifies a variant which uses a prefix, the id is used to compute this prefix. | @RestrictedApi(
explanation = "Accessing parts of keys can produce unexpected incompatibilities",
link = "https://developers.google.com/tink/design/access_control#accessing_partial_keys",
allowedOnPath = ".*Test\\.java",
allowlistAnnotations = {AccessesPartialKey.class})
public static AesCmacK... | [
"@RestrictedApi(\n explanation = \"Accessing parts of keys can produce unexpected incompatibilities\",\n link = \"https://developers.google.com/tink/design/access_control#accessing_partial_keys\",\n allowedOnPath = \".*Test\\\\.java\",\n allowlistAnnotations = {AccessesPartialKey.class})\n publ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Verify the error message if user enters < 3 characters in the description field "At least 3 characters are required" | @Test(description = "AT-29589:TRA_01_47:Verify the error message if user enters < 3 characters in the description field", priority = 48)
void descerrorValidation() {
if (Config.getInstance().getEnvironment().toLowerCase().contains("bbt")) {
SeleniumUtil.refresh(d);
} else {
SeleniumUtil.refresh(d);
... | [
"@Test(description = \"AT-29594:TRA_01_53:Verify the error message if user enters < 3 characters in the tag field At least 3 characters are required\", priority = 54,dependsOnMethods = { \"descerrorValidation\" })\r\n\tpublic void tagMax3CharValidation() {\n\t\tAssert.assertEquals(add_manual_transaction.tagErr().ge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes a value of property UnsynchronizedTextContentDescriptor given as an instance of java.lang.String | public static void removeUnsynchronizedTextContentDescriptor(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.lang.String value) {
Base.remove(model, instanceResource, UNSYNCHRONIZEDTEXTCONTENTDESCRIPTOR, value);
} | [
"public void removeUnsynchronizedTextContentDescriptor(java.lang.String value) {\r\n\t\tBase.remove(this.model, this.getResource(), UNSYNCHRONIZEDTEXTCONTENTDESCRIPTOR, value);\r\n\t}",
"public void removeUnsynchronizedTextContentDescriptor( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.remove(this.mod... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column verify_token.token_type | public void setTokenType(Integer tokenType) {
this.tokenType = tokenType;
} | [
"void setTokenType(String tokenType);",
"public void setTokenType(String tokenType) {\n this.tokenType = tokenType;\n }",
"public void setTokenType(TokenType tokenType) {\r\n\t\tmyToken.tokenType = tokenType;\r\n\t}",
"public void setTokenType(String tokenType) {\n\t\tthis.tokenType = tokenType;\n\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calls pack() on a parent JDialog if available. Very useful to resize JDialogs from an embedded JPanel. | public static void tryPackingMyParentDialog(final Component component) {
Component parent = component;
while (!(parent instanceof JDialog) && (parent != null)) {
parent = parent.getParent();
}
if (parent instanceof JDialog) {
((JDialog)parent).pack();
... | [
"private void packParentFrame(){\n //Get the parent frame and call its pack method\n parentFrame.pack();\n }",
"private void buildDialog()\n {\n setMinimumSize( new Dimension( 640, 480 ) );\n\n final JComponent settingsPane = createSettingsPane();\n final JComponent ioPane = createIOPan... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the Status of Leave. | public final LeaveStatus getLeaveStatus() {
return leaveStatus;
} | [
"public final LeaveType getLeaveType() {\n return leaveType;\n }",
"public final String getLeaveReason() {\n return leaveReason;\n }",
"public String getLeaveMessage() {\n return leaveMessage;\n }",
"@RequestMapping(value = \"/status\", method = RequestMethod.POST)\n\tpublic String statuslea... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Fire a restore event. Normally this will activate the object's onRestore(), but if the object has been removed or renamed it will fire onRemoval() or onRename() accordingly. | private boolean fireRestoreEvent(DataObject obj, Object associated) {
if (obj.isObsolete()) {
if (obj.getRename() != null) {
DataObject newObj = obj.getParent().getChild(obj.getObjectCode(), obj.getRename());
if (newObj != null)
newObj.onRename(obj... | [
"public void fireContainerRestored(final ContainerEvent e) {\n if (!e.getContainer().isSeen())\n runApplyContainerFlagSeen(e.getContainer().getId());\n }",
"public void restoreFromLoad()\n\t{\n\t\tinventory.restoreFromLoad(this);\n\t}",
"void notifyGameRestored();",
"public void reques... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Callback called when service is unregistered from the RCS/IMS platform | public void onServiceUnregistered() {
// Update the list of sessions
updateList();
} | [
"@Override\n public void onServiceUnregistered(NsdServiceInfo arg0) {\n }",
"@Override\n public void onServiceUnregistered(NsdServiceInfo arg0) {\n Log.i(\"DiscoveryListener\",\"onServiceUnregistered====\");\n }",
"public abstract void unregister(Object... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Determine the main folder of the external SD card containing the given file. | @TargetApi(Build.VERSION_CODES.KITKAT)
public static String getExtSdCardFolder(final File file, Context context) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) {
return null;
}
try {
String[] extSdPaths = getExtSdCardPaths(context);
for (int i =... | [
"@TargetApi(Build.VERSION_CODES.KITKAT)\n public static String getExtSdCardFolder(final File file, Context context) {\n String[] extSdPaths = getExtSdCardPaths(context);\n try {\n for (int i = 0; i < extSdPaths.length; i++) {\n if (file.getCanonicalPath().startsWith(extSdP... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ testPrecisionInvalidWeight: 100 : (1,100.01,$40) and precision 2 weight is too high | @Test
public void testPrecisionInvalidWeight(){
try{
Packer.pack("./src/test/resources/precisionInvalidWeight.txt");
}catch (APIException e) {
// test passed - exception expected when incorrect parameters are being passed
System.out.println("Test Passed. PrecisionInvalidWeight.");
return;
} c... | [
"@Test\r\n\tpublic void testPrecisionValidWeight(){\r\n\t\tString expectedResult = \"1\";\r\n\t\tString itemsResults = Packer.pack(\"./src/test/resources/precisionValidWeight.txt\");\r\n\t\tassertEquals(expectedResult, itemsResults);\r\n\t\tSystem.out.println(\"Test passed. PrecisionValidWeight.\");\r\n\t}",
"pub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Give a queue bound to the topic exchange the TopicDeletePolicy suitably configured with the deletepersistent tag will close the connection and delete the queue | public void testPersistentTopicIsClosedAndDeleted()
{
//Set the config to delete persistent queues
_config.getConfig().addProperty("delete-persistent", "");
TopicDeletePolicy policy = new TopicDeletePolicy();
policy.configure(_config);
assertTrue("Config was not updated to ... | [
"public void testTopicIsClosed()\n {\n TopicDeletePolicy policy = new TopicDeletePolicy();\n policy.configure(_config);\n\n final MockAMQQueue queue = createOwnedQueue();\n\n queue.addBinding(new Binding(null, \"bindingKey\", queue, new TopicExchange(), null));\n\n setQueueToAu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the agency_url of this agency. | public void setAgency_url(String agency_url); | [
"public void setAgency_fare_url(String agency_fare_url);",
"public void setUrl(String url)\n\t{\n\t\tDomUtil.setAttribute(this, \"href\", url);\n\t}",
"public void setAgencyNum(String agencyNum) {\n this.agencyNum = agencyNum;\n }",
"public void setOpenIdUrl(java.lang.String openIdUrl);",
"public ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the passport copy upload. | public String getPassportCopyUpload() {
return passportCopyUpload;
} | [
"public void setPassportCopyUpload(String passportCopyUpload) {\n\t\tthis.passportCopyUpload = passportCopyUpload;\n\t}",
"InputStream getUploadStream() {\n return uploadStream;\n }",
"public FileUpload getFileUpload() {\r\n return fileUpload;\r\n }",
"private CombinedUpload getCombinedUploa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A QuorumChecker is created after a forceddisconnect in order to probe the network to see if there is a quorum of members that can be contacted. It is currently used in geodecore's InternalDistributedSystem autoreconnect code. | public interface QuorumChecker {
/**
* Check to see if a quorum of the old members are reachable
*
* @param timeoutMS time to wait for responses, in milliseconds
*/
boolean checkForQuorum(long timeoutMS) throws InterruptedException;
/**
* resumes the quorum checker after having invoked suspend();... | [
"private boolean getQuorumState() {\n if (!mindQuorum)\n haveQuorum = true;\n else {\n NodeMgrService.Proxy proxy;\n proxy = ServiceManager.proxyFor(ServiceManager.LOCAL_NODE);\n haveQuorum = proxy.hasQuorum();\n }\n return haveQuorum;\n }",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method lets the client send a string and then wait for a response from the server | private String sendAndWaitForResponse(String command) throws IOException {
StringBuffer strBuf = new StringBuffer();
out.println(command);
while (!in.ready()) ;
while (in.ready()) {
strBuf.append(in.readLine() + "\n");
}
return strBuf.toString();
} | [
"public void sendRequest() {\n\n\t\tString[] request = requestTextArea.getText().split(\"\\n\");\n\t\tString response = client.send(request[0]);\n\t\trequestTextArea.setText(\"\");\n\t\tresponseTextArea.append(\"Request : \" + request[0] + \"\\nServer answered : \" + response + \"\\n\");\n\t}",
"public String Sen... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns this option's long token. | public String getLongToken() {
return this.longToken;
} | [
"String getLongToken();",
"public String getLongflag() {\n return (longFlag);\n }",
"public String getShortToken() {\n return shortToken_;\n }",
"String getLongTextValue();",
"public static Tokenizer forDecLong(){\n return TokenLong.getDecTokenizer();\n }",
"String getShortToken(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes a specific repetition of DEFINITION (a Group object) | public RDR_RDR_DEFINITION removeDEFINITION(int rep) throws HL7Exception {
return (RDR_RDR_DEFINITION)super.removeRepetition("DEFINITION", rep);
} | [
"public Type removeRepetition(int fieldNum, int index)\n\t\t\tthrows HL7Exception {\n\t\tif (fieldNum < 1 || fieldNum > fields.size()) {\n\t\t\tthrow new HL7Exception(\"The field \" + fieldNum\n\t\t\t\t\t+ \" does not exist in the segment \"\n\t\t\t\t\t+ this.getClass().getName());\n\t\t}\n\n\t\tString name = names... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Each context should have separate image state | @Test
public void imageStatesInConcurrentContexts() {
loadScript("integration/image/multicontext");
} | [
"protected abstract void setupImages(Context context);",
"private void createImages() {\n mImages = new ArrayList<>();\n BitmapFactory bf = new BitmapFactory();\n mImages.add(bf.decodeResource(Constants.CURRENT_CONTEXT.getResources(), R.drawable.cloud1));\n mImages.add(bf.decodeResourc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Log normalization constant using a filter. | double logNorm(IFilter<ERESULT> filter); | [
"double logNorm(IFilter<Category<MR>> filter);",
"double logNorm();",
"public void transformLog()\n {\n for(int i = 0; i < lookupTable.length; i++) lookupTable[i] = Math.log(lookupTable[i] + 1.0);\n }",
"public void logNormalizeTermFrequencies(){\n\t\tNode temp = head;\n\t\t\n\t\twhile( temp != n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method for getting all tests of a specific project. | public List<CognitiveTest> filterTestsByProject(String projectFilter) throws DBException {
try {
List<CognitiveTest> toReturn = dao.filterTestsByProject(projectFilter);
logger.info("Successfully found all tests for a given project. Project: " + projectFilter);
return toRe... | [
"com.jarden.testengine.Tests getTests();",
"public List<TestInfo> listTests() {\n\t\treturn searchTests(\"\");\n\t}",
"Set<Project> getProjects(Long testplanID);",
"public ArrayList<Test> getTests() {\n String testQuery = \"SELECT * FROM test ORDER BY Name\";\n ArrayList<Test> tests = new ArrayL... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "questions" $ANTLR start "sets" D:\\entornotrabajo\\workspacesgo\\persistance\\src\\main\\java\\es\\caser\\persistance\\sql\\antlr\\SQLGrammar.g:186:1: sets : SET ( tablename dot )? fieldname EQUAL question ( comma ( ( tablename dot )? fieldname ) EQUAL question ) ; | public final void sets() throws RecognitionException {
try {
// D:\\entornotrabajo\\workspace-sgo\\persistance\\src\\main\\java\\es\\caser\\persistance\\sql\\antlr\\SQLGrammar.g:186:6: ( SET ( tablename dot )? fieldname EQUAL question ( comma ( ( tablename dot )? fieldname ) EQUAL question )* )
... | [
"SetExpression createSetExpression();",
"public final CliParser.setStatement_return setStatement() throws RecognitionException {\n CliParser.setStatement_return retval = new CliParser.setStatement_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token SET116=nu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return true to play this step right after a vibrator has notified vibration completed, used to anticipate steps waiting on vibrator callbacks with a timeout. | public boolean shouldPlayWhenVibratorComplete(int vibratorId) {
return false;
} | [
"@Override\n public boolean isFinished() {\n if (!m_limelightSubsystem.hasValidTarget()) {\n m_counter++;\n }\n else {\n m_counter = 0;\n }\n\n // if we lost target for 10 consecutive scheduled executes, then stop\n if (m_counter >= 10) {\n return true;\n }\n return (m_forwar... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Access method for legacyEngineFamily. | public String getLegacyEngineFamily() {
return legacyEngineFamily;
} | [
"public void setLegacyEngineFamily(String aLegacyEngineFamily) {\n legacyEngineFamily = aLegacyEngineFamily;\n }",
"public String getEngineFamily() {\n return engineFamily;\n }",
"public void setEngineFamily(String aEngineFamily) {\n engineFamily = aEngineFamily;\n }",
"@Override... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets flag to reread the metadata | public void rereadMetaData() {
reread = true;
} | [
"void setMetadataComplete(boolean metadataComplete);",
"public void setCopyMetadata(Boolean b) {\n copyMetadata = b;\n }",
"public void setMetadata(Metadata metadata) {\n this.metadata = metadata;\n }",
"@Override\n public void force(final boolean metaData)\n throws IOException\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value(s) for formal (ElementDefinition.formal). creating it if it does not exist. Will not return null. Definition: The definition SHALL be consistent with the base definition, but convey the meaning of the element in the particular context of use of the resource | public String getFormal() {
return getFormalElement().getValue();
} | [
"public StringDt getFormalElement() { \n\t\tif (myFormal == null) {\n\t\t\tmyFormal = new StringDt();\n\t\t}\n\t\treturn myFormal;\n\t}",
"public ElementDefinitionDt setFormal(StringDt theValue) {\n\t\tmyFormal = theValue;\n\t\treturn this;\n\t}",
"AttributeDefinition getDefinition();",
"public ElementDefini... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates an instance of the separated keyname translator, using the given separator. | CamelCaseKeyTranslator(String sep) {
this.separator = sep;
} | [
"public static SeparatorBuilder create() {\n return new SeparatorBuilder();\n }",
"public static String getKeyFromPairedKeyValue(\n\t\t\tString str, String tokenSeparator) {\n\t\tString result = NULL_STRING;\n\t\tStringTokenizer tok = new StringTokenizer(str, tokenSeparator);\n\t\t\n\t\tif (tok.hasMoreTokens(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests writer with one character. | public void testOneDecorated() throws IOException
{
logger_.info("Running testOneDecorated...");
String one = "a";
StringWriter sw = new StringWriter();
WrappingWriter ww = new WrappingWriter(sw, 80, "[", "]");
ww.write(one);
ww.close();
... | [
"public void testOneLineOneChar() throws Exception\n {\n logger_.info(\"Running testOneLineOneChar...\");\n \n String expected = \"12345\\n6\";\n \n StringWriter sw = new StringWriter(); \n WrappingWriter ww = new WrappingWriter(sw, 5);\n ww.write(\"123456\");\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Update a jockey in the database. | public Jockey update(Jockey jockey); | [
"public void update(Job job) throws DatabaseException, IllegalArgumentException;",
"public void updateEmployee(Employee employee) throws SQLException;",
"void setJockey(java.lang.String jockey);",
"public boolean updateSickPerson(SickPerson sickPerson) throws SQLException;",
"public Hoppy update(Hoppy hoppy... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests values that should be considered invalid flags. | @Order(2)
@ParameterizedTest(name = "[{index}: \"{0}\"]")
@ValueSource(strings = {
"a-b-c", "hello", "hello world", "", " ", "\t", "\n", "-", " - a",
" -a", "\t-a", "--a", "-$a", "-_a", "-\ta", "97", "1", "-1"
})
public void testInvalidFlags(String flag) {
boolean actual = ArgumentMap.isFlag(flag);
... | [
"@Order(7)\n\t\t@Test\n\t\tpublic void testNoFlagNoValue() {\n\t\t\tassertFalse(this.parser.hasValue(\"-g\"), this.debug);\n\t\t}",
"@Order(1)\n\t\t@ParameterizedTest(name = \"[{index}: \\\"{0}\\\"]\")\n\t\t@ValueSource(strings = {\n\t\t\t\t\"-a\", \"-hello\", \"-hello world\", \"-trailing \", \"-résumé\", \"-üb... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns whether or not this point is infinite | public boolean isInfinite()
{
return infinite;
} | [
"public boolean isInfinite()\n {\n return this.infinite;\n }",
"public boolean isPositiveInfinite() {\n\t\treturn this.getHigh().equals(\"+Inf\");\n\t}",
"public boolean isInf() {\n return false;\n }",
"public boolean isNegativeInfinite() {\n\t\treturn this.getLow().equals(\"-Inf\");\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'MEDIA_IND' field. | public java.lang.CharSequence getMEDIAIND() {
return MEDIA_IND;
} | [
"public java.lang.CharSequence getMEDIAIND() {\n return MEDIA_IND;\n }",
"public void setMEDIAIND(java.lang.CharSequence value) {\n this.MEDIA_IND = value;\n }",
"public org.LNDCDC_NCS_TCS.CF_MEDIA_TYPES.apache.nifi.LNDCDC_NCS_TCS_CF_MEDIA_TYPES.Builder setMEDIAIND(java.lang.CharSequence value) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Loads a player from a file. | private void loadGame(File file) throws ParseException {
// For storing JSON input from file
StringBuilder builder = new StringBuilder();
try (Scanner in = new Scanner(file)) {
// load the player as a JSONString
while (in.hasNextLine()) {
... | [
"Game load(File file) throws IOException;",
"void loadGame(File file);",
"public void loadGame(File fileLocation, boolean replay);",
"public void loadCurrentPlayer() {\n\t\tScanner sc;\n\t\tFile file = new File(\"data/current_player\");\n\t\tif(file.exists()) {\n\t\t\ttry {\n\t\t\t\tsc = new Scanner(new File(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
reads sym file and returns true if an error is found | private boolean readSym(String filePath) throws FileNotFoundException {
Scanner fileScan;
int numSymbols = 0;
try {
fileScan = new Scanner(new FileReader(filePath + ".sym"));
while (fileScan.hasNextLine()) {
fileScan.nextLine();
numSymbols+... | [
"private boolean checkForSymbol(final String symb) throws IOException {\n for (int x = 0; x < symb.length(); x++) {\n if (symb.charAt(x) != lookahead(x)) {\n return false;\n }\n }\n return true;\n }",
"boolean getFileErr();",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests if book throws an FacilityNotFoundException if a facility id does not exist. | @Test(expected = FacilityNotFoundException.class)
public void testBookFacilityIDDoesNotExist() throws Exception {
bookingManagement
.book(USER_ID, Arrays.asList("some id that does not exist"), validStartDate, validEndDate);
} | [
"@Test(expected = IllegalArgumentException.class)\n\tpublic void testBookIllegalFacilityID() throws Exception {\n\t\tbookingManagement.book(USER_ID, Arrays.asList((String) null), validStartDate, validEndDate);\n\t}",
"private Exception doValidFacilCheck(String facilName, Hashtable facilTable){\n if (!facil... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__BaseStiffnessExp__DampViscousAssignment_7" $ANTLR start "rule__BaseStiffnessExp__DampCoulombAssignment_9" ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/srcgen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:9914:1: rule__BaseStiffnessExp__DampCoulombAssignment_9 : ( ruleAddExp... | public final void rule__BaseStiffnessExp__DampCoulombAssignment_9() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:9918:1: (... | [
"public final void rule__BaseStiffnessExp__DampViscousAssignment_7() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return the amount of points that are available to spend. | public long getAvailablePoints() {
return this.mAvailablePoints;
} | [
"public int getNoOfPoints()\r\n {\r\n return pointsHeld;\r\n }",
"public int getTotalPoints()\n\t{\n\t\treturn this.turnPoints + this.bankPoints;\n\t}",
"int getUsedPoints();",
"public int getTotalPoints() {\n return this.statesPoints + this.countriesPoints + this.challengesPoints;\n }"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Allows user to enter id for account and then password to edit that account | public static void enterAccount(){
System.out.println("What is the account id?");
int id = getInt();
int attempts = 5;
while (fl.getMasterAccount(id) == null){
System.out.println("Please enter a valid id");
id = getInt();
}
MasterAccount ms = fl.getMasterAccount(id);
System.out.println("Wha... | [
"@GetMapping(value = \"/edit/{id}\")\n public String editAccount(@PathVariable(\"id\") Long id,\n Model model,\n Authentication auth,\n HttpServletResponse response) {\n\n Account account;\n if (accountRepository... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new JpaModule for a Crnk client. | public static JpaModule newClientModule() {
return new JpaModule();
} | [
"DatabaseClient newModulesDbClient();",
"Module createModule();",
"Modules createModules();",
"ModuleDefinition createModuleDefinition();",
"ModulePackage createModulePackage();",
"public void createModule(String moduleId, int crnNumber, String name,\r\n\t\t\tint lecturerAutoId, int semesterAutoId);",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return whether this is a before advice. | @Override
public boolean isBeforeAdvice()
{
return false;
} | [
"public boolean isBefore() {\n boolean result = false;\n Object val = getStateHelper().eval(InsertPropertyKeys.before);\n if (val != null) {\n result = (Boolean) val;\n }\n return result;\n }",
"public boolean isBeforeImage()\n\t{\n\t\treturn beforeImage;\n\t}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Convenience method equivalent to ToolBarContributionItem(new ToolBarManager(), null). | public ToolBarContributionItem() {
this(new ToolBarManager(), null);
} | [
"public ToolBarContributionItem(IToolBarManager toolBarManager) {\n this(toolBarManager, null);\n }",
"public ToolBarContributionItem(IToolBarManager toolBarManager, String id) {\n super(id);\n Assert.isTrue(toolBarManager instanceof ToolBarManager);\n this.toolBarManager = (To... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column orderitem.carrierName | public void setCarrierName(String carrierName) {
this.carrierName = carrierName;
} | [
"public void setCarrier(java.lang.String carrier) {\n this.carrier = carrier;\n }",
"public void setCarrierName(java.lang.String carrierName) {\r\n this.carrierName = carrierName;\r\n }",
"public void setCarrierID(java.lang.String carrierID) {\r\n this.carrierID = carrierID;\r\n }"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Register a ProcessingNode under a given name. For example, ResourceNodeBuilder stores here the ProcessingNodes it produces for use by sitemap pipelines. This allows to turn the tree into a graph. If a node with the name is already registed, the process fails! | boolean registerNode(String name, ProcessingNode node); | [
"protected void registerNode(String name, StateMachineNode node) {\n List<StateMachineNode> nodesList = nodes.get(name);\n if (nodesList == null) {\n nodes.put(name, new ArrayList<StateMachineNode>());\n nodesList = nodes.get(name);\n }\n nodesList.add(node);\n }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
We've already verified INSERT permission on newContainer Now, verify DELETE permission on old container(s) and move runs to the new container | public static void moveRuns(final User user, List<MS2Run> runList, Container newContainer) throws UnauthorizedException
{
List<Integer> runIds = new ArrayList<>(runList.size());
for (MS2Run run : runList)
runIds.add(run.getRun());
SQLFragment selectSQL = new SQLFragment(... | [
"public void runCreateContainer() {\n runCreateContainer(null, null);\n }",
"@Test\r\n public void testIssue902() throws Exception {\r\n final String USER_ID = \"escidoc:test\";\r\n\r\n try {\r\n // remove all grants for test user\r\n revokeGrantsForUser(USER_ID)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Log Likelihood Document Part | private double getDocumentLogLikelihood()
{
double likelihood = 0;
double alpha_sum = 0;
for(int topic_idx = 0 ; topic_idx < this.TopicCnt ; topic_idx++)
{
alpha_sum += AD_LDA_Gibbs.alpha_vec[topic_idx];
}
// For all documents
Document_LDA_Gibbs target_doc = null;
int[] assigned_topi... | [
"private double getLogLikelihood()\r\n\t{\r\n\t\treturn (this.getTopicLogLikelihood() + this.getDocumentLogLikelihood());\r\n\t}",
"double logNorm();",
"public double logLikelihoodObservation() {\r\n double logLikelihood = 0.0;\r\n int T = this.scaling.length;\r\n for (int t = 0; t < T; t++... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__AstAction__Group_8_2__0" $ANTLR start "rule__AstAction__Group_8_2__0__Impl" ../org.caltoopia.frontend.ui/srcgen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:13246:1: rule__AstAction__Group_8_2__0__Impl : ( ',' ) ; | public final void rule__AstAction__Group_8_2__0__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:13250:1: ( ( ',' ) )
// ../org... | [
"public final void rule__AstAction__Group_7_2__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:13093:1: ( ( ',' ) )\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Given a m x n grid filled with nonnegative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. Note: You can only move either down or right at any point in time. | public int minPathSum(int[][] grid) {
int rows = grid.length;
int cols = grid[0].length;
int[] dp = new int[cols];
dp[0] = grid[0][0];
for (int i = 1; i < cols; i++) {
dp[i] = dp[i-1] + grid[0][i];
}
for(int i = 1;i<rows;i++){
dp[0] = dp[... | [
"public void calculatePath () {\n int[][] grid = mMatrix.getMatrix();\n boolean isPathPossible = false;\n int lastValidColumnIndex = -1;\n\n if (grid.length == 0) {\n return;\n }\n\n for (int i = 0; i < grid[0].length; i++) {\n isPathPossible = false;\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the "SearchWindowEnd" element | void setSearchWindowEnd(java.util.Calendar searchWindowEnd); | [
"void xsetSearchWindowEnd(org.apache.xmlbeans.XmlDateTime searchWindowEnd);",
"void setNilSearchWindowEnd();",
"boolean isSetSearchWindowEnd();",
"void setEndSearch(int endSearch);",
"void unsetSearchWindowEnd();",
"java.util.Calendar getSearchWindowEnd();",
"org.apache.xmlbeans.XmlDateTime xgetSearchWi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds a move to the cup when AI takes a turn. | void addMove(Move userChoice) {
moves.add(userChoice);
} | [
"private void addToMoves(char move) {\n this.prevMoves += move;\n }",
"public void addMove(String move) {\n moves.add(move);\n }",
"public void addMove(Move move) {\n super.addMove(move);\n heuristic.addMove(move);\n }",
"public void addMove(Move move){\n allMoves.p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
string field_1464 = 1464; | java.lang.String getField1464(); | [
"java.lang.String getField1436();",
"java.lang.String getField1663();",
"java.lang.String getField1677();",
"java.lang.String getField1414();",
"java.lang.String getField1665();",
"java.lang.String getField1448();",
"java.lang.String getField1634();",
"java.lang.String getField1236();",
"java.lang.S... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |