query stringlengths 8 1.54M | document stringlengths 9 312k | negatives listlengths 19 20 | metadata dict |
|---|---|---|---|
Get the zero element from the coefficients. | public C getZEROCoefficient() {
return coFac.getZERO();
} | [
"public FixedPointBase<?> getZero() {\n return zero;\n }",
"public double coefficient(int exponent){\r\n if (exponent < coeff.length){\r\n return coeff[exponent];\r\n }\r\n else\r\n return 0;\r\n }",
"Vector getZeroVector();",
"Vector zero();",
"public... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Calculate all the possible square targets of the basic effect and encode them into a message ready to be send to the player . | @Override
public ControllerViewEvent getTargetEffectOne() {
ArrayList<Square> possibleTarget = new ArrayList<>();
for (int i = 0; i < 4; i++) {
if (getOwner().getPosition().checkDirection(i) && !getOwner().getPosition().getNextSquare(i).getSquareColour().equals(getOwner().getPosition().g... | [
"@Override\n public ControllerViewEvent getTargetEffectTwo() {\n ArrayList<Square> possibleTargets = new ArrayList<>();\n for (int i = 0; i < 4; i++) {\n if (getOwner().getPosition().checkDirection(i) && !getOwner().getPosition().getNextSquare(i).getSquarePlayers().isEmpty())\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Does the following 1. Update the level 2. Check if the level needs scrolling 3. Hero has collision with powerup 4. Hero stays within Level boundary 5. Enemies stay within Level boundary | public void update(final Engine engine) throws Exception
{
//if the level object does not exist we have nothing to update
if (getLevel() == null)
return;
//update level scrolling etc..
getLevel().update(engine.getMain().getScreen());
//get hero ... | [
"public interface Level {\n /**\n * Return a List of the currently existing Entities.\n * @return The list of current entities for this level\n */\n List<Entity> getEntities();\n\n /**\n * The height of the level\n * @return The height (should be in the same format as Entity sizes)\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
OTHER TOINDEX() Returns an ArrayList containing the values of this object in the order they appear on the DBMS. | public ArrayList<String> toIndex()
{
ArrayList<String> index = new ArrayList<String>();
index.add(this.id+"");
index.add(this.getServiceType().getID()+"");
index.add(this.title);
index.add(this.description);
index.add(String.format("%.2f", this.rate));
index.add(""+this.clientID);
index.add(""+this.... | [
"Collection<Index> getAllCurrentValues();",
"public Collection<Object> getDistinctIndexedValues(L index);",
"CloseableIndexed<ActualType> getSortedIndexedValues();",
"private List<?> internalCalculateIndex(CompositeData value) {\n\n return Collections.unmodifiableList(Arrays.asList(value.getAll(this.in... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a new object of class 'variable'. | variable createvariable(); | [
"Variable createVariable();",
"VariableReference createVariableReference();",
"VariableExp createVariableExp();",
"DynamicVariable createDynamicVariable();",
"Var createVar();",
"Variable getVariable();",
"NodeVariable createNodeVariable();",
"VariableRef createVariableRef();",
"public Var asVar() ;... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__AnswerPort__Group__6" $ANTLR start "rule__AnswerPort__Group__6__Impl" InternalComponentDefinition.g:2687:1: rule__AnswerPort__Group__6__Impl : ( '}' ) ; | public final void rule__AnswerPort__Group__6__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalComponentDefinition.g:2691:1: ( ( '}' ) )
// InternalComponentDefinition.g:2692:1: ( '}' )
{
// InternalCompon... | [
"public final void rule__AnswerPort__Group__6() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalComponentDefinition.g:2680:1: ( rule__AnswerPort__Group__6__Impl )\n // InternalComponentDefinition.g:2681:2: rule__AnswerPort__... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get an AWSbased service bundler using Newton. | public AWSServiceBundler() {
final Config config = getConfig();
final Jdbi jdbi = Jdbi.create(config.getValue("trellis.jdbc.url", String.class),
config.getValue("trellis.jdbc.username", String.class),
config.getValue("trellis.jdbc.password", String.class));
final ... | [
"private ArtifactServicePair classLoaderService() throws IOException {\n return new ArtifactServicePair() {\n\n Path jarPath = Paths.get(tempFolder.newFile(\"jar.jar\").getPath());\n\n // These are initialized when the staging service is requested.\n FileSystem jarFilesystem;\n JavaFilesystem... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Adds the player's strongbox to the board's StringBuilder passed as a parameter. | private void showStrongbox(LightPlayer player, StringBuilder board){
StringBuilder sb = new StringBuilder();
sb.append(" STRONGBOX:\n");
//for spaces indentation
int maxLength = 0;
for(PhysicalResource currRes : player.getStrongbox()) {
int partialLength = String.val... | [
"public void setStrongbox(String strongbox){\n this.strongbox.append(strongbox).append(splitter);\n }",
"public static String blessPlayer(Player player){\n StringBuilder blessString = new StringBuilder();\n String power = \"\\nThe power of the coin god is with you....\\n you have been bles... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Check whether the current component is a descendant of the specifed component. | boolean isDescendant(IComponent comp); | [
"boolean isAncestor(IComponent comp);",
"public boolean hasChildComponent(Widget component) {\n return locationToWidget.containsValue(component);\n }",
"@Override\n public boolean isDescendantOf(Actor actor) {\n return super.isDescendantOf(actor);\n }",
"protected boolean containsAnce... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleImport" $ANTLR start "entryRuleQUALIFIED_NAME" ../org.eclipse.osee.framework.core.dsl.ui/srcgen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:116:1: entryRuleQUALIFIED_NAME : ruleQUALIFIED_NAME EOF ; | public final void entryRuleQUALIFIED_NAME() throws RecognitionException {
try {
// ../org.eclipse.osee.framework.core.dsl.ui/src-gen/org/eclipse/osee/framework/core/dsl/ui/contentassist/antlr/internal/InternalOseeDsl.g:117:1: ( ruleQUALIFIED_NAME EOF )
// ../org.eclipse.osee.framework.co... | [
"public final void entryRuleQualifiedName() throws RecognitionException {\n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:1888:1: ( ruleQualifiedName EOF )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Converts a answerobject into a answerDtoobject. | private AnswerDto convertToDto(Answer a) {
return new AnswerDto(a.getId(), a.getText(), a.getDate(), convertToDto(a.getAnswerer()), a.isAccepted());
} | [
"SurveyQuestionDTO convertSurveyQuestionToSurveyQuestionDTO(SurveyQuestion question);",
"Question toQuestionPojo(@NonNull JsonObject object, @NonNull String formId) throws Exception;",
"private QuestionDto convertToDto(Question q){\n List<Answer> answers = q.getAnswers();\n List<AnswerDto> answerD... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Specifies TokenizerFactory class to be used for tokenization | public Builder tokenizerFactory(@NonNull String tokenizer) {
this.tokenizer = tokenizer;
return this;
} | [
"public TokenizerFactory()\n\t{\n\t\ttry\n\t\t{\n\t\t\tParameters params = new Parameters();\n\t\t\tFileBasedConfigurationBuilder<XMLConfiguration> builder =\n\t\t\t new FileBasedConfigurationBuilder<XMLConfiguration>(XMLConfiguration.class)\n\t\t\t .configure(params.xml()\n\t\t\t .setFileName(Default_... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Maps all Tumblr Queries by their ID | public Map<Long, TumblrQuery> getAllTumblrQueries(){
if(tumblrQueryMap == null){
tumblrQueryMap = getAll(TUMBLR_QUERY, CURSOR_TUMBLR_QUERY_CONVERTER);
}
return tumblrQueryMap;
} | [
"public Map<Long, TwitterQuery> getAllTwitterQueries(){\r\n if(twitterQueryMap == null){\r\n twitterQueryMap = getAll(TWITTER_QUERY, CURSOR_TWITTER_QUERY_CONVERTER);\r\n }\r\n return twitterQueryMap;\r\n }",
"public Map<Long, TumblrStream> getAllTumblrStreams(){\r\n if(tu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
dump_details Dump details into a string, for troubleshooting. | public String dump_details () {
return ((details == null) ? "null" : details);
} | [
"private void dumpServiceDetails(ServiceDetailsExt details)\n {\n log(\"*\");\n log(\"* ServiceDetails Information\");\n assertNotNull(\"ServiceDetails' Long name cannot be null\", details.getLongName());\n log(\"* SD Long Name: \" + details.getLongName());\n int prog... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Equality__OpAssignment_1_1" $ANTLR start "rule__Equality__RightAssignment_1_2" InternalTym.g:3774:1: rule__Equality__RightAssignment_1_2 : ( ruleComparison ) ; | public final void rule__Equality__RightAssignment_1_2() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalTym.g:3778:1: ( ( ruleComparison ) )
// InternalTym.g:3779:2: ( ruleComparison )
{
// InternalTym.g:3779:2:... | [
"public final void rule__Equality__RightAssignment_1_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:40705:1: ( ( ruleComparison ) )\n // InternalDsl.g:40706:2: ( ruleComparison )\n {\n // Int... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the selected set of conversations. Guaranteed to return nonnull, this should return an empty set if no conversation is currently selected. | public ConversationSelectionSet getSelectedSet(); | [
"public Conversation[] getConversations () {\n Vector<Conversation> convoList = new Vector<Conversation>();\n Logger.write(\"VERBOSE\", \"DB\", \"getConversations()\");\n\n try {\n ResultSet convoSet = query(DBStrings.getConversations);\n while (convoSet.next())\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Breaks up an ItemStack into stacks that obey the maximum size limit set by the contained item. | @Nonnull
public static List<ItemStack> fitToMaxSize(@Nullable ItemStack stack) {
// Skip if the stack is empty.
if (stack.isEmpty()) {
return Collections.EMPTY_LIST;
}
// Fetch stack information.
int stackSize = stack.getCount();
final int maxSize = stack... | [
"public int getMaxStackSize() {\n\t\treturn theRealItem.getMaxStackSize();\n\t}",
"public ItemStack[] toItemStackArray() {\n int maxStackSize = Material.getMaterial(itemId).getMaxStackSize();\n ItemStack[] stacks;\n int quotient = amount / maxStackSize;\n if(amount % maxStackSize =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set extra JVM parameters string | public static void setExtraVMParams(String value)
{
prefGeneral.put(ID_EXTRA_VMPARAMS, value);
} | [
"public void setJvmargs(String args) {\n this.additionalJvmArgs = args;\n }",
"private void setJvmForkArgs(String javaExecutablePath) {\n Commandline cmd = new Commandline();\n cmd.getShell().setQuotedArgumentsEnabled(true); // for JVM args\n cmd.setWorkingDirectory(project.getBui... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Registers the specified listener on tabclose events on the specified tabbed pane. | public static void registerTabCloseChangeListener(JTabbedPane tabbedPane,
BaseTabCloseListener tabCloseListener) {
if (tabbedPane == null) {
throw new IllegalArgumentException("Component scope APIs do not accept null components");
}
TabCloseListenerMan... | [
"private Tab addCloseListener(Tab tab, TabPane tabPane) {\r\n\t\ttab.setOnClosed(event -> {\r\n\t\t\tupdateTabPolicy(tabPane);\r\n\t\t});\r\n\t\treturn tab;\r\n\t}",
"public void addTabClosingListener(FTabClosingListener listener) {\n\t\tif (! closingListeners.contains(listener))\n\t\t\tclosingListeners.add(liste... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Should we check a token (against Strava's API) or should we just assume it's good? (default true) | protected boolean getStravaCheckToken()
{
return true;
} | [
"boolean isTokenValid();",
"private static boolean checkToken(String token){\n\t\treturn true;\n\t}",
"public boolean isTokenValide() {\n try {\n token = Save.defaultLoadString(Constants.PREF_TOKEN, getApplicationContext());\n if (token != null && !token.equals(\"\")) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the cuota value for this TSafiPagosCuota. | public void setCuota(java.lang.String cuota) {
this.cuota = cuota;
} | [
"public void setCuota(java.lang.String cuota);",
"public void setCuota(double value) {\r\n this.cuota = value;\r\n }",
"void setCuarto(int cuarto);",
"public void setCuarto(com.hotel.rooms.Room cuarto)\n {\n synchronized (monitor())\n {\n c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
void update(GroupAccount groupAccount) throws Exception; | int update(GroupAccount groupNo) throws Exception; | [
"void updateAccount(Account account);",
"Account updateAccount();",
"public void updateAccount(Account entity) throws Exception;",
"public void updateAccount(Account accForUpdate);",
"public void update(Group group){\r\n\t\tEntityManager em = connection.getEntityManager();\r\n\t\tGroup foundGroup = em.find(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the type of the dysco | public DyscoType getDyscoType() {
return dyscoType;
} | [
"public void setDyscoType(DyscoType dyscoType) {\n this.dyscoType = dyscoType;\n }",
"DSpecification getDType();",
"public java.lang.String getPcmsys__Type__c() {\n return pcmsys__Type__c;\n }",
"public java.lang.String getCsttype () {\n\t\treturn csttype;\n\t}",
"public String getCdntyp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates new form ViewAdminRates | public ViewAdminRates() {
initComponents();
initRates();
} | [
"@RequestMapping(value = \"add\", method = RequestMethod.GET)\n public String displayAddContractorForm(Model model) {\n model.addAttribute(\"title\", \"Add Worker\");\n model.addAttribute(new Contractor());\n return \"contractor/add\";\n }",
"public RateSettingForm() {\n initComp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Deregisters an existing ECL Domain configuration delete listener. | public void
removeECLDomainDeleteListener(
ConfigurationDeleteListener<ExternalChangelogDomainCfg> listener)
{} | [
"public void\n addECLDomainDeleteListener(\n ConfigurationDeleteListener<ExternalChangelogDomainCfg> listener)\n throws ConfigException\n {}",
"public void removeECLDomainAddListener(\n ConfigurationAddListener<ExternalChangelogDomainCfg>\n listener)\n {}",
"void removeListener( ConfigurationList... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
change colour for checked circle warning: used after getPoint() //Toast.makeText(map_main.this, "Update markers", Toast.LENGTH_SHORT).show(); | private void updateMarkers(){
double lat1, lat2, lng1, lng2;
System.out.println("The size: " + appCookies.userCheckedPoints.size());
for(int i = 0; i < appCookies.userCheckedPoints.size(); i++) {
lat1 = appCookies.userCheckedPoints.get(i).getLatitude();
lng1 = appCookies.... | [
"private void\nshowCircularMarker (String name, LatLng position, float radius, int colour)\n{\n // Show the marker\n MarkerOptions mOptions =\n new MarkerOptions ().position (position).title (name);\n map.addMarker (mOptions);\n\n // Show the surrounding circle\n if (radius > 1f)\n {\n CircleOptions c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__XClosure__Group_0_0__1" $ANTLR start "rule__XClosure__Group_0_0__1__Impl" ../de.nie.fin.ui/srcgen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9874:1: rule__XClosure__Group_0_0__1__Impl : ( '[' ) ; | public final void rule__XClosure__Group_0_0__1__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9878:1: ( ( '[' ) )
// ../de.nie.fin.ui/src-gen/d... | [
"public final void rule__XClosure__Group_0_0__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:9500:1: ( ( '[' ) )\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__TaskDefinition__Group_4__3__Impl" $ANTLR start "rule__TaskResult__Group__0" InternalTaskDefinition.g:1502:1: rule__TaskResult__Group__0 : rule__TaskResult__Group__0__Impl rule__TaskResult__Group__1 ; | public final void rule__TaskResult__Group__0() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalTaskDefinition.g:1506:1: ( rule__TaskResult__Group__0__Impl rule__TaskResult__Group__1 )
// InternalTaskDefinition.g:1507:2: rule__TaskResul... | [
"public final void rule__TaskDefinition__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalTaskDefinition.g:1013:1: ( rule__TaskDefinition__Group__0__Impl rule__TaskDefinition__Group__1 )\n // InternalTaskDefinition... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create a new DatabaseAbstractor that uses the given mapper. | public DatabaseAbstractor(Mapper mapper) {
this(mapper, null);
} | [
"public DatabaseAbstractor(Mapper mapper, OnDemandMapper onDemandMapper) {\r\n this.dataTypeMapper = mapper;\r\n this.onDemandMapper = onDemandMapper;\r\n }",
"public void testDatabaseAbstractor_Accuracy2() {\n Mapper mapper = new Mapper();\n abstractor = new DatabaseAbstractor(mapp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns a hashmap that contains the properties of several subnamespaces under the given namespace. For instance, take the following example: a.b.c a.b.d a.e.f g.h.i If we call the method with "a" as parameter, then it will return a map with two entries "b" and "e", both assigned a set of properties (for "b", it would b... | public HashMap<String, ExtendedProperties> getSubNamespaces(String nameSpace, boolean fullNames) {
HashMap<String, ExtendedProperties> result = new HashMap<String, ExtendedProperties>();
// find out how may hierarchy steps we have in base namespace
// ... first remove eventually trailing do... | [
"public static Map<String, String> getNamespaceDeclarations(Element element) {\n\t\tHashMap<String, String> result = new HashMap<String, String>();\n\t\t\n\t\tfor(int i = 0; i < element.getNamespaceDeclarationCount(); i++) {\n\t\t\tString prefix = element.getNamespacePrefix(i);\n\t\t\tString uri = element.getNamesp... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Performs the diffing algorithm on the style attribute, using the StyleDiffer | private void diffStyles() throws Exception {
result.addAll(new StyleDiffer(editor).diff(this.left, this.right));
} | [
"private void style(final DiffType pDiff, final Style[] pStyle) {\n\t\tassert pStyle != null;\n\t\tswitch (pDiff) {\n\t\tcase UPDATED:\n\t\t\tfinal Color green = new Color(40, 220, 40, 50);\n\t\t\tfor (final Style style : pStyle) {\n\t\t\t\tStyleConstants.setBackground(style, green);\n\t\t\t}\n\t\t\tbreak;\n\t\tcas... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Generated method Setter of the AmazonConfig.requestCompleteDeliveryAddress attribute. | public void setRequestCompleteDeliveryAddress(final Boolean value)
{
setRequestCompleteDeliveryAddress( getSession().getSessionContext(), value );
} | [
"public void setRequestCompleteDeliveryAddress(final boolean value)\n\t{\n\t\tsetRequestCompleteDeliveryAddress( getSession().getSessionContext(), value );\n\t}",
"public void setRequestCompleteDeliveryAddress(final SessionContext ctx, final Boolean value)\n\t{\n\t\tsetProperty(ctx, REQUESTCOMPLETEDELIVERYADDRESS... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "rule__Number__Group__2__Impl" $ANTLR start "rule__Number__Group__3" ../org.iworkz.qon.ui/srcgen/org/iworkz/qon/ui/contentassist/antlr/internal/InternalQonDsl.g:3753:1: rule__Number__Group__3 : rule__Number__Group__3__Impl ; | public final void rule__Number__Group__3() throws RecognitionException {
int stackSize = keepStackSize();
try {
// ../org.iworkz.qon.ui/src-gen/org/iworkz/qon/ui/contentassist/antlr/internal/InternalQonDsl.g:3757:1: ( rule__Number__Group__3__Impl )
// ../org.iwork... | [
"public final void rule__Number__Group_3__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.iworkz.qon.ui/src-gen/org/iworkz/qon/ui/contentassist/antlr/internal/InternalQonDsl.g:3914:1: ( rule__Number__Group_3__2__Impl )\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
/ Rotate a point p by angle theta around an arbitrary line segment p1p2 Return the rotated point. Positive angles are anticlockwise looking down the axis towards the origin. Assume right hand coordinate system. | public static PVector rotatePoint(PVector p, double theta, PVector p1, PVector p2) {
PVector r = new PVector();
PVector q = new PVector();
PVector myP = new PVector();
double costheta, sintheta;
myP.set(p);
r.x = p2.x - p1.x;
r.y = p2.y - p1.y;
r.z = p2.... | [
"static PointDouble rotate(PointDouble p, double theta) {\n double rad = DEG_to_RAD(theta); // get angle in radians\n return new PointDouble(\n p.x * Math.cos(rad) - p.y * Math.sin(rad),\n p.x * Math.sin(rad) + p.y * Math.cos(rad)\n );\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get the gold amount to return given the tier and distance the player has travelled. | public static int getGoldReward(JSONObject encounter, int distance) throws JSONException {
if (encounter.has(IS_GOLD)) {
// todo: scale the gold correctly
int tier = encounter.getInt(TIER);
return distance + tier;
} else
return 0;
} | [
"public int getGoldGivenBy(Player player) {\n for (TradeItem ti : items) {\n if (ti instanceof GoldTradeItem && player == ti.getSource()) {\n return ((GoldTradeItem)ti).getGold();\n }\n }\n return -1;\n }",
"public int getGoalTally(Player player){\r\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Default Empty Constructor for class Content | public Content () {
super();
} | [
"public Content() {}",
"public Content() {\n super();\n }",
"public Content() {\n\n }",
"public ContentManager() {\n\t\tsuper();\n\t}",
"public LogContent() {\n\t}",
"public ContentResource() {\n }",
"public ContentDecorator() {\r\n super();\r\n }",
"abstract public Content c... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method clones the state of the agent. It's used in the search process, when creating the search tree. | @Override
public SearchBasedAgentState clone() {
int[][] newWorld = new int[9][14];
for (int row = 0; row < 9; row++) {
for (int col = 0; col < 14; col++) {
newWorld[row][col] = bosque[row][col];
}
}
int[] newPosition = new int[2];
ne... | [
"@Override\n public SearchBasedAgentState clone() {\n \n\t\t//TODO: Complete Method\n\t\t\n return null;\n }",
"public abstract State clone();",
"public Agent clone() {\n\t\tAgent agentClone = new Agent(getID());\n\t\tagentClone.setCoordinates(xCoor, yCoor);\n\t\tagentClone.setGoalCoordinate... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Removes all the tasks from the database. | @Override
public void removeAll() {
for (Task task : findAll()) {
remove(task);
}
} | [
"public void deleteAll() {\n tasks = new ArrayList<>();\n }",
"public void deleteAllTasks() {\n int rowsDeleted = getActivity().getContentResolver().delete(taskContract.TaskEntry.CONTENT_URI, null, null);\n Log.v(\"CatalogActivity\", rowsDeleted + \" rows deleted from the database\");\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
optional uint64 audio_track_id = 4 [(.description) = "audio track choice."]; | public long getAudioTrackId() {
return audioTrackId_;
} | [
"long getAudioTrackId();",
"public void setAudioDescriptor( AudioDescriptor audioDescriptor );",
"public long getAudioTrackId() {\n return audioTrackId_;\n }",
"public String getAudioCode() {\n return audioCode;\n }",
"Builder addAudio(String value);",
"public AudioDescriptor getAudioDes... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
.google.protobuf.StringValue zip_code = 13 [json_name = "zipCode"]; | public com.google.protobuf.StringValueOrBuilder getZipCodeOrBuilder() {
if (zipCodeBuilder_ != null) {
return zipCodeBuilder_.getMessageOrBuilder();
} else {
return zipCode_ == null ?
com.google.protobuf.StringValue.getDefaultInstance() : zipCode_;
}
} | [
"@java.lang.Override\n public com.google.protobuf.StringValueOrBuilder getZipCodeOrBuilder() {\n return getZipCode();\n }",
"@java.lang.Override\n public com.google.protobuf.StringValue getZipCode() {\n return zipCode_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : zipCode_;\n }",
"p... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
SubprogramGroupType returns aadl2::SubprogramGroupType: "subprogram" "group" name=ID (ownedExtension=TypeExtension ("(" ownedPrototypeBinding+=PrototypeBinding ("," ownedPrototypeBinding+=PrototypeBinding) ")")?)? ("prototypes" (noPrototypes?="none" ";" | ownedPrototype+=Prototype+))? ("features" (noFeatures?="none" ";... | public SubprogramGroupTypeElements getSubprogramGroupTypeAccess() {
return pSubprogramGroupType;
} | [
"public String getSubgroup() {\n\t\treturn subgroup;\n\t}",
"public void setSubgroup(String subgroup) {\n\t\tthis.subgroup = subgroup;\n\t}",
"public int getSubGroup() {\n return subGroup;\n }",
"public SubprogramGroupPrototypeElements getSubprogramGroupPrototypeAccess() {\n\t\treturn pSubprogramGro... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method getTypeById() gets type by id | public Type getTypeById(int typeId) {
Type type = typeDAO.getByKey("id", typeId);
return type;
} | [
"TypeRespone findByIdType(Long Id);",
"String getTypeID();",
"public IInputType getInputTypeById(String id);",
"public BikeType getType(int typeId){\n try(Connection con = DatabaseConnector.getConnection();\n PreparedStatement ps = con.prepareStatement(TYPE_BY_ID + typeId);\n Resu... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new instance, initially with no chart to display. This constructor is required so that this control can be used within FXML. | public ChartViewer() {
this(null);
} | [
"private void initGraph() {\r\n\t\tchart = new Chart(graphContainer, SWT.NONE);\r\n\t\tchart.setSize(672, 200);\r\n\t\tchart.setVisible(false);\r\n\t}",
"public ChartController()\n {\n \tthis.pieModel = new PieChartModel();\n \tthis.pieModel.set(\"\", 0);\n \tthis.categoryModel = new CartesianChartMod... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "ruleBooleanDataType" $ANTLR start "entryRuleFloatDataType" ../de.hs_rm.cs.vs.dsm.flow/srcgen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4520:1: entryRuleFloatDataType returns [EObject current=null] : iv_ruleFloatDataType= ruleFloatDataType EOF ; | public final EObject entryRuleFloatDataType() throws RecognitionException {
EObject current = null;
EObject iv_ruleFloatDataType = null;
try {
// ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4521:2: (iv_ruleFloatDataType= ruleFloatData... | [
"public final EObject entryRuleBooleanDataType() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleBooleanDataType = null;\n\n\n try {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:4490:2: (iv_ruleBooleanDataT... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
do something int rand super.setProcessDay(randNumb); | public int determineDayRandomly() {
return 0;
} | [
"public static void boarDay (Grid grid) {\n grid.weekday = dateArray[(int) (Math.random() * 7)];\n }",
"public void becomingDay() {\n \t\t\n \t}",
"public void setSpecialTime(){\r\n Random random = new Random();\r\n specialTime1=random.nextInt(50);\r\n specialTime2=random.nextInt(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set the height of the tree rooted at this node | public void setHeight()
{
this.height = 1+Math.max(getLeftHeight(), getRightHeight());
} | [
"void setNodeHeight(double value);",
"private void setHeight(int heightOfLeaf) {\n\t\t\tthis.height = heightOfLeaf;\n\t\t}",
"public void update_height() {\r\n int tmp_height = 0;\r\n int tmp_left = -1;\r\n int tmp_right = -1;\r\n\r\n // set height of null children to -1\r\n i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns all rows from the registro_checkin table that match the criteria 'ID_CHECK = :idCheck'. | public RegistroCheckin findByPrimaryKey(long idCheck) throws RegistroCheckinDaoException; | [
"public RegistroCheckin[] findWhereIdCheckEquals(long idCheck) throws RegistroCheckinDaoException;",
"public RegistroCheckin[] findWhereIdTipoCheckEquals(int idTipoCheck) throws RegistroCheckinDaoException;",
"public RegistroCheckin[] findWhereIdDetalleCheckEquals(int idDetalleCheck) throws RegistroCheckinDaoEx... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
getItemCount() is called many times, and when it is first called, mFishes has not been updated (means initially, it's null, and we can't return null). | @Override
public int getItemCount() {
if (mFishes != null)
return mFishes.size();
else return 0;
} | [
"public int getNbFishes() {\n return fishes.size();\n }",
"@Override\n public int getItemCount() {\n List <Neighbour> favoris = new ArrayList<>();\n for (Neighbour neighbour : mfavNeighbour) {\n if (neighbour.isFavorite()) {\n favoris.add(neighbour);\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Represents the Processing mouseMoved method. This method should be called in the PApplet GUI respective to what it represents. | public void mouseMoved() {
} | [
"public abstract void mouseMoved(Point p);",
"public void mouseMoved(MouseEvent e);",
"public void mouseMoved() {\n\t\tactiveScreen.mouseMoved();\n\t}",
"public void mouseMoved(SuiMouseEvent e) {}",
"public void mouseMoved(MouseEvent evt){}",
"public void mouseMoved(MouseEvent e) { mouseX = e.getX(); mous... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Test of setFunction method, of class gov.sandia.cognition.learning.kernel.VectorFunctionKernel. | public void testSetFunction()
{
VectorFunctionKernel instance = new VectorFunctionKernel();
assertNull(instance.getFunction());
LinearVectorFunction function = new LinearVectorFunction(RANDOM.nextGaussian());
instance.setFunction(function);
assertSame(functi... | [
"public void testEvaluate()\n {\n LinearVectorFunction function = new LinearVectorFunction(RANDOM.nextGaussian());\n VectorFunctionKernel instance = new VectorFunctionKernel(function);\n \n PolynomialKernel kernel = new PolynomialKernel(4, RANDOM.nextDouble());\n \n int ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates a new instance of the PointRecord class. | public PointRecord(){
} | [
"public Point(Point point) {\n this(point.coordinates);\n }",
"Point createPoint();",
"public TempOffrPrflPrcPointRecord() {\n\t\tsuper(TempOffrPrflPrcPoint.TEMP_OFFR_PRFL_PRC_POINT);\n\t}",
"Points createPoints();",
"public WB_Point() {\r\n\t\tsuper();\r\n\t}",
"public Point(Point point) {\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Update the interestOps of the key looking only at values of the boolean closed and of both ByteBuffers. The convention is that both buffers are in writemode before the call to updateInterestOps and after the call. Also it is assumed that process has been be called just before updateInterestOps. | private void updateInterestOps() {
var interesOps = 0;
if (state != State.CLOSED && bbin.hasRemaining()) {
interesOps = interesOps | SelectionKey.OP_READ;
}
if (bbout.position() != 0) {
interesOps |= SelectionKey.OP_WRITE;
}
if (interesOps ==... | [
"private void updateInterestOps() {\n var interesOps = 0;\n if (!closed && bbin.hasRemaining()) {\n interesOps = interesOps | SelectionKey.OP_READ;\n }\n if (bbout.position() != 0) {\n interesOps |= SelectionKey.OP_WRITE;\n }\n if (interesOps == ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get a set of registered users that match search criteria. See documentation on the criteria class for information on how criteria are applied. | PaginatedResults<RegisteredUser> getRegisteredUsers(RegisteredUserCriteria criteria, Pagination pagination) throws ServiceException, InvalidDataException; | [
"public synchronized Set<User> getUsers() {\r\n Set<User> userSet = new HashSet<User>(userSetSize); \r\n userSet.addAll(this.email2user.values());\r\n return userSet;\r\n }",
"public List<User> searchUsers(String arg) {\n\n\t\tMUser mu = new MUser();\n\t\tList<User> searchUsers = mu.searchUsers(arg)... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Create TextView for compliment messages | public View makeView() {
TextView compliment = new TextView(GamePage.this);
//layout parameters. centers vertically and horizontally. and give parameters to TextView
FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.WRAP_CONTENT, Fra... | [
"void compliment_setFactory() {\n textswitcher.setFactory(new ViewSwitcher.ViewFactory() {\n\n public View makeView() {\n\n //Create TextView for compliment messages\n TextView compliment = new TextView(GamePage.this);\n\n //layout parameters. centers v... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the dataflow endpoint group. | @Override
public GetDataflowEndpointGroupResult getDataflowEndpointGroup(GetDataflowEndpointGroupRequest request) {
request = beforeClientExecution(request);
return executeGetDataflowEndpointGroup(request);
} | [
"String getPortGroup();",
"public String getPdpGroup() {\n return pdpGroup;\n }",
"@Override\n public ListDataflowEndpointGroupsResult listDataflowEndpointGroups(ListDataflowEndpointGroupsRequest request) {\n request = beforeClientExecution(request);\n return executeListDataflowEndpoi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
$ANTLR end "line" $ANTLR start "declarator" grammar/ChronosTree.g:54:1: declarator : ^( DECL type_specifier ID ) ; | public final void declarator() throws RecognitionException {
ChronosTree.type_specifier_return type_specifier1 =null;
try {
// grammar/ChronosTree.g:55:2: ( ^( DECL type_specifier ID ) )
// grammar/ChronosTree.g:55:4: ^( DECL type_specifier ID )
{
match(... | [
"public final void line() throws RecognitionException {\n try {\n // grammar/ChronosTree.g:50:5: ( declarator | instantiator | stmt )\n int alt2=3;\n switch ( input.LA(1) ) {\n case DECL:\n {\n alt2=1;\n }\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method tests logging into gmail which the provided credentials | @Test(dataProvider = "sendLoginData", priority = 0)
public void testGmailloginCreds(String username, String password, String expectedUrl) {
logger.info("TEST METHOD: " + Thread.currentThread().getStackTrace()[1].getMethodName());
gmailPg.loadGmailLoginPg();
String currPageURL = gmailPg.verifyGmailSignInFlow(user... | [
"@Category({Critical.class})\n @Test\n public void gmailLoginShouldBeSuccessful(){\n SignInPage signInPage = WebUtil.goToSignInPage(driver);\n\n //2.Enter Username\n signInPage.enterUsername(driver, \"kbjoshitest@gmail.com\");\n\n //3. Go to next page\n SignInPage2 signInPag... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Add a Set of format alias names. | public void setAliasNames(Set<String> names) {
this.aliasNames = names;
} | [
"public void addAliases(String... aliases) {\n this.aliases.addAll(Lists.newArrayList(aliases));\n Collections.sort(this.aliases);\n }",
"@ReportableProperty(order = 6, value = \"Format alias names.\")\r\n\tpublic Set<String> getAliasNames() {\r\n\t\treturn this.aliasNames;\r\n\t}",
"public voi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Simplified method form for invoking the GetSessionToken operation. | @Override
public java.util.concurrent.Future<GetSessionTokenResult> getSessionTokenAsync() {
return getSessionTokenAsync(new GetSessionTokenRequest());
} | [
"public String getSessionToken();",
"String getSessionToken();",
"SessionToken getSession(int id);",
"@Override\n\tpublic String getSessionToken(final String serverName);",
"public void testGetSessionToken() throws Exception {\r\n LOG.info(\"getSessionToken\");\r\n TokenAuthorisation token =... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
RePrintData Sends the request to the DC to reprint the selected row. Afterwards, shows the warning popup. | public void RePrintData(ActionEvent actionEvent) {
try {
BindingContext bCtx = BindingContext.getCurrent();
DCBindingContainer bindings = (DCBindingContainer) bCtx.getCurrentBindingsEntry();
DCIteratorBinding iter = (DCIteratorBinding) bindings.findIteratorBinding("reprintsIt... | [
"public void refreshReprint(ActionEvent actionEvent) {\n try {\n BindingContext bCtx = BindingContext.getCurrent();\n DCBindingContainer bindings = (DCBindingContainer) bCtx.getCurrentBindingsEntry();\n DCIteratorBinding iter = (DCIteratorBinding) bindings.findIteratorBinding... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set method for struct member 'shdwb'. | public void setShdwb(float shdwb) throws IOException
{
if ((__io__pointersize == 8)) {
__io__block.writeFloat(__io__address + 232, shdwb);
} else {
__io__block.writeFloat(__io__address + 188, shdwb);
}
} | [
"public void setShdwg(float shdwg) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeFloat(__io__address + 228, shdwg);\n\t\t} else {\n\t\t\t__io__block.writeFloat(__io__address + 184, shdwg);\n\t\t}\n\t}",
"public void setShdwpad(float shdwpad) throws IOException\n\t{\n\t\tif (... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sets the value for child leaf "ipaddress2", using a JNC type value. | public void setIpAddress2Value(IpAddress ipAddress2Value)
throws JNCException {
setLeafValue(Epc.NAMESPACE,
"ip-address2",
ipAddress2Value,
childrenNames());
} | [
"public void setIpAddress2Value(String ipAddress2Value) throws JNCException {\n setIpAddress2Value(new IpAddress(ipAddress2Value));\n }",
"public IpAddress getIpAddress2Value() throws JNCException {\n IpAddress ipAddress2 = (IpAddress)getValue(\"ip-address2\");\n if (ipAddress2 == null) {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set couple of cube view properties | private static void setUserEssBaseOptions(IEssCubeView cubeView, UserEssBaseOptions userEssBaseOptions) throws EssException{
System.out.println("Preferences are: "+userEssBaseOptions.toString());
cubeView.setRepeatMemberNames(userEssBaseOptions.isRepeatLabel());
cubeView.setIncludeSelection(tru... | [
"void setPropsViews(Map<String, String> propertiesView);",
"public void setViewInfo(View view, TransformGroup tg)\n {\n if(((view != null) && (tg == null)) ||\n ((view == null) && (tg != null)))\n throw new IllegalArgumentException(\"View or TG is null when \" +\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Checks if an annotation is present at a specific method. | public boolean isAnnotationPresent(final String annotationName, final Method method) {
final AnnotationReader.MemberKey key = AnnotationReader.MemberKey.newMethodKey(method);
Object map = m_methodAnnotationElements.get(key);
if (map != null) {
if (((Map) m_methodAnnotationElements.ge... | [
"public boolean hasAnnotation(Method aMethod, Class<?> aAnnotation) {\n\t\treturn AnnotationsHelper.getAnnotation(aMethod, aAnnotation) != null;\n\t}",
"public boolean hasAnnotation(Method aMethod, String aFqNameToLookfor) {\n\t\treturn AnnotationsHelper.getAnnotation(aMethod, aFqNameToLookfor) != null;\n\t}",
... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Get all words and how many times they occur (In alphabetical order) | public String wordsAndOccurrences() {
TreeMap<String, Integer> sorted = new TreeMap<>(wordOccurs);
StringBuilder ret = new StringBuilder();
for(HashMap.Entry<String, Integer> entry : sorted.entrySet()) {
ret.append(entry.getKey()).append(" - ").append(entry.getValue()).append("\n");
... | [
"public static void mostUsedWords(String text) {\n\t\tString[] words = text.toLowerCase().split(\" \");\n\t\tMap<String, Integer> map = new HashMap<String,Integer>();\n\t\tWordFreqComparator wfc = new WordFreqComparator(map);\n\t\tMap<String,Integer> sorted_map = new HashMap<String,Integer>();\n\t\t//count the all ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
repeated .llql_proto.Expr right_keys = 2; | java.util.List<? extends com.vitessedata.llql.llql_proto.LLQLExpr.ExprOrBuilder>
getRightKeysOrBuilderList(); | [
"com.vitessedata.llql.llql_proto.LLQLExpr.Expr getRightKeys(int index);",
"com.vitessedata.llql.llql_proto.LLQLExpr.Expr getLeftKeys(int index);",
"java.util.List<com.vitessedata.llql.llql_proto.LLQLExpr.Expr> \n getRightKeysList();",
"java.util.List<? extends com.vitessedata.llql.llql_proto.LLQLExpr.E... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
CoreASM plugins can implement this interface to extend the language with new operators or new behavior for already existing operators. | public interface OperatorProvider {
/**
* Returns the operator rules, and thus operator syntax, provided by
* this plugin as a list of operator rules.
*
* @return a collection of operator rule information in <code>OperatorRule</code>s
*/
public abstract Collection<OperatorRule> getOperatorRules();
/... | [
"public interface Operator\n{\n /**\n * apply operator operatorName on the values in the stack.\n *\n * @param operatorName the name of the operator, for example the String \"+\"\n * @param anInstance instance of the script calling this operator\n * @param passedInLocals a stack containing values t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Idea: 2d and 4d should be the same... | @Test
public void test2dVs4d() {
Nd4j.getRandom().setSeed(12345);
int m = 2;
int h = 3;
int w = 3;
int nOut = 2;
INDArray in = Nd4j.rand('c', ((m * h) * w), nOut);
INDArray in4 = in.dup();
in4 = Shape.newShapeNoCopy(in4, new int[]{ m, h, w, nOut }, fal... | [
"@Test\n public void testGetSize() {\n assertEquals(r1.getSize(), new Dimension2D(7, 4));\n assertEquals(r2.getSize(), new Dimension2D(0, 4));\n assertEquals(r3.getSize(), new Dimension2D(7, 0));\n assertEquals(r4.getSize(), new Dimension2D(0, 0));\n }",
"int dimensionality();",
"private static Ti... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This kludge is specific to get over AccessControlException thrown during Applet.stop() or destroy() when static thread is suspended. Set a flag in AppletClassLoader to indicate that an AccessControlException for RuntimePermission "modifyThread" or "modifyThreadGroup" had occurred. | private void setExceptionStatus(AccessControlException e) {
Permission p = e.getPermission();
if (p instanceof RuntimePermission) {
if (p.getName().startsWith("modifyThread")) {
if (loader == null)
loader = getClassLoader(getCodeBase(), getClassLoaderCacheKey());
... | [
"synchronized void createAppletThread() {\n // Create a thread group for the applet, and start a new\n // thread to load the applet.\n String nm = \"applet-\" + getCode();\n loader = getClassLoader(getCodeBase(), getClassLoaderCacheKey());\n loader.grab(); // Keep this puppy aroun... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This is constructor a ClientChat. | public ClientChat() {
new ClientController(new ClientViewLogin(),
new ClientViewChat(),
new ClientModel());
} | [
"public ChatClient(String host, int port, ChatIF clientUI) \n throws IOException \n {\n super(host, port); //Call the superclass constructor\n this.clientUI = clientUI;\n openConnection();\n }",
"public void createClient() {\n\t\t//TODO figure out port/hostname/ip/whatever to connect to server\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
do my own display | @Override
public void doDisplay() {
} | [
"public void updateDisplay() {}",
"void display() {\r\n System.out.println(\"Title: \" + title);\r\n System.out.println(\"Author: \" + author);\r\n System.out.println(\"Price: \" + price);\r\n }",
"private void updateDisplay() {\n }",
"void displayView();",
"Display createDisplay(... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Implementation is calling this method to init a message handler capable of producing messages back to a reply channel. | protected abstract AbstractReplyProducingMessageHandler getMessageHandler(); | [
"@Override\n\tprotected void initChannel(SocketChannel ch) throws Exception {\n\t\tch.pipeline().addLast(\"tcpDecoder\", new MessageDecoder());\n\t\tch.pipeline().addLast(\"tcpHandler\", new TcpServerHandler(ac)); \n\t\t\n\t}",
"@Override\r\n\tprotected void initChannel(SocketChannel ch) throws Exception {\n\t\t... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the given screen coordinates, translated into game space. | public Point2D.Float getScreenToGameCoords(double screenX, double screenY) {
return cam.unproject((float) screenX, (float) screenY);
} | [
"Vector3f getScreenCoordinates( Vector3f worldPosition );",
"Vector3f getScreenCoordinates( Vector3f worldPosition, Vector3f store );",
"public Point2D.Float getScreenToGameCoords(int screenX, int screenY) {\n\t\treturn cam.unproject((float) screenX, (float) screenY);\n\t}",
"DeviceCoordinate transformWorldTo... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Sends the user's chosen game title through three checks: 1) it contains only valid characters 2) it is a good length (1 and 2 are checked by gameTitleDelimiter pattern 3) it hasn't been used already If the title passes these three checks, returns true. else, returns false. | private boolean isGameNameAvailable(String newGameName){
//first check if it's got only valid characters and if it is a decent length
Pattern delim = Client.getInstance().getGameTitleDelimiter();
if(!delim.matcher(newGameName).matches()){
//there were some weird characters in there or the title was too long
... | [
"public static boolean checkTitle(String title) {\r\n\t\tboolean result = false;\r\n\t\tif (check(title) && title.matches(CommandParameter.REG_EXP_TITLE)) {\r\n\t\t\tresult = true;\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public void testInvalidTitle() {\n\t\tassertFalse(Item.isTitleValid(\"pop1corn\"));\n\t\tSys... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Takes an input from a user and logs it with the current system time in milliseconds | private void logUserEntry(int input) {
logger.log(String.format("%d %d\n", System.currentTimeMillis(), input));
} | [
"public static void showTimeConsole() //display 'time' syntax to console\n {\n log.info(\"[StacheStash] Please enter one of the following commands:\");\n log.info(\"[StacheStash] 'time set ## worldname'\");\n log.info(\"[StacheStash] 'time add ## worldname'\");\n log.info(\"[StacheSta... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Start the whole execution, load configuration, create loggers, start the change runner and start the Client class, which is the main sender/receiver. | private void start() throws Exception {
logger.info("****************************************");
logger.info("* STARTING TRAFFIRATOR *****************");
logger.info("****************************************");
Config config = getConfig();
// prepare executor service based on gi... | [
"public void start() {\n\t\tassert (runner == null);\n\t\trunner = new Thread(this);\n\t\trunner.start();\n\t\tSystem.out.println(\"Client handler voor \" + toString() + \" is gestart.\");\n\t}",
"private void startInternally() {\n log.debug(\"Start internally called.\");\n\n try {\n Lume... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates an instance of GpuResource class. | public GpuResource() {
} | [
"Device_Resource createDevice_Resource();",
"public PromotionResource() {\n }",
"public GdpResource() {\r\n }",
"public Resource() {\n }",
"public GPUBase() throws CLException\n\t{\n\t\tthis(false); // use single precision\n\t}",
"Network_Resource createNetwork_Resource();",
"public Shader()\n ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Retrieve the coordinate as a LatLng. | public LatLng getCoordinateAsLatLng()
{
return this.coordinateAsLatLng;
} | [
"public LatLng getLatLng() {\n return new LatLng(latitude, longitude);\n }",
"com.google.type.LatLng getLatLng();",
"java.lang.String getLat();",
"public LatLng getLocationCoords();",
"double getLat();",
"public String getLngLat() {\n return lngLat;\n }",
"public LatLng getPosition()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
initialize the back card images for second player and stock pile | public static void initImages(Activity activity) {
// if it's already initialized, then ignore
if (cardImage1 != null) return;
int stockBackImage = R.drawable.cardback;
int player2BackImage = R.drawable.cardback;
cardImage1 = BitmapFactory.decodeResource(activity.getResources(),stockBackImage);
ca... | [
"private void reinitCardBack() {\n try {\n Image back = ImageIO.read(this.getClass().getResource(\"/back.png\"));\n cardBack = new Card(\"Back\", back);\n } catch (IOException ioex) {\n System.exit(1);\n }\n }",
"public void setCardBack(Image back)\n {\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets the URI users should be sent to in the event of an error. | @Nullable String getErrorURL(); | [
"public String getErrorUri() {\n return errorUri;\n }",
"protected abstract String getFailedMessagesUri();",
"java.lang.String getDidUri();",
"public String getUserURI() {\n return host + userResource;\n }",
"String getRedirectUri() throws Exception;",
"com.google.protobuf.StringValue ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Updates an existing pricing rule. | UpdatePricingRuleResult updatePricingRule(UpdatePricingRuleRequest updatePricingRuleRequest); | [
"public boolean updatePricingForId(int productId, Pricing pricing);",
"public UpdatePricingRuleResult withArn(String arn) {\n setArn(arn);\n return this;\n }",
"UpdatePricingPlanResult updatePricingPlan(UpdatePricingPlanRequest updatePricingPlanRequest);",
"RuleDto updateRule(Integer ruleId, ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
this is an interface for all Objects which should receive the selectedCacheChanged Event | public interface CacheListChangedEventListener {
public void CacheListChangedEvent();
} | [
"public interface CacheListener {\n\n\t/** Called when a change is triggered in the cache\n\t * \n\t * @param e The CacheUpdateEvent containing the type of change and the source of the change that occured\n\t */\n\t\n\tpublic void update(CacheUpdateEvent e);\n}",
"@Override\n\tpublic void onEvent(CacheEvent<? ext... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Read a request body and output it as string. | static String readRequestBody(HttpExchange t) throws IOException {
InputStream is = t.getRequestBody();
String value = new Scanner(is).useDelimiter("\\A").next();
is.close();
return value;
} | [
"public String getBodyAsText() {\n\t\tInputStream inputStream = exchange.getRequestBody();\n\n\t\tString text = new BufferedReader(\n\t\t\t\tnew InputStreamReader(inputStream, StandardCharsets.UTF_8))\n\t\t\t\t.lines()\n\t\t\t\t.collect(Collectors.joining(\"\\n\"));\n\n\t\treturn text;\n\t}",
"public InputStream ... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method to display Cancel history related table information in Change Properties page | public Boolean showFieldIfCancelHistoryExists(Context context, String[] args)throws Exception {
boolean showField = false;
HashMap programMap = (HashMap)JPO.unpackArgs(args);
String objectId = (String)programMap.get(ChangeConstants.OBJECT_ID);
return Boolean.valueOf(getHistoryBasedOnAction(context,obj... | [
"public java.lang.String getBIndPersCancelHist()\r\n {\r\n return this._bIndPersCancelHist;\r\n }",
"public abstract void showRollbackChangesDialog(List<Change> changes);",
"private void actionfor_cancel() {\r\n\t\t\r\n\t\tboolean savedData = csvController.dataColl.cbActionListener.isSavedChanges()... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Creates an instance of EdifactProtocolSettings class. | public EdifactProtocolSettings() {
} | [
"public static EthProtocolOptions create() {\n return new EthProtocolOptions();\n }",
"public EPPProtocolExtension() {\n\t}",
"public AS2EnvelopeSettings() {\n }",
"public static AmqpTransportConfig create() {\n\t\tfinal AmqpTransportConfig res = new AmqpTransportConfig();\n\t\tres.setBuilder(BUILDER);... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column TB_YW_SCSJ_FILE.FWBH | public String getFwbh() {
return fwbh;
} | [
"public java.lang.String getBFSDATA() {\n return BFSDATA;\n }",
"java.lang.String getSbDFValue();",
"public byte[] getFileBinary() {\n synchronized (monitor()) {\n check_orphaned();\n\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbea... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method provides an opportunity to remove old snapshots. | public abstract void cleanSnapshots(); | [
"@MainThread\n @Override\n public void removeSnapshotView() {\n final View snapshotRootView = getRootView(SCREEN_SNAPSHOT_ROOT_ID);\n if (snapshotRootView == null) {\n return;\n }\n ViewParent parent = snapshotRootView.getParent();\n if (parent instanceof ViewGrou... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the result of interpreting the object as an instance of 'Base64 Binary'. This implementation returns null; returning a nonnull result will terminate the switch. | public T caseBase64Binary(Base64Binary object) {
return null;
} | [
"public boolean isBase64Binary() {\n return false;\n }",
"public T caseBinary(Binary object) {\n\t\treturn null;\n\t}",
"public org.hl7.fhir.Base64Binary getBlob()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.Base64Binary target = null;\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
open the results file. normally following by loadLine | protected void openFile()
{
try{
resultsFile = Files.openFileReader(resultsFilename);
} catch (IOException ioe) {
logger.error(ioe);
}
errorCount = 0;
logger.debug("TRECResultMatching opened "+ resultsFilename + " for matching results");
} | [
"protected boolean loadLine()\n\t{\n\t\t//try to read a line from the result file\n\t\ttry{\n\t\t\tcurrentLine = resultsFile.readLine();\n\t\t} catch (IOException ioe){ \n\t\t\tlogger.warn(\"Problem reading matching results file at line \" + lineNumber, ioe);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t//EOF was reached... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Delete the selected article from the articles list | public void deleteArticle(Article article); | [
"public void deleteAllArticles();",
"public void removeByArticle(java.lang.String articleId);",
"public static void delete(String id, String article){\n \tint article_ID = Integer.getInteger(id);\n \tmodels.Article.delete(\"article_ID\", article_ID);\n \t\tFileManagment.delete(article);\n \t\trender();\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column SNP_Marker.K0014 | public abstract String getK0014(); | [
"public abstract String getK0008();",
"public int getMarker() {\r\n\t\treturn this.marker;\r\n\t}",
"public String getMarkerOffset();",
"public int[][] getMarker(){\n\t\treturn marker;\n\t}",
"public int getMarker() {\n return this.marker;\n }",
"public String getMapKeyFieldName() { return \"key... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Created By: Neeraj Description: Click Method for Free Gift Checkbox | public void clickOnFreeGiftCheckBox()
{
objGenericMethods.takeSnapShot();
getFreeGiftChk().click();
objGenericMethods.ReportClickEvent("Free Gift Checkbox");
} | [
"public void checkbox() {\r\n\t\tcheckBox.click();\r\n\t}",
"public void clickOnCheckbox() {\n\t\tfindElement(identifier).click();\n\t}",
"public void clickCreatedFeatureCheckbox() {\r\n\t\tthis.createFeatureCheckbox.click();\r\n\t}",
"public void tickCheckBox() {\r\n\t\tcheckBox = driver.findElement(checkBox... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Gets a log entry by identifier. | @Override
public final NbsIntegrationLogEntry getLogEntry(String id) {
// Get the log entry
return this.inMemoryTable.stream().filter(r -> id.equals(r.getId())).findFirst().orElse(null);
} | [
"public LogEntry findLogEntry(Object logId) throws Exception;",
"OliLogItem get(String id);",
"public static LogEntry getById ( final Long id ) {\n try {\n return getWhere( createCriterionAsList( ID, id ) ).get( 0 );\n }\n catch ( final Exception e ) {\n return null;\n... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
A new thread scheduler | public Scheduler newThread(){
return Schedulers.newThread();
} | [
"private Scheduler myCustomScheduler() {\n final ThreadFactory factoryBuilder = new ThreadFactoryBuilder().setNameFormat(\"CustomExecutor-%d\").build();\n final ExecutorService service = Executors.newFixedThreadPool(10, factoryBuilder);\n return Schedulers.from(service);\n }",
"private voi... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Returns the smallest key in the symbol table. | public Key min() {
if ( isEmpty() ) {
throw new NoSuchElementException( "called min() with empty symbol table" );
}
return min( root ).key;
} | [
"public Key min() {\n if (isEmpty()) throw new NoSuchElementException(\"calls min() with empty symbol table\");\n return min(root).key;\n }",
"public K min() {\n if (isEmpty()) throw new NoSuchElementException(\"called min() with empty symbol table\");\n return min(root).key;\n }... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
The Feed affected by this change. .google.protobuf.StringValue feed = 12; | public com.google.protobuf.StringValueOrBuilder getFeedOrBuilder() {
return getFeed();
} | [
"public com.google.protobuf.StringValue getFeed() {\n return feed_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : feed_;\n }",
"public com.google.protobuf.StringValue getFeed() {\n if (feedBuilder_ == null) {\n return feed_ == null ? com.google.protobuf.StringValue.getDefaultInst... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
This method was generated by MyBatis Generator. This method returns the value of the database column t_sup_info.sup_ent_regunit | public String getSupEntRegunit() {
return supEntRegunit;
} | [
"public String getSupEntRegname() {\n return supEntRegname;\n }",
"public void setSupEntRegunit(String supEntRegunit) {\n this.supEntRegunit = supEntRegunit == null ? null : supEntRegunit.trim();\n }",
"public String getSupEntType() {\n return supEntType;\n }",
"public String get... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Set/clear the request queued flag | public synchronized final void setQueued(boolean qd) {
setFlag(RequestQueued, qd);
} | [
"void resetEnqueuedOnceFlag();",
"public void setQueued(boolean aB)\r\n {\r\n mQueued = aB;\r\n }",
"public void setRequestQueue(BlockingQueue q)\n {\n queue = q;\n }",
"private void stopRequest(){ Remove the clause synchronized of the stopRequest method.\n // Synchronization is i... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
Method: displayEmployee Reads names from external commadelimited file, employeeStats, and populates JComboBox | private void displayEmployee()
{
employeeJComboBox.removeAllItems();
int location = employeeJComboBox.getSelectedIndex();
String[] namesArray = new String[employees.size()];
for(int i = 0; i < employees.size(); i++)
{
namesArray[i] = employees.get(i).getName();
... | [
"public void employees(String service) {\r\n\t\tString fileName = service + \".txt\";\r\n\t\tBufferedReader br;\r\n\t\ttry {\r\n\t\t\tbr = new BufferedReader(new FileReader(fileName));\r\n\t\t\tArrayList<String> employeees = new OwnerUtils().empAvailable(service); //Initialize the list with available employees\r\n\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |
click event of the button on the spotify page to start the download of the spotify playlist | public void startSpotifyDownloadBtn() {
interruptspotifyDownload = false;
Platform.runLater(() -> {
spotifyInfoLabel.setText("retrieving necessary data!");
SpotifyProgressbar.setProgress(-1.0);
});
if (myspotify.isLoggedIn()) {
ArrayList<Song> songs =... | [
"public void spotifybtnStop() {\n interruptspotifyDownload = true;\n //TODO full interrupt also current download\n }",
"public void pressOnDownloadBtn() {\n Network.sendMsg(\n new FileRequest(\n serverFilesList.getSelectionModel().getSelectedItem()));\... | {
"objective": {
"paired": [],
"self": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} |