query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
$ANTLR end "rule__IfStmt__Group__4" $ANTLR start "rule__IfStmt__Group__4__Impl" InternalMGPL.g:2671:1: rule__IfStmt__Group__4__Impl : ( ( rule__IfStmt__ThenAssignment_4 ) ) ; | public final void rule__IfStmt__Group__4__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalMGPL.g:2675:1: ( ( ( rule__IfStmt__ThenAssignment_4 ) ) )
// InternalMGPL.g:2676:1: ( ( rule__IfStmt__ThenAssignment_4 ) )
{
... | [
"public final void rule__IfStmt__Group__4() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:7943:1: ( rule__IfStmt__Group__4__Impl )\r\n // InternalGo.g:7944:2: rule__IfStmt__Group__4__Impl\r\n {\r\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Load texture from bitmap | public static int loadTexture(Bitmap bitmap) {
final int[] textureHandle = new int[1];
GLES20.glGenTextures(1, textureHandle, 0);
if (textureHandle[0] != 0) {
// Bind to the texture in OpenGL
GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, textureHandle[0]);
//... | [
"public void loadFromSavedBitmap() {\n if (bitmap != null) {\n // genera un nuovo puntatore ad una texture\n GLES20.glGenTextures(1, texture, 0);\n // lega questo puntatore ad una variabile disponibile all'app\n GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, texture[0]... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
If the object is an Instance, it casts it to an Instance and returns it. Otherwise, returns null. | public static Instance getInstance(IdentifiedObject io) {
if (io instanceof Instance)
return (Instance) io;
else
return null;
} | [
"public T caseInstance(Instance object)\n {\n return null;\n }",
"public static <T> T as(Class<T> t, Object o) {\r\n\t return t.isInstance(o) ? t.cast(o) : null;\r\n\t}",
"public T caseInstanceAvailability(InstanceAvailability object) {\n\t\treturn null;\n\t}",
"public T caseSubstanceInstance(SubstanceI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Evaluates the given OGNL expression to extract a value from the given root object in a given context | Object getValue( String expression, Map<String, Object> context, Object root ) throws ReflectionException; | [
"public static Object getValue(String expression, Map context, Object root)\n throws OgnlException\n {\n return getValue(expression, context, root, null);\n }",
"public static Object getValue(String expression, Map context, Object root)\n throws OgnlException {\n return g... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
the Setter of toDeleteFlg | public void setToDeleteFlg(String toDeleteFlg) {
this.toDeleteFlg = toDeleteFlg;
} | [
"@Transient\n\tpublic String getToDeleteFlg() {\n\t\treturn toDeleteFlg;\n\t}",
"public void setDeleteFlg(String deleteFlg) {\n\t\tthis.deleteFlg = deleteFlg;\n\t}",
"public String getDeleteFlg() {\n\t\treturn deleteFlg;\n\t}",
"public void setDelFlg(String delFlg) {\n this.delFlg = delFlg;\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calls caseXXX for each class of the model until one returns a non null result; it yields that result. | @Override
protected T doSwitch(int classifierID, EObject theEObject) {
switch (classifierID) {
case UsecasePackage.MODEL_ELEMENT: {
ModelElement modelElement = (ModelElement)theEObject;
T result = caseModelElement(modelElement);
if (result == null) result = defaultCase(theEObject);
return result;
... | [
"@Override\n protected T doSwitch(int classifierID, EObject theEObject)\n {\n switch (classifierID)\n {\n case DomainModelPackage.MODEL:\n {\n Model model = (Model)theEObject;\n T result = caseModel(model);\n if (result == null) result = defaultCase(theEObject);\n retur... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Access the Team object home | public static Team getHome() {
return Home;
} | [
"public String getHomeTeam();",
"public Team getHomeTeam() {\n\t\treturn homeTeam;\n\t}",
"public int getHomeTeam(){\n\t\treturn homeTeamId; //Hub 36230\n\t}",
"public String getHomeTeam() throws JSONException {\n return mGame.getString(\"home_team\");\n }",
"public static void setHome(Team h... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Verify the namespace is PhysicalLink | @Test
public void testGetNamespace()
{
assertThat(m_SUT.getNamespace(), is(Namespace.PhysicalLink));
} | [
"boolean hasLinkTargetType();",
"@Test\n\t\t\tpublic void VerifyGlobalProgramMappingLink(){\n\t\t\t\tAssert.assertTrue(uiDocumentsImagingPageObjects.lnkDocumentMapping.isDisplayed(), \"Document Mapping Link is not displayed\");\n\t\t\t}",
"public boolean isWIpLink () { return this instanceof WIpLink; }",
"Log... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Inserts and returns a new empty value (as xml) as the ith "SubTotDTE" element | cl.sii.siiDte.boletas.EnvioBOLETADocument.EnvioBOLETA.SetDTE.Caratula.SubTotDTE insertNewSubTotDTE(int i); | [
"cl.sii.siiDte.boletas.EnvioBOLETADocument.EnvioBOLETA.SetDTE.Caratula.SubTotDTE addNewSubTotDTE();",
"public com.blackntan.dbmssync.xsd.dbSchemaV1.CtNVP addNewSubInfo()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.blackntan.dbmssync.xsd.dbSchemaV1.CtNVP targ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts a modern server list ping response into an legacy disconnect packet. | public static LegacyDisconnect fromServerPing(ServerPing response,
LegacyMinecraftPingVersion version) {
Players players = response.getPlayers().orElse(FAKE_PLAYERS);
switch (version) {
case MINECRAFT_1_3:
// Minecraft 1.3 and below use the section symbol as a delimiter. Accordingly, we mus... | [
"@SuppressWarnings({\"UnusedDeclaration\"})\n private static byte[] getBufferToDisconnectHeartbeat(String tangoHost,\n String deviceName) throws DevFailed {\n byte[] buffer = new byte[0];\n try {\n ArrayList<String> stringList = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Native wrapper around POSIX symlink(2) syscall. | public static native void symlink(String oldpath, String newpath)
throws IOException; | [
"public static native void link(String oldpath, String newpath) throws IOException;",
"boolean isSymlink();",
"private static native cli.System.IntPtr getLinkLocation( String path, boolean resolve);",
"@Test\n public void testCreateSymbolicLink() throws IOException {\n // Check if symlink capable (J... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Saves the parent block information with the specified blockID in the Stub Map | public static void putNewParentInStubMap(Long blockID) {
String key = Block.getBlock(blockID).getBlockLabel() + Block.getBlock(blockID).getGenusName();
if (parentNameToParentBlocks.get(key) == null) {
parentNameToParentBlocks.put(key, new HashSet<Long>());
}
parentNameToParentBlocks.get(key).add(b... | [
"public static void removeParentFromStubMap(Long blockID) {\n Block block = Block.getBlock(blockID);\n String key = block.getBlockLabel() + block.getGenusName();\n if (parentNameToParentBlocks.containsKey(key)) {\n parentNameToParentBlocks.get(key).remove(blockID);\n if (parentNameToParentBlocks.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get all the claimDocumentTypes. | List<ClaimDocumentTypeDTO> findAll(); | [
"public List<String> getAllDocumentTypes() {\n\t\tList<String> toReturn = new ArrayList<String>();\n\n\t\tint size = combBoxDocumentTypes.getItemCount();\n\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\ttoReturn.add((String) combBoxDocumentTypes.getItemAt(i));\n\t\t}\n\n\t\treturn toReturn;\n\t}",
"public Map<Strin... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests for floor method Test for finding value in Collection of Integer | @Test
public void test_floor_Integer_Collection1() {
populate_i1();
int actual = Selector.floor(i1, 6, new CompareIntegerAscending());
int expected = 4;
Assert.assertEquals("Did not find floor value", expected, actual);
} | [
"@Test\n public void test_ceiling_Integer_Collection1() {\n populate_i1();\n int actual = Selector.ceiling(i1, 1, new CompareIntegerAscending());\n int expected = 2;\n Assert.assertEquals(\"Did not find ceiling value\", expected, actual);\n }",
"@Test\n void descendingSetFloor... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a SymbolClass object with the specified map. | public SymbolClass(final Map<Integer, String> map) {
objects = map;
} | [
"public static Object mapToClass(Map<String, Object> map) {\n Object instance = null;\n String classname = (String) map.get(\"classname\");\n try {\n instance = Class.forName(classname).newInstance();\n for (String key : map.keySet()) {\n Object value = map.get(key);\n set(instance,... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of verticesSet method, of class Graph. | public void testVerticesSet() {
System.out.println("verticesSet");
Assert.assertTrue(generateGraph().verticesSet().size() == 25);
} | [
"@Test\n\tpublic void verticesTest() {\n\t\tgraph.addVertex(A);\n\t\tgraph.addVertex(B);\n\t\tgraph.addVertex(C);\n\t\tgraph.addVertex(D);\n\t\tassertEquals(4, graph.vertices().size());\n\t\tassertTrue(graph.vertices().contains(A));\n\t\tassertTrue(graph.vertices().contains(D));\n\t}",
"@Test\n public void ver... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Find all resources in jar files that match the given location pattern via the Antstyle PathMatcher. | protected Set<Resource> doFindPathMatchingJarResources(Resource rootDirResource,
URL rootDirURL, String subPattern) throws IOException {
URLConnection con = rootDirURL.openConnection();
JarFile jarFile;
String jarFileUrl;
String ... | [
"protected Resource[] findPathMatchingResources(String locationPattern) throws IOException {\n String rootDirPath = determineRootDir(locationPattern);\n String subPattern = locationPattern.substring(rootDirPath.length());\n Resource[] rootDirResources = getResources(rootDirPath);\n Set<R... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Perform a session using the type3 NTLM response received from the client | public final void doSessionSetup(Type3NTLMMessage type3Msg) throws IOException, SMBException
{
doSessionSetup(type3Msg.getDomain(), type3Msg.getUserName(), type3Msg.getWorkstation(),
type3Msg.getLMHash(), type3Msg.getNTLMHash(), 0);
} | [
"public ServerSession getServerSession();",
"private void processNegotiateResponse() throws IOException, SMBException\n {\n\n // Set the security mode flags\n\n int keyLen = 0;\n boolean unicodeStr = false;\n int encAlgorithm = PasswordEncryptor.LANMAN;\n int defFlags2 = 0;\n\n if (... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the set of all valid words in the given Boggle board, as an Iterable. | public Iterable<String> getAllValidWords(BoggleBoard board) {
if (board == null)
throw new IllegalArgumentException();
HashSet<String> result = new HashSet<>();
for (int i = 0; i < board.rows(); i++)
for (int j = 0; j < board.cols(); j++)
check(board, new... | [
"public Iterable<String> getAllValidWords(BoggleBoard board) {\n\n validWords = new SET<String>();\n\n for(int i = 0; i < board.rows(); i++) {\n for (int j = 0; j < board.cols(); j++) {\n\n Boolean[][] visited = new Boolean[board.rows()][board.cols()];\n for (i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
create toString() method in Locomotive class that return a string representation of Locomotive Expected returned string = "Loco("+specification+")" | @Test
public void testLocomotiveToStringIsOverriden() throws TrainException {
Integer grossWeight = 1;
String classification = "9E";
String expectedString = "Loco(9E)";
asgn2RollingStock.RollingStock locomotiveUnderTest =
new asgn2RollingStock.Locomotive(grossWeight, classification);
assertEquals(... | [
"public String toString() {\n\t\tString vehicleSpecification = \"Make:\"+getMake()+\", Model:\"+getModel()+\" ,engineInCC:\"+getEngineiInCC()+\n\t\t\t\t\", fuelCapacity:\"+getFuelCapacity()+\", milage:\"+getMilage()+\", Price:\"+getPrice()+\", roadTax:\"+getRoadTax()+\", \";\n\t\treturn vehicleSpecification;\t\t\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Update the distribution point of a TSL Data in the data base an the cache. | public void updateDistributionPointTSLData(Long tslDataId, String newDP) throws TSLManagingException {
try {
// Obtenemos el TSLData de la BD.
TslData td = null;
try {
td = ManagerPersistenceServices.getInstance().getManagerPersistenceConfigurationServices().getTslDataService().getTslDataById(tslDataId... | [
"public void gatherSensoryData(DistanceCache dt) {}",
"public void update(DataPoint dataPoint, double targetValue);",
"public void update(long timestamp, double[] data)\n { \n \tlock.AcquireWrite();\n \ttry {\n \t\tif (timestamp > time) {\n \t\t\tif (this.data == null)\n \t\t\t\tthis.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Find minimal cost matching between two node lists; Record the matching info back to the trees Using the original algorithm | private void matchListO(int nodes1[], int nodes2[], int count1, int count2, boolean treeOrder,
boolean matchFlag) {
int[][] distance = new int[count1 + 1][];
int[] matching1 = new int[count1];
int[] matching2 = new int[count2];
// insert cost.
distance[count1] = new int[count2 + 1];
for (... | [
"private int optimalMatching(int count1, int count2, int dist[][], int matching1[],\n int matching2[]) {\n // Initialize matching.\n // Initial guess will be pair-matching between two lists.\n // Others will be insertion or deletion\n for (int i = 0; i < count2; i++)\n matching1[i] = i;\n f... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the measurementScale for this attribute | public String getMeasurementScale()
{
return measurementScale;
} | [
"public java.lang.String getScale()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the WebSession for the user associated with the current request. | public WebSession getWebApplicationSession()
{
return WebSession.class.cast(getSession());
} | [
"public static UserSession<?> getUserSession() {\n UserSession us = getThreadLocalUserSession();\n if (us != null) {\n return us;\n }\n\n if (!isNetworkContextSet()) {\n return null;\n }\n\n return getUserSessionFromHttpSession();\n }",
"public st... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
UTILITY METHODS Checks whether a select clause is an aggregation operation by checking if includes a "group by" clause | private boolean isAggregation(ProjectParsed queryData) {
return queryData.getGroupBy() != null && !queryData.getGroupBy().getIds().isEmpty();
} | [
"public boolean isAggregation()\r\n\t{\r\n\t\tif(groupingAtt != null)\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tif(exprsToSelect == null)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tfor(Expression e : exprsToSelect)\r\n\t\t{\r\n\t\t\tif(e.includesAggregateFunction())\r\n\t\t\t{\r\n\t\t\t\treturn tr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Internal query to resolve the "customValues" tomany relationship of OUBase. | public List<CustomValue> _queryOUBase_CustomValues(long customValuesOUBaseId) {
synchronized (this) {
if (oUBase_CustomValuesQuery == null) {
QueryBuilder<CustomValue> queryBuilder = queryBuilder();
queryBuilder.where(Properties.CustomValuesOUBaseId.eq(null));
... | [
"public List<CustomValue> _queryOU_CustomValues(long customValuesOUId) {\n synchronized (this) {\n if (oU_CustomValuesQuery == null) {\n QueryBuilder<CustomValue> queryBuilder = queryBuilder();\n queryBuilder.where(Properties.CustomValuesOUId.eq(null));\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end rule__FloatLeaf__Group_1_1__0__Impl $ANTLR start rule__FloatLeaf__Group_1_1__1 ../fr.irisa.cairn.model.mathematica.xtext.ui/srcgen/fr/irisa/cairn/model/ui/contentassist/antlr/internal/InternalMathematica.g:1120:1: rule__FloatLeaf__Group_1_1__1 : rule__FloatLeaf__Group_1_1__1__Impl ; | public final void rule__FloatLeaf__Group_1_1__1() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../fr.irisa.cairn.model.mathematica.xtext.ui/src-gen/fr/irisa/cairn/model/ui/contentassist/antlr/internal/InternalMathematica.g:1124:1: ( rule__FloatLeaf_... | [
"public final void rule__FloatLeaf__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../fr.irisa.cairn.model.mathematica.xtext.ui/src-gen/fr/irisa/cairn/model/ui/contentassist/antlr/internal/InternalMathematica.g:967:1: ( rule__Flo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
for getting last 12 months data | @GetMapping("admin/month")
public String getMonthbyMonthData(ModelMap model)
{
List<MonthByMonthResult> details = userService.getMonthByMonthData();
if(details.size()<2)
{
return "nodata";
}
model.addAttribute("monthlydata",details);
return "monthbymonth";
} | [
"List<MonthlyExpenses> lastMonthExpenses();",
"private void calculateMonthsData(){\r\n\t\tmonthlyData = new ArrayList<Map<Object,Number>>();\r\n\t\tfor(int i=0; i<4; i++){\r\n\t\t\tmonthlyData.add(monthlyChart.getSeries().get(i).getData());\r\n\t\t}\r\n\t\t//monthlyChart.getSeries().remove(3);//remove total line ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Example of use: URL url = new URL (" Transmittal.saveTransmittalToMVS(url, "rs22", "'PDSAMO.PKGTEXT'"); | public static boolean saveTransmittalToMVS(URL url, String sTargetHost, String sTargetDSN)
{
boolean result = false;
try
{
JiraClient jiraClient = new JiraClient();
HttpURLConnection connection = jiraClient.getHttpURLConnection(url);
InputStream local = (InputStream)connecti... | [
"private void saveToServer() {\n\t\tString[] data = {\"http://users.aber.ac.uk/wia2/WTC/upload.php\"};\n\t\tnew SendData(this, tour).execute(data);\n\t}",
"java.lang.String getTransferTxt();",
"private String postMT(String xml) throws PrepException{\n\n StringBuilder responseXml = new StringBuilder();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a reference to /list_info/$listId/name | private DatabaseReference getListNameReference(String listId)
{
return getListInfoReference(listId).child(LIST_NAME_KEY);
} | [
"private DatabaseReference getListInfoReference(String listId)\n {\n return mDb.getReference(LIST_INFO_NODE_NAME).child(listId);\n }",
"String getListName();",
"public String getName() {\r\n return listName;\r\n }",
"public String getListName()\r\n {\r\n return listName;\r\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks whether the 'puppiGammaIso' field has been set | public boolean hasPuppiGammaIso() {
return fieldSetFlags()[18];
} | [
"public boolean hasPuppiGammaIsoNoLep() {\n return fieldSetFlags()[21];\n }",
"public void setPuppiGammaIso(java.lang.Float value) {\n this.puppiGammaIso = value;\n }",
"public baconhep.TTau.Builder setPuppiGammaIso(float value) {\n validate(fields()[18], value);\n this.puppiGammaIso = val... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the annotations of the protein. | String getAnnotations(String protein) throws SQLException; | [
"public Annotation[] getAnnotations() {\n\t\treturn this.annotations;\n\t}",
"public ParsedAnnotationInfo getAnnotations();",
"public String getAnnotations() {\n\t\treturn annotations;\n\t}",
"Annotation[] getAnnotations();",
"public Annotations getAnnotations() {\n\t\treturn annotations;\n\t}",
"public C... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The method that sets all the products that will be ordered. | public void setProducts(List<OrderProduct> products) {
this.products.addAll(products);
} | [
"public void setOrderList(String products){\n\t\tStringBuilder stringBuilder = new StringBuilder();\n\n\t\t// split the orders\n\t\tString[] lines = products.split(\"\\n\");\n\n\t\tList<Order> orders = new ArrayList<>();\n\t\tfor (int i = 0; i < lines.length; i++) {\n\t\t\tOrder order = new Order();\n\t\t\t// all t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column tbl_symbol.symbol_type | public void setSymbolType(String symbolType) {
this.symbolType = symbolType == null ? null : symbolType.trim();
} | [
"public void setSymbolType(final SymbolType SYMBOL_TYPE) {\n symbolType = SYMBOL_TYPE;\n init(getInnerBounds().width, getInnerBounds().height);\n repaint(getInnerBounds());\n }",
"public String getSymbolType() {\n return symbolType;\n }",
"Type(char symbol)\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the squashing function of a specified layer. | public FloatFunction getSquashingFunction(int idx) {
return this.squashingFunctionList.get(idx);
} | [
"private static float shapeInput(float input) {\n float shapedValue = 0.0f;\n if (input != 0.0f) {\n if (input < 0.0f) {\n shapedValue = input * -input;\n }\n else {\n shapedValue = input * input;\n }\n }\n\n retur... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add a listener to receive notification of page change events. Events will be fired whenever the currentPage value is changed. The values recorded are 0based. | public void addPageChangeListener(final PageChangeListener l) {
this.listenerList.add(PageChangeListener.class, l);
} | [
"private void firePageChangedEvent() {\r\n\t\tfor (PaginatorListener listener : listeners) {\r\n\t\t\tlistener.pageChanged(new PageChangedEvent(this, page, getStartIndex(), getTotalPages(), pageSize));\r\n\t\t}\r\n\t}",
"public abstract void onPageChanged(int oldPage, int newPage);",
"public Registration addPag... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the Reserving amount of this transaction, which is the amount of this transaction in the Reserving Currency. The amount is determined by summing the ReservingAmounts of all TransactionLineItems that belong to the transaction. Returns zero if the transaction has no line items. | public gw.api.financials.CurrencyAmount getReservingAmount() {
return ((gw.cc.financials.entity.Transaction)__getDelegateManager().getImplementation("gw.cc.financials.entity.Transaction")).getReservingAmount();
} | [
"@gw.internal.gosu.parser.ExtendedProperty\n public java.math.BigDecimal getReservingAmount();",
"public BigDecimal getRESERVE_AMOUNT() {\r\n return RESERVE_AMOUNT;\r\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public gw.api.financials.CurrencyAmount getReservingAmount() {\n return (gw... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Se recuperan todos los datos de la Equipo | @Override
public Equipo mostrar() {
LOG.info("Mostrar los datos del equipo");
return equipo;
} | [
"@Override\r\n\tpublic Equipo modificar() {\n\t\tLOG.info(\"Modificar los datos del equipo\");\r\n\t\treturn equipo;\r\n\t}",
"public List<Equipo> getEquipos();",
"private void buscarEmpleados() {\n\t\tEmpleadoRSH rsh = EmpleadoRSH.getInstance();\n\n\t\tList<Empleado> empleados = rsh.verEmpleados();\n\n\t\tfor ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns registered work by a given activity and date. | public RegisteredWork getRegisteredWork(Activity activity, GregorianCalendar calendarDate) {
for (RegisteredWork regwork: this.registeredWork) {
if (regwork.getDate().get(Calendar.DATE) == calendarDate.get(Calendar.DATE) &&
regwork.getDate().get(Calendar.MONTH) == calendarDate.get(Calendar.MONTH) &&
regwor... | [
"public List<RegisteredWork> getRegisteredWork(Calendar date) {\n\t\tList<RegisteredWork> regworks = new ArrayList<RegisteredWork>();\n\t\tfor (RegisteredWork regwork: this.registeredWork) {\n\t\t\tif (regwork.getDate().get(Calendar.YEAR) == date.get(Calendar.YEAR) &&\n\t\t\t\tregwork.getDate().get(Calendar.MONTH) ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GENLAST:event_convertbutton convertir seleccion de combobox a evento | private void ConvertComboBox(javax.swing.event.PopupMenuEvent evt) {//GEN-FIRST:event_ConvertComboBox
for (IViewEventListener listener : list_listeners) {
Event event = new Event(evt, 0, evt);
listener.Listen(event);
}
} | [
"private void comboClienteActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void combo_diabeticoActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void configListenerComboboxPlayer1() {\n cbJ1.getSelectionModel().selectedIndexProperty().addListener(\n obs... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Deserializes a TripleObject from a ByteBuffer. | public static TripleObject fromByteBuffer(
java.nio.ByteBuffer b) throws java.io.IOException {
return DECODER.decode(b);
} | [
"Object deserialize(ByteBuffer bb);",
"T deserialize(ByteBuffer byteBuffer);",
"public static Trip fromByteBuffer(\n java.nio.ByteBuffer b) throws java.io.IOException {\n return DECODER.decode(b);\n }",
"public static Triangle fromByteBuffer(\n java.nio.ByteBuffer b) throws java.io.IOException {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
password is optional. use context.optional if password is null/empty, pass the validation, but it will not be updated (e.g., just ignored) since password will never be empty. otherwise (if password has a value), we need to validate whether it match its validation. optional if optional = true | @Override
public boolean isValid(String value, ConstraintValidatorContext context) {
if (value == null || value == "") {
return this.optional ? true : false;
}
// custom password logic here with PCI compliance.
/**
* this might be null if the user does not want to update password (e.g.,
... | [
"boolean hasPasswordRequired();",
"public boolean validatePassword(String externalId, String password);",
"public boolean isPASSWORDValid(){\r\n\t\tif ((localUser.password == null) || (localUser.password.equalsIgnoreCase(\"null\")) || (localUser.password.equals(\"\"))){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tre... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This gets the subTypes | public List<String> getSubTypes() {
return this.subTypes;
} | [
"IType[] getAllSubtypes(IType type);",
"public Set<String> getSubtypes();",
"public org.semanticwb.model.GenericIterator<org.semanticwb.model.ResourceSubType> listSubTypes()\r\n {\r\n return new org.semanticwb.model.GenericIterator<org.semanticwb.model.ResourceSubType>(getSemanticObject().listObjectPr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Instantiates a new show annotated text handler. | public ShowAnnotatedTextHandler(MainFrame frame) {
this.main = frame;
} | [
"public TextHandler(String text) {\n\t\tsection = -1;\n\t\tlineBegin = 0;\n\t\tlineEnd = -1;\n\t\tlineNumber = 0;\n\t\tthis.text = text;\n\t\tannotations = new HashMap<Lifeline, String>();\n\t\treset();\n\t}",
"public AnnotationTextCalloutFactory() {\n super(\"AnnotationTextCallout\");\n }",
"@Overrid... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Puts debug log for the displaying the resulcode description | private String putResultCodeDebug(int resultcode)
{
String message = null;
switch (resultcode)
{
case ErrorCode.SUCCESS:
message = "SUCCESS";
break;
case ErrorCode.SQL_ERROR:
message = "SQL_ERROR";
... | [
"private void debugMessage(String result)\n\t{\n\t\tmain.addDebugMessage(result);\n\t}",
"private void debug(String msg) {\n\t\t// System.out.println(msg);\n\t}",
"java.lang.String getDebugInformation();",
"protected abstract void printEntryResponse(int responseCode);",
"public void debugDump() {\n i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter for the wordbreak mode. | public com.anychart.core.StateSettings wordBreak(com.anychart.enums.WordBreak mode) {
APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".wordBreak(%s);", (mode != null) ? mode.getJsBase() : null));
return this;
} | [
"public com.anychart.core.StateSettings wordBreak(String mode) {\n APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + \".wordBreak(%s);\", wrapQuotes(mode)));\n\n return this;\n }",
"public void setWordBreak(java.lang.Boolean wordBreak) {\r\n this.wordBreak = wordBreak;\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Delete the hospital by id. | public void delete(Long id) {
log.debug("Request to delete Hospital : {}", id);
hospitalRepository.deleteById(id);
} | [
"public void deleteHospital(Long id) {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}",
"public void delete(Long id) {\n log.debug(\"Request to delete Diet : {}\", id);\n dietRepository.deleteById(id);\n }",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delet... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Defines a filter to be tested against Attribute contained in the Manifest. If one filter accept the attribute, others are ignored. | public interface ManifestAttributeFilter {
/**
* Tests if the given Attribute is recognized by the filter
* @param attribute the tested attribute.
* @return <code>true</code> if the filter accept the
* value, <code>false</code> otherwise.
*/
public boolean accept(final Attribute attrib... | [
"public boolean accept(final Attribute attribute);",
"public void addFilterToAttributes(ViewerFilter filter);",
"public String getFilterAttr() {\n return filterAttr;\n }",
"public void setFilterAttr(Short filterAttr) {\n this.filterAttr = filterAttr;\n }",
"public void addBusinessFilterT... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Constructor for objects of class Level1. | public Level1()
{
super();
which = true;
prepareEnemies(which);
tiempo = 30;
level = 2;
casa.setLevel(level);
} | [
"public Level1R2() {\n\t\tsuper();\n\t}",
"public void level1() {\n\t\tlevel = new Level(1); //Create Level object, passing 1 to constructor for level 1\n\t\tplayer = new Player(100, 100); //Set player y position); //Create player object, place in middle of screen, position will later be determined by level png\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Create the Question interface e.g. eu.compassresearch.ast.analysis.intf.IQuestion for the extension. | private void createIQuestionInterface(final Environment result,
Environment extEnv)
{
List<String> genericArguments = new LinkedList<String>();
genericArguments.add("Q");
String name = "Question";
String tag = result.TAG_IQuestion;
MethodFactory extMf = new MethodFactory()
{
// @Override
// publ... | [
"private void createIQuestionInterface(final Environment result,\n \t\t\tEnvironment extEnv) {\n \n \t\tList<String> genericArguments = new LinkedList<String>();\n \t\tgenericArguments.add(\"Q\");\n \t\tString name = \"Question\";\n \t\tString tag = result.TAG_IQuestion;\n \t\tMethodFactory extMf = new MethodFactor... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
returns item object with given item code, if found | private InventoryItem search(int item_code)throws ItemNotFound {
for (InventoryItem inventoryItem2 : inventoryItem) {
if(inventoryItem2.getCode()==item_code)
return inventoryItem2;
}
throw new ItemNotFound("Sorry not Found");
} | [
"ItemModel lookupItemForPk(PK pk);",
"public Item fetchFirstWornItem(long wornCode);",
"public Items[] findWhereCodeEquals(String code) throws ItemsDaoException;",
"String findItemTypeCode(String integrationObjectCode, String integrationObjectItemCode);",
"public InventoryItem lookupItem(int serialNum){\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates context menu for first and second list view. It will create Add S and Sc MenuItems with work in same way like buttons. | private void initializeMenuForListView() {
MenuItem sItem = new MenuItem(labels.get(Labels.PROP_INFO_ADD_S_MENU));
sItem.setOnAction(event ->
addSAction()
);
MenuItem scItem = new MenuItem(labels.get(Labels.PROP_INFO_ADD_SC_MENU));
scItem.setOnAction(event ->
addScAction()
);
ContextMenu menu... | [
"private void createContextMenu() {\n\t\tMenuManager menuMgr = new MenuManager();\n\t\tmenuMgr.setRemoveAllWhenShown(true);\n\t\tmenuMgr.addMenuListener(new IMenuListener() {\n\t\t\tpublic void menuAboutToShow(IMenuManager mgr) {\n\t\t\t\tfillContextMenuMethodsTableViewer(mgr);\n\t\t\t}\n\n\t\t});\n\t\t// Create me... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
SI2cubicft Utility method converting a double value from cubiccm to the SI or SI derived unit. | public static final double cubiccm2SI(double d) {
return d*SI_CUBICCM;
} | [
"public static final double SI2cubicft(double d) {\n return d/SI_CUBICFT;\n }",
"public static final double[] SI2cubicft(double[] da) {\n for (int n = 0; n < da.length; n++) {\n da[n] /= SI_CUBICFT;\n }\n return da;\n }",
"public static final double cubicft2SI(double d) {\n return d*SI_CUB... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Filter out arcs that are outside of the node range | private void filterArcsOutsideRange() {
List<Arc> tempArcs = new ArrayList<Arc>();
ListUtils.copyList(arcListToDraw, tempArcs);
while (!tempArcs.isEmpty()) {
Arc arc = tempArcs.remove(0);
if (!nodeRangeCircle.containsManyPoints(arc)) {
arcListToDraw.remove(arc);
}
}
} | [
"private void filterUnconnectedArcs() {\r\n\t\tList<Arc> connectedArcList = new ArrayList<Arc>();\r\n\t\tfor (int i = 0; i < arcListToDraw.size(); i++) {\r\n\t\t\tArc arcToConsider = arcListToDraw.get(i);\r\n\t\t\tfor (int j = 0; j < arcListToDraw.size(); j++) {\r\n\t\t\t\tif (i != j) {\r\n\t\t\t\t\tArc arc = arcLi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Helper function to get the index of the label in labels list | private int getLabelIndex(String label) {
for (int i = 0; i < this.labels.size(); i++) {
if (label.equals(this.labels.get(i))) {
return i;
}
}
return -1;
} | [
"public int getIndex(String label) {\r\n\t\tint i = 0;\r\n\t\tint index = -1;\r\n\t\tEnumeration<String> labels = this.labels.elements();\r\n\r\n\t\twhile (labels.hasMoreElements()) {\r\n\t\t\tif (label.equals(labels.nextElement())) {\r\n\t\t\t\tindex = i;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\ti++;\r\n\t\t}\r\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test extracting the toplevel package from a nonstatic import statement that ends with a wildcard. | @Test
public void shouldGetTopLevelFromImportWithWildcard() {
assertEquals("com",
ImportStatements.getTopLevel("import com.google.ads.pebl.*"));
} | [
"@Test\n public void shouldGetTopLevelFromStaticImportWithWildcard() {\n assertEquals(\"org\",\n ImportStatements.getTopLevel(\"import static org.junit.Assert.*\"));\n }",
"@Test\n public void shouldGetTopLevelFromImportWithWhitespace() {\n assertEquals(\"com\",\n ImportStatements.getTopLev... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Carga los recursos que necesita NavajaFW | public static void cargarRecursos(String carpetaArchivosConf, AdministradorRecursosNvjItf recursosProyecto)
throws CargadorRecursosException, MapeoException, IOException{
System.out.println("Comenzando la carga de NavajaFW");
//Listo los archivos de configuracion
String[] listaDeArchivos ... | [
"public void FilesTrie (String diretorio) {\n File listFile = new File(diretorio);\n File[] files = listFile.listFiles();\n \n for (int i = 0; i < files.length; i++)\n makeTrie(diretorio + \"/\" + files[i].getName(), files[i].getName());\n }",
"private static void recorrerDi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get information identified by a key from the Augmentations structure | public Object getItem(String key){
return fAugmentationsContainer.getItem(key);
} | [
"public interface Augmentations {\n\n\n /**\n * Add additional information identified by a key to the Augmentations structure.\n *\n * @param key Identifier, can't be <code>null</code>\n * @param item Additional information\n *\n * @return the previous value of the specified key in t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value of the 'field986' field | public com.maxpoint.cascading.avro.TestExtraLarge.Builder setField986(java.lang.CharSequence value) {
validate(fields()[986], value);
this.field986 = value;
fieldSetFlags()[986] = true;
return this;
} | [
"public void setField987(java.lang.CharSequence value) {\n this.field987 = value;\n }",
"public void setField868(java.lang.CharSequence value) {\n this.field868 = value;\n }",
"public void setField977(java.lang.CharSequence value) {\n this.field977 = value;\n }",
"public com.maxpoint.cascading.avr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the "resolutionstatus" element | java.lang.String getResolutionstatus(); | [
"org.apache.xmlbeans.XmlString xgetResolutionstatus();",
"public String getStatus()\n\t\t{\n\t\t\tElement statusElement = XMLUtils.findChild(mediaElement, STATUS_ELEMENT_NAME);\n\t\t\treturn statusElement == null ? null : statusElement.getTextContent();\n\t\t}",
"void setResolutionstatus(java.lang.String resolu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of nuevoCoste method, of class Coste. | @Test
public void testNuevoCoste() {
System.out.println("nuevoCoste");
Coste expResult = null;
Coste result = Coste.nuevoCoste();
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is... | [
"@Test\r\n public void testGetAcomodador() {\r\n System.out.println(\"getAcomodador\");\r\n Coste instance = new Coste();\r\n Acomodador expResult = null;\r\n Acomodador result = instance.getAcomodador();\r\n assertEquals(expResult, result);\r\n // TODO review the genera... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
test cases for searchParents(): p1 (Parents of Dick Johnson are: Sarah Susan Smith and Dick Johnson) p15 (no parents found) p17 (Parents of Sally Abigale Smith are: Henry Adam Smith and there is no mother found) | public void findParents() { // not working for one or more values are not found
System.out.println("Enter Person ID: ");
String searchIDNum = scanner.nextLine().toUpperCase();
if (persons.containsKey(searchIDNum)) {
String parentRelationshipNum = persons.get(searchIDNum).getParentRel... | [
"public void selectParents() {\n // Create a new parent list for this reproductive cycle. Let the garbage\n // handler dispose of the old list, if there was one.\n switch (Defines.parentAlgo) {\n case Defines.PA_RANDOM:\n this.parents = this.selectParentsRandom();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Print a goodbye message to the screen. | private void printGoodbye()
{
System.out.println("Nice talking to you. Bye...");
} | [
"private void printGoodbye() {\n System.out.println();\n System.out.println(\"Thank you for playing. Good bye.\");\n }",
"public void showGoodbye() {\n printWithLines(BYE_HEADER);\n }",
"public void printGoodbyeMessage() {\n System.out.println(\"Very well. Goodbye.\");\n }",... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sends the supplied message to the log panel status line. | protected void statusMessage(String message) {
m_Log.statusMessage(message);
} | [
"public void setStatusMessage(String statusMessage){\n this.sendPanel.setStatusMessage(statusMessage);\n }",
"public void statusMessage(String message);",
"public void logStatus(String msg) {\r\n\t\tlogger.logStatus(logPrefix + msg + LINESEP);\r\n\t}",
"public void setStatusMessage(IStatus status)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This sets the adapter factory after the domain is already created. | public void setAdapterFactory(AdapterFactory adapterFactory)
{
this.adapterFactory = adapterFactory;
} | [
"public AdapterFactoryEditingDomain(AdapterFactory adapterFactory, CommandStack commandStack)\n {\n this.adapterFactory = adapterFactory;\n this.commandStack = commandStack;\n this.resourceSet = new AdapterFactoryEditingDomainResourceSet();\n }",
"public AdapterFactory getAdapterFactory()\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Setter method for the LCOM metrics | public void setLcom( int pLcom )
{
( (IntegerMetricBO) getMetrics().get( LCOM ) ).setValue( new Integer( pLcom ) );
} | [
"public Integer getLcom()\r\n {\r\n return (Integer) ( (IntegerMetricBO) getMetrics().get( LCOM ) ).getValue();\r\n }",
"private void setClassLCOM()\n\n{\n\t// need to calculate; no. of methods, no. of fields, no. of methods accessing a given field\t\n\tdouble M = classMethods.size();\t\n\tdouble F =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets The default poll interval for longrunning operation. | Duration getDefaultPollInterval(); | [
"public Duration getDefaultPollInterval() {\n return this.defaultPollInterval;\n }",
"public int getPollInterval()\r\n {\r\n return m_iPollInterval;\r\n }",
"public int getPollingInterval() {\n return pollingInterval;\n }",
"public int getMaxPollInterval()\n {\n return max... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts a SURFACE to a JTS Polygon. | public static com.vividsolutions.jts.geom.Polygon surface2JTS(IomObject obj,double strokeP) //SurfaceOrAreaType type)
throws Iox2jtsException
{
if(obj==null){
return null;
}
com.vividsolutions.jts.geom.Polygon ret=null;
//IFMEFeatureVector bndries=session.createFeatureVector();
boolean clipped=obj.getobj... | [
"private static Polygon createPolygon(GisFeature feature) {\n GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();\n\n List<GISCoordinate> featureCoordinates = feature.getCoordinates();\n Coordinate[] coordinates = new Coordinate[featureCoordinates.size()];\n int i = ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Notify consumer that we encountered the end of an array boundary | public abstract void notifyArrayEnd(); | [
"protected abstract void doWriteEndArray();",
"public abstract void notifyArrayStart();",
"void writeEndArray();",
"void endArray() throws SAJException;",
"void onEndOfBatch(int batchSize);",
"protected abstract void doWriteStartArray();",
"private void handleEndReached() {\n// System.out.println();\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the oxygen saturation in %. | public float getOxygenSaturation()
{
return mOxygenSaturation;
} | [
"public int getSaturation()\n {\n return (int)(s * 100);\n }",
"public double getOxygen() {\r\n return roundSingleDecimal(oxygen);\r\n }",
"public float getSaturation();",
"@GetMapping(path=\"/saturation\", produces = \"application/json\")\n public String getSaturation() \n {\n \t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
initialize the puzzle generates a word such puzzle from a .txt file as an array of strings preconditions: puzzle should be nxn (that is, a square) postconditions: file, filereader, dimension and puzzleRows are initialized after calling this method | public void generatePuzzle(){
Scanner scanner = new Scanner(System.in);
System.out.println("Welcome! this program takes a .txt file and solves a word search!");
System.out.print("Enter the name of the file you wish to test: ");
String name = scanner.next();
file=new File(name);
... | [
"public void makePuzzle(){\n\n if(!fp.parseFile()){\n JOptionPane.showMessageDialog(null, \"File not recognised or corrupt\");\n\n return;\n }\n grid = new GameGrid();\n for(int i =0; i < fp.getValues().length; i++){\n for(int j = 0; j < fp.getValues().le... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
! Diameter Of Tree | public int diameterLength() {
Pair p = diameterLength(this.root);
System.out.println(p.b);
return p.b;
} | [
"private int GetTreeDiameterOptimized(TreeEntity root) {\r\n\t\t// TODO Auto-generated method stub\r\n\r\n\t\tif (root == null) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tint left = 0, right = 0;\r\n\r\n\t\tleft = GetTreeDiameterOptimized(root.getLeft());\r\n\t\tright = GetTreeDiameterOptimized(root.getRight());\r\n\t\ti... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds a new rating of an user to the item. You cannot overwrite an existing rating, otherwise this method will throws an IllegalArgumentException. It is not recommended to use this method, use DataModel.addRating(...) instead. | public void addRating(int userIndex, double rating) {
if (!this.usersRatings.add(userIndex, rating))
throw new IllegalArgumentException("Provided rating already exist in item: " + id);
min = Math.min(rating, min);
max = Math.max(rating, max);
average =
(this.usersRatings.size() <= 1)
... | [
"public static void addRatingToUser(User user, double rating) {\n user.updateRating(rating);\n }",
"public void addRating(Rating rating) {\n this.ratings.add(rating);\n }",
"public synchronized void addRating(Rating rating){\n boolean found = false;\n String userPk = rating.ge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retourne une collection contenant tout les materiaux enregistrer. La collection est synchronisee avec la classe, donc si un materiau est rajoute ou enleve, elle subira la modification. | public static Collection<Materiaux> getCollection(){ return mats.values(); } | [
"Collect getColl();",
"public static Materiaux enregistrerMateriaux(Materiaux mat){ \n\t\tmats.put(mat.nomUnique, mat);\n\t\treturn mat;\n\t}",
"public ArrayList<Materia> getListaMaterie() {\n\n // Apertura connessione db sola lettura\n SQLiteDatabase db = dbHelper.getReadableDatabase();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets a patient's allergy status | public String getAllergyStatus(Patient patient); | [
"public List<Allergy> getAllergies(Patient patient);",
"Allergies getAllergies(Patient patient);",
"public Allergy getAllergy(Integer allergyId);",
"org.hl7.fhir.AllergyIntolerance getAllergyIntolerance();",
"String getAllergies();",
"public static String getPatientServiceStatus(String patientId, String d... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
load the 50 songs corresponding to the given page : open the songs file and read from line (page1 x 50) + 1 to line (page1 x 50) + 1 + 51 | private ArrayList<String> loadSourceItems(){
//java resource loading + read file
ArrayList<String> pagedSongs = new ArrayList<>();
int start = ((page-1) * 50) + 1;
for(int i = start; i <= start + 49; i++){
if(listSource[i-1]!=null)
pagedSongs.add(listSource[i-... | [
"public void loadNext() throws IOException {\n\t\tif (closed) throw new IOException(\"Buffer closed.\");\n\t\tif (file.length() <= lastScannedPosition) \n\t\t\tif(!ended){ended=true; return;}\n\t\t\telse throw new IOException(\"Finished\");\n\t\tlong toExpand = Math.min(pageNumber*pageSize, file.length() - lastScan... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check if the object that wants to receive notifications is garbage collected, and is no longer available. | public boolean isGarbage()
{
return this.subscriberRef.get() == null;
} | [
"public boolean isFreed() {\n\t\treturn this.memory == null;\n\t}",
"public void notifyReadyToGC();",
"boolean isDetectingLeaks();",
"public final boolean isWeakAlive(){\r\n\t\treturn mWeakRef !=null && mWeakRef.get() != null;\r\n\t}",
"boolean isReleased();",
"public boolean hasDisposableResources()\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets (as xml) the "username" element | public org.apache.xmlbeans.XmlString xgetUsername()
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.XmlString target = null;
target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(USERNAME$0, 0);
return target;
... | [
"public org.apache.xmlbeans.XmlString xgetUsername()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(USERNAME$0, 0);... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves all the cookies stored in github and uploads them to the database | HashMap<Proxy, Map<SearchEngine.SupportedSearchEngine, Set<Cookie>>> downloadCookiesFromGithub(GUILabelManagement
guiLabels,
... | [
"@NonNull Collection<HttpCookie> cookies();",
"Cookie[] getCookies();",
"List<ICookie> getCookieJarContents();",
"public CookiesStore(Context context) {\n cookiePrefs = context.getSharedPreferences(COOKIE_PREFS, 0);\n cookies = new ConcurrentHashMap<String, Cookie>();\n\n\n }",
"public void... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of GenerateHL7MessageId method, of class HL7MessageIdGenerator. device id | @Test
public void testGenerateHL7MessageId_1arg() {
log.info("testGenerateHL7MessageId_1arg");
String myDeviceId = "2.16.840.1.113883.3.166.4";
II result = HL7MessageIdGenerator.GenerateHL7MessageId(myDeviceId);
assertEquals(result.getRoot(), "2.16.840.1.113883.3.166.4");
a... | [
"@Test\n public void testGenerateMessageId() {\n log.info(\"testGenerateMessageId\");\n\n String result = HL7MessageIdGenerator.GenerateMessageId();\n assertNotNull(result);\n }",
"@Test\n public void testGenerateHL7MessageId_0args() {\n log.info(\"testGenerateHL7MessageId_0ar... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Writes the index file. | private void writeIndexFile() throws IOException {
File file = new File(dataDir, INDEX_FILE);
DataOutputStream dos =
new DataOutputStream(new FileOutputStream(file));
dos.writeInt(entries.size());
for (FileEntry entry : entries.values()) {
dos.writeUTF(entry.g... | [
"public void writeIndexFile() {\r\n\t\ttry {\r\n\t\t\tFileOutputStream fileOut = new FileOutputStream(this.file);\r\n\t\t\tObjectOutputStream out = new ObjectOutputStream(fileOut);\r\n\t\t\tSystem.out.println(\"Writing a file to represent INDEX: \" + this.file.getName());\r\n\t\t\tout.writeObject(this);\r\n\t\t\tou... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use SignMessage.newBuilder() to construct. | private SignMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
} | [
"com.google.protobuf.ByteString getMessageToSign();",
"public Signature signMessage(String message);",
"private SignInit(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"private EthereumSignMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n\t\t\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ListItem listItem = listItems.get(position); holder.imageView.setImageResource(listItem.getImageResource()); holder.text_name.setText(listItem.getWarehouseName()); holder.text_details.setText(listItem.getWaregouseDetails()); | @Override
public void onBindViewHolder(@NonNull ListViewHolder holder, int position) {
holder.imageView.setImageResource(images[position]);
holder.text_name.setText(names[position]);
holder.text_details.setText(details[position]);
holder.itemView.setOnClickListener(new View.OnClick... | [
"public CharSequence getItemImageUrl() {\n return item_image_url;\n }",
"public CharSequence getItemImageUrl() {\n return item_image_url;\n }",
"String getItemImage();",
"@Override\n public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {\n if(!dataModelList.get(positio... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column T_SB_ZWYC_ZSDLSRDQ.EDDLKDDL | public void setEddlkddl(BigDecimal eddlkddl) {
this.eddlkddl = eddlkddl;
} | [
"public void setEddl(BigDecimal eddl) {\n this.eddl = eddl;\n }",
"public BigDecimal getEddlkddl() {\n return eddlkddl;\n }",
"public void setDlsbsdsj(Long dlsbsdsj) {\n this.dlsbsdsj = dlsbsdsj;\n }",
"public void setLkzzjgdm(String lkzzjgdm) {\n this.lkzzjgdm = lkzzjgdm ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the first vdoc field in the ordered set where parentId = &63;. | @Override
public vdocField findByParentId_First(String parentId,
OrderByComparator<vdocField> orderByComparator)
throws NoSuchvdocFieldException {
vdocField vdocField = fetchByParentId_First(parentId, orderByComparator);
if (vdocField != null) {
return vdocField;
}
StringBundler msg = new StringBundle... | [
"@Override\n\tpublic vdocField fetchByParentId_First(String parentId,\n\t\tOrderByComparator<vdocField> orderByComparator) {\n\t\tList<vdocField> list = findByParentId(parentId, 0, 1, orderByComparator);\n\n\t\tif (!list.isEmpty()) {\n\t\t\treturn list.get(0);\n\t\t}\n\n\t\treturn null;\n\t}",
"@Override\n\tpubli... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
removes student from exam | void remove(long studentId,long examId); | [
"@SuppressWarnings(\"Duplicates\")\n private static void removeStudents() {\n if (FinalStudent.size() == 0) {\n System.out.println(\"\\nYou don't have any students in your roster. Let's add some.\\n\");\n ManageStudents.addStudents();\n }\n\n StringPrompt stringPrompt =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the sharedMemorySizeMiB property: The share memory buffer for sample transfers, in mebibytes. It can only be used with the 'SharedMemory' transfer mode. | public GrpcExtensionDataTransfer setSharedMemorySizeMiB(String sharedMemorySizeMiB) {
this.sharedMemorySizeMiB = sharedMemorySizeMiB;
return this;
} | [
"public KernelLauncher setSharedMemSize(int sharedMemSize)\r\n {\r\n this.sharedMemSize = sharedMemSize;\r\n return this;\r\n }",
"public String getSharedMemorySizeMiB() {\n return this.sharedMemorySizeMiB;\n }",
"public void setMemory(int systemMemorySize)\n\t{\n\t\tmemorySize = s... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Bean property getter: $ref. | @Beanp("$ref")
public String getRef() {
return ref;
} | [
"public Ref getRef() {\n\t\treturn ref;\n\t}",
"public String getRef() {\r\n return this.ref;\r\n }",
"java.lang.String getRef();",
"ComponentBean getReferencedBean();",
"PropertyReference createPropertyReference();",
"ReferenceProperty createReferenceProperty();",
"protected Object resolveRefere... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if barcode is valid. | public boolean checkBarcode() {
return getID().length() < size;
} | [
"private boolean isValidBarcode(String barcode) {\n if (barcode.length() != isbnBarcodeLength) {\n return false;\n }\n final char[] barcodeChars = barcode.toCharArray();\n for (char i : barcodeChars) {\n if (i < isbnBarcodeValidStart || i > isbnBarcodeValidEnd) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Called when the winner defeats the loser | public void onDefeat(Player winner, Player loser) {} | [
"private void gameOver() {\n winningHandView.setText(R.string.purse_empty_text);\n betOneButton.setEnabled(false);\n betMaxButton.setEnabled(false);\n dealButton.setEnabled(false);\n drawButton.setEnabled(false);\n }",
"private void loseCondition() {\n if (player.getHealth() <= 0) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Function under test: zstdCompress Reason for testing: Test command line compatibility. Failure explanation: The results are not the same as running standard CLI tools. | @Test
public void byteStringCliCompatibility() throws Exception {
// ARRANGE
String data = "Hello World";
// ACT
ByteString result = CompressionUtils.zstdCompress(ByteString.copyFromUtf8(data));
// ASSERT
// This should be equivalent to the following command:
// echo -n "Hello World" > /... | [
"@Test\n public void cliCompatibility() throws Exception {\n // ARRANGE\n String data = \"Hello World\";\n\n // ACT\n String result = CompressionUtils.zstdCompress(data);\n\n // ASSERT\n // This should be equivalent to the following command:\n // echo -n \"Hello World\" > /tmp/out.txt; zstd --... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Trying to add "two" to the tree again. Should fail throwing an IllegalArgumentException with a message "Duplicate items" | @Test
public void testAddDuplicateElement() {
Throwable caught = null;
try {
tree.insert("two");
} catch (Exception e) {
caught = e;
}
assertEquals("Duplicate items", caught.getMessage());
} | [
"protected void insertDuplicate() throws TreeException{\n throw new TreeException (\"Cannot add duplicate.\");\n }",
"@Test(expected = DuplicateValueNotAllowedException.class)\n @Ignore(\"this condition is removed\")\n public void testBTreeForbidDups() throws IOException, BTreeAlreadyManagedException... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the short name of the selected spectra. | public void updateShortName()
{
if ( inhibitChanges ) return;
int[] indices = specList.getSelectedIndices();
if ( indices.length > 0 && indices[0] > -1 ) {
String name = shortName.getText();
if ( name != null && ! "".equals( name.trim() ) ) {
... | [
"void setShortName(String shortName);",
"public void setNameShort(String nameShort)\n\t{\n\t\tthis.nameShort = nameShort;\n\t\tdata.set(1, nameShort);\n\t}",
"public void setShortname(String shortname) {\r\n this.shortname = shortname;\r\n }",
"public void setShortName(String shortName) {\n t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
An array of each component of the event start date in UTC time | @ApiModelProperty(value = "An array of each component of the event start date in UTC time")
public DateDetails getUtcStartDateDetails() {
return utcStartDateDetails;
} | [
"public Date[] getEventTimes(Event e) {\n Date startTime, endTime;\n\n // extract the times from the string in the event object\n StringTokenizer time = new StringTokenizer(e.getTime(), \"-\");\n String firstTime = time.nextToken();\n String secondTime = time.nextToken();\n\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a list of all vacant industries a commander owns | public static ArrayList<XYCoord> findUsableProperties(Commander co, GameMap map)
{
ArrayList<XYCoord> industries = new ArrayList<XYCoord>();
// We don't want to bother if we're trying to find nobody's properties
if( null != co )
{
// Add all vacant, <co>-owned industries to the list
for( X... | [
"public List<Industry> industries() {\n return industries;\n }",
"public CompletableFuture<EsiResponseWrapper<List<IndustryFacilities>>> getIndustryFacilities(String ifNoneMatch);",
"static Collection<String> getAllIndustryDescriptions() {\n return getAllDescriptions(6);\n }",
"public List<Maste... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
getFirstCandidate Get the candidate with the best final score | public Candidate getFirstCandidate(){
//Security, list have to be sorted before
this.count();
return this.candidateList.get(0);
} | [
"public int getCandidate() {\n ++counter;\n if(counter >= candidates.size()) return -1;\n return candidates.get(counter);\n }",
"private Pair<Integer, Double> getBestLocalCandidateAndScore(TIntDoubleHashMap entityCandidates) {\n if (entityCandidates.size() == 0) {\n return new Pair<Integer, Doub... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
GENLAST:event_jButton15ActionPerformed User submit message that sends email to administrator. | private void jButton17ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton17ActionPerformed
String subject = jTextField7.getText();// gets subject text
String message = jTextArea3.getText();// gets actual message
String sender = MyData.getUsername(); // gets username of the... | [
"private void txtEmailActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"private void sendMail(){\n\t\t\n\t\ttry{\n\t\t\tfacultyAdvisor.setMessage(message);\n\t\t\tfacultyAdvisor.setSubject(subject);\n\t\t\tfacultyAdvisor.setSender(getName());\n\t\t}\n\t\tcatch(NullPointerException e){\n\t\t\tSystem.out.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
An interface which contains all the jaxrs anotations for CreateRental | public interface CreateRentalInterface {
@GET
@Produces({MediaType.APPLICATION_XML})
@Path("/{value}")
public Rentals getRental(@PathParam("value") String value) throws Exception;
@POST
@Produces(MediaType.TEXT_PLAIN)
@Consumes(MediaType.APPLICATION_XML)
@Path("/{value}")
public Response createAccount(@Pat... | [
"Rental createRental();",
"RentalAgency createRentalAgency();",
"public interface InterfaceRental {\n\t\n\t/* Returns info related to the film rented */\n\tpublic Film getFilm();\n\t\n\t/* Returns the date of the rental. */\n\tpublic LocalDate getDate();\n\t\n\t/* Returns the length of the rental. */\n\tpublic ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reads a string from standard input, using a custom prompt. | public static String readString(String prompt) {
String result = null;
if ( (prompt!=null) && (!prompt.equals("")) ){
System.out.print(prompt);
}
try{
result = STDIN().readLine();
if ( result == null ){
throw new EOFException();
... | [
"public static String promptInput(String prompt){\n\t\tSystem.out.print(prompt);\n\t\treturn inputStream.nextLine();\n\t}",
"public static String readString(String prompt){ \n\t\tSystem.out.print(prompt+\": \");\n\t\tstringInput = readInput();\n\t\treturn stringInput; \n\t}",
"public String readInput(String pro... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
set headers on the input sacFile | private void setHeaderOn(SAC sac) {
if (beginDateTime != null) sac.setEventTime(beginDateTime);
sac.setValue(SACHeaderEnum.B, 0);
sac.setStation(station);
sac.setEventLocation(primeSPC.getSourceLocation());
sac.setSACString(SACHeaderEnum.KEVNM, primeSPC.getSourceID());
... | [
"void setHeader(String header);",
"public void setHeader (String name, String val);",
"void setHeader(java.lang.String header);",
"private void initHeader(boolean newHeader) throws IOException {\n\n if (newHeader) writeHeader();\n /*\n if (rafShp.read() == -1) { \n //File is em... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |