query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Return the flags associated with the given type (would be equivalent to IMember.getFlags()), or 1 if this information wasn't cached on the hierarchy during its computation. | int getCachedFlags(IType type); | [
"long getFlags();",
"int getFlags();",
"public int getFlagsNumber ()\r\n {\r\n return flagsNumber;\r\n }",
"public org.apache.axis.types.UnsignedInt getFlags() {\n return flags;\n }",
"protected static Flag flagFor(Class<?> type, int ordinal) {\n Flag obj;\n String nam... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get a list of available TestLink project names | public List<String> getTestLinkProjects() {
logger.info("Getting TestLink projects...");
List<TestLinkMetricMeasurement> measurements = getAllTestLinkMetricObjects();
List<String> projects = new ArrayList<>();
for (TestLinkMetricMeasurement testLinkMetricMeasurement : measurements) {
String project = te... | [
"public static Collection<String> getProjectNames() {\n\t\tsynchronized (projects) {\n\t\t\treturn new TreeSet<String>(projectNames);\n\t\t\t//return new TreeSet<String>(projects.keySet());\n\t\t}\n\t}",
"@Test\n public void testGetProjectList() throws ClientAPIException {\n LOGGER.info(\"ClientAPIServe... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Recursively check whether the left JSON object is a proper subset of the right JSON object | public static boolean isJsonObjectProperSubsetOf(String leftObject, String rightObject,
boolean checkValues, boolean allowExtra, boolean isOrdered) throws IOException
{
return isProperSubsetOf(APIHelper.deserialize(leftObject), APIHelper.deserialize(rightObject),
checkValue... | [
"@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\r\n public static boolean isProperSubsetOf(Map<String, Object> leftTree, Map<String, Object> rightTree, \r\n boolean checkValues, boolean allowExtra, boolean isOrdered)\r\n {\r\n for (Iterator<String> iterator = leftTree.keySet().iterator()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__XCastedExpression__TypeAssignment_1_1" $ANTLR start "rule__XMemberFeatureCall__FeatureAssignment_1_0_0_0_2" ../com.avaloq.tools.dslsdk.check.ui/srcgen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:18836:1: rule__XMemberFeatureCall__FeatureAssignment_1_0_0_0_2 : ( ( rule... | public final void rule__XMemberFeatureCall__FeatureAssignment_1_0_0_0_2() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:188... | [
"public final void rule__XMemberFeatureCall__FeatureAssignment_1_1_2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/Intern... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
La forma correcta de crear el edificio va aca dentro: | protected abstract Edificio crearEdificio(); | [
"public abstract Anuncio creaAnuncioTematico();",
"public abstract Anuncio creaAnuncioGeneral();",
"public void crearAutomovil(){\r\n automovil = new Vehiculo();\r\n automovil.setMarca(\"BMW\");\r\n automovil.setModelo(2010);\r\n automovil.setPlaca(\"TWS435\");\r\n }",
"Compuesta cre... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Ceffective__Group__4" $ANTLR start "rule__Ceffective__Group__4__Impl" InternalCeffective.g:806:1: rule__Ceffective__Group__4__Impl : ( '}' ) ; | public final void rule__Ceffective__Group__4__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalCeffective.g:810:1: ( ( '}' ) )
// InternalCeffective.g:811:1: ( '}' )
{
// InternalCeffective.g:811:1: ( '}' ... | [
"public final void rule__Ceffective__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCeffective.g:799:1: ( rule__Ceffective__Group__4__Impl )\n // InternalCeffective.g:800:2: rule__Ceffective__Group__4__Impl\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the fixture for this Course Of Action test case. | @Override
protected CourseOfAction getFixture() {
return (CourseOfAction)fixture;
} | [
"@Override\n\tprotected TestIdentityAction getFixture() {\n\t\treturn (TestIdentityAction)fixture;\n\t}",
"@Override\n\tprotected CompositeActivityAction getFixture() {\n\t\treturn (CompositeActivityAction) fixture;\n\t}",
"protected Composite getFixture() {\n\t\treturn fixture;\n\t}",
"protected ICooker getF... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this method is used for mutating a single individual with a given mutation rate. | public static Individual mutateIndividual(Problem problem, Individual iv, double mutationRate) {
Random r = new Random();
int muteDie = r.nextInt(100);
Individual mutatedIv = new Individual(problem);
mutationRate = mutationRate*100;
//if the mutation die is smaller than the mutation rate, apply mutation... | [
"public void mutate(double mutationRate) {\n\t\t// chose a weight to mutate\n\t\tint MUTATED_WEIGHT = (int)(Math.random() * NUM_WEIGHTS);\n\t\tif (Math.random() < mutationRate) {\n\t\t\tif (MUTATED_WEIGHT == 1) { // picked weight is linesCleared\n\t\t\t\tthis.weights[MUTATED_WEIGHT] = (10)*Math.random(); \n\t\t\t}\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
capture the output of a provided code into the file with provided artifact name. only one capture code will run at a time in multithreading environment | public void capture(String textFileNameWithoutExtension, ConsoleOutputGeneratingCode codeToProduceOutput) {
capture(textFileNameWithoutExtension, () -> {
codeToProduceOutput.runAndGenerate();
return null;
});
} | [
"public <R> R capture(String textFileNameWithoutExtension, ConsoleOutputGeneratingCodeWithReturn<R> codeToProduceOutput) {\n WebTauStep step = WebTauStep.createStep(\n tokenizedMessage().action(\"capturing\").classifier(\"console output\")\n .action(\"documentation artif... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column pojo_type_json.type_desc | public String getTypeDesc() {
return typeDesc;
} | [
"public String getTypeDesc() {\r\n return typeDesc;\r\n }",
"public String getTypeJson() {\n return typeJson;\n }",
"public String getTypedesc() {\r\n\t\treturn typedesc;\r\n\t}",
"String getJsonType();",
"public String getData_type_desc() {\n return data_type_desc;\n }",
"St... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Write X series device EEPROM data Check D2xx Programmer's Guide Appendix A for details | public void writeEEPROM_X(EepromX eeprom) throws FTD2XXException {
String manufacturer = eeprom.getManufacturer();
Memory mManufacturer = new Memory(manufacturer.length() + 1);
mManufacturer.setString(0, manufacturer);
String manufacturerId = eeprom.getManufacturerId();
Memory m... | [
"public void writeEEPROMUserArea(byte[] data) throws FTD2XXException {\n Memory source = new Memory(data.length);\n source.write(0, data, 0, data.length);\n ensureFTStatus(ftd2xx.FT_EE_UAWrite(ftHandle, source, data.length));\n }",
"void writeEeprom(ImuEepromWriter sensor, int scaleNo, sho... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
if(userPasses.containsKey(username) & userPasses.get(username).equals(password)) return true; | public static boolean checkUserPass(String username, String password){
getCurrentUsers();
if(userPasses.containsKey(username)){
System.out.println("bo");
if (userPasses.get(username).equals(password)){
return true;
}
}
System.out.printl... | [
"private boolean passMatch (String user, String pass){\n String passFile = users.get(user);\n return passFile.equals(pass);\n }",
"Boolean isValidUserPassword(String username, String password);",
"boolean validateUserAndPassword(String username, String password);",
"private boolean verifyPass... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check if the menu is showing GuiGameOver | boolean isGameOver() {
return getMenu() instanceof ch;
} | [
"boolean isMenuShowing() {\n return game.r != null;\n }",
"private void gameOver() {\r\n\t\t// Create game over dialog and set its position, then show it\r\n\t\tInGameDialog d = new InGameDialog(\"Game Over\", new Skin(\t\t\t\t\t\t\r\n\t\t\t\tGdx.files.internal(\"skins/menuSkin.json\"),\r\n\t\t\t\tnew T... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
AroundMethodAdvice for the APIs exposed from controller. Intercepts the request, gather requested time, requested uri, request type; also intercepts outgoing response gather information around the response status before releasing it to the consumer. | @SuppressWarnings("rawtypes")
@Around(CONTROLLER_BEAN_METHOD_POINTCUT)
public @ResponseBody Response aroundMethodInControllerClass(ProceedingJoinPoint joinPoint) throws Throwable {
LOGGER.debug("Got Request for controller");
Response jsonResponse = null;
HttpServletRequest request = ((Se... | [
"@Around(\"restControllers()\")\n\tpublic Object measureMethodExecutionTime(ProceedingJoinPoint joinPoint) throws Throwable {\n\t\tlong start = System.nanoTime();\n\t\tObject returnValue = joinPoint.proceed();\n\t\tlong end = System.nanoTime();\n\t\tString methodName = joinPoint.getSignature().getName();\n\t\tlogge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
All classes implementing this inteface will be capable of participate of the Groovy truth. | public interface Truth {
/**
* This method has to be implemented to know whether the
* object implementing this interface should be treated
* as a Boolean.TRUE value or Boolean.FALSE
*
* This interface has been created in order to
* make it easier to interact with Groovy collections
... | [
"boolean implementsOwnDependencyChecking();",
"private interface Behaviour{\n\t\t/*\n\t\t * This method is public so we can only implement this interface from inside the Animal class\n\t\t */\n\t\tvoid alive();\n\t}",
"public abstract boolean esComestible();",
"public interface BooleanExpression_Aspect extend... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the value of the C6 column. | public void setC6(java.lang.Long c6)
{
this.c6 = c6;
} | [
"public void setCol6(String col6) {\r\n this.col6 = col6;\r\n }",
"public void setC6(Boolean c6) {\n\t\tthis.c6 = c6;\n\t}",
"public void setValue6(String value)\n {\n value6 = value;\n }",
"public void setCol6value(String col6value) {\n this.col6value = col6value == null ? n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method updates the inventory by removing the vehicle. | public void updateInventory(String vin) {
dealership.getVehInv().deleteVehicle(vin);
} | [
"public void removeVehicle() {\n currentV = null;\n }",
"void removeFromInventory(Item item) {\n inventory.remove(item);\n }",
"public void unEquipArmor(){\n \tinventory.add(equippedArmor);\n \tequippedArmor = null;\n \tsetChanged();\n notifyObservers(inventory);\t\n }",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
method to get the old FKCopy attribute for the ClassifyEvent | public long getOldFKCopy()
{
return getData("FKCopy").getPreviouslong();
} | [
"public long\tgetFKCopy() \r\n\t{\r\n\treturn getData(\"FKCopy\").getlong();\r\n\t}",
"public long\tgetOldPKClassifyEvent()\r\n{\r\n\treturn getData(\"PKClassifyEvent\").getPreviouslong();\r\n}",
"public\tCopyImpl\tgetOldCopy()\r\n{\r\n\tCopyImpl parent = null;\r\n\tSearchRequest searchReq = new SearchRequest()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates combat if space is a monster_encounter space | public void checkSpace() {
Space sp = map2.getSpaces().get(player1.getCoordX() + " " + player1.getCoordY());
if (sp.getSt() == SpaceType.MONSTER_ENCOUNTER) {
int randEn = RNG.generateInt(0, 10);
if (randEn == 10) {
move = false;
combatView(createMonster());
}
} else if (sp.getSt() == Space... | [
"private void addAndCreateMonster() {\n int roll;\n Monster monster = new Monster();\n roll = rand.nextInt(100) + 1;\n monster.setType(roll);\n addMonster(monster);\n }",
"ArenaCreature createPlayerMageArenaCreature(Player player);",
"EnemyCharacter createEnemy();",
"Enco... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
public HeapNode(int key) Class' constructor Complexity O(1) | public HeapNode(int key) {
this.key = key;
this.rank = 0 ;
this.mark = 0 ;
this.originalNode = null;
} | [
"public HeapNode(int key, HeapNode originalNode) {\r\n \t this.key = key;\r\n \t this.rank = 0 ; \r\n \t this.mark = 0 ;\r\n \t this.originalNode = originalNode;\r\n \t}",
"public HeapNode(int aKey) {\r\n\t\t\tthis.mKey = aKey;\r\n\t\t\tthis.mMarked = false;\r\n\t\t\tthis.mRank = 0;\r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the direction based on the two points from and to. The resulting direction will point from "from" to "to". Length is unchanged. | public void setDirection(final V2 from, final V2 to) {
final float l = this.length();
this.x = to.x - from.x;
this.y = to.y - from.y;
this.setLength(l);
} | [
"public void setDirection(Vector2 dir){\n this.direction = dir.cpy();\n }",
"public void setDirection( Vector3f direction );",
"public void setDirectionTo(Position ep, Position vp) throws InvalidPositionException;",
"private void initDirection(ROVector2f start, ROVector2f point) {\n if (start... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column fieldconfigschemeissuetype.FIELDCONFIGSCHEME | public void setFieldconfigscheme(Long fieldconfigscheme) {
this.fieldconfigscheme = fieldconfigscheme;
} | [
"public Fieldconfigschemeissuetype() {\n super();\n }",
"public void setCodingSchemeURI(java.lang.String codingSchemeURI) {\n this.codingSchemeURI = codingSchemeURI;\n }",
"public Long getFieldconfigscheme() {\n return fieldconfigscheme;\n }",
"public Fieldconfigschemeissuetype(L... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
setNeighbours to set the neighbours in all 6 directions of this Cell | protected void setNeighbours(Cell[] neighbours) throws IllegalArgumentEvent {
if(neighbours.length != 6){
throw new IllegalArgumentEvent("incorrect number of neighbours");
}
this.neighbours = neighbours;
} | [
"public void setNeighbours ()\n {\n neighbours = new ArrayList<Cell> ();\n\n if (x != 0)\n {\n addNeighbour (x-1, y);\n }\n\n if (y != 0)\n {\n addNeighbour (x, y-1);\n }\n\n if (x < maze.getColumns () - 1)\n {\n addN... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set Function to f(x)=ax^2+bx+c | public Function(double a, double b, double c) {
//y = a*(x*x) + b*x + c;
co[0]= c;
co[1]= b;
co[2]= a;
degree[0] = 0;
degree[1] = 1;
degree[2] = 2;
cindex = 3;
} | [
"public Function(double b, double c) {\r\n\t //y = b*x + c;\r\n co[0]= c;\r\n co[1]= b;\r\n degree[0] = 0;\r\n degree[1] = 1;\r\n cindex = 2; \r\n\t}",
"public Function(double c) {\r\n co[0]= c;\r\n degree[0] = 0;\r\n cindex = 1; \r\n\t}",
"public static float fung... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
bool delete_null = 1006; | boolean getDeleteNull(); | [
"boolean getForceDeleteNull();",
"public boolean getDeleteNull() {\n return deleteNull_;\n }",
"void deleteValue(boolean b);",
"public boolean getForceDeleteNull() {\n return forceDeleteNull_;\n }",
"boolean getDeleteCampaignNull();",
"boolean getDeleteTemplateNull();",
"public abstract ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Computes the MLE model using a percentile resolution hill climbing in the parameter space. | public static MLEPoint hillClimbSearch(MLEPoint point, MleLikelihoodCache mleCache, double[] T) {
// init the MLE points
MLEPoint temp = new MLEPoint(point.getPIuni(), point.getMu(), point.getSigma(), Double
.NEGATIVE_INFINITY);
boolean done = false;
while (!done) {
// Check each directi... | [
"double getLbs();",
"private double getPowerFromModsTuningUS() {\r\n\r\n\t\tdouble fsr_freq = gloco.getChannelSpacing() / 1e9;\r\n\r\n\t\t// Mod for each each wavelength for each site +demod for the memory site\r\n\t\tdouble Mod_heater_power = gloco.getNumberOfWavelengths()\r\n\t\t\t\t* (gloco.getNumberOfCores() ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ EntityManagerFactory emf = Persistence.createEntityManagerFactory("couponTestPU"); private EntityManager em; private EntityTransaction tx; private CouponDaoJpa cdj; | @Before
public void setUp() {
/* try {
new DatabaseCleaner(emf.createEntityManager()).clean();
} catch (SQLException ex) {
Logger.getLogger(CouponDaoJpaTest.class.getName()).log(Level.SEVERE, null, ex);
}
em = emf.createEntityManager();
tx = em.getTrans... | [
"private static void init(){\n entityManager = HibernateUtil.getEntityManager();\n transaction = entityManager.getTransaction();\n }",
"EMInitializer() {\r\n try {\r\n emf = Persistence.createEntityManagerFactory(\"pl.polsl_MatchStatist\"\r\n + \"icsWeb_war_4.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return an intersection of two collections as a set. The original collections will not be modified. | public static <T> Set<T> intersection(Collection<T> a, Collection<T> b) {
return intersection(a, b, defaultSetFactory());
} | [
"public Set intersection(Set anotherSet);",
"Set<E> intersect(Set<E> other);",
"@Override\r\n public ImmutableSet<T> intersection(Set<T> other) {\r\n return intersect(asThis(other));\r\n }",
"public ZYSet<ElementType> intersection(ZYSet<ElementType> otherSet){\n ZYSet<ElementType> result = new ZYArrayS... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ This method is used to print the output when an isomorphism is found. It formats and then returns the tuple array. | private static String printH(Tuple[] h){
String answer = "ISOMORPHISM:\t{";
for(int i = 0; i < h.length; i++){
answer = answer + h[i] + (i < h.length-1? ",": "");
}
answer = answer + "}";
return answer;
} | [
"public void printArray(){\n\n\t\tfor (int i=0;i<1;i++){\n\n\t\t\tfor (int j=0;j<population[i].getLength();j++){\n\n\t\t\t\tSystem.out.println(\"X\" + j + \": \" + population[i].getX(j) + \" \" + \"Y\"+ j + \": \" + population[i].getY(j));\n\t\t\t\tSystem.out.println();\n\n\t\t\t}//end j\n\n\t\t\tSystem.out.println... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts a chain of interfaces to Fasten URIs. | public static List<FastenURI> toURIInterfaces(final List<ObjectType> types) {
final List<FastenURI> result = new ArrayList<>();
types.forEach(objectType -> result.add(OPALMethod.getTypeURI(objectType)));
return result;
} | [
"public static LinkedList<FastenURI> toURIClasses(final LinkedList<ObjectType> types) {\n final LinkedList<FastenURI> result = new LinkedList<>();\n types.forEach(objectType -> result.add(OPALMethod.getTypeURI(objectType)));\n return result;\n }",
"public URI toIRI(\n ){\n String... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Notifies profiler that named event had stopped | public void stop(String event) {
Long start = started.get(event);
if (start != null && start != NOT_STARTED) {
profile.add(event, System.currentTimeMillis() - start);
started.put(event, NOT_STARTED);
}
} | [
"public void unregisterProfileNameEvents()\n {\n profileNameListener_ = null;\n }",
"@Override\n\tpublic void stopped() {\n\t\t\n\t}",
"protected void on_stop()\n {\n }",
"private void notifyPlayerEventStopped() {\n if (logger.isActivated()) {\n logger.info(\"Player is sto... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
add additional type query parameter | public <TValue> ByProjectKeyByResourceTypeGet addType(final TValue type) {
return copy().addQueryParam("type", type);
} | [
"public void setQueryType(String queryType);",
"public void addParam(String type) {\n String[] origParams = getParamNames();\n String[] params = new String[origParams.length + 1];\n for (int i = 0; i < origParams.length; i++)\n params[i] = origParams[i];\n params[origParams.... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts a list of harvested DDOWiki item links into full URLs. For example, /page/Item:Duality,_the_Moral_Compass would become | static Set<String> convertWikiItemLinksToFullURL(Set<String> links) {
Set<String> items = shortenWikiItemLinks(links);
Set<String> ret = new HashSet<>();
for(String item : items) {
ret.add(WIKI_BASE_URL + item);
}
return ret;
} | [
"private static String makeLinkListString(String[] items) {\n\t\tString linkListString = \"\";\n\t\tfor (int i = 0; i < items.length; i++)\n\t\t\tlinkListString += items[i] + ((i < items.length - 1) ? LINK_LIST_SEPARATOR : \"\");\n\t\treturn linkListString;\n\t}",
"@Override\n protected List<String> convertDoisT... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Initialize NodeBar Connections in Model | public void initialize() {
for (String barname : barmap.keySet()){
Bar bar = barmap.get(barname);
bar.initialize_model_connections();
}
for (String nodename : nodemap.keySet()){
Node node = nodemap.get(nodename);
node.initialize_model_connections();
}
} | [
"@Override\n protected void setUpConnections() {\n drawer.setDrawerObservable(model);\n drawer.notifyOfChanges();\n model.addDrawerObserver(drawer);\n }",
"private void initBars()\n\t{\n\t\tfor (int i = 0; i < Constants.MAX_VALUE; i++)\n\t\t{\n\t\t\trows[i] = new Bar();\n\t\t\tcolumns[i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
check if two trips have the same return date | public boolean sameReturningDate(Trip otherTrip)
{
return this._returningDate.equals(otherTrip._returningDate);
} | [
"protected boolean hasSameDates(final Available other) {\n\t\treturn (_tDateStart.equals(other._tDateStart) &&\n\t\t _tDateStamp.equals(other._tDateStamp) &&\n\t\t _tDateEnd.equals(other._tDateEnd) &&\n\t\t _tDateCreated.equals(other._tDateCreated) &&\n\t\t _tLastModified... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new page in PDF document. | public void createNewPage(); | [
"public void create() {\n PDDocument document = new PDDocument();\n PDPage page = new PDPage();\n document.addPage(page);\n\n // Create a new font object selecting one of the PDF base fonts\n PDFont font = PDType1Font.HELVETICA_BOLD;\n try (document) {\n // Start... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
based on file contents see what the newline type is | private static String newlineFromFile(String fileContents) {
String newline = "\n";
if (fileContents.contains("\\r\\n")) {
newline = "\\r\\n";
}
if (fileContents.contains("\\n\\r")) {
newline = "\\n\\r";
}
if (fileContents.contains("\\r")) {
newline = "\\r";
}
... | [
"@Test\n public void test_parsenewlines_crlf() {\n NewlineParser nlp = new NewlineParser();\n Diagnostics<Diagnosis> diagnostics = new Diagnostics<Diagnosis>();\n byte[] bytes;\n int expectedNewlines;\n boolean expectedMissingCr;\n boolean expectedMissingLf;\n boo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method, that gets specific table information from a given period | public List<Table> getTables(char table, DatePeriod period) throws OnlineResourcesAccessException, JsonParserException {
// http://api.nbp.pl/api/exchangerates/tables/{table}/{startDate}/{endDate}/
String url = "http://api.nbp.pl/api/exchangerates/tables/%c/%s/%s/"; // table, startDate, endDate
... | [
"java.lang.String getTable();",
"String getTable(String tableName);",
"Object getTables();",
"public void findPayPeriod()\r\n {\r\n BatSQL bSQL = new BatSQL();\r\n \r\n String q = \"SELECT * FROM PAYPERIOD\"; \r\n ResultSet rs = bSQL.query(q);\r\n try\r\n {\r\n rs.next();\r\n ppst... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieves collection of active Product's by ReportingClass'es | private Map getReportingClassToActiveProductCollection()
{
if(reportingClassToActiveProduct == null)
{
reportingClassToActiveProduct = new HashMap(DEFAULT_SIZE);
}
return reportingClassToActiveProduct;
} | [
"public synchronized Product[] getProductsForReportingClass(ReportingClass reportingClass, boolean activeOnly)\n {\n Product[] products = productPrototype;\n\n if(activeOnly)\n {\n if(getReportingClassToActiveProductCollection().containsKey(reportingClass))\n {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
return true if variant has any prediction with a SO term (or its children) with this label | public boolean hasSequenceOntologyLabel(final VariantContext ctx,final String lbl)
{
if(lbl==null) return false;
final Term t= this.getSequenceOntologyTree().getTermByLabel(lbl);
if(t==null) LOG.warning("don't know SO.label "+lbl);
return hasSequenceOntologyTerm(ctx,t);
} | [
"public boolean getPredSentencePolarity() {\n Iterator<Integer> childrenIter = childIndListSets.get(0).iterator();\n int nonRootHeadInd = childrenIter.next();\n childrenIter = childIndListSets.get(nonRootHeadInd).iterator(); // Get all children of nonRootHead\n\n int posCount = 0;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Performs a GET request on the categoryRules endpoint. This test uses a valid session ID and tests whether the output is formatted according to the specification. This test also adds rules first, making sure the correct rules are returned. | @Test
public void validSessionWithDataCategoryRulesGetTest() {
categoryRulePostTest();
given()
.header("X-session-ID", sessionId)
.get("api/v1/categoryRules")
.then()
.assertThat()
.body(matchesJsonSchema(CATEGORYRULE_L... | [
"@Test\n public void validSessionCategoryRulesGetTest() {\n given()\n .header(\"X-session-ID\", sessionId)\n .get(\"api/v1/categoryRules\")\n .then()\n .assertThat()\n .body(matchesJsonSchema(CATEGORYRULE_LIST_SCHEMA_PATH.toAbsolut... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes the YANG module name of the JSON subtree that the builder is currently building. This function may be called when the builder finishes building a data node. | void popModuleName(); | [
"public com.autodesk.ws.avro.Call.Builder clearModule() {\n module = null;\n fieldSetFlags()[2] = false;\n return this;\n }",
"void unsetBuildingName();",
"public void removeModuleFromTree(DefaultMutableTreeNode newNode) {\r\n treeModel.removeNodeFromParent(newNode) ;\r\n treeModel.r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Reverse complement a byte array of bases (that is, chars casted to bytes, not base indices in byte form) | static public byte[] simpleReverseComplement(byte[] bases) {
byte[] rcbases = new byte[bases.length];
for (int i = 0; i < bases.length; i++) {
rcbases[i] = simpleComplement(bases[bases.length - 1 - i]);
}
return rcbases;
} | [
"@Deprecated\n static public char[] simpleReverseComplement(char[] bases) {\n char[] rcbases = new char[bases.length];\n\n for (int i = 0; i < bases.length; i++) {\n rcbases[i] = simpleComplement(bases[bases.length - 1 - i]);\n }\n\n return rcbases;\n }",
"@Deprecated\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Hyperbolic sin. Hyperbolic sine: (e^xe^x)/2 | public static final float sinh(float x) {
return (MoreMath.pow(MoreMath.E, x) - MoreMath.pow(MoreMath.E, -x)) / 2.0f;
} | [
"public static final double sinh(double x) {\n return (Math.pow(Math.E, x) - Math.pow(Math.E, -x)) / 2.0d;\n }",
"public double calculateHyperbolicSine(double angle);",
"E sin(final E n);",
"public double sine()\n {\n return Math.sin( result );\n }",
"public static double sin(double x... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
BA.debugLineNum = 299;BA.debugLine="Sub Activity_KeyPress(KeyCode As Int)As Boolean"; BA.debugLineNum = 300;BA.debugLine="If KeyCode = KeyCodes.KEYCODE_BACK Then"; | public static boolean _activity_keypress(int _keycode) throws Exception{
if (_keycode==anywheresoftware.b4a.keywords.Common.KeyCodes.KEYCODE_BACK) {
//BA.debugLineNum = 301;BA.debugLine="close_click";
_close_click();
};
//BA.debugLineNum = 304;BA.debugLine="Return True";
if (true) return anywheresoftware.b4a.keywo... | [
"public static boolean _activity_keypress(int _keycode) throws Exception{\nif (_keycode==anywheresoftware.b4a.keywords.Common.KeyCodes.KEYCODE_BACK) { \n //BA.debugLineNum = 298;BA.debugLine=\"Activity.Finish\";\nmostCurrent._activity.Finish();\n };\n //BA.debugLineNum = 300;BA.debugLine=\"End Sub\";\nreturn false... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
use the pageid as the xpath | private void showPathList(WebContext ctx, String xpath, PageId pageId) {
showPathList(ctx, pageId.name(), null, false);
} | [
"private void navigateToPage(String page) throws MalformedURLException, XPathExpressionException {\n switchPage(page);\n\n }",
"void setXPath(String xpath);",
"java.lang.String getPageId();",
"void setXpath(java.lang.String xpath);",
"String getPageID();",
"Integer getPageId();",
"void visit(X... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
constructor creates a new DefaultCmdLineHandler as its delegate | public LoggerCmdLineHandler ( OutputStream stream,
String cmdName,
String cmdDesc,
Parameter[] options,
Parameter[] args,
CmdLineParser parser) {
... | [
"public LoggerCmdLineHandler ( OutputStream stream,\n String cmdName, \n String cmdDesc, \n Parameter[] options,\n Parameter[] args) {\n this(stream, \n new DefaultC... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Tests whether a single servlet is correctly merged into a descriptor that already contains the definition of an other servlet. | public void testMergeOneServletIntoDocumentWithAnotherServlet() throws Exception
{
String srcXml = "<web-app>"
+ " <servlet>"
+ " <servlet-name>s1</servlet-name>"
+ " <servlet-class>sclass1</servlet-class>"
+ " </servlet>"
+ "</web-app>";
... | [
"public void testMergeOneServletIntoDocumentWithSameServlet() throws Exception\n {\n String srcXml = \"<web-app>\"\n + \" <servlet>\"\n + \" <servlet-name>s1</servlet-name>\"\n + \" <servlet-class>sclass1</servlet-class>\"\n + \" </servlet>\"\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the TerritoryCodes field. The rating territory codes. | @gw.internal.gosu.parser.ExtendedProperty
public entity.TerritoryCode[] getTerritoryCodes() {
return (entity.TerritoryCode[])__getInternalInterface().getFieldValue(TERRITORYCODES_PROP.get());
} | [
"@gw.internal.gosu.parser.ExtendedProperty\n public entity.TerritoryCode[] getTerritoryCodes() {\n return (entity.TerritoryCode[])__getInternalInterface().getFieldValue(TERRITORYCODES_PROP.get());\n }",
"public void setTerritoryCodes(entity.TerritoryCode[] value) {\n __getInternalInterface().setFi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test that you cannot create a shape with the same name as another shape in the animation. | @Test(expected = IllegalArgumentException.class)
public void testNoShapeWithSameName() {
model1.addShape(Rectangle.createRectangle("R", new Point.Double(500, 200),
new Color(0, 0, 0), 0, 10, 10, 10));
model1.addShape(Oval.createOval("R", new Point.Double(500, 200),
new Color(0, 0, 0), ... | [
"@Test(expected = IllegalArgumentException.class)\n public void testAddSameShapeTwice() {\n testAnimation.addShape(c, 1, 100);\n testAnimation.addShape(c, 50, 70);\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testNoShapeWithSameNameCaseInsensitive() {\n model1.addShape(Rectang... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
1) Provided with the details of a transaction we need to be able to add the transaction to a bank account. | public void processTransaction(Transaction transaction) throws BankProcessingException {
Account account = map.get(transaction.getAssociatedAccount());
if (account != null) {
synchronized (account) {
try {
account.addTransaction(transaction);
... | [
"public void addTransaction(Transaction tx) {\n // IMPLEMENT THIS\n }",
"protected abstract Transaction createAndAdd();",
"public void addTransaction(TransactionId tid, Permissions pms){\n\tif(tid != null){\n\t Transaction tas = new Transaction(tid, pms);\n\t this.traid.add(tas);\n\t} else{\n\t Deb... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__ELong__Group__1" $ANTLR start "rule__ELong__Group__1__Impl" ../org.xtext.catalogo.ui/srcgen/org/xtext/ui/contentassist/antlr/internal/InternalCatalogo.g:1748:1: rule__ELong__Group__1__Impl : ( RULE_INT ) ; | public final void rule__ELong__Group__1__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.xtext.catalogo.ui/src-gen/org/xtext/ui/contentassist/antlr/internal/InternalCatalogo.g:1752:1: ( ( RULE_INT ) )
// ../org.xtext.catalogo.... | [
"public final void rule__ELong__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.catalogo.ui/src-gen/org/xtext/ui/contentassist/antlr/internal/InternalCatalogo.g:1741:1: ( rule__ELong__Group__1__Impl )\n // ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the priority for this type key | public int getPriority() {
return _typeKeyImplManager.getTypeKeyImpl().getPriority();
} | [
"public int getPriorityType() {\n return getPT();\n }",
"com.google.protobuf.Int32Value getPriority();",
"public byte getPriority()\n\t{\n\t\treturn priority;\n\t}",
"String getSpecifiedPriority();",
"public int getPriorityNumber();",
"@DISPID(1610874911) //= 0x6004001f. The runtime will prefer the... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
An immutable clientside representation of ScriptPackage. | public interface ScriptPackage {
/**
* Gets the id property: Fully qualified resource Id for the resource.
*
* @return the id value.
*/
String id();
/**
* Gets the name property: The name of the resource.
*
* @return the name value.
*/
String name();
/**
... | [
"public JavaPackage asJavaPackage() {\r\n\t\tJavaPackage outPckg = null;\r\n\t\tString pckgStr = this.asString();\r\n\t\tif (!Strings.isNullOrEmpty(pckgStr)) {\r\n\t\t\toutPckg = new JavaPackage(pckgStr);\r\n\t\t}\r\n\t\treturn outPckg;\r\n\t}",
"public List getPackageList()\n {\n return Collections.unmodifia... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The LispList interface allows both ConsCells, which have data members, and NilAtoms, to be treated as lists, the latter as the empty list. In Common Lisp, NIL is both an atom and a list, so it essentially has multiple inheritance, which is just the appropriate use for an interface In scheme it is an error to call CAR o... | interface LispList extends Iterable<LispObject>, LispObject {
LispList listOfValues(Environment env) ;
LispObject evalSequence(Environment env) ;
public LispList cdrList() ;
LispObject[] toArray();
int length() ;
} | [
"static List createEmptyList() {\n return new LinkedList<>();\n }",
"public interface ImList<E> {\n /**\n * @return a list with e as its first element, \n * followed by this list as its remaining elements.\n */\n public ImList<E> cons(E e);\n \n /**\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The async counterpart of GreetingService. | public interface GreetingServiceAsync
{
void addUserFormData(UserFormData data, AsyncCallback<String> callback);
void getUserFormData(Integer startIndex, Integer length, AsyncCallback<UserFormData[]> callback);
void getUserFormDataCount( AsyncCallback<Integer> callback);
} | [
"public interface GreetingServiceAsync {\n\tvoid getAllChannels(AsyncCallback<ArrayList<String>> callback);\n\tvoid getChatLogDataFromSearchCriteria(String startDate, String endDate, String channel, String searchText, AsyncCallback<ArrayList<ChatLog>> callback);\n\tvoid getDaysAndCountForChannel(String channel, Asy... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Define a transect that is 60 degrees long and extends along a meridian that passes through vertex 1 exactly. This means that the first half of the transect is in the middle of triangles, the center point exactly hits a vertex, and the last half of the transect resides on (or very close to) an edge of a triangle. The tr... | @Test
public void testTransect() throws GeoTessException {
double dist = Math.toRadians(60);
double azimuth = Math.toRadians(10);
double[] vertex1 = posLinear.getModel().getGrid().getVertex(1);
//System.out.println(GeoTessUtils.getLatLonString(vertex1)); System.out.println();
double[] start = G... | [
"protected ArrayList<Polyhedron> subdivideHelper (Geometry g, GeometryMap hash) {\n\t\tArrayList<Polyhedron> newPolys = new ArrayList<Polyhedron> ();\n\n\t\t/** Original vertices */ int[] v1 = new int[4]; \n\t\t/** Midpoint vertices*/ int[] v2 = new int[6];\n\n\t\tv1[0] = vertices[0];\t// 0 1 2 \t//faces\n\t\tv1[1]... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a BeastProfile for a beast based on ID. Returns null if a beast doesn't exist | public BeastProfile selectProfile(int beastID){
SQLiteDatabase db = this.getReadableDatabase();
String IdString = Integer.toString(beastID);
Cursor cursor = db.rawQuery("SELECT * FROM "+T1+
" WHERE "+T1_ID+" = "+IdString+";", null);
if (cursor.moveToFirst()){
... | [
"public Profile getProfile (int id){\n\t\treturn profiles.stream().filter(p -> p.getId()==(id)).findFirst().get();\n\t}",
"public Profile getProfile(final String id);",
"Profile getProfile( String profileId );",
"public GrowthProfile getSpecificGrowthProfile(int id);",
"@Override\r\n public Profile getPr... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
TODO: Autogenerated Javadoc The Interface ElecPoleRepository. | public interface ElecPoleRepository extends MongoRepository<ElectricPole, String> {
/**
* Find ElectricPole by id.
*
* @param _id the id
* @return the electric pole
*/
ElectricPole findBy_id(ObjectId _id);
} | [
"ElectricPole findBy_id(ObjectId _id);",
"@Override\n @Transactional(readOnly = true)\n public Page<Pole> findAll(Pageable pageable) {\n log.debug(\"Request to get all Poles\");\n return poleRepository.findAll(pageable);\n }",
"public T casePole(Pole object) {\n\t\treturn null;\n\t}",
"... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Leaves from the bounty hunter. | public void leaveBountyHunter(Player player) {
targets.remove(player);
} | [
"void bust() {\n\t\t_loses++;\n\t\t//_money -= _bet;\n\t\tclearHand();\n\t\t_bet = 0;\n\t}",
"public void dropBounty() {\n //if bandit had bounties\n if (this.bounties.size() > 0) {\n //pick a random bounty\n Random r = new Random();\n int randomBountyIndex = r.nextI... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method created by SpringML to get notification message based on no. of days of last exposure. | private String getNotificationMsg(int days){
String message;
if (days == 0){
message = context.getString(R.string.notification_message_zero_days);
}
else if (days == 1){
message = context.getString(R.string.notification_message_one_day, days);
}
else{
message = context.getStrin... | [
"int getMessageCounterHistoryDayLimit();",
"public String After_1day_BegDateInspect(String objectStoreName, String Subject, String Body, String dominoServer, String dominoMailbox, String dominoUsername, String dominoPassword) throws VWException {\n Send_Notifications Send_Notif = new Send_Notifications();\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
convert a term into words (separated by ASCII space only) | public static ArrayList<String> ToWordListBySpace(String inTerm)
{
// tokenize words
StringTokenizer buf = new StringTokenizer(inTerm.trim(), " ");
ArrayList<String> wordList = new ArrayList<String>();
while(buf.hasMoreTokens() == true)
{
wordList.add(buf.nextToke... | [
"public String normalize(String word);",
"public String[] separateWords() {\n //Separates the words into an array.\n String[] separatedWords = tokenizer.tokenize(phrase);\n //But that's not all! We need to remove capital letters and punctuation!\n //That's what this loop is for.\n int length = sepa... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns true if the text is completely empty (and cursor is at line 1). | public boolean isEmpty() {
return cursor==-1 && lines.isEmpty();
} | [
"public boolean empty(){\n return(workspace.getText().length() == 0);\n }",
"private boolean isEmptyContent() {\n\t\tchar c = data[currentIndex];\n\t\tif(c == ' ' || c == '\\t') {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public boolean isConsiderEmptyText() {\n return considerEmp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of interpreting the object as an instance of 'Logical Not Operation Call Exp CS'. This implementation returns null; returning a nonnull result will terminate the switch. | public T caseLogicalNotOperationCallExpCS(LogicalNotOperationCallExpCS object) {
return null;
} | [
"public T caseLogicalOrOperationCallExpCS(LogicalOrOperationCallExpCS object) {\r\n return null;\r\n }",
"public T caseLogicalAndOperationCallExpCS(LogicalAndOperationCallExpCS object) {\r\n return null;\r\n }",
"public T caseLogicalImpliesOperationCallExpCS(LogicalImpliesOperationCallExpCS object) {\r\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the value of the 'var292' field. | public java.lang.Double getVar292() {
return var292;
} | [
"public java.lang.Double getVar292() {\n return var292;\n }",
"public java.lang.CharSequence getVar234() {\n return var234;\n }",
"public java.lang.CharSequence getVar234() {\n return var234;\n }",
"public java.lang.CharSequence getVar233() {\n return var233;\n }",
"public java.lang.Inte... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the fixture for this Connection Info test case. | protected void setFixture(ConnectionInfo fixture) {
this.fixture = fixture;
} | [
"protected ConnectionInfo getFixture() {\r\n\t\treturn fixture;\r\n\t}",
"protected void setFixture(DatabaseOptions fixture) {\n\t\tthis.fixture = fixture;\n\t}",
"protected void setFixture(Endpoint fixture) {\n\t\tthis.fixture = fixture;\n\t}",
"protected void setFixture(Meta fixture) {\r\n\t\tthis.fixture =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
XDialog() Create an XDialog | public XDialog(Frame owner)
{
super(owner );
} | [
"public abstract Dialog createDialog(DialogDescriptor descriptor);",
"public XDialog(Dialog owner)\r\n\t{\r\n\t\tsuper(owner );\r\n\t}",
"public void createAndShowDialog() {\n\t\tcreateDialog();\n\t\tgetSwingRenderer().showDialog(createdDialog, true);\n\t}",
"private DialogBox createDialogBox(String text) {\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Handler for when a transaction in the TableView is selected. Enables the "Delete Transaction" button when a transaction is selected. | @FXML
public void handleClickTransactionItem() {
deleteTransactionButton.setDisable(false);
} | [
"@FXML\n public void handleDelete() {\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION, \"Are you sure you want to delete the transaction?\");\n Transaction selected = transactionTable.getSelectionModel().getSelectedItem();\n Optional<ButtonType> result = alert.showAndWait();\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Detect languages in document | private LanguageDetect(Document doc) {
this(doc, "deu", new String[] { "tur", "en" }, 5);
} | [
"private void detectLanguage(Document document) throws LangDetectException{\n \tString detail_page_main_content = document.getFieldToTextMap().get(\"detail_page_main_content\");\n \tString lang = null;\n \tif(detail_page_main_content != null && !detail_page_main_content.isEmpty()){\n \t\tlang = this.lan... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Inverts a binary tree. Example: 4 / \ 2 7 / \ / \ 1 3 6 9 to 4 / \ 7 2 / \ / \ 9 6 3 1 Strategy: For each visited node, swap its children. An easy solution is to use DFS or BFS since they visit every node. | public TreeNode invertTree(TreeNode root) {
// Null Check: tree is null
if (root == null) return root;
// Swap children
TreeNode temp = root.left;
root.left = root.right;
root.right = temp;
// Call invertTree on left and right
in... | [
"public void invert() {\n mxGraphHierarchyNode temp = source;\n source = target;\n target = temp;\n isReversed = !isReversed;\n }",
"public static void mirror(BinaryTreeNode<Integer> root){\n if(root == null){\n return;\n }\n Queue<BinaryTreeNode<Integer>> queue = new ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
need to be in lower case eventAliases.put("Event", Event.class); | private void initialiseEventAliases() {
eventAliases.put("entity", EntityEvent.class);
eventAliases.put("entityc", EntityCombustEvent.class);
eventAliases.put("entitydbb", EntityDamageByBlockEvent.class);
eventAliases.put("entitydbe", EntityDamageByEntityEvent.class);
eventAliase... | [
"public interface Event\n\t{\n\t\tpublic static final String EVENT_ID = \"aether.event.id\";\n\t\tpublic static final String TIME = \"aether.event.time\";\n\t\tpublic static final String EVENT_TYPE = \"aether.event.type\";\n\t}",
"public EventClass getEventClass();",
"EventUse createEventUse();",
"public inte... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
We need to reset previous state of adapter and recycler view before every new query | @Override
public void resetQuery() {
mData.clear();
mAdapter.notifyDataSetChanged();
mEndlessScrollListener.resetState();
} | [
"private void clearCurrentResults() {\n if (adapter != null) {\n adapter.clearRecyclerView();\n page = 0;\n }\n }",
"public void resetAdapter() {\n\n // Hide ProgressBar\n mBinding.searchUserLayout.getUvm().hideProgress();\n\n // Cancel any pending searc... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method sets the value of the database column vendor_application.result_status | public void setResultStatus(String resultStatus) {
this.resultStatus = resultStatus == null ? null : resultStatus.trim();
} | [
"public void setGetTaskStatusResult(int value) {\r\n this.getTaskStatusResult = value;\r\n }",
"protected void maybeSetResultPropertyValue(int result) {\r\n String res = Integer.toString(result);\r\n if (resultProperty != null) {\r\n getProject().setNewProperty(resultProperty, r... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the seasons before and after the current season in the ordered set where companyId = &63;. | public hu.webtown.liferay.portlet.model.Season[] findByCompanyId_PrevAndNext(
long seasonId, long companyId,
com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
throws com.liferay.portal.kernel.exception.SystemException,
hu.webtown.liferay.portlet.NoSuchSeasonException; | [
"public hu.webtown.liferay.portlet.model.Season[] findByUuid_C_PrevAndNext(\n\t\tlong seasonId, java.lang.String uuid, long companyId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException,\n\t\t\thu.webtown.liferay.portlet.NoSuchSea... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this just checkes if wordSpawnDelay has passed | @Override
public void update(float delta) {
timedelta += delta;
if(timedelta > wordSpawnDelay){
spawnWord();
timedelta = 0f;
}
updateWords(delta);
} | [
"public void checkSpawnTimer(World world)\n {\n if(spawn_Assignment_timer.isTimeUp())\n {\n float the_starting_Y = generate_starting_Y();\n float the_starting_speed = generate_speed();\n\n Assignments_Spawned.add(new Assignments(world, the_starting_speed, 4f, the_st... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Term__Group__2__Impl" $ANTLR start "rule__Term__Group__3" ../com.blasedef.onpa.ONPA.ui/srcgen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:2256:1: rule__Term__Group__3 : rule__Term__Group__3__Impl rule__Term__Group__4 ; | public final void rule__Term__Group__3() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:2260:1: ( rule__Term__Group__3__Impl rule__Term__Group__4 )
... | [
"public final void rule__Term__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:9064:1: ( rule__Term__Group__3__Impl rule__Term__Group__4... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Instantiates a new generic three drop down choices model. | public ThreeDropDownChoicesModel( final T selectedOption,
final Map< T, List< T >> modelsMap,
final List< T > selectedValuesChoices ) {
super( selectedOption, modelsMap );
this.selectedValuesChoices = selectedValuesChoices;
} | [
"public GenericOptionChoice() {\n // your code here\n\n }",
"MultipleChoice createMultipleChoice();",
"public GenericOptionChoice(ApplicationEnvironment environment) {\n super(environment);\n\n }",
"public MultipleChoiceSet() {\n }",
"public void createSpecialityComboBox(){\n S... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
method to click on edit employee | public void Edit_employee()
{
clk_edit_employee.click();
} | [
"public void clickEdit(){\n\t\tdriver.findElement(edit).click();\n\t}",
"public void clickEdit() {\r\n\t\tEdit.click();\r\n\t}",
"public void clickEditLink() {\r\n\t\tbtn_EditLink.click();\r\n\t}",
"public void clickEditButton(){\r\n\t\t\r\n\t\tMcsElement.getElementByXpath(driver, \"//div[contains(@class,'x-t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
closes the source reader | public void closeFile() throws IOException{
sourceReader.close();
} | [
"@Override\n protected void _closeInput() throws IOException\n {\n if (_reader != null) {\n if (_ioContext.isResourceManaged() || isEnabled(Feature.AUTO_CLOSE_SOURCE)) {\n _reader.close();\n }\n _reader = null;\n }\n }",
"public void close() {... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get whether the tiles list has changed since the last update. | public boolean haveTilesChanged() {
return tilesChanged;
} | [
"private boolean recentlyChanged() {\n List<ResultValue> previousResultValues = getPreviousResultValues();\n if (previousResultValues.isEmpty()) {\n return false;\n }\n return previousResultValues.get(previousResultValues.size() - 1) != getResultValue();\n }",
"public boo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Is this a new release item | public abstract boolean isNewRelease(); | [
"public boolean isNewRelease() {\r\n return newRelease;\r\n }",
"public boolean isRelease() {\n return this.release;\n }",
"public boolean isReleased() {\n // Exam\n ZonedDateTime releaseDate;\n if (this.isExamExercise()) {\n releaseDate = this.getExerciseGroup().ge... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The ID of the first DM user, or an empty string if this message was not sent through a DM chat. optional string user_id_one = 12; | com.google.protobuf.ByteString
getUserIdOneBytes(); | [
"java.lang.String getUserIdOne();",
"public UserID userID() {\n if (person != null && !person.userIds.isEmpty())\n return person.userIds.get(0);\n return null;\n }",
"java.lang.String getUserID();",
"public void setFirstUser(User firstUser) {\n this.firstUser = firstUser;\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
SEARCH /_search/hrClassInfos/:query > search for the hrClassInfo corresponding to the query. | @RequestMapping(value = "/_search/hrClassInfos/{query}",
method = RequestMethod.GET,
produces = MediaType.APPLICATION_JSON_VALUE)
@Timed
public List<HrClassInfo> searchHrClassInfos(@PathVariable String query) {
log.debug("REST request to search HrClassInfos for query {}", query);
... | [
"@RequestMapping(value = \"/_search/hrProjectInfos/{query}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public List<HrProjectInfo> searchHrProjectInfos(@PathVariable String query) {\n log.debug(\"REST request to search HrProjectInfos for query... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Only the first piece of code that recognizes that the response is done gets to set response end time. | public void setResponseEndTimeNanosToNowIfNotAlreadySet() {
if (this.responseEndTimeNanos == null) {
this.responseEndTimeNanos = System.nanoTime();
}
} | [
"Timer getServerRequestCompletedDuration();",
"public void endResponse() throws IOException {\n out.println();\n //out.println(\"--End\");\n out.flush();\n endedLastResponse = true;\n }",
"protected void finish() {\n writerServerTimingHeader();\n\n try {\n\n // maybe nobody ever call get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Configure the classifier to traverse the cause chain. | public RetryTopicConfigurationBuilder traversingCauses() {
classifierBuilder().traversingCauses();
return this;
} | [
"public void setClassifier(Classifier classifier) {\n this.classifier = classifier;\n //setClassifier(classifier, false);\n }",
"public void configure(Configuration config) {\r\n this.learner = config.get(\"classifier\");\r\n if(learner == null)\r\n throw new IllegalArgum... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Use ReqBattleEnd.newBuilder() to construct. | private ReqBattleEnd(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
} | [
"protobuf.clazz.Protocol.GameEndResponseOrBuilder getGameEndOrBuilder();",
"protobuf.clazz.Protocol.GameEndResponse getGameEnd();",
"private LeaveBattleReq(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }",
"public static com.voole.hobbit2.camus.order.OrderPlayEndReqS... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Jwt access token converter jwt access token converter. | @Bean
public JwtAccessTokenConverter jwtAccessTokenConverter() {
JwtAccessTokenConverter converter = new JwtAccessTokenConverter();
String jwtsigningKey = paascloudProperties.getSecurity().getOauth2().getJwtSigningKey();
if(StringUtils.isBlank(jwtsigningKey)){
jwtsigningKey = "paascloud";
}
convert... | [
"@Bean\n public JwtAccessTokenConverter tokenConverter() {\n JwtAccessTokenConverter converter = new JwtAccessTokenConverter();\n converter.setSigningKey(Constants.SIGN_KEY);\n return converter;\n }",
"private JwtAuthenticationConverter jwtAuthenticationConverter() {\n JwtAuthent... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Update the remote port | public void updateRemotePort(int remotePort){
this.remotePort = remotePort;
} | [
"public void updateLocalPort(int localPort){\n this.localPort = localPort;\n }",
"private void setRemoteDataPort(int value) {\n\n remoteDataPort_ = value;\n }",
"public final void setRemoteSocketPort(int port){\r\n remoteSocketPort = port;\r\n }",
"public void setPort(int port);",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column S_TODO_DET.RECEIVED_CODE | public BigDecimal getRECEIVED_CODE() {
return RECEIVED_CODE;
} | [
"public void setRECEIVED_CODE(BigDecimal RECEIVED_CODE) {\r\n this.RECEIVED_CODE = RECEIVED_CODE;\r\n }",
"public java.lang.String getReceiveCode() {\r\n return receiveCode;\r\n }",
"protocol.Msg.ReadTableMsg.ReadImportantTableRsp.ResultCode getResultCode();",
"@Override\n\tpublic java.lan... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the label associated with the specified address. | AccountLabel getLabel(final Address address); | [
"private String getLabel(int address) {\n int key = Arrays.binarySearch(addresses, address);\n if (key >= 0) {\n return \"(\" + symbols[key] + \")\";\n }\n return \"\";\n }",
"Label getLabelForAddress(final int addressOffset) {\n if (this.addressLabels.containsKey(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
update atmospheric information with the given data point for the given point type | public void updateAtmosphericInformation(AtmosphericInformation ai, String pointType, DataPoint dp) throws Exception {
final DataPointType dptype = DataPointType.valueOf(pointType.toUpperCase());
ai.update(dptype, dp);
} | [
"public AtmosphericInformation updateAtmosphericValues(AtmosphericInformation atmosphericInformation,\n String pointType, DataPoint dp) throws WeatherUpdateException {\n\n if (pointType.equalsIgnoreCase(DataPointType.WIND.name())) {\n if (dp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Construct a surface definition from the tag at which the reader is currently positioned. | SurfaceDef(XMLStreamReader reader) {
name = reader.getAttributeValue(null, "start");
int x = Integer.parseInt(reader.getAttributeValue(null, "ulx"));
int y = Integer.parseInt(reader.getAttributeValue(null, "uly"));
int w = Integer.parseInt(reader.getAttributeValue(null, "lrx")) - x;... | [
"public Surface(){\r\n\t\tsuper(SURFACE_TAG,\"\");\r\n\t\tthis.setRef(\"CG\");\r\n\t}",
"DynamicSurface createSurface (\n int time,\n int level\n ) throws IOException;",
"Surface createSurface();",
"public org.landxml.schema.landXML11.SurfaceDocument.Surface addNewSurface()\r\n {\r\n synchron... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Detects contact made between penguin, obstacles, and ground. | @Override
public void beginContact(Contact contact) {
Body a = contact.getFixtureA().getBody();
Body b = contact.getFixtureB().getBody();
if((BodyUtils.bodyIsPenguin(a) && BodyUtils.bodyIsGround(b)) ||
(BodyUtils.bodyIsGround(a) && BodyUtils.bodyIsPenguin(b))){
p... | [
"public void decideGroundContactPointsInContact()\n {\n List<Joint> children = this.getRootJoints();\n\n for (int i = 0; i < children.size(); i++)\n {\n Joint rootJoint = children.get(i);\n rootJoint.physics.recursiveDecideGroundContactPointsInContact();\n }\n }",
"protecte... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
HashMap of IValidator Constructs the validator on a group of validators. | public GroupValidator(Map<Object, IValidator> validatorMap)
{
this(validatorMap,null);
} | [
"public GroupValidator()\n {\n this(new HashMap<Object, IValidator>());\n }",
"public Map getValidatorMap();",
"com.github.jtendermint.jabci.types.Types.Validator getValidators(int index);",
"cosmos.staking.v1beta1.ValidatorOrBuilder getValidatorsOrBuilder(\n int index);",
"public void putVali... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create an aliased location_indoor.tracking_k_nearest table reference | public TrackingKNearest(String alias) {
this(alias, TRACKING_K_NEAREST);
} | [
"public TrackingKNearest() {\n this(\"tracking_k_nearest\", null);\n }",
"public SPIEntry nearest(Coordinate latlon);",
"public SPIEntry nearest(Coordinate latlon, float maxDist);",
"private static TableRef createAliasedTableRef( final TableMeta table,\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Read the input image to test or train, store its pixel values in image_all[0][0]. Input image's filename is passed as a parameter. Input text file is assumed to be of the following format: 1 1 1 1 ... (First line is the class label) 5 12 25 57 ...... (The last 3636 lines and columns are the pixel values of the input im... | public void readInputImage(String filename) throws IOException {
Scanner reader;
reader=new Scanner(new File(filename));
createClassLabel(reader);
createInput(reader);
} | [
"public static ArrayList<ClassificationImage> readClassificationIPUTxt(String path) throws Exception {\n ArrayList<ClassificationImage> classificationIPUImage = new ArrayList<>();\n String lineTxt = \"\";\n File file = new File(path);\n\n InputStreamReader isr = new InputStreamReader(new... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Return an array giving the indexes in getDataForGraphing() where you calculate steps occurring. This can be used to visualize/debug. | public int[] getStepIndexes() {
return null;
} | [
"private static int[] computeIndices() {\n \t\tint[] ret = new int[batch_size/numberOfProcessesPerBatch];\n \t\tfor (int i = 0; i < batch_size/numberOfProcessesPerBatch; i++) {\n \t\t\tret[i] = data_p[phase][i].index;\n \t\t}\n \t\treturn ret;\n \t}",
"public abstract Point2D[] getNextTracePositions();",
"int[]... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the next card of the card stack. | Card getNextCard() {
if (cardStack.isEmpty()) {
return null;
}
Card next = cardStack.removeFirst();
lastDrawnCard = next;
return next;
} | [
"public Card nextCard(){\r\n\t if(topCardIndex >=52){\r\n\t throw new IndexOutOfBoundsException();\r\n\t }\r\n\t return cards[topCardIndex++];\r\n\t}",
"public AbstractCard getNextCard() {\n currentCardPos++;\n if (currentCardPos >= deck.size()) {\n return null;\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the color settings. | public Vector<ColorSettingsIntervalBased> getColorSettingsVector() {
if (colorSettings==null) {
colorSettings = new Vector<>();
}
return colorSettings;
} | [
"static Color[] getSavedColorSettings() {\n\t\tFile path = new File(\"save\" + File.separatorChar + \"colorSettings.mpy\");\n\t\tif (path.exists()) {\n\t\t\ttry {\n\t\t\t\tFileInputStream file = new FileInputStream(path);\n\t\t\t\tObjectInputStream colorSettings = new ObjectInputStream(file);\n\t\t\t\tColor[] color... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Minimize cursor shape while maintaining same number of iterations | public void optimizeCursorMaxShape() {
for (int i = 0; i < 3; i++) {
int numIterations = _maxBrickIndex[i] / _cursorMaxShape[i] + 1;
int r = numIterations * _cursorMaxShape[i] - (_maxBrickIndex[i] + 1);
_cursorMaxShape[i] -= r / numIterations;
}
} | [
"private void resetCursorToMaxBufferedRowsPlus1() {\n if (cursorPosition > rows.size() + 1) {\n cursorPosition = rows.size() + 1;\n }\n }",
"private void scaleCursors() {\n\t\ttempDst.set(0.0f, 0.0f, bridge.charWidth, bridge.charHeight);\n\t\tscaleMatrix.setRectToRect(tempSrc, tempDst,... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |