blob_id stringlengths 40 40 | __id__ int64 225 39,780B | directory_id stringlengths 40 40 | path stringlengths 6 313 | content_id stringlengths 40 40 | detected_licenses list | license_type stringclasses 2
values | repo_name stringlengths 6 132 | repo_url stringlengths 25 151 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 70 | visit_date timestamp[ns] | revision_date timestamp[ns] | committer_date timestamp[ns] | github_id int64 7.28k 689M ⌀ | star_events_count int64 0 131k | fork_events_count int64 0 48k | gha_license_id stringclasses 23
values | gha_fork bool 2
classes | gha_event_created_at timestamp[ns] | gha_created_at timestamp[ns] | gha_updated_at timestamp[ns] | gha_pushed_at timestamp[ns] | gha_size int64 0 40.4M ⌀ | gha_stargazers_count int32 0 112k ⌀ | gha_forks_count int32 0 39.4k ⌀ | gha_open_issues_count int32 0 11k ⌀ | gha_language stringlengths 1 21 ⌀ | gha_archived bool 2
classes | gha_disabled bool 1
class | content stringlengths 7 4.37M | src_encoding stringlengths 3 16 | language stringclasses 1
value | length_bytes int64 7 4.37M | extension stringclasses 24
values | filename stringlengths 4 174 | language_id stringclasses 1
value | entities list | contaminating_dataset stringclasses 0
values | malware_signatures list | redacted_content stringlengths 7 4.37M | redacted_length_bytes int64 7 4.37M | alphanum_fraction float32 0.25 0.94 | alpha_fraction float32 0.25 0.94 | num_lines int32 1 84k | avg_line_length float32 0.76 99.9 | std_line_length float32 0 220 | max_line_length int32 5 998 | is_vendor bool 2
classes | is_generated bool 1
class | max_hex_length int32 0 319 | hex_fraction float32 0 0.38 | max_unicode_length int32 0 408 | unicode_fraction float32 0 0.36 | max_base64_length int32 0 506 | base64_fraction float32 0 0.5 | avg_csv_sep_count float32 0 4 | is_autogen_header bool 1
class | is_empty_html bool 1
class | shard stringclasses 16
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
57d7f93b9c1d3f0f38d0019aad1db9bd2a199330 | 15,461,882,267,230 | 18269ed6f1a93b22a11b5b3e30f3a019316d01c2 | /app/models/Spell.java | e128b35ace8d2f4f48b60572ab65443668cc6483 | [
"Apache-2.0"
] | permissive | FaHeymann/HSDeckHub | https://github.com/FaHeymann/HSDeckHub | 2a1659c187654a62422027fb8237ea73cbe3a99f | a2a77d34651e509b111caf0d6c88a400455c534d | refs/heads/master | 2021-01-10T17:16:48.952000 | 2016-05-05T22:59:58 | 2016-05-05T22:59:58 | 53,889,754 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package models;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorValue("spell")
public class Spell extends Card {
private static final long serialVersionUID = -6845481996156235472L;
public Spell() {
super();
}
public Spell(String name, String description, byte attack, byte life, byte cost, byte classId, byte qualityId, byte raceId) {
super(name, description, attack, life, cost, classId, qualityId, 0);
}
@Override
public void setRaceId(int raceId) {
this.raceId = 0;
}
@Override
public String getRaceString() {
return "";
}
}
| UTF-8 | Java | 847 | java | Spell.java | Java | [] | null | [] | package models;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorValue("spell")
public class Spell extends Card {
private static final long serialVersionUID = -6845481996156235472L;
public Spell() {
super();
}
public Spell(String name, String description, byte attack, byte life, byte cost, byte classId, byte qualityId, byte raceId) {
super(name, description, attack, life, cost, classId, qualityId, 0);
}
@Override
public void setRaceId(int raceId) {
this.raceId = 0;
}
@Override
public String getRaceString() {
return "";
}
}
| 847 | 0.662338 | 0.637544 | 33 | 23.666666 | 27.383547 | 129 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.727273 | false | false | 13 |
6fbd6fe8848e019e9e07f55522f662a642116d9a | 15,461,882,267,673 | d58e4c7e48c360a8c22031f5a34f3bf5b9daf8c0 | /hackerrank/src/sorting/QuickSort.java | cda632ce46445f6937ba18ebbae86e8c700c5c62 | [] | no_license | denismironchuk/hackerrank | https://github.com/denismironchuk/hackerrank | d9e5730a75a906596d5837ac250738b4d04c661f | d7a2a671d69c0880ee47fe6acd59cba2bd0bfb27 | refs/heads/master | 2023-05-02T05:06:37.771000 | 2023-04-17T19:47:41 | 2023-04-17T19:47:41 | 143,649,550 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package sorting;
import java.util.Arrays;
public class QuickSort {
private static int partition(int[] arr, int start, int end) {
int pivot = arr[end];
int lessEnd = start - 1;
for (int i = start; i <= end; i++) {
if (arr[i] <= pivot) {
lessEnd++;
int tmp = arr[i];
arr[i] = arr[lessEnd];
arr[lessEnd] = tmp;
}
}
return lessEnd == end ? lessEnd - 1 : lessEnd;
}
private static void sort(int[] arr, int start, int end) {
if (start >= end) {
return;
}
int middle = partition(arr, start, end);
sort(arr, start, middle);
sort(arr, middle + 1, end);
}
private static void print(int[] arr) {
for (int a : arr) {
System.out.printf("%3d", a);
}
System.out.println();
}
public static void main(String[] args) {
while (true) {
int n = 20;
int max = 10;
int[] arr = new int[n];
int[] arrEtl = new int[n];
for (int i = 0; i < n; i++) {
arr[i] = (int) (max * Math.random());
arrEtl[i] = arr[i];
}
print(arr);
sort(arr, 0, n - 1);
print(arr);
Arrays.sort(arrEtl);
print(arrEtl);
System.out.println("================");
if (!Arrays.equals(arr, arrEtl)) {
throw new RuntimeException();
}
}
}
}
| UTF-8 | Java | 1,567 | java | QuickSort.java | Java | [] | null | [] | package sorting;
import java.util.Arrays;
public class QuickSort {
private static int partition(int[] arr, int start, int end) {
int pivot = arr[end];
int lessEnd = start - 1;
for (int i = start; i <= end; i++) {
if (arr[i] <= pivot) {
lessEnd++;
int tmp = arr[i];
arr[i] = arr[lessEnd];
arr[lessEnd] = tmp;
}
}
return lessEnd == end ? lessEnd - 1 : lessEnd;
}
private static void sort(int[] arr, int start, int end) {
if (start >= end) {
return;
}
int middle = partition(arr, start, end);
sort(arr, start, middle);
sort(arr, middle + 1, end);
}
private static void print(int[] arr) {
for (int a : arr) {
System.out.printf("%3d", a);
}
System.out.println();
}
public static void main(String[] args) {
while (true) {
int n = 20;
int max = 10;
int[] arr = new int[n];
int[] arrEtl = new int[n];
for (int i = 0; i < n; i++) {
arr[i] = (int) (max * Math.random());
arrEtl[i] = arr[i];
}
print(arr);
sort(arr, 0, n - 1);
print(arr);
Arrays.sort(arrEtl);
print(arrEtl);
System.out.println("================");
if (!Arrays.equals(arr, arrEtl)) {
throw new RuntimeException();
}
}
}
}
| 1,567 | 0.424378 | 0.417358 | 62 | 24.274193 | 17.590475 | 65 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.741935 | false | false | 13 |
ebf76b067b840fff2b1aa81e08d354f0d8ec0a1a | 30,185,030,163,898 | a3944a49bc9f6c34389385d5c25c2569fa2ab17e | /src/pages/PageBase.java | 261880d818f1e87d17e54797ef02413500d4965c | [] | no_license | StasKrivoguz/MishQAHaifa-1-master | https://github.com/StasKrivoguz/MishQAHaifa-1-master | 47dd51d619013fda1d0053444f9b49139d5c43f6 | 3815089ea5f300cab08f427819f203eec6be957f | refs/heads/master | 2020-04-13T02:49:18.205000 | 2019-01-07T18:37:47 | 2019-01-07T18:37:47 | 162,478,950 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package pages;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
public abstract class PageBase {
protected WebDriver driver;
public PageBase(WebDriver driver) {
this.driver = driver;
}
public void waitUntilElementIsLoaded(WebDriver driver,
By locator, int time)
{
try {
new WebDriverWait(driver, time).until(ExpectedConditions
.presenceOfElementLocated(locator));
}
catch(Exception e){
e.printStackTrace();
}
}
public void waitUntilElementIsLoaded(WebDriver driver,
WebElement element, int time)
{
try {
new WebDriverWait(driver, time).until(ExpectedConditions
.visibilityOf(element));
}
catch(Exception e){
e.printStackTrace();
}
}
public void setValueToField(WebElement element,String value){
element.click();
element.clear();
element.sendKeys(value);
}
}
| UTF-8 | Java | 1,243 | java | PageBase.java | Java | [] | null | [] | package pages;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
public abstract class PageBase {
protected WebDriver driver;
public PageBase(WebDriver driver) {
this.driver = driver;
}
public void waitUntilElementIsLoaded(WebDriver driver,
By locator, int time)
{
try {
new WebDriverWait(driver, time).until(ExpectedConditions
.presenceOfElementLocated(locator));
}
catch(Exception e){
e.printStackTrace();
}
}
public void waitUntilElementIsLoaded(WebDriver driver,
WebElement element, int time)
{
try {
new WebDriverWait(driver, time).until(ExpectedConditions
.visibilityOf(element));
}
catch(Exception e){
e.printStackTrace();
}
}
public void setValueToField(WebElement element,String value){
element.click();
element.clear();
element.sendKeys(value);
}
}
| 1,243 | 0.598552 | 0.598552 | 43 | 27.88372 | 22.250381 | 70 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.511628 | false | false | 13 |
40188f1851ec9833877229e56a5aa2e86ff8f207 | 27,341,761,873,154 | 3cabd71635738186cc28e6bddd8ab8ab4abca184 | /core/src/main/java/org/kgusarov/socketio/core/server/impl/SocketIOServlet.java | c5d4704bb97b42bb5ef63c6a26be9477fe905667 | [
"MIT"
] | permissive | kgusarov/socket.io-server-java | https://github.com/kgusarov/socket.io-server-java | e00734a4fe74193e7574f30394ba9b7d2228c726 | 5f35184cc3833042c94f5befa40fb26f3cd8d7d5 | refs/heads/master | 2021-01-18T20:03:08.016000 | 2016-09-02T09:25:17 | 2016-09-02T09:25:18 | 65,989,963 | 0 | 0 | null | true | 2016-08-18T10:56:25 | 2016-08-18T10:56:25 | 2016-08-11T05:30:54 | 2016-02-20T03:29:08 | 2,313 | 0 | 0 | 0 | null | null | null | package org.kgusarov.socketio.core.server.impl;
import org.kgusarov.socketio.core.common.SocketIOProtocolException;
import org.kgusarov.socketio.core.protocol.EngineIOProtocol;
import org.kgusarov.socketio.core.protocol.SocketIOProtocol;
import org.kgusarov.socketio.core.server.TransportProvider;
import org.kgusarov.socketio.core.server.UnsupportedTransportException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/**
* @author Alexander Sova (bird@codeminders.com)
* @author Konstantin Gusarov (konstantins.gusarovs@gmail.com)
*/
@SuppressWarnings("NonSerializableFieldInSerializableClass")
public abstract class SocketIOServlet extends HttpServlet {
private static final Logger LOGGER = LoggerFactory.getLogger(SocketIOServlet.class);
private final SocketIOManager socketIOManager = new SocketIOManager();
/**
* Initializes and retrieves the given Namespace by its pathname identifier {@code id}.
* <p/>
* If the namespace was already initialized it returns it right away.
*
* @param id namespace id
* @return namespace object
*/
public Namespace of(final String id) {
return namespace(id);
}
/**
* Initializes and retrieves the given Namespace by its pathname identifier {@code id}.
* <p/>
* If the namespace was already initialized it returns it right away.
*
* @param id namespace id
* @return namespace object
*/
public Namespace namespace(final String id) {
Namespace ns = socketIOManager.getNamespace(id);
if (ns == null) {
ns = socketIOManager.createNamespace(id);
}
return ns;
}
public void setTransportProvider(final TransportProvider transportProvider) {
socketIOManager.setTransportProvider(transportProvider);
}
@Override
public void init() throws ServletException {
of(SocketIOProtocol.DEFAULT_NAMESPACE);
LOGGER.info("Socket.IO server stated.");
}
@Override
public void destroy() {
socketIOManager.getTransportProvider().destroy();
super.destroy();
}
@Override
protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {
serve(req, resp);
}
@Override
protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {
serve(req, resp);
}
@Override
protected void doOptions(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {
serve(req, resp);
}
@SuppressWarnings("NestedMethodCall")
private void serve(final HttpServletRequest request, final HttpServletResponse response) throws IOException {
assert socketIOManager.getTransportProvider() != null;
try {
LOGGER.trace("Request from " +
request.getRemoteHost() + ':' + request.getRemotePort() +
", transport: " + request.getParameter(EngineIOProtocol.TRANSPORT) +
", EIO protocol version:" + request.getParameter(EngineIOProtocol.VERSION));
socketIOManager.getTransportProvider()
.getTransport(request)
.handle(request, response, socketIOManager);
} catch (UnsupportedTransportException | SocketIOProtocolException e) {
response.sendError(HttpServletResponse.SC_BAD_REQUEST);
LOGGER.warn("Socket IO error", e);
}
}
}
| UTF-8 | Java | 3,766 | java | SocketIOServlet.java | Java | [
{
"context": "ponse;\nimport java.io.IOException;\n\n/**\n * @author Alexander Sova (bird@codeminders.com)\n * @author Konstanti",
"end": 658,
"score": 0.9998731017112732,
"start": 644,
"tag": "NAME",
"value": "Alexander Sova"
},
{
"context": "OException;\n\n/**\n * @author Ale... | null | [] | package org.kgusarov.socketio.core.server.impl;
import org.kgusarov.socketio.core.common.SocketIOProtocolException;
import org.kgusarov.socketio.core.protocol.EngineIOProtocol;
import org.kgusarov.socketio.core.protocol.SocketIOProtocol;
import org.kgusarov.socketio.core.server.TransportProvider;
import org.kgusarov.socketio.core.server.UnsupportedTransportException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/**
* @author <NAME> (<EMAIL>)
* @author <NAME> (<EMAIL>)
*/
@SuppressWarnings("NonSerializableFieldInSerializableClass")
public abstract class SocketIOServlet extends HttpServlet {
private static final Logger LOGGER = LoggerFactory.getLogger(SocketIOServlet.class);
private final SocketIOManager socketIOManager = new SocketIOManager();
/**
* Initializes and retrieves the given Namespace by its pathname identifier {@code id}.
* <p/>
* If the namespace was already initialized it returns it right away.
*
* @param id namespace id
* @return namespace object
*/
public Namespace of(final String id) {
return namespace(id);
}
/**
* Initializes and retrieves the given Namespace by its pathname identifier {@code id}.
* <p/>
* If the namespace was already initialized it returns it right away.
*
* @param id namespace id
* @return namespace object
*/
public Namespace namespace(final String id) {
Namespace ns = socketIOManager.getNamespace(id);
if (ns == null) {
ns = socketIOManager.createNamespace(id);
}
return ns;
}
public void setTransportProvider(final TransportProvider transportProvider) {
socketIOManager.setTransportProvider(transportProvider);
}
@Override
public void init() throws ServletException {
of(SocketIOProtocol.DEFAULT_NAMESPACE);
LOGGER.info("Socket.IO server stated.");
}
@Override
public void destroy() {
socketIOManager.getTransportProvider().destroy();
super.destroy();
}
@Override
protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {
serve(req, resp);
}
@Override
protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {
serve(req, resp);
}
@Override
protected void doOptions(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {
serve(req, resp);
}
@SuppressWarnings("NestedMethodCall")
private void serve(final HttpServletRequest request, final HttpServletResponse response) throws IOException {
assert socketIOManager.getTransportProvider() != null;
try {
LOGGER.trace("Request from " +
request.getRemoteHost() + ':' + request.getRemotePort() +
", transport: " + request.getParameter(EngineIOProtocol.TRANSPORT) +
", EIO protocol version:" + request.getParameter(EngineIOProtocol.VERSION));
socketIOManager.getTransportProvider()
.getTransport(request)
.handle(request, response, socketIOManager);
} catch (UnsupportedTransportException | SocketIOProtocolException e) {
response.sendError(HttpServletResponse.SC_BAD_REQUEST);
LOGGER.warn("Socket IO error", e);
}
}
}
| 3,710 | 0.697823 | 0.697292 | 106 | 34.528301 | 32.723312 | 129 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.45283 | false | false | 13 |
a620c4b9cbf09d54c4fdf83e36d357ac6e824452 | 15,324,443,331,207 | 1921483949b258be03329de57d4cacd3482022ea | /src/pl/coderslab/entity/Group.java | 06f6a0a89f9ce28d8603d2c40f4ca68d0b63ccf3 | [] | no_license | elnorbiako/Workshop_booking | https://github.com/elnorbiako/Workshop_booking | c655995d20d5bba09593f3147f1f25ee36dfbabb | e40f15cf40dcb6b246809727eb762edee7dfa4e7 | refs/heads/master | 2020-03-10T02:49:53.271000 | 2018-04-15T19:26:41 | 2018-04-15T19:26:41 | 129,146,998 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package pl.coderslab.entity;
import pl.coderslab.dao.GroupDao;
public class Group extends GroupDao{
private Integer id;
private String name;
public Group(Integer id, String name) {
super();
this.id = id;
this.name = name;
}
public Group() {
super();
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
| UTF-8 | Java | 520 | java | Group.java | Java | [] | null | [] | package pl.coderslab.entity;
import pl.coderslab.dao.GroupDao;
public class Group extends GroupDao{
private Integer id;
private String name;
public Group(Integer id, String name) {
super();
this.id = id;
this.name = name;
}
public Group() {
super();
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
| 520 | 0.601923 | 0.601923 | 49 | 9.571428 | 11.885509 | 40 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.959184 | false | false | 13 |
cc16918c8d95b405ec6ce13a16bcdbb8d22037e8 | 21,672,405,004,489 | cc129f61a0ec6a0861bab6f4c97e6c65b275a9e4 | /pb-payment-common-domain/src/main/java/com/elong/pb/payment/common/domain/request/route/UnifiedPaymentBaseRequest.java | 6460c6e6a6e70867714b7e43d7ea213a38e90f80 | [] | no_license | xiongshaogang/common | https://github.com/xiongshaogang/common | e22e8bdb7f57cb35aa6d4f7bbf2e4f81d6ff1e64 | 898efcd06dc00243732cf05ad081290a3080c378 | refs/heads/master | 2019-05-26T23:43:50.309000 | 2017-03-06T15:25:08 | 2017-03-06T15:25:08 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package com.elong.pb.payment.common.domain.request.route;
import com.elong.pb.payment.common.domain.request.IRequest;
import org.codehaus.jackson.annotate.JsonProperty;
/**
* Date: 15/12/2
* Time: 下午8:28
*
* @author zhiwei.zhang@corp.elong.com
*/
public class UnifiedPaymentBaseRequest implements IRequest {
public UnifiedPaymentBaseRequest() {
}
@JsonProperty(value = "version")
protected String version;
@JsonProperty(value = "channel_type")
protected Integer channelType;
@JsonProperty(value = "business_type")
protected Integer businessType;
@JsonProperty(value = "language")
protected Integer language;
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public Integer getChannelType() {
return channelType;
}
public void setChannelType(Integer channelType) {
this.channelType = channelType;
}
public Integer getBusinessType() {
return businessType;
}
public void setBusinessType(Integer businessType) {
this.businessType = businessType;
}
public Integer getLanguage() {
return language;
}
public void setLanguage(Integer language) {
this.language = language;
}
}
| UTF-8 | Java | 1,326 | java | UnifiedPaymentBaseRequest.java | Java | [
{
"context": "/**\n * Date: 15/12/2\n * Time: 下午8:28\n *\n * @author zhiwei.zhang@corp.elong.com\n */\npublic class UnifiedPaymentBaseRequest implem",
"end": 249,
"score": 0.9967616200447083,
"start": 222,
"tag": "EMAIL",
"value": "zhiwei.zhang@corp.elong.com"
}
] | null | [] | package com.elong.pb.payment.common.domain.request.route;
import com.elong.pb.payment.common.domain.request.IRequest;
import org.codehaus.jackson.annotate.JsonProperty;
/**
* Date: 15/12/2
* Time: 下午8:28
*
* @author <EMAIL>
*/
public class UnifiedPaymentBaseRequest implements IRequest {
public UnifiedPaymentBaseRequest() {
}
@JsonProperty(value = "version")
protected String version;
@JsonProperty(value = "channel_type")
protected Integer channelType;
@JsonProperty(value = "business_type")
protected Integer businessType;
@JsonProperty(value = "language")
protected Integer language;
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public Integer getChannelType() {
return channelType;
}
public void setChannelType(Integer channelType) {
this.channelType = channelType;
}
public Integer getBusinessType() {
return businessType;
}
public void setBusinessType(Integer businessType) {
this.businessType = businessType;
}
public Integer getLanguage() {
return language;
}
public void setLanguage(Integer language) {
this.language = language;
}
}
| 1,306 | 0.673979 | 0.667927 | 61 | 20.672131 | 19.723267 | 60 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.245902 | false | false | 13 |
a11a60bcbf7533c79299dba15eb716f08cf87f72 | 11,897,059,464,610 | 639670f9c1bb2a5228f4befebbb1143ff0ccafbb | /src/main/java/com/vnpay/auth/util/JwtTokenGenerator.java | 280ee33e087abdbcc07e2ac971176d8e809baed9 | [] | no_license | manhtt23091992/springboot-jwt | https://github.com/manhtt23091992/springboot-jwt | 422b35ed3353b2be7d2cfbf306d4351f058c6876 | 874bafaa2dfb0a004df89c81f06a8a551d280d3e | refs/heads/master | 2020-03-25T01:55:54.966000 | 2018-08-02T08:54:15 | 2018-08-02T08:54:15 | 143,265,219 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.vnpay.auth.util;
import io.jsonwebtoken.Claims;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm;
import org.joda.time.DateTime;
import org.springframework.beans.factory.annotation.Value;
/**
*
* @author tienmanh
*/
public class JwtTokenGenerator {
public static String generateToken(JwtUser u, String secret, int jwt_expiration) {
Claims claims = Jwts.claims().setSubject(u.getUsername());
claims.put("role", u.getRole());
return Jwts.builder()
.setClaims(claims)
.signWith(SignatureAlgorithm.HS256, secret)
.setExpiration(DateTime.now().plusSeconds(jwt_expiration).toDate())
.compact();
}
}
| UTF-8 | Java | 915 | java | JwtTokenGenerator.java | Java | [
{
"context": "beans.factory.annotation.Value;\n\n/**\n *\n * @author tienmanh\n */\npublic class JwtTokenGenerator {\n\n public ",
"end": 435,
"score": 0.9991084933280945,
"start": 427,
"tag": "USERNAME",
"value": "tienmanh"
}
] | null | [] | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.vnpay.auth.util;
import io.jsonwebtoken.Claims;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm;
import org.joda.time.DateTime;
import org.springframework.beans.factory.annotation.Value;
/**
*
* @author tienmanh
*/
public class JwtTokenGenerator {
public static String generateToken(JwtUser u, String secret, int jwt_expiration) {
Claims claims = Jwts.claims().setSubject(u.getUsername());
claims.put("role", u.getRole());
return Jwts.builder()
.setClaims(claims)
.signWith(SignatureAlgorithm.HS256, secret)
.setExpiration(DateTime.now().plusSeconds(jwt_expiration).toDate())
.compact();
}
}
| 915 | 0.686339 | 0.68306 | 30 | 29.5 | 26.64176 | 86 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.533333 | false | false | 13 |
6a77de9ee4bb25156a3f53c3899df9424c20746b | 28,552,942,647,272 | 7fd2bdd7d656333da49cb6b13e7a099d4aa09197 | /spring-mock-spy-bean/src/main/java/com/jojoldu/springmockspybean/dto/OrderResponseDto.java | c2f2680e59490bffaef1ac4b8e3ab5b375889a1e | [] | no_license | jojoldu/blog-code | https://github.com/jojoldu/blog-code | 5b0e38479bfb576c505b3720cb12be0fb8f7fe15 | acabdb8e4b1f258aa35f554f0c964cf167a8e2ac | refs/heads/master | 2023-08-29T14:31:27.509000 | 2023-08-19T15:37:04 | 2023-08-19T15:37:04 | 65,371,147 | 705 | 451 | null | false | 2023-09-04T10:45:08 | 2016-08-10T09:51:58 | 2023-09-04T01:24:40 | 2023-09-02T06:17:25 | 990,817 | 641 | 324 | 7 | Java | false | false | package com.jojoldu.springmockspybean.dto;
import com.jojoldu.springmockspybean.domain.product.Product;
import lombok.Getter;
import java.util.List;
import java.util.stream.Collectors;
/**
* Created by jojoldu@gmail.com on 2017. 9. 22.
* Blog : http://jojoldu.tistory.com
* Github : https://github.com/jojoldu
*/
@Getter
public class OrderResponseDto {
private String customerName;
private List<ProductDto> products;
public OrderResponseDto(String customerName, List<Product> products) {
this.customerName = customerName;
this.products = products.stream()
.map(ProductDto::new)
.collect(Collectors.toList());
}
@Getter
public static class ProductDto {
private String name;
private long price;
public ProductDto(Product product) {
this.name = product.getName();
this.price = product.getPrice();
}
}
}
| UTF-8 | Java | 946 | java | OrderResponseDto.java | Java | [
{
"context": "rt java.util.stream.Collectors;\n\n/**\n * Created by jojoldu@gmail.com on 2017. 9. 22.\n * Blog : http://jojoldu.tistory.",
"end": 223,
"score": 0.999921977519989,
"start": 206,
"tag": "EMAIL",
"value": "jojoldu@gmail.com"
},
{
"context": "ojoldu.tistory.com\n * Github... | null | [] | package com.jojoldu.springmockspybean.dto;
import com.jojoldu.springmockspybean.domain.product.Product;
import lombok.Getter;
import java.util.List;
import java.util.stream.Collectors;
/**
* Created by <EMAIL> on 2017. 9. 22.
* Blog : http://jojoldu.tistory.com
* Github : https://github.com/jojoldu
*/
@Getter
public class OrderResponseDto {
private String customerName;
private List<ProductDto> products;
public OrderResponseDto(String customerName, List<Product> products) {
this.customerName = customerName;
this.products = products.stream()
.map(ProductDto::new)
.collect(Collectors.toList());
}
@Getter
public static class ProductDto {
private String name;
private long price;
public ProductDto(Product product) {
this.name = product.getName();
this.price = product.getPrice();
}
}
}
| 936 | 0.657505 | 0.650106 | 40 | 22.65 | 20.284908 | 74 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.35 | false | false | 13 |
17cf4e7aee965fb94377208a4f4ad2d5bc5b3b05 | 5,162,550,694,710 | 1f044232d65bfead8ee64bec10919717d1b65f19 | /src/Auxiliares/Borrame_migrar_tablas.java | ffd00c9ffa5bde7f5af723ffb7b27e8ae846f5bd | [] | no_license | Israel-ICM/ManejadorArchivos | https://github.com/Israel-ICM/ManejadorArchivos | 134fae49aaebe4eab7b11b1979ff13bb51425352 | bc88bdba2b85e88dbb4a023923ce2865c007d151 | refs/heads/master | 2020-07-01T20:26:24.524000 | 2019-08-08T15:59:24 | 2019-08-08T15:59:24 | 201,290,555 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package Auxiliares;
import java.sql.ResultSet;
import java.sql.SQLException;
import siap_configuraciones_model.configuraciones_model;
import siap_configuraciones_model.personalizacion_model;
import sqlite.SqliteManager;
import sqlite.model.CreateDataBase;
/**
*
* @author josue
*/
public class Borrame_migrar_tablas {
public void migrarConfiguracionAPersonalizacion()
{
boolean existe = false;
SqliteManager db=new SqliteManager();
db.connectionSQL();
ResultSet rs = db.query("SELECT name FROM sqlite_master WHERE type='table' AND name='configuracion' ");
try
{
if(rs.next())
existe = true;
}
catch (SQLException e)
{
System.out.println(e.getMessage());
}
db.close();
if(existe){
CreateDataBase cdb = new CreateDataBase();
String[] a = cdb.getConfiguracion();
personalizacion_model c_pm = new personalizacion_model();
c_pm.updateConfiguracion(1, Integer.parseInt(a[1]), Integer.parseInt(a[2]), Integer.parseInt(a[3]), Integer.parseInt(a[4]), a[5], Integer.parseInt(a[6]), a[7], a[8], a[9], a[10], a[11], a[12]);
}
db.connectionSQL();
if(existe)
db.execute("DROP TABLE configuracion");
db.close();
}
public void migrarPathsAConfiguraciones()
{
boolean existe = false;
SqliteManager db=new SqliteManager();
db.connectionSQL();
ResultSet rs = db.query("SELECT name FROM sqlite_master WHERE type='table' AND name='path' ");
try
{
if(rs.next())
existe = true;
}
catch (SQLException e)
{
System.out.println(e.getMessage());
}
db.close();
if(existe){
CreateDataBase cdb = new CreateDataBase();
String[] a = cdb.getPaths();
configuraciones_model c_configuraciones_model = new configuraciones_model();
c_configuraciones_model.setPhp(a[0]);
c_configuraciones_model.setBack_compartido(a[1]);
c_configuraciones_model.setHistorial(a[2]);
c_configuraciones_model.setBack_compartido_local(a[3]);
c_configuraciones_model.setHistorial_local(a[4]);
c_configuraciones_model.setFrontend(a[5]);
c_configuraciones_model.setBackend(a[6]);
c_configuraciones_model.setCompartir(a[7]);
c_configuraciones_model.setUsuario(a[8]);
c_configuraciones_model.setActualizacion(a[9]);
//c_configuraciones_model.setServidor_versiones("");
c_configuraciones_model.setIp_connect(a[10]);
c_configuraciones_model.setUsuario_connect(a[11]);
c_configuraciones_model.setPassword_connect(a[12]);
c_configuraciones_model.update();
}
db.connectionSQL();
if(existe)
db.execute("DROP TABLE path");
db.close();
}
}
| UTF-8 | Java | 3,087 | java | Borrame_migrar_tablas.java | Java | [
{
"context": "rt sqlite.model.CreateDataBase;\n\n/**\n *\n * @author josue\n */\npublic class Borrame_migrar_tablas {\n publ",
"end": 282,
"score": 0.9975020289421082,
"start": 277,
"tag": "USERNAME",
"value": "josue"
}
] | null | [] | package Auxiliares;
import java.sql.ResultSet;
import java.sql.SQLException;
import siap_configuraciones_model.configuraciones_model;
import siap_configuraciones_model.personalizacion_model;
import sqlite.SqliteManager;
import sqlite.model.CreateDataBase;
/**
*
* @author josue
*/
public class Borrame_migrar_tablas {
public void migrarConfiguracionAPersonalizacion()
{
boolean existe = false;
SqliteManager db=new SqliteManager();
db.connectionSQL();
ResultSet rs = db.query("SELECT name FROM sqlite_master WHERE type='table' AND name='configuracion' ");
try
{
if(rs.next())
existe = true;
}
catch (SQLException e)
{
System.out.println(e.getMessage());
}
db.close();
if(existe){
CreateDataBase cdb = new CreateDataBase();
String[] a = cdb.getConfiguracion();
personalizacion_model c_pm = new personalizacion_model();
c_pm.updateConfiguracion(1, Integer.parseInt(a[1]), Integer.parseInt(a[2]), Integer.parseInt(a[3]), Integer.parseInt(a[4]), a[5], Integer.parseInt(a[6]), a[7], a[8], a[9], a[10], a[11], a[12]);
}
db.connectionSQL();
if(existe)
db.execute("DROP TABLE configuracion");
db.close();
}
public void migrarPathsAConfiguraciones()
{
boolean existe = false;
SqliteManager db=new SqliteManager();
db.connectionSQL();
ResultSet rs = db.query("SELECT name FROM sqlite_master WHERE type='table' AND name='path' ");
try
{
if(rs.next())
existe = true;
}
catch (SQLException e)
{
System.out.println(e.getMessage());
}
db.close();
if(existe){
CreateDataBase cdb = new CreateDataBase();
String[] a = cdb.getPaths();
configuraciones_model c_configuraciones_model = new configuraciones_model();
c_configuraciones_model.setPhp(a[0]);
c_configuraciones_model.setBack_compartido(a[1]);
c_configuraciones_model.setHistorial(a[2]);
c_configuraciones_model.setBack_compartido_local(a[3]);
c_configuraciones_model.setHistorial_local(a[4]);
c_configuraciones_model.setFrontend(a[5]);
c_configuraciones_model.setBackend(a[6]);
c_configuraciones_model.setCompartir(a[7]);
c_configuraciones_model.setUsuario(a[8]);
c_configuraciones_model.setActualizacion(a[9]);
//c_configuraciones_model.setServidor_versiones("");
c_configuraciones_model.setIp_connect(a[10]);
c_configuraciones_model.setUsuario_connect(a[11]);
c_configuraciones_model.setPassword_connect(a[12]);
c_configuraciones_model.update();
}
db.connectionSQL();
if(existe)
db.execute("DROP TABLE path");
db.close();
}
}
| 3,087 | 0.579851 | 0.569485 | 88 | 34.06818 | 29.957468 | 205 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.693182 | false | false | 13 |
7033760ce1c502e02c0a348774e24c6976514997 | 29,489,245,512,814 | b7e22968cd90c0f499e0e1ed61bbccc3a3f9e246 | /inkubator-hrm/src/main/java/com/inkubator/hrm/entity/NeracaCuti.java | e5f34a5f282e01698ee9c29d77041af5b350bdbf | [] | no_license | creative-active-technology/inkubator-hrm | https://github.com/creative-active-technology/inkubator-hrm | feb2b6f01d0c7867349901a97d00c0e517757b22 | 295a99713392bb63fbe0c5ab22e4148dce9c6a56 | refs/heads/master | 2021-01-09T07:59:19.422000 | 2016-01-22T09:39:31 | 2016-01-22T09:39:31 | 16,723,933 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package com.inkubator.hrm.entity;
// Generated Sep 30, 2014 12:22:58 PM by Hibernate Tools 4.3.1
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;
import javax.persistence.Version;
/**
* NeracaCuti generated by hbm2java
*/
@Entity
@Table(name="neraca_cuti"
,catalog="hrm"
)
public class NeracaCuti implements java.io.Serializable {
private long id;
private Integer version;
private LeaveDistribution leaveDistribution;
private Double debet;
private Double kredit;
private Double saldo;
private Date createdOn;
private String createdBy;
private Date updatedOn;
private String updatedBy;
public NeracaCuti() {
}
public NeracaCuti(long id) {
this.id = id;
}
public NeracaCuti(long id, LeaveDistribution leaveDistribution, Double debet, Double kredit, Date createdOn, String createdBy, Date updatedOn, String updatedBy) {
this.id = id;
this.leaveDistribution = leaveDistribution;
this.debet = debet;
this.kredit = kredit;
this.createdOn = createdOn;
this.createdBy = createdBy;
this.updatedOn = updatedOn;
this.updatedBy = updatedBy;
}
@Id
@Column(name="id", unique=true, nullable=false)
public long getId() {
return this.id;
}
public void setId(long id) {
this.id = id;
}
@Version
@Column(name="version")
public Integer getVersion() {
return this.version;
}
public void setVersion(Integer version) {
this.version = version;
}
@ManyToOne(fetch=FetchType.LAZY)
@JoinColumn(name="leave_distribusi_id")
public LeaveDistribution getLeaveDistribution() {
return this.leaveDistribution;
}
public void setLeaveDistribution(LeaveDistribution leaveDistribution) {
this.leaveDistribution = leaveDistribution;
}
@Column(name="debet", precision=22, scale=0)
public Double getDebet() {
return this.debet;
}
public void setDebet(Double debet) {
this.debet = debet;
}
@Column(name="kredit", precision=22, scale=0)
public Double getKredit() {
return this.kredit;
}
public void setKredit(Double kredit) {
this.kredit = kredit;
}
@Column(name="saldo", precision=22, scale=0)
public Double getSaldo() {
return saldo;
}
public void setSaldo(Double saldo) {
this.saldo = saldo;
}
@Temporal(TemporalType.TIMESTAMP)
@Column(name="created_on", length=19)
public Date getCreatedOn() {
return this.createdOn;
}
public void setCreatedOn(Date createdOn) {
this.createdOn = createdOn;
}
@Column(name="created_by", length=45)
public String getCreatedBy() {
return this.createdBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
@Temporal(TemporalType.TIMESTAMP)
@Column(name="updated_on", length=19)
public Date getUpdatedOn() {
return this.updatedOn;
}
public void setUpdatedOn(Date updatedOn) {
this.updatedOn = updatedOn;
}
@Column(name="updated_by", length=45)
public String getUpdatedBy() {
return this.updatedBy;
}
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
}
| UTF-8 | Java | 3,712 | java | NeracaCuti.java | Java | [] | null | [] | package com.inkubator.hrm.entity;
// Generated Sep 30, 2014 12:22:58 PM by Hibernate Tools 4.3.1
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;
import javax.persistence.Version;
/**
* NeracaCuti generated by hbm2java
*/
@Entity
@Table(name="neraca_cuti"
,catalog="hrm"
)
public class NeracaCuti implements java.io.Serializable {
private long id;
private Integer version;
private LeaveDistribution leaveDistribution;
private Double debet;
private Double kredit;
private Double saldo;
private Date createdOn;
private String createdBy;
private Date updatedOn;
private String updatedBy;
public NeracaCuti() {
}
public NeracaCuti(long id) {
this.id = id;
}
public NeracaCuti(long id, LeaveDistribution leaveDistribution, Double debet, Double kredit, Date createdOn, String createdBy, Date updatedOn, String updatedBy) {
this.id = id;
this.leaveDistribution = leaveDistribution;
this.debet = debet;
this.kredit = kredit;
this.createdOn = createdOn;
this.createdBy = createdBy;
this.updatedOn = updatedOn;
this.updatedBy = updatedBy;
}
@Id
@Column(name="id", unique=true, nullable=false)
public long getId() {
return this.id;
}
public void setId(long id) {
this.id = id;
}
@Version
@Column(name="version")
public Integer getVersion() {
return this.version;
}
public void setVersion(Integer version) {
this.version = version;
}
@ManyToOne(fetch=FetchType.LAZY)
@JoinColumn(name="leave_distribusi_id")
public LeaveDistribution getLeaveDistribution() {
return this.leaveDistribution;
}
public void setLeaveDistribution(LeaveDistribution leaveDistribution) {
this.leaveDistribution = leaveDistribution;
}
@Column(name="debet", precision=22, scale=0)
public Double getDebet() {
return this.debet;
}
public void setDebet(Double debet) {
this.debet = debet;
}
@Column(name="kredit", precision=22, scale=0)
public Double getKredit() {
return this.kredit;
}
public void setKredit(Double kredit) {
this.kredit = kredit;
}
@Column(name="saldo", precision=22, scale=0)
public Double getSaldo() {
return saldo;
}
public void setSaldo(Double saldo) {
this.saldo = saldo;
}
@Temporal(TemporalType.TIMESTAMP)
@Column(name="created_on", length=19)
public Date getCreatedOn() {
return this.createdOn;
}
public void setCreatedOn(Date createdOn) {
this.createdOn = createdOn;
}
@Column(name="created_by", length=45)
public String getCreatedBy() {
return this.createdBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
@Temporal(TemporalType.TIMESTAMP)
@Column(name="updated_on", length=19)
public Date getUpdatedOn() {
return this.updatedOn;
}
public void setUpdatedOn(Date updatedOn) {
this.updatedOn = updatedOn;
}
@Column(name="updated_by", length=45)
public String getUpdatedBy() {
return this.updatedBy;
}
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
}
| 3,712 | 0.653556 | 0.644666 | 158 | 22.481012 | 20.691746 | 166 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.518987 | false | false | 13 |
7a38d7e6bdfbba49ad8ab1483600f1bc5d7954ec | 10,385,230,928,163 | 51f86e19413d89201be21aa47eb7de8dbab3afbd | /2-weather-canada-app/src/main/java/org/yp/camel/CamelIntegration.java | 839baf475207356add908212125e4b8eabb089f5 | [] | no_license | eugene-patsiomkin/quarkus-demo | https://github.com/eugene-patsiomkin/quarkus-demo | cc588cc383c5cf9b2055353ef0a92bc75f9135c8 | a2f634e7714817fae1fe4d5f4c62df47ae96930e | refs/heads/main | 2023-03-22T13:56:52.760000 | 2021-03-12T22:10:53 | 2021-03-12T22:10:53 | 345,770,365 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package org.yp.camel;
import org.apache.camel.LoggingLevel;
import org.apache.camel.Predicate;
import org.apache.camel.Processor;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.caffeine.CaffeineConstants;
import org.apache.camel.Exchange;
import static org.apache.camel.support.builder.PredicateBuilder.not;
/**
* CamelIntegration
*/
public class CamelIntegration extends RouteBuilder {
Predicate GotResult = header(CaffeineConstants.ACTION_HAS_RESULT).isEqualTo(true);
@Override
public void configure() throws Exception {
from("timer:GetWeatherInfo?period=3600000").routeId("Trigger get weather info")
.setBody().constant("BC")
.to("seda:StartIngestionJob")
.end();
from("seda:StartIngestionJob").routeId("Get weather info")
// Setting up constants
.setHeader("ProvinceToGet", simple("${body}"))
.log(LoggingLevel.INFO, ">".repeat(6) + "Getting City list " + ">".repeat(6))
.to("direct:getCityList")
.process(new XmlParser())
.split(body()).stopOnException().parallelProcessing()
.to("seda:processCity?concurrentConsumers=5")
.end()
.end();
from("seda:processCity").routeId("Process city weather")
.process(new Processor(){
public void process(Exchange exchange) {
Site s = exchange.getIn().getBody(Site.class);
exchange.getIn().setHeader("CityCode", s.getCode());
exchange.getIn().setHeader("CityProvinceCode", s.getProvinceCode());
exchange.getIn().setHeader("CityNameEn", s.getNameEn());
}
})
.log(LoggingLevel.INFO, ">".repeat(3) + "Getting Weather information for ${header.CityNameEn} [${header.CityCode}] " + ">".repeat(3))
.to("direct:getBcCityInfo")
.to("direct:processCityFile")
.log(LoggingLevel.INFO, "<".repeat(3) + "Information for ${header.CityNameEn} [${header.CityCode}] retrieved " + "<".repeat(3))
.end();
from("direct:getCityList").routeId("Get city list")
.setHeader("CITY_LIST_CACHE_KEY", constant("CITY_LIST_CACHE_KEY"))
.setHeader("CITY_LIST_CACHE", constant("CITY_LIST_CACHE"))
.setHeader(CaffeineConstants.ACTION, constant(CaffeineConstants.ACTION_GET))
.setHeader(CaffeineConstants.KEY, simple("${header.CITY_LIST_CACHE_KEY}"))
.toD("caffeine-cache://${header.CITY_LIST_CACHE}?expireAfterAccessTime=86400")
.choice()
.when(not(GotResult))
.log(LoggingLevel.INFO, "Retrieving city list from Weather Canada")
.to("direct:getCityListFromHTTP")
.setHeader(CaffeineConstants.ACTION, constant(CaffeineConstants.ACTION_PUT))
.toD("caffeine-cache://${header.CITY_LIST_CACHE}")
.otherwise()
.log(LoggingLevel.INFO, "City list retrieved from cache")
.end()
.end();
from("direct:getCityListFromHTTP").routeId("Getting city list from HTTP")
.setHeader("Accept", constant("*/*"))
.setHeader("User-Agent", constant("ApacheCamel"))
.setHeader("Connection", constant("keep-alive"))
.setHeader(Exchange.HTTP_METHOD, constant("GET"))
.setHeader(Exchange.HTTP_PATH, constant("/citypage_weather/xml/siteList.xml"))
.to("https://dd.weather.gc.ca?bridgeEndpoint=true")
.convertBodyTo(String.class)
.end();
from("direct:getBcCityInfo").routeId("Getting weather info for bc city")
.throttle(10).timePeriodMillis(1000)
.setHeader(Exchange.HTTP_METHOD, constant("GET"))
.toD("https://dd.weather.gc.ca/citypage_weather/xml/${header.CityProvinceCode}/${header.CityCode}_e.xml")
.convertBodyTo(String.class)
.process(new ChecksumProcessor())
.log(LoggingLevel.INFO, "Weather information for ${header.CityNameEn} [${header.CityCode}] retrieved from Weather Canada")
.end();
from("direct:processCityFile").routeId("Parsing weather file")
.multicast().aggregationStrategy(new ChecksumAggregationStrategy())
.to("seda:waitForCheckSum?waitForTaskToComplete=Always", "seda:checkCache?waitForTaskToComplete=Always")
.end()
.choice()
.when(simple("${header.FileExists} == true"))
.log(LoggingLevel.INFO, "No new data available for ${header.CityNameEn} [${header.CityCode}]")
.otherwise()
.setHeader("CamelFileName", simple("${header.CityProvinceCode}/${header.CityCode}/${header.CityNameEn}/${date:now:yyyy-MM-dd_HHmmssSSS}.${header[CheckSum]}.xml"))
.log("Folder: ${properties:application.destination:/res}")
.toD("file://${properties:application.destination:/res}")
.setHeader("CamelFileName", simple("${header.CityProvinceCode}/${header.CityCode}/current.xml"))
.toD("file://${properties:application.destination:/res}")
.log(LoggingLevel.INFO, "Weather data for ${header.CityNameEn} [${header.CityCode}] was saved to ${header.CamelFileName}")
.end()
.end();
from("seda:checkCache").routeId("Check city weather cache").setBody(simple(""))
.setHeader("CITY_CACHE_KEY_PREFIX", constant("CITY_CACHE_KEY_PREFIX_"))
.setHeader("CITY_CACHE", constant("CITY_CACHE"))
.setHeader(CaffeineConstants.ACTION, constant(CaffeineConstants.ACTION_GET))
.setHeader(CaffeineConstants.KEY, simple("${header.CITY_CACHE_KEY_PREFIX}${header.CheckSum}"))
.toD("caffeine-cache://${header.CITY_CACHE}?expireAfterAccessTime=86400")
.setHeader("FileExists", simple("${header.CamelCaffeineActionHasResult} == true && ${header.CheckSum} == ${body}", boolean.class))
.setHeader(CaffeineConstants.ACTION, constant(CaffeineConstants.ACTION_PUT))
.setHeader(CaffeineConstants.VALUE, simple("${header[CheckSum]}"))
.toD("caffeine-cache://${header.CITY_CACHE}")
.log("Cache check complete result: ${header.FileExists}")
.end();
from("seda:waitForCheckSum").routeId("Waiting for a duplicate checkup")
.log("Waiting for a file cache record check.")
.end();
}
} | UTF-8 | Java | 6,379 | java | CamelIntegration.java | Java | [] | null | [] | package org.yp.camel;
import org.apache.camel.LoggingLevel;
import org.apache.camel.Predicate;
import org.apache.camel.Processor;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.caffeine.CaffeineConstants;
import org.apache.camel.Exchange;
import static org.apache.camel.support.builder.PredicateBuilder.not;
/**
* CamelIntegration
*/
public class CamelIntegration extends RouteBuilder {
Predicate GotResult = header(CaffeineConstants.ACTION_HAS_RESULT).isEqualTo(true);
@Override
public void configure() throws Exception {
from("timer:GetWeatherInfo?period=3600000").routeId("Trigger get weather info")
.setBody().constant("BC")
.to("seda:StartIngestionJob")
.end();
from("seda:StartIngestionJob").routeId("Get weather info")
// Setting up constants
.setHeader("ProvinceToGet", simple("${body}"))
.log(LoggingLevel.INFO, ">".repeat(6) + "Getting City list " + ">".repeat(6))
.to("direct:getCityList")
.process(new XmlParser())
.split(body()).stopOnException().parallelProcessing()
.to("seda:processCity?concurrentConsumers=5")
.end()
.end();
from("seda:processCity").routeId("Process city weather")
.process(new Processor(){
public void process(Exchange exchange) {
Site s = exchange.getIn().getBody(Site.class);
exchange.getIn().setHeader("CityCode", s.getCode());
exchange.getIn().setHeader("CityProvinceCode", s.getProvinceCode());
exchange.getIn().setHeader("CityNameEn", s.getNameEn());
}
})
.log(LoggingLevel.INFO, ">".repeat(3) + "Getting Weather information for ${header.CityNameEn} [${header.CityCode}] " + ">".repeat(3))
.to("direct:getBcCityInfo")
.to("direct:processCityFile")
.log(LoggingLevel.INFO, "<".repeat(3) + "Information for ${header.CityNameEn} [${header.CityCode}] retrieved " + "<".repeat(3))
.end();
from("direct:getCityList").routeId("Get city list")
.setHeader("CITY_LIST_CACHE_KEY", constant("CITY_LIST_CACHE_KEY"))
.setHeader("CITY_LIST_CACHE", constant("CITY_LIST_CACHE"))
.setHeader(CaffeineConstants.ACTION, constant(CaffeineConstants.ACTION_GET))
.setHeader(CaffeineConstants.KEY, simple("${header.CITY_LIST_CACHE_KEY}"))
.toD("caffeine-cache://${header.CITY_LIST_CACHE}?expireAfterAccessTime=86400")
.choice()
.when(not(GotResult))
.log(LoggingLevel.INFO, "Retrieving city list from Weather Canada")
.to("direct:getCityListFromHTTP")
.setHeader(CaffeineConstants.ACTION, constant(CaffeineConstants.ACTION_PUT))
.toD("caffeine-cache://${header.CITY_LIST_CACHE}")
.otherwise()
.log(LoggingLevel.INFO, "City list retrieved from cache")
.end()
.end();
from("direct:getCityListFromHTTP").routeId("Getting city list from HTTP")
.setHeader("Accept", constant("*/*"))
.setHeader("User-Agent", constant("ApacheCamel"))
.setHeader("Connection", constant("keep-alive"))
.setHeader(Exchange.HTTP_METHOD, constant("GET"))
.setHeader(Exchange.HTTP_PATH, constant("/citypage_weather/xml/siteList.xml"))
.to("https://dd.weather.gc.ca?bridgeEndpoint=true")
.convertBodyTo(String.class)
.end();
from("direct:getBcCityInfo").routeId("Getting weather info for bc city")
.throttle(10).timePeriodMillis(1000)
.setHeader(Exchange.HTTP_METHOD, constant("GET"))
.toD("https://dd.weather.gc.ca/citypage_weather/xml/${header.CityProvinceCode}/${header.CityCode}_e.xml")
.convertBodyTo(String.class)
.process(new ChecksumProcessor())
.log(LoggingLevel.INFO, "Weather information for ${header.CityNameEn} [${header.CityCode}] retrieved from Weather Canada")
.end();
from("direct:processCityFile").routeId("Parsing weather file")
.multicast().aggregationStrategy(new ChecksumAggregationStrategy())
.to("seda:waitForCheckSum?waitForTaskToComplete=Always", "seda:checkCache?waitForTaskToComplete=Always")
.end()
.choice()
.when(simple("${header.FileExists} == true"))
.log(LoggingLevel.INFO, "No new data available for ${header.CityNameEn} [${header.CityCode}]")
.otherwise()
.setHeader("CamelFileName", simple("${header.CityProvinceCode}/${header.CityCode}/${header.CityNameEn}/${date:now:yyyy-MM-dd_HHmmssSSS}.${header[CheckSum]}.xml"))
.log("Folder: ${properties:application.destination:/res}")
.toD("file://${properties:application.destination:/res}")
.setHeader("CamelFileName", simple("${header.CityProvinceCode}/${header.CityCode}/current.xml"))
.toD("file://${properties:application.destination:/res}")
.log(LoggingLevel.INFO, "Weather data for ${header.CityNameEn} [${header.CityCode}] was saved to ${header.CamelFileName}")
.end()
.end();
from("seda:checkCache").routeId("Check city weather cache").setBody(simple(""))
.setHeader("CITY_CACHE_KEY_PREFIX", constant("CITY_CACHE_KEY_PREFIX_"))
.setHeader("CITY_CACHE", constant("CITY_CACHE"))
.setHeader(CaffeineConstants.ACTION, constant(CaffeineConstants.ACTION_GET))
.setHeader(CaffeineConstants.KEY, simple("${header.CITY_CACHE_KEY_PREFIX}${header.CheckSum}"))
.toD("caffeine-cache://${header.CITY_CACHE}?expireAfterAccessTime=86400")
.setHeader("FileExists", simple("${header.CamelCaffeineActionHasResult} == true && ${header.CheckSum} == ${body}", boolean.class))
.setHeader(CaffeineConstants.ACTION, constant(CaffeineConstants.ACTION_PUT))
.setHeader(CaffeineConstants.VALUE, simple("${header[CheckSum]}"))
.toD("caffeine-cache://${header.CITY_CACHE}")
.log("Cache check complete result: ${header.FileExists}")
.end();
from("seda:waitForCheckSum").routeId("Waiting for a duplicate checkup")
.log("Waiting for a file cache record check.")
.end();
}
} | 6,379 | 0.632544 | 0.627841 | 122 | 51.295082 | 37.804436 | 178 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.459016 | false | false | 13 |
21a930a251c6a1ccef6c41b98478ed6a5fd8c9e4 | 29,712,583,820,419 | d00b87d74e3d96ab6b8b6ef47056719fa2841399 | /src/main/java/model/actions/AcquirePermit.java | 5522841ec0e75c16e3803112e55555f58589543d | [] | no_license | frankpolimi/Council-of-Four | https://github.com/frankpolimi/Council-of-Four | 881b1855293b72dd0e965de3252846341aa7e91a | 5137a585f40c0bc03699749391462ef9ed1c0c8e | refs/heads/master | 2020-05-23T10:14:41.986000 | 2017-01-30T09:17:48 | 2017-01-30T09:17:48 | 80,407,090 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package model.actions;
import java.util.ArrayList;
import model.game.BuildingPermit;
import model.game.Game;
import model.game.council.RegionalCouncil;
import model.game.politics.PoliticsCard;
/**
* @author Vitaliy Pakholko
*/
public class AcquirePermit extends MainAction
{
/**
*
*/
private static final long serialVersionUID = 4581355540805367240L;
private RegionalCouncil council;
private ArrayList<PoliticsCard> politics;
private BuildingPermit permit;
/**
* constructor for the action that allows the player to acquire
* a building permit by selecting the permit to acquire, the council
* to pay with some given politics cards
* @param council the regional council that the player wants to
* corrupt in order to acquire a specific permit
* the council is forcibly a regional council
* because only this kind of council holds a permit deck
* @param politics the list of cards that the player wants to use
* to corrupt the council
* @param permit the specific permit that a player wants to acquire
*/
public AcquirePermit(RegionalCouncil council, ArrayList<PoliticsCard> politics, BuildingPermit permit)
{
this.council = council;
this.politics = politics;
this.permit = permit;
}
/**
* The player acquires a face up building permit if he can pay the council.
* @throws IllegalStateException if the player has no Main actions left
* @throws IllegalStateException if the player has not enough coins to pay the council
* @throws IllegalArgumentException if the player indicated a wrong Building permit that is not held by the
* council given as a field of the action
*/
@Override
public boolean takeAction(Game game)
{
boolean permitAcquired=false;
if(!this.checkAction(game))
throw new IllegalStateException("Not enough Main actions");
RegionalCouncil council=game.getRegions().stream().map(e->e.getCouncil()).filter(e->e.equals(this.council)).findFirst().get();
if(payCouncil(game,council,politics))
{
try
{
permitAcquired=council.getPermitsDeck().givePermit(game, permit);
}catch(IllegalStateException e)
{
permitAcquired=true;
}
if(permitAcquired)
{
game.decrementMainActionCounter();
super.takeAction(game);
return true;
}else return false;
}
else throw new IllegalStateException("Not enough coins or Cards to pay the council. For 1 missing politics card you pay 4 additional coins,"
+ " for each additional missing politics card you add 3 more");
}
@Override
public String toString() {
return "AcquirePermit: The player tries to pay a council, using a nunmber a cards equals or less the number of councillors in a council,"
+ "with the intent to acquire a BuildingPermit situated in the council's corresponding deck.";
}
/**
* get the regional council that the player tries
* to corrupt with the politics cards
* @return the council that a player tries to corrupt
*/
public RegionalCouncil getCouncil() {
return council;
}
/**
* set the regional council that the player tries
* to corrupt with the politics cards
* @param council the council that a player tries to corrupt
*/
public void setCouncil(RegionalCouncil council) {
this.council = council;
}
/**
* get the list of cards that a player has decided
* to give in to try and corrupt the council
* @return the list of cards that a player tried to use
*/
public ArrayList<PoliticsCard> getPolitics() {
return politics;
}
/**
* set the list of cards that a player has decided
* to give in to try and corrupt the council
* @param politics the list of cards that a player tried to use
*/
public void setPolitics(ArrayList<PoliticsCard> politics) {
this.politics = politics;
}
/**
* get the building permit that a player has
* decided to try and acquire. this permit
* will be only a face up permit of a
* permit deck of a specific region
* @return the permit chosen by the player
*/
public BuildingPermit getPermit() {
return permit;
}
/**
* set the building permit that a player has
* decided to try and acquire. this permit
* will be only a face up permit of a
* permit deck of a specific region
* @param permit the permit chosen by the player
*/
public void setPermit(BuildingPermit permit) {
this.permit = permit;
}
} | UTF-8 | Java | 4,354 | java | AcquirePermit.java | Java | [
{
"context": " model.game.politics.PoliticsCard;\n\n/**\n * @author Vitaliy Pakholko\n */\npublic class AcquirePermit extends MainAction",
"end": 226,
"score": 0.9998775720596313,
"start": 210,
"tag": "NAME",
"value": "Vitaliy Pakholko"
}
] | null | [] | package model.actions;
import java.util.ArrayList;
import model.game.BuildingPermit;
import model.game.Game;
import model.game.council.RegionalCouncil;
import model.game.politics.PoliticsCard;
/**
* @author <NAME>
*/
public class AcquirePermit extends MainAction
{
/**
*
*/
private static final long serialVersionUID = 4581355540805367240L;
private RegionalCouncil council;
private ArrayList<PoliticsCard> politics;
private BuildingPermit permit;
/**
* constructor for the action that allows the player to acquire
* a building permit by selecting the permit to acquire, the council
* to pay with some given politics cards
* @param council the regional council that the player wants to
* corrupt in order to acquire a specific permit
* the council is forcibly a regional council
* because only this kind of council holds a permit deck
* @param politics the list of cards that the player wants to use
* to corrupt the council
* @param permit the specific permit that a player wants to acquire
*/
public AcquirePermit(RegionalCouncil council, ArrayList<PoliticsCard> politics, BuildingPermit permit)
{
this.council = council;
this.politics = politics;
this.permit = permit;
}
/**
* The player acquires a face up building permit if he can pay the council.
* @throws IllegalStateException if the player has no Main actions left
* @throws IllegalStateException if the player has not enough coins to pay the council
* @throws IllegalArgumentException if the player indicated a wrong Building permit that is not held by the
* council given as a field of the action
*/
@Override
public boolean takeAction(Game game)
{
boolean permitAcquired=false;
if(!this.checkAction(game))
throw new IllegalStateException("Not enough Main actions");
RegionalCouncil council=game.getRegions().stream().map(e->e.getCouncil()).filter(e->e.equals(this.council)).findFirst().get();
if(payCouncil(game,council,politics))
{
try
{
permitAcquired=council.getPermitsDeck().givePermit(game, permit);
}catch(IllegalStateException e)
{
permitAcquired=true;
}
if(permitAcquired)
{
game.decrementMainActionCounter();
super.takeAction(game);
return true;
}else return false;
}
else throw new IllegalStateException("Not enough coins or Cards to pay the council. For 1 missing politics card you pay 4 additional coins,"
+ " for each additional missing politics card you add 3 more");
}
@Override
public String toString() {
return "AcquirePermit: The player tries to pay a council, using a nunmber a cards equals or less the number of councillors in a council,"
+ "with the intent to acquire a BuildingPermit situated in the council's corresponding deck.";
}
/**
* get the regional council that the player tries
* to corrupt with the politics cards
* @return the council that a player tries to corrupt
*/
public RegionalCouncil getCouncil() {
return council;
}
/**
* set the regional council that the player tries
* to corrupt with the politics cards
* @param council the council that a player tries to corrupt
*/
public void setCouncil(RegionalCouncil council) {
this.council = council;
}
/**
* get the list of cards that a player has decided
* to give in to try and corrupt the council
* @return the list of cards that a player tried to use
*/
public ArrayList<PoliticsCard> getPolitics() {
return politics;
}
/**
* set the list of cards that a player has decided
* to give in to try and corrupt the council
* @param politics the list of cards that a player tried to use
*/
public void setPolitics(ArrayList<PoliticsCard> politics) {
this.politics = politics;
}
/**
* get the building permit that a player has
* decided to try and acquire. this permit
* will be only a face up permit of a
* permit deck of a specific region
* @return the permit chosen by the player
*/
public BuildingPermit getPermit() {
return permit;
}
/**
* set the building permit that a player has
* decided to try and acquire. this permit
* will be only a face up permit of a
* permit deck of a specific region
* @param permit the permit chosen by the player
*/
public void setPermit(BuildingPermit permit) {
this.permit = permit;
}
} | 4,344 | 0.72554 | 0.720487 | 139 | 30.330935 | 29.885967 | 142 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1.741007 | false | false | 13 |
8c9595b2e2e3bf88960ff55f480ed5ff716b9771 | 22,969,485,128,016 | a97533539030384708c6a546cc9952f2ddaeff05 | /jmetal-algorithm/src/main/java/org/uma/jmetal/algorithm/multiobjective/moead/util/ViolationThresholdComparator.java | 95acbf0de82e9cba3b9cbbd93db70f67353dda64 | [
"MIT"
] | permissive | jMetal/jMetal | https://github.com/jMetal/jMetal | 862ab3902ecda7f0485ec2905b6c8f09a4fb0fc4 | 95fbeee22d1a4c50fb1c31b2f152c07c35629d91 | refs/heads/main | 2023-09-04T21:46:12.666000 | 2023-08-31T09:10:34 | 2023-08-31T09:10:34 | 19,381,895 | 515 | 623 | MIT | false | 2023-07-04T07:47:11 | 2014-05-02T16:59:26 | 2023-07-03T09:59:35 | 2023-07-04T07:47:11 | 254,530 | 453 | 400 | 24 | Java | false | false | package org.uma.jmetal.algorithm.multiobjective.moead.util;
import java.util.Comparator;
import java.util.List;
import org.uma.jmetal.solution.Solution;
import org.uma.jmetal.util.ConstraintHandling;
/**
* This class implements the ViolationThreshold Comparator
*
* @author Juan J. Durillo
*/
@SuppressWarnings("serial")
public class ViolationThresholdComparator<S extends Solution<?>> implements Comparator<S> {
private double threshold = 0.0;
/**
* Compares two solutions. If the solutions has no constraints the method return 0
*
* @param solution1 Object representing the first <code>Solution</code>.
* @param solution2 Object representing the second <code>Solution</code>.
* @return -1, or 0, or 1 if o1 is less than, equal, or greater than o2,
* respectively.
*/
@Override
public int compare(S solution1, S solution2) {
double overall1, overall2;
overall1 = ConstraintHandling.numberOfViolatedConstraints(solution1) * ConstraintHandling.overallConstraintViolationDegree(solution1);
overall2 = ConstraintHandling.numberOfViolatedConstraints(solution2) * ConstraintHandling.overallConstraintViolationDegree(solution2);
if ((overall1 < 0) && (overall2 < 0)) {
return Double.compare(overall2, overall1);
} else if ((overall1 == 0) && (overall2 < 0)) {
return -1;
} else if ((overall1 < 0) && (overall2 == 0)) {
return 1;
} else {
return 0;
}
}
/**
* Returns true if solutions s1 and/or s2 have an overall constraint
* violation with value less than 0
*/
public boolean needToCompare(S solution1, S solution2) {
boolean needToCompare;
double overall1, overall2;
overall1 = Math.abs(ConstraintHandling.numberOfViolatedConstraints(solution1) * ConstraintHandling.overallConstraintViolationDegree(solution1));
overall2 = Math.abs(ConstraintHandling.numberOfViolatedConstraints(solution2) * ConstraintHandling.overallConstraintViolationDegree(solution2));
needToCompare = (overall1 > this.threshold) || (overall2 > this.threshold);
return needToCompare;
}
/**
* Computes the feasibility ratio
* Return the ratio of feasible solutions
*/
public double feasibilityRatio(List<S> solutionSet) {
double aux = 0.0;
for (S solution : solutionSet) {
if (ConstraintHandling.numberOfViolatedConstraints(solution) < 0) {
aux = aux + 1.0;
}
}
return aux / (double) solutionSet.size();
}
/**
* Computes the feasibility ratio
* Return the ratio of feasible solutions
*/
public double meanOverallViolation(List<S> solutionSet) {
double aux = 0.0;
for (S solution : solutionSet) {
aux += Math.abs(ConstraintHandling.numberOfViolatedConstraints(solution) *
ConstraintHandling.overallConstraintViolationDegree(solution));
}
return aux / (double) solutionSet.size();
}
/**
* Updates the threshold value using the population
*/
public void updateThreshold(List<S> set) {
threshold = feasibilityRatio(set) * meanOverallViolation(set);
}
}
| UTF-8 | Java | 3,073 | java | ViolationThresholdComparator.java | Java | [
{
"context": "ts the ViolationThreshold Comparator\n *\n * @author Juan J. Durillo\n */\n@SuppressWarnings(\"serial\")\npublic class Viol",
"end": 294,
"score": 0.9998674392700195,
"start": 279,
"tag": "NAME",
"value": "Juan J. Durillo"
}
] | null | [] | package org.uma.jmetal.algorithm.multiobjective.moead.util;
import java.util.Comparator;
import java.util.List;
import org.uma.jmetal.solution.Solution;
import org.uma.jmetal.util.ConstraintHandling;
/**
* This class implements the ViolationThreshold Comparator
*
* @author <NAME>
*/
@SuppressWarnings("serial")
public class ViolationThresholdComparator<S extends Solution<?>> implements Comparator<S> {
private double threshold = 0.0;
/**
* Compares two solutions. If the solutions has no constraints the method return 0
*
* @param solution1 Object representing the first <code>Solution</code>.
* @param solution2 Object representing the second <code>Solution</code>.
* @return -1, or 0, or 1 if o1 is less than, equal, or greater than o2,
* respectively.
*/
@Override
public int compare(S solution1, S solution2) {
double overall1, overall2;
overall1 = ConstraintHandling.numberOfViolatedConstraints(solution1) * ConstraintHandling.overallConstraintViolationDegree(solution1);
overall2 = ConstraintHandling.numberOfViolatedConstraints(solution2) * ConstraintHandling.overallConstraintViolationDegree(solution2);
if ((overall1 < 0) && (overall2 < 0)) {
return Double.compare(overall2, overall1);
} else if ((overall1 == 0) && (overall2 < 0)) {
return -1;
} else if ((overall1 < 0) && (overall2 == 0)) {
return 1;
} else {
return 0;
}
}
/**
* Returns true if solutions s1 and/or s2 have an overall constraint
* violation with value less than 0
*/
public boolean needToCompare(S solution1, S solution2) {
boolean needToCompare;
double overall1, overall2;
overall1 = Math.abs(ConstraintHandling.numberOfViolatedConstraints(solution1) * ConstraintHandling.overallConstraintViolationDegree(solution1));
overall2 = Math.abs(ConstraintHandling.numberOfViolatedConstraints(solution2) * ConstraintHandling.overallConstraintViolationDegree(solution2));
needToCompare = (overall1 > this.threshold) || (overall2 > this.threshold);
return needToCompare;
}
/**
* Computes the feasibility ratio
* Return the ratio of feasible solutions
*/
public double feasibilityRatio(List<S> solutionSet) {
double aux = 0.0;
for (S solution : solutionSet) {
if (ConstraintHandling.numberOfViolatedConstraints(solution) < 0) {
aux = aux + 1.0;
}
}
return aux / (double) solutionSet.size();
}
/**
* Computes the feasibility ratio
* Return the ratio of feasible solutions
*/
public double meanOverallViolation(List<S> solutionSet) {
double aux = 0.0;
for (S solution : solutionSet) {
aux += Math.abs(ConstraintHandling.numberOfViolatedConstraints(solution) *
ConstraintHandling.overallConstraintViolationDegree(solution));
}
return aux / (double) solutionSet.size();
}
/**
* Updates the threshold value using the population
*/
public void updateThreshold(List<S> set) {
threshold = feasibilityRatio(set) * meanOverallViolation(set);
}
}
| 3,064 | 0.70973 | 0.69053 | 90 | 33.144444 | 34.827053 | 148 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.422222 | false | false | 13 |
fd86ebe3db82def5465023c8cf5545583a7c4c7b | 30,700,426,246,757 | bf407f1d7bac47da36a4cc096728a1e193084b4d | /ccd_gui/src/test/java/de/ods/ccd_gui/TextUmbruchServiceTest.java | 8b786216cb43ac5a286c148b53ee23dbf5297c20 | [] | no_license | RolandDahlem/ccd-hausaufgabe | https://github.com/RolandDahlem/ccd-hausaufgabe | e9df54c0733ae95852d9e5ea7d93b759cdf03f44 | 0836b90ab3c28e8854de132ead9102a739b79960 | refs/heads/master | 2021-01-15T14:32:17.248000 | 2016-10-07T11:03:27 | 2016-10-07T11:03:27 | 58,059,924 | 0 | 2 | null | true | 2016-05-19T06:34:10 | 2016-05-04T14:45:26 | 2016-05-04T15:30:18 | 2016-05-19T06:34:10 | 10 | 0 | 1 | 0 | Java | null | null | package de.ods.ccd_gui;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.*;
import org.junit.Test;
import de.ods.ccd_gui.textumbruch.TextUmbruchService;
public class TextUmbruchServiceTest {
TextUmbruchService service = new TextUmbruchService();
@Test
public void test_ob_umgebrochen_wird() {
String umbruchstext = "Er fragte, wohin gehen wir.";
int maximalbreite = 9;
String ergebnis = service.umbrechen(umbruchstext, maximalbreite);
assertThat(ergebnis, is("Er\nfragte,\nwohin\ngehen\nwir."));
}
@Test
public void test_ob_zu_grosse_woerter_probleme_machen() {
String umbruchstext = "Donaudampfschiffartskapiaensmuetzenfarbe ist blau";
int maximalbreite = 9;
String ergebnis = service.umbrechen(umbruchstext, maximalbreite);
assertThat(ergebnis, is("Donaudampfschiffartskapiaensmuetzenfarbe\nist blau"));
}
@Test
public void test_ob_zu_grosse_woerter_am_textende_probleme_machen() {
String umbruchstext = "Donaudampfschiffartskapiaensmuetze";
int maximalbreite = 9;
String ergebnis = service.umbrechen(umbruchstext, maximalbreite);
assertThat(ergebnis, is("Donaudampfschiffartskapiaensmuetze"));
}
@Test
public void test_ob_abseatze_erhalten_bleiben() {
String umbruchstext = "yo lo\nyolo";
int maximalbreite = 9;
String ergebnis = service.umbrechen(umbruchstext, maximalbreite);
assertThat(ergebnis, is("yo lo\nyolo"));
}
@Test
public void test_ob_grenzfaelle_passen() {
String umbruchstext = "Er fragte,\nwohin";
int maximalbreite = 10;
String ergebnis = service.umbrechen(umbruchstext, maximalbreite);
assertThat(ergebnis, is("Er fragte,\nwohin"));
}
@Test
public void test_ob_grenzfaelle_in_der_naechsten_zeile_passen() {
String umbruchstext = "Er fragte,\nwohin gehen\n";
int maximalbreite = 11;
String ergebnis = service.umbrechen(umbruchstext, maximalbreite);
assertThat(ergebnis, is("Er fragte,\nwohin gehen\n"));
}
}
| UTF-8 | Java | 1,991 | java | TextUmbruchServiceTest.java | Java | [
{
"context": "leme_machen() {\n\t\t\n\t\tString umbruchstext = \"Donaudampfschiffartskapiaensmuetzenfarbe ist blau\";\n\t\tint m",
"end": 654,
"score": 0.724107563495636,
"start": 651,
"tag": "NAME",
"value": "amp"
},
{
"context": "n() {\n\t\t\n\t\tString umbruchstext = \"Donaudampfs... | null | [] | package de.ods.ccd_gui;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.*;
import org.junit.Test;
import de.ods.ccd_gui.textumbruch.TextUmbruchService;
public class TextUmbruchServiceTest {
TextUmbruchService service = new TextUmbruchService();
@Test
public void test_ob_umgebrochen_wird() {
String umbruchstext = "Er fragte, wohin gehen wir.";
int maximalbreite = 9;
String ergebnis = service.umbrechen(umbruchstext, maximalbreite);
assertThat(ergebnis, is("Er\nfragte,\nwohin\ngehen\nwir."));
}
@Test
public void test_ob_zu_grosse_woerter_probleme_machen() {
String umbruchstext = "Donaudampfschiffartskapiaensmuetzenfarbe ist blau";
int maximalbreite = 9;
String ergebnis = service.umbrechen(umbruchstext, maximalbreite);
assertThat(ergebnis, is("Donaudampfschiffartskapiaensmuetzenfarbe\nist blau"));
}
@Test
public void test_ob_zu_grosse_woerter_am_textende_probleme_machen() {
String umbruchstext = "Donaudampfschiffartskapiaensmuetze";
int maximalbreite = 9;
String ergebnis = service.umbrechen(umbruchstext, maximalbreite);
assertThat(ergebnis, is("Donaudampfschiffartskapiaensmuetze"));
}
@Test
public void test_ob_abseatze_erhalten_bleiben() {
String umbruchstext = "yo lo\nyolo";
int maximalbreite = 9;
String ergebnis = service.umbrechen(umbruchstext, maximalbreite);
assertThat(ergebnis, is("yo lo\nyolo"));
}
@Test
public void test_ob_grenzfaelle_passen() {
String umbruchstext = "Er fragte,\nwohin";
int maximalbreite = 10;
String ergebnis = service.umbrechen(umbruchstext, maximalbreite);
assertThat(ergebnis, is("Er fragte,\nwohin"));
}
@Test
public void test_ob_grenzfaelle_in_der_naechsten_zeile_passen() {
String umbruchstext = "Er fragte,\nwohin gehen\n";
int maximalbreite = 11;
String ergebnis = service.umbrechen(umbruchstext, maximalbreite);
assertThat(ergebnis, is("Er fragte,\nwohin gehen\n"));
}
}
| 1,991 | 0.731291 | 0.727273 | 82 | 23.280487 | 26.173565 | 81 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1.926829 | false | false | 13 |
0c933b66bd2005be83c401249620fc463c6f3540 | 575,525,622,131 | d7594cbe0148f825abfef6ad85cd8e702354327c | /Tutorials/tutorials/src/tutorials/dataTypes.java | 1d43f58ff601523598cf873e88e66fa33be38d17 | [] | no_license | Haadi-Khan/Java | https://github.com/Haadi-Khan/Java | b17f09d273d0e04b12eee6aea9a2870a72e168c0 | 7ea15d9bfe45d7712c18a16868fb35621960b9e1 | refs/heads/master | 2020-06-19T09:31:50.386000 | 2019-08-11T20:55:57 | 2019-08-11T20:55:57 | 196,655,488 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package tutorials;
//basic data types
public class dataTypes {
public static void main(String [] args) {
String phrase = "To be or not to be"; //words or phrases
int age = 18; //whole numbers
double gpa = 3.8; // decimal numbers
char grade = 'A'; // single letter *** USE SINGLE QUOTES
boolean isMarkFunny = false; //true or false value
System.out.println(phrase);
System.out.println(age);
System.out.println(gpa);
System.out.println(grade);
System.out.println(gpa);
System.out.println(isMarkFunny);
}
} | UTF-8 | Java | 580 | java | dataTypes.java | Java | [] | null | [] | package tutorials;
//basic data types
public class dataTypes {
public static void main(String [] args) {
String phrase = "To be or not to be"; //words or phrases
int age = 18; //whole numbers
double gpa = 3.8; // decimal numbers
char grade = 'A'; // single letter *** USE SINGLE QUOTES
boolean isMarkFunny = false; //true or false value
System.out.println(phrase);
System.out.println(age);
System.out.println(gpa);
System.out.println(grade);
System.out.println(gpa);
System.out.println(isMarkFunny);
}
} | 580 | 0.632759 | 0.625862 | 21 | 26.666666 | 19.941183 | 62 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.571429 | false | false | 13 |
e07daeb4ee4ed5cdb70a647ddd176711cbb420ee | 25,967,372,296,618 | e6285379816f2bb03cdca1ef2c771c629c6b13de | /autoscaling/sdk/cli/src/main/java/org/project/openbaton/cli/NFVOCommandLineInterface.java | b54f0eabd3ffb96da959961b27045de113e3d72f | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | alincalinciuc/ms-vnfm | https://github.com/alincalinciuc/ms-vnfm | 25717df2d6aa1a7edff34150913e557a93c13e7a | 874392da52fc05aeed1f99828af6f7b1eb4adac5 | refs/heads/master | 2020-12-25T08:50:41.376000 | 2016-01-29T19:06:22 | 2016-01-29T19:06:22 | 50,653,563 | 0 | 0 | null | true | 2016-01-29T09:46:10 | 2016-01-29T09:46:09 | 2016-01-12T10:19:04 | 2016-01-29T02:46:07 | 64,279 | 0 | 0 | 0 | null | null | null | package org.project.openbaton.cli;
import com.google.gson.Gson;
import jline.console.ConsoleReader;
import jline.console.completer.ArgumentCompleter;
import jline.console.completer.Completer;
import jline.console.completer.FileNameCompleter;
import jline.console.completer.StringsCompleter;
import org.project.openbaton.cli.model.Command;
import org.project.openbaton.cli.util.PrintFormat;
import org.openbaton.sdk.NFVORequestor;
import org.openbaton.sdk.api.annotations.Help;
import org.openbaton.sdk.api.util.AbstractRestAgent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.*;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Type;
import java.util.*;
/**
* Created by lto on 14/07/15.
*
*/
public class NFVOCommandLineInterface {
private static Logger log = LoggerFactory.getLogger(NFVOCommandLineInterface.class);
private static final Character mask = '*';
private static String CONFIGURATION_FILE = "/etc/openbaton/cli.properties";
private static final String VERSION = "1";
private final static LinkedHashMap<String, Command> commandList = new LinkedHashMap<>();
private final static LinkedHashMap<String, String> helpCommandList = new LinkedHashMap<String, String>() {{
put("help", "Print the usage");
//put("exit", "Exit the application");
//put("print properties", "print all the properties");
}};
public static void usage() {
log.info("\n" +
" _______ _______________ ____________ _________ .____ .___ \n" +
" \\ \\ \\_ _____/\\ \\ / /\\_____ \\ \\_ ___ \\| | | |\n" +
" / | \\ | __) \\ Y / / | \\ ______ / \\ \\/| | | |\n" +
"/ | \\| \\ \\ / / | \\ /_____/ \\ \\___| |___| |\n" +
"\\____|__ /\\___ / \\___/ \\_______ / \\______ /_______ \\___|\n" +
" \\/ \\/ \\/ \\/ \\/ ");
log.info("Nfvo OpenBaton Command Line Interface");
System.out.println("/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/");
//System.out.println("Usage: java -jar build/libs/neutrino-<$version>.jar");
System.out.println("Available commands are");
String format = "%-80s%s%n";
for (Object entry : helpCommandList.entrySet()) {
System.out.printf(format, ((Map.Entry) entry).getKey().toString() + ":", ((Map.Entry) entry).getValue().toString());
}
System.out.println("/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/");
}
public static void helpUsage(String s) {
for (Object entry : helpCommandList.entrySet()) {
String format = "%-80s%s%n";
if (((Map.Entry) entry).getKey().toString().startsWith(s) || ((Map.Entry) entry).getKey().toString().startsWith(s + "-")) {
System.out.printf(format, ((Map.Entry) entry).getKey().toString() + ":", ((Map.Entry) entry).getValue().toString());
}
}
}
private static void helpCommand(String command) {
Command cmd = commandList.get(command);
System.out.println();
System.out.println("/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/");
System.out.print("Usage: " + command + " ");
for (Class c : cmd.getParams()) {
System.out.print("<" + c.getSimpleName() + ">");
}
System.out.println();
System.out.println();
String format = "%-80s%s%n";
System.out.println("Where:");
for (Class c : cmd.getParams())
System.out.printf(format, "<" + c.getSimpleName() + "> is a: ", c.getName());
System.out.println("/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/");
}
public static void main(String[] args) {
//log.info("Log class: { " + log.getClass().getName() + " }");
ConsoleReader reader = getConsoleReader();
Properties properties = new Properties();
CONFIGURATION_FILE = args[0];
File file = new File(CONFIGURATION_FILE);
String line;
PrintWriter out = new PrintWriter(reader.getOutput());
if (file.exists()) {
try {
log.trace("File exists");
properties.load(new FileInputStream(file));
log.trace("Properties are: " + properties);
} catch (IOException e) {
log.warn("Error reading /etc/openbaton/cli.properties, trying with Environment Variables");
readEnvVars(properties);
}
} else {
log.warn("File [" + CONFIGURATION_FILE + "] not found, looking for Environment Variables");
readEnvVars(properties);
}
getProperty(reader, properties, "nfvo-usr", "");
getProperty(reader, properties, "nfvo-pwd", "");
getProperty(reader, properties, "nfvo-ip", "127.0.0.1");
getProperty(reader, properties, "nfvo-port", "8080");
getProperty(reader, properties, "nfvo-version", VERSION);
NFVORequestor nfvo = new NFVORequestor(properties.getProperty("nfvo-usr"), properties.getProperty("nfvo-pwd"), properties.getProperty("nfvo-ip"), properties.getProperty("nfvo-port"), properties.getProperty("nfvo-version"));
fillCommands(nfvo);
List<Completer> completors = new LinkedList<Completer>();
completors.add(new StringsCompleter(helpCommandList.keySet()));
completors.add(new FileNameCompleter());
// completors.add(new NullCompleter());
reader.addCompleter(new ArgumentCompleter(completors));
reader.setPrompt("\u001B[135m" + properties.get("nfvo-usr") + "@[\u001B[32mopen-baton\u001B[0m]~> ");
try {
reader.setPrompt("\u001B[135m" + properties.get("nfvo-usr") + "@[\u001B[32mopen-baton\u001B[0m]~> ");
//input reader
String s = "";
int find = 0;
for (Object entry : helpCommandList.entrySet()) {
String format = "%-80s%s%n";
String search = args[1] + "-";
if (((Map.Entry) entry).getKey().toString().equals(args[1])) {
find++;
}
}
if (find > 0) { //correct comand
if (args.length > 3) //tree parameters
{
s = args[1] + " " + args[2] + " " + args[3];
/*if (!args[1].endsWith("Descriptor") || !args[1].endsWith("Dependency")) {
System.out.println("Error: too much arguments");
exit(0);
}*/
} else if (args.length > 2) //two parameters
{
if (args[2].equalsIgnoreCase("help")) {
helpUsage(args[1]);
exit(0);
}else if (args[1].endsWith("All")) {
System.out.println("Error: too much arguments");
exit(0);
}
s = args[1] + " " + args[2];
if (args[1].contains("update")) {
System.out.println("Error: no id or object passed");
exit(0);
}
if (args[1].contains("NetworkServiceDescriptor-delete") && !args[1].endsWith("NetworkServiceDescriptor-delete")) {
System.out.println("Error: no id of the Descriptor or the Object");
exit(0);
}
} else if (args.length > 1) {
s = args[1];
if (s.equalsIgnoreCase("help")) {
usage();
exit(0);
} else if (s.contains("delete") || s.endsWith("ById") || s.contains("get")) {
System.out.println("Error: no id passed");
exit(0);
} else if (s.contains("create")) {
System.out.println("Error: no object or id passed");
exit(0);
}else if (s.contains("update")) {
System.out.println("Error: no id and/or object passed");
exit(0);
}else if(s.contains("exit")) {
exit(0);
}
}
//execute comand
try {
String result = PrintFormat.printResult(args[1],executeCommand(s));
System.out.println(result);
exit(0);
} catch (Exception e)
{
e.printStackTrace();
log.error("Error while invoking command");
exit(0);
}
} else { //wrong comand
for (Object entry : helpCommandList.entrySet()) {
String format = "%-80s%s%n";
if (((Map.Entry) entry).getKey().toString().startsWith(args[1])) {
System.out.printf(format, ((Map.Entry) entry).getKey().toString() + ":", ((Map.Entry) entry).getValue().toString());
find++;
}
}
if (find == 0) {
System.out.println("Nfvo OpenBaton Command Line Interface");
System.out.println("/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/");
System.out.println(args[1] + ": comand not found");
exit(0);
}
}
} catch (Throwable t) {
t.printStackTrace();
}
}
private static void getProperty(ConsoleReader reader, Properties properties, String property, String defaultProperty) {
if (properties.get(property) == null) {
log.warn(property + " property was not found neither in the file [" + CONFIGURATION_FILE + "] nor in Environment Variables");
try {
String insertedProperty = reader.readLine(property + "[" + defaultProperty + "]: ");
if (insertedProperty == null || insertedProperty.equals("")) {
insertedProperty = defaultProperty;
}
properties.put(property, insertedProperty);
} catch (IOException e) {
log.error("Oops, Error while reading from input");
exit(990);
}
}
}
private static Object executeCommand(String line) throws InvocationTargetException, IllegalAccessException, FileNotFoundException {
StringBuffer sb = new StringBuffer();
StringTokenizer st = new StringTokenizer(line);
sb.append(st.nextToken());
log.trace(sb.toString());
String commandString = sb.toString();
Command command = commandList.get(commandString);
if (command == null) {
return "Command: " + commandString + " not found!";
}
log.trace("invoking method: " + command.getMethod().getName() + " with parameters: " + command.getParams());
List<Object> params = new LinkedList<>();
for (Type t : command.getParams()) {
log.trace("type is: " + t.getClass().getName());
if (t.equals(String.class)) { //for instance an id
params.add(st.nextToken());
} else {// for instance waiting for an obj so passing a file
String pathname = st.nextToken();
log.trace("the path is: " + pathname);
File f = new File(pathname);
Gson gson = new Gson();
FileInputStream fileInputStream = new FileInputStream(f);
String file = getString(fileInputStream);
log.trace(file);
log.trace("waiting for an object of type " + command.getClazz().getName());
Object casted = command.getClazz().cast(gson.fromJson(file, command.getClazz()));
log.trace("Parameter added is: " + casted);
params.add(casted);
}
}
String parameters = "";
for (Object type : params) {
parameters += type.getClass().getSimpleName() + " ";
}
log.trace("invoking method: " + command.getMethod().getName() + " with parameters: " + parameters);
return command.getMethod().invoke(command.getInstance(), params.toArray());
}
private static String getString(FileInputStream fileInputStream) {
StringBuilder builder = new StringBuilder();
int ch;
try {
while ((ch = fileInputStream.read()) != -1) {
builder.append((char) ch);
}
} catch (IOException e) {
e.printStackTrace();
exit(333);
}
return builder.toString();
}
private static void fillCommands(NFVORequestor nfvo) {
getMethods(nfvo.getNetworkServiceRecordAgent());
getMethods(nfvo.getConfigurationAgent());
getMethods(nfvo.getImageAgent());
getMethods(nfvo.getEventAgent());
getMethods(nfvo.getVNFFGAgent());
getMethods(nfvo.getVimInstanceAgent());
getMethods(nfvo.getNetworkServiceDescriptorAgent());
getMethods(nfvo.getVirtualLinkAgent());
}
private static void getMethods(AbstractRestAgent agent) {
String className = agent.getClass().getSimpleName();
log.trace(className);
Class clazz = null;
try {
clazz = (Class) agent.getClass().getSuperclass().getDeclaredMethod("getClazz").invoke(agent);
} catch (InvocationTargetException e) {
e.printStackTrace();
exit(123);
} catch (NoSuchMethodException e) {
e.printStackTrace();
exit(123);
} catch (IllegalAccessException e) {
e.printStackTrace();
exit(123);
}
String replacement = null;
if (className.endsWith("RestRequest")) {
replacement = className.substring(0, className.indexOf("RestRequest"));
} else if (className.endsWith("RestAgent")) {
replacement = className.substring(0, className.indexOf("RestAgent"));
} else if (className.endsWith("Agent")) {
replacement = className.substring(0, className.indexOf("Agent"));
} else
exit(700);
log.trace("Clazz: " + clazz);
log.trace("Replacement: " + replacement);
for (Method method : agent.getClass().getSuperclass().getDeclaredMethods()) {
if (method.isAnnotationPresent(Help.class)) {
log.trace("Method: " + method.getName());
helpCommandList.put(replacement + "-" + method.getName(), method.getAnnotation(Help.class).help().replace("{#}", replacement));
Command command = new Command(agent, method, method.getParameterTypes(), clazz);
commandList.put(replacement + "-" + method.getName(), command);
}
}
for (Method method : agent.getClass().getDeclaredMethods()) {
if (method.isAnnotationPresent(Help.class)) {
Command command = new Command(agent, method, method.getParameterTypes(), clazz);
commandList.put(replacement + "-" + method.getName(), command);
helpCommandList.put(replacement + "-" + method.getName(), method.getAnnotation(Help.class).help());
}
}
}
private static ConsoleReader getConsoleReader() {
ConsoleReader reader = null;
try {
reader = new ConsoleReader();
} catch (IOException e) {
log.error("Oops, Error while creating ConsoleReader");
exit(999);
}
return reader;
}
private static void readEnvVars(Properties properties) {
try {
properties.put("nfvo-usr", System.getenv().get("nfvo_usr"));
properties.put("nfvo-pwd", System.getenv().get("nfvo_pwd"));
properties.put("nfvo-ip", System.getenv().get("nfvo_ip"));
properties.put("nfvo-port", System.getenv().get("nfvo_port"));
properties.put("nfvo-version", System.getenv().get("nfvo_version"));
} catch (NullPointerException e) {
return;
}
}
/**
* * * EXIT STATUS CODE
*
* @param status: *) 1XX Variable errors
* * *) 100: variable not found
* <p/>
* *) 8XX: reflection Errors
* * *) 801 ConsoleReader not able to read
* *) 9XX: Libraries Errors
* * *) 990 ConsoleReader not able to read
* * *) 999: ConsoleReader not created
*/
private static void exit(int status) {
System.exit(status);
}
} | UTF-8 | Java | 17,083 | java | NFVOCommandLineInterface.java | Java | [
{
"context": "flect.Type;\nimport java.util.*;\n\n/**\n * Created by lto on 14/07/15.\n *\n */\npublic class NFVOCommandLineI",
"end": 765,
"score": 0.9996045827865601,
"start": 762,
"tag": "USERNAME",
"value": "lto"
},
{
"context": " getProperty(reader, properties, \"nfvo-ip\",... | null | [] | package org.project.openbaton.cli;
import com.google.gson.Gson;
import jline.console.ConsoleReader;
import jline.console.completer.ArgumentCompleter;
import jline.console.completer.Completer;
import jline.console.completer.FileNameCompleter;
import jline.console.completer.StringsCompleter;
import org.project.openbaton.cli.model.Command;
import org.project.openbaton.cli.util.PrintFormat;
import org.openbaton.sdk.NFVORequestor;
import org.openbaton.sdk.api.annotations.Help;
import org.openbaton.sdk.api.util.AbstractRestAgent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.*;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Type;
import java.util.*;
/**
* Created by lto on 14/07/15.
*
*/
public class NFVOCommandLineInterface {
private static Logger log = LoggerFactory.getLogger(NFVOCommandLineInterface.class);
private static final Character mask = '*';
private static String CONFIGURATION_FILE = "/etc/openbaton/cli.properties";
private static final String VERSION = "1";
private final static LinkedHashMap<String, Command> commandList = new LinkedHashMap<>();
private final static LinkedHashMap<String, String> helpCommandList = new LinkedHashMap<String, String>() {{
put("help", "Print the usage");
//put("exit", "Exit the application");
//put("print properties", "print all the properties");
}};
public static void usage() {
log.info("\n" +
" _______ _______________ ____________ _________ .____ .___ \n" +
" \\ \\ \\_ _____/\\ \\ / /\\_____ \\ \\_ ___ \\| | | |\n" +
" / | \\ | __) \\ Y / / | \\ ______ / \\ \\/| | | |\n" +
"/ | \\| \\ \\ / / | \\ /_____/ \\ \\___| |___| |\n" +
"\\____|__ /\\___ / \\___/ \\_______ / \\______ /_______ \\___|\n" +
" \\/ \\/ \\/ \\/ \\/ ");
log.info("Nfvo OpenBaton Command Line Interface");
System.out.println("/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/");
//System.out.println("Usage: java -jar build/libs/neutrino-<$version>.jar");
System.out.println("Available commands are");
String format = "%-80s%s%n";
for (Object entry : helpCommandList.entrySet()) {
System.out.printf(format, ((Map.Entry) entry).getKey().toString() + ":", ((Map.Entry) entry).getValue().toString());
}
System.out.println("/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/");
}
public static void helpUsage(String s) {
for (Object entry : helpCommandList.entrySet()) {
String format = "%-80s%s%n";
if (((Map.Entry) entry).getKey().toString().startsWith(s) || ((Map.Entry) entry).getKey().toString().startsWith(s + "-")) {
System.out.printf(format, ((Map.Entry) entry).getKey().toString() + ":", ((Map.Entry) entry).getValue().toString());
}
}
}
private static void helpCommand(String command) {
Command cmd = commandList.get(command);
System.out.println();
System.out.println("/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/");
System.out.print("Usage: " + command + " ");
for (Class c : cmd.getParams()) {
System.out.print("<" + c.getSimpleName() + ">");
}
System.out.println();
System.out.println();
String format = "%-80s%s%n";
System.out.println("Where:");
for (Class c : cmd.getParams())
System.out.printf(format, "<" + c.getSimpleName() + "> is a: ", c.getName());
System.out.println("/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/");
}
public static void main(String[] args) {
//log.info("Log class: { " + log.getClass().getName() + " }");
ConsoleReader reader = getConsoleReader();
Properties properties = new Properties();
CONFIGURATION_FILE = args[0];
File file = new File(CONFIGURATION_FILE);
String line;
PrintWriter out = new PrintWriter(reader.getOutput());
if (file.exists()) {
try {
log.trace("File exists");
properties.load(new FileInputStream(file));
log.trace("Properties are: " + properties);
} catch (IOException e) {
log.warn("Error reading /etc/openbaton/cli.properties, trying with Environment Variables");
readEnvVars(properties);
}
} else {
log.warn("File [" + CONFIGURATION_FILE + "] not found, looking for Environment Variables");
readEnvVars(properties);
}
getProperty(reader, properties, "nfvo-usr", "");
getProperty(reader, properties, "nfvo-pwd", "");
getProperty(reader, properties, "nfvo-ip", "127.0.0.1");
getProperty(reader, properties, "nfvo-port", "8080");
getProperty(reader, properties, "nfvo-version", VERSION);
NFVORequestor nfvo = new NFVORequestor(properties.getProperty("nfvo-usr"), properties.getProperty("nfvo-pwd"), properties.getProperty("nfvo-ip"), properties.getProperty("nfvo-port"), properties.getProperty("nfvo-version"));
fillCommands(nfvo);
List<Completer> completors = new LinkedList<Completer>();
completors.add(new StringsCompleter(helpCommandList.keySet()));
completors.add(new FileNameCompleter());
// completors.add(new NullCompleter());
reader.addCompleter(new ArgumentCompleter(completors));
reader.setPrompt("\u001B[135m" + properties.get("nfvo-usr") + "@[\u001B[32mopen-baton\u001B[0m]~> ");
try {
reader.setPrompt("\u001B[135m" + properties.get("nfvo-usr") + "@[\u001B[32mopen-baton\u001B[0m]~> ");
//input reader
String s = "";
int find = 0;
for (Object entry : helpCommandList.entrySet()) {
String format = "%-80s%s%n";
String search = args[1] + "-";
if (((Map.Entry) entry).getKey().toString().equals(args[1])) {
find++;
}
}
if (find > 0) { //correct comand
if (args.length > 3) //tree parameters
{
s = args[1] + " " + args[2] + " " + args[3];
/*if (!args[1].endsWith("Descriptor") || !args[1].endsWith("Dependency")) {
System.out.println("Error: too much arguments");
exit(0);
}*/
} else if (args.length > 2) //two parameters
{
if (args[2].equalsIgnoreCase("help")) {
helpUsage(args[1]);
exit(0);
}else if (args[1].endsWith("All")) {
System.out.println("Error: too much arguments");
exit(0);
}
s = args[1] + " " + args[2];
if (args[1].contains("update")) {
System.out.println("Error: no id or object passed");
exit(0);
}
if (args[1].contains("NetworkServiceDescriptor-delete") && !args[1].endsWith("NetworkServiceDescriptor-delete")) {
System.out.println("Error: no id of the Descriptor or the Object");
exit(0);
}
} else if (args.length > 1) {
s = args[1];
if (s.equalsIgnoreCase("help")) {
usage();
exit(0);
} else if (s.contains("delete") || s.endsWith("ById") || s.contains("get")) {
System.out.println("Error: no id passed");
exit(0);
} else if (s.contains("create")) {
System.out.println("Error: no object or id passed");
exit(0);
}else if (s.contains("update")) {
System.out.println("Error: no id and/or object passed");
exit(0);
}else if(s.contains("exit")) {
exit(0);
}
}
//execute comand
try {
String result = PrintFormat.printResult(args[1],executeCommand(s));
System.out.println(result);
exit(0);
} catch (Exception e)
{
e.printStackTrace();
log.error("Error while invoking command");
exit(0);
}
} else { //wrong comand
for (Object entry : helpCommandList.entrySet()) {
String format = "%-80s%s%n";
if (((Map.Entry) entry).getKey().toString().startsWith(args[1])) {
System.out.printf(format, ((Map.Entry) entry).getKey().toString() + ":", ((Map.Entry) entry).getValue().toString());
find++;
}
}
if (find == 0) {
System.out.println("Nfvo OpenBaton Command Line Interface");
System.out.println("/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/");
System.out.println(args[1] + ": comand not found");
exit(0);
}
}
} catch (Throwable t) {
t.printStackTrace();
}
}
private static void getProperty(ConsoleReader reader, Properties properties, String property, String defaultProperty) {
if (properties.get(property) == null) {
log.warn(property + " property was not found neither in the file [" + CONFIGURATION_FILE + "] nor in Environment Variables");
try {
String insertedProperty = reader.readLine(property + "[" + defaultProperty + "]: ");
if (insertedProperty == null || insertedProperty.equals("")) {
insertedProperty = defaultProperty;
}
properties.put(property, insertedProperty);
} catch (IOException e) {
log.error("Oops, Error while reading from input");
exit(990);
}
}
}
private static Object executeCommand(String line) throws InvocationTargetException, IllegalAccessException, FileNotFoundException {
StringBuffer sb = new StringBuffer();
StringTokenizer st = new StringTokenizer(line);
sb.append(st.nextToken());
log.trace(sb.toString());
String commandString = sb.toString();
Command command = commandList.get(commandString);
if (command == null) {
return "Command: " + commandString + " not found!";
}
log.trace("invoking method: " + command.getMethod().getName() + " with parameters: " + command.getParams());
List<Object> params = new LinkedList<>();
for (Type t : command.getParams()) {
log.trace("type is: " + t.getClass().getName());
if (t.equals(String.class)) { //for instance an id
params.add(st.nextToken());
} else {// for instance waiting for an obj so passing a file
String pathname = st.nextToken();
log.trace("the path is: " + pathname);
File f = new File(pathname);
Gson gson = new Gson();
FileInputStream fileInputStream = new FileInputStream(f);
String file = getString(fileInputStream);
log.trace(file);
log.trace("waiting for an object of type " + command.getClazz().getName());
Object casted = command.getClazz().cast(gson.fromJson(file, command.getClazz()));
log.trace("Parameter added is: " + casted);
params.add(casted);
}
}
String parameters = "";
for (Object type : params) {
parameters += type.getClass().getSimpleName() + " ";
}
log.trace("invoking method: " + command.getMethod().getName() + " with parameters: " + parameters);
return command.getMethod().invoke(command.getInstance(), params.toArray());
}
private static String getString(FileInputStream fileInputStream) {
StringBuilder builder = new StringBuilder();
int ch;
try {
while ((ch = fileInputStream.read()) != -1) {
builder.append((char) ch);
}
} catch (IOException e) {
e.printStackTrace();
exit(333);
}
return builder.toString();
}
private static void fillCommands(NFVORequestor nfvo) {
getMethods(nfvo.getNetworkServiceRecordAgent());
getMethods(nfvo.getConfigurationAgent());
getMethods(nfvo.getImageAgent());
getMethods(nfvo.getEventAgent());
getMethods(nfvo.getVNFFGAgent());
getMethods(nfvo.getVimInstanceAgent());
getMethods(nfvo.getNetworkServiceDescriptorAgent());
getMethods(nfvo.getVirtualLinkAgent());
}
private static void getMethods(AbstractRestAgent agent) {
String className = agent.getClass().getSimpleName();
log.trace(className);
Class clazz = null;
try {
clazz = (Class) agent.getClass().getSuperclass().getDeclaredMethod("getClazz").invoke(agent);
} catch (InvocationTargetException e) {
e.printStackTrace();
exit(123);
} catch (NoSuchMethodException e) {
e.printStackTrace();
exit(123);
} catch (IllegalAccessException e) {
e.printStackTrace();
exit(123);
}
String replacement = null;
if (className.endsWith("RestRequest")) {
replacement = className.substring(0, className.indexOf("RestRequest"));
} else if (className.endsWith("RestAgent")) {
replacement = className.substring(0, className.indexOf("RestAgent"));
} else if (className.endsWith("Agent")) {
replacement = className.substring(0, className.indexOf("Agent"));
} else
exit(700);
log.trace("Clazz: " + clazz);
log.trace("Replacement: " + replacement);
for (Method method : agent.getClass().getSuperclass().getDeclaredMethods()) {
if (method.isAnnotationPresent(Help.class)) {
log.trace("Method: " + method.getName());
helpCommandList.put(replacement + "-" + method.getName(), method.getAnnotation(Help.class).help().replace("{#}", replacement));
Command command = new Command(agent, method, method.getParameterTypes(), clazz);
commandList.put(replacement + "-" + method.getName(), command);
}
}
for (Method method : agent.getClass().getDeclaredMethods()) {
if (method.isAnnotationPresent(Help.class)) {
Command command = new Command(agent, method, method.getParameterTypes(), clazz);
commandList.put(replacement + "-" + method.getName(), command);
helpCommandList.put(replacement + "-" + method.getName(), method.getAnnotation(Help.class).help());
}
}
}
private static ConsoleReader getConsoleReader() {
ConsoleReader reader = null;
try {
reader = new ConsoleReader();
} catch (IOException e) {
log.error("Oops, Error while creating ConsoleReader");
exit(999);
}
return reader;
}
private static void readEnvVars(Properties properties) {
try {
properties.put("nfvo-usr", System.getenv().get("nfvo_usr"));
properties.put("nfvo-pwd", System.getenv().get("nfvo_pwd"));
properties.put("nfvo-ip", System.getenv().get("nfvo_ip"));
properties.put("nfvo-port", System.getenv().get("nfvo_port"));
properties.put("nfvo-version", System.getenv().get("nfvo_version"));
} catch (NullPointerException e) {
return;
}
}
/**
* * * EXIT STATUS CODE
*
* @param status: *) 1XX Variable errors
* * *) 100: variable not found
* <p/>
* *) 8XX: reflection Errors
* * *) 801 ConsoleReader not able to read
* *) 9XX: Libraries Errors
* * *) 990 ConsoleReader not able to read
* * *) 999: ConsoleReader not created
*/
private static void exit(int status) {
System.exit(status);
}
} | 17,083 | 0.516713 | 0.508634 | 401 | 41.603493 | 33.212757 | 231 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.735661 | false | false | 13 |
7796cbd7548498a022feee8838c3c9eecc2d544d | 35,424,890,259,932 | bb9221017d67df2322863e341503df974a69a824 | /system-service/src/main/java/com/ifox/platform/adminuser/response/RoleVO.java | 1c66e9d0bcb35668498aad72343698fd7f8c9b48 | [] | no_license | summerz1993/ifox-platform | https://github.com/summerz1993/ifox-platform | 7430f89e02b525a587ea46fbec3e72e63874cb87 | bb021b6e3d085833c3187165e986dd92e488bc9e | refs/heads/master | 2021-01-01T06:12:18.926000 | 2017-09-27T06:32:45 | 2017-09-27T06:32:45 | 97,377,929 | 14 | 3 | null | false | 2017-09-19T14:45:26 | 2017-07-16T11:08:35 | 2017-08-28T14:47:39 | 2017-09-19T14:45:25 | 19,278 | 5 | 1 | 15 | JavaScript | null | null | package com.ifox.platform.adminuser.response;
import com.ifox.platform.adminuser.dto.RoleDTO;
import java.util.ArrayList;
import java.util.List;
public class RoleVO extends RoleDTO {
}
| UTF-8 | Java | 189 | java | RoleVO.java | Java | [] | null | [] | package com.ifox.platform.adminuser.response;
import com.ifox.platform.adminuser.dto.RoleDTO;
import java.util.ArrayList;
import java.util.List;
public class RoleVO extends RoleDTO {
}
| 189 | 0.798942 | 0.798942 | 10 | 17.9 | 19.007629 | 47 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.4 | false | false | 13 |
3beb3ac60cbad73973cdf8a5968c62831d59ca1a | 32,598,801,803,700 | 34bd1acb34f4a1efe9f676c5a19d5c12940bf83f | /Galaxy Defense/src/com/fffan911/galaxy_defense/Model/Composites/Upgrades/ReinforcedArmorUpgrade.java | 42a8f4ea6c917e16b670e8ac706cababe5a71534 | [] | no_license | lgoodridge/Galaxy_Defense | https://github.com/lgoodridge/Galaxy_Defense | 937ba6d99054a6d20613a447be170fc0039c2164 | a79d994d22a656db85e5f5bbfd865c538dce2948 | refs/heads/master | 2021-01-10T20:28:30.225000 | 2014-10-24T20:27:37 | 2014-10-24T20:27:37 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package com.fffan911.galaxy_defense.Model.Composites.Upgrades;
import com.fffan911.galaxy_defense.Model.Composites.Composite;
public class ReinforcedArmorUpgrade extends CompositeUpgrade {
//Constants
private static final String TAG = "ReinforcedArmorUpgrade";
//Constructor
public ReinforcedArmorUpgrade(Composite innerComposite) {
super(innerComposite);
}
public ReinforcedArmorUpgrade() {
super();
}
//Upgrade Methods
@Override
public float getMaxArmorMultiplier() {
return super.getMaxArmorMultiplier() * 1.2f;
}
@Override
public float getMaxSpeedAddition() {
return super.getMaxSpeedAddition() - 20;
}
@Override
public String getUpgradeName() {
return "Reinforced Armor";
}
@Override
public String getUpgradeFlowChartName() {
return "Reinforced";
}
@Override
public String getUpgradeSummary() {
return "Reinforce the armor with additional layers. Increases " +
"defense provided by the armor, at the cost of a small speed reduction.";
}
@Override
public String getUpgradeEffectsDescription() {
return "Armor Multiplier: x1.2\nShip Speed: -20";
}
}
| UTF-8 | Java | 1,146 | java | ReinforcedArmorUpgrade.java | Java | [] | null | [] | package com.fffan911.galaxy_defense.Model.Composites.Upgrades;
import com.fffan911.galaxy_defense.Model.Composites.Composite;
public class ReinforcedArmorUpgrade extends CompositeUpgrade {
//Constants
private static final String TAG = "ReinforcedArmorUpgrade";
//Constructor
public ReinforcedArmorUpgrade(Composite innerComposite) {
super(innerComposite);
}
public ReinforcedArmorUpgrade() {
super();
}
//Upgrade Methods
@Override
public float getMaxArmorMultiplier() {
return super.getMaxArmorMultiplier() * 1.2f;
}
@Override
public float getMaxSpeedAddition() {
return super.getMaxSpeedAddition() - 20;
}
@Override
public String getUpgradeName() {
return "Reinforced Armor";
}
@Override
public String getUpgradeFlowChartName() {
return "Reinforced";
}
@Override
public String getUpgradeSummary() {
return "Reinforce the armor with additional layers. Increases " +
"defense provided by the armor, at the cost of a small speed reduction.";
}
@Override
public String getUpgradeEffectsDescription() {
return "Armor Multiplier: x1.2\nShip Speed: -20";
}
}
| 1,146 | 0.731239 | 0.719023 | 43 | 24.651163 | 22.929501 | 75 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1.348837 | false | false | 13 |
b72aa5a515ad7e89e6c7fe17e1726773d9d4a3f6 | 17,763,984,769,623 | 23ee6977fa5e4f88449e63cb0a402236f95c800b | /src/Overload/SinhVien.java | b993e74bf7212f0d035c1151fc3367b1f1fe0917 | [] | no_license | thangnt2409/Java | https://github.com/thangnt2409/Java | 9c0ad5af3a6a831f24370c6b4983f971097eb448 | d3572cede9b82d42be0b2c00a097af85791f1331 | refs/heads/master | 2021-01-17T08:55:16.728000 | 2017-04-11T06:36:35 | 2017-04-11T06:36:35 | 68,698,633 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package Overload;
public class SinhVien {
String HoTen;
String MSSV;
String NgaySinh;
public String getHoTen() {
return HoTen;
}
public void setHoTen(String hoTen) {
HoTen = hoTen;
}
public String getMSSV() {
return MSSV;
}
public void setMSSV(String mSSV) {
MSSV = mSSV;
}
public String getNgaySinh() {
return NgaySinh;
}
public void setNgaySinh(String ngaySinh) {
NgaySinh = ngaySinh;
}
public SinhVien(String HoTen, String MSSV,String NgaySinh)
{
this.HoTen=HoTen;
this.MSSV=MSSV;
this.NgaySinh=NgaySinh;
}
public SinhVien(SinhVien sv)
{
this.HoTen=sv.HoTen;
this.MSSV=sv.MSSV;
this.NgaySinh=sv.NgaySinh;
}
}
| UTF-8 | Java | 659 | java | SinhVien.java | Java | [] | null | [] | package Overload;
public class SinhVien {
String HoTen;
String MSSV;
String NgaySinh;
public String getHoTen() {
return HoTen;
}
public void setHoTen(String hoTen) {
HoTen = hoTen;
}
public String getMSSV() {
return MSSV;
}
public void setMSSV(String mSSV) {
MSSV = mSSV;
}
public String getNgaySinh() {
return NgaySinh;
}
public void setNgaySinh(String ngaySinh) {
NgaySinh = ngaySinh;
}
public SinhVien(String HoTen, String MSSV,String NgaySinh)
{
this.HoTen=HoTen;
this.MSSV=MSSV;
this.NgaySinh=NgaySinh;
}
public SinhVien(SinhVien sv)
{
this.HoTen=sv.HoTen;
this.MSSV=sv.MSSV;
this.NgaySinh=sv.NgaySinh;
}
}
| 659 | 0.701062 | 0.701062 | 38 | 16.342106 | 13.629064 | 59 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1.657895 | false | false | 13 |
4969bf9e864f78ff121a0bd0f613f0a5e357f156 | 29,257,317,269,233 | e61cfc4008b12a581f8477aebfe2170863c994c0 | /src/main/java/net/tmclean/pettracker/db/service/impl/PetServiceImpl.java | 2393e0ec9884c4d1afbe3f2299769cc2c0ce277c | [] | no_license | adysec/1daybuild-2020-07-10-micronaut-sandbox | https://github.com/adysec/1daybuild-2020-07-10-micronaut-sandbox | 61f29d3f7e6a77078d8a8978ea6388b5551de4de | 3f778a4301ed21418e9f2d08b9699b153ddb3535 | refs/heads/master | 2023-05-08T12:42:06.875000 | 2020-08-22T19:27:32 | 2020-08-22T19:27:32 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package net.tmclean.pettracker.db.service.impl;
import java.util.List;
import javax.inject.Singleton;
import javax.persistence.EntityManager;
import javax.persistence.TypedQuery;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.transaction.Transactional;
import io.micronaut.transaction.annotation.ReadOnly;
import net.tmclean.pettracker.db.model.pet.Pet;
import net.tmclean.pettracker.db.service.PetService;
@Singleton
public class PetServiceImpl implements PetService {
private final EntityManager entityManager;
public PetServiceImpl( final EntityManager entityManager ) {
this.entityManager = entityManager;
}
@Override
@ReadOnly
public List<Pet> getPets() {
CriteriaBuilder cb = this.entityManager.getCriteriaBuilder();
CriteriaQuery<Pet> cq = cb.createQuery( Pet.class );
TypedQuery<Pet> allQuery =
this.entityManager.createQuery(
cq.select(
cq.from( Pet.class )
)
);
return allQuery.getResultList();
}
@Override
@ReadOnly
public Pet getPet( String petId ) {
return entityManager.find( Pet.class, petId );
}
@Override
@Transactional
public Pet addPet( Pet pet ) {
entityManager.persist( pet );
return pet;
}
@Override
@Transactional
public Pet deletePet( String petId ) {
Pet petToRemove = getPet( petId );
entityManager.remove( petToRemove );
return petToRemove;
}
}
| UTF-8 | Java | 1,422 | java | PetServiceImpl.java | Java | [] | null | [] | package net.tmclean.pettracker.db.service.impl;
import java.util.List;
import javax.inject.Singleton;
import javax.persistence.EntityManager;
import javax.persistence.TypedQuery;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.transaction.Transactional;
import io.micronaut.transaction.annotation.ReadOnly;
import net.tmclean.pettracker.db.model.pet.Pet;
import net.tmclean.pettracker.db.service.PetService;
@Singleton
public class PetServiceImpl implements PetService {
private final EntityManager entityManager;
public PetServiceImpl( final EntityManager entityManager ) {
this.entityManager = entityManager;
}
@Override
@ReadOnly
public List<Pet> getPets() {
CriteriaBuilder cb = this.entityManager.getCriteriaBuilder();
CriteriaQuery<Pet> cq = cb.createQuery( Pet.class );
TypedQuery<Pet> allQuery =
this.entityManager.createQuery(
cq.select(
cq.from( Pet.class )
)
);
return allQuery.getResultList();
}
@Override
@ReadOnly
public Pet getPet( String petId ) {
return entityManager.find( Pet.class, petId );
}
@Override
@Transactional
public Pet addPet( Pet pet ) {
entityManager.persist( pet );
return pet;
}
@Override
@Transactional
public Pet deletePet( String petId ) {
Pet petToRemove = getPet( petId );
entityManager.remove( petToRemove );
return petToRemove;
}
}
| 1,422 | 0.756681 | 0.756681 | 62 | 21.935484 | 19.483551 | 63 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1.467742 | false | false | 13 |
f2436155838b1f47b4ce7d144bfeea359660cf2e | 31,490,700,249,767 | c924a532175521a24775a5dbfbe1f43c22cb2234 | /app_architecture/app/src/main/java/mack/com/c_framework/network/protocol/http/networkengine/NetworkResponse.java | 6f75fde3a52346d1244ae861c0f7514cbca647d0 | [] | no_license | mackzheng/app_framework | https://github.com/mackzheng/app_framework | bbdcac25fd9ece4910d87fa30641b7a17b76ba30 | 8e60f05dcd79a34d9c6d072a0886b3e8aa593429 | refs/heads/master | 2020-05-23T02:44:57.524000 | 2018-11-17T09:44:16 | 2018-11-17T09:44:16 | 57,953,429 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package mack.com.c_framework.network.protocol.http.networkengine;
import java.util.Dictionary;
public class NetworkResponse
{
//public Response mResponse = null;
public NetworkRequest mRequest = null;
public int mStatusCode = 0;
public Dictionary<String,String> mHeaderFieldDictionary = null;
public NetworkResponse(int code, Dictionary<String, String> headers)
{
super();
mHeaderFieldDictionary = headers;
mStatusCode = code;
}
public NetworkResponse()
{
super();
}
public Dictionary<String,String> allHeaderFields()
{
return mHeaderFieldDictionary;
}
public int statusCode()
{
return mStatusCode;
}
static public String localizedStringForStatusCode(int statusCode)
{
return null;
}
}
| UTF-8 | Java | 731 | java | NetworkResponse.java | Java | [] | null | [] | package mack.com.c_framework.network.protocol.http.networkengine;
import java.util.Dictionary;
public class NetworkResponse
{
//public Response mResponse = null;
public NetworkRequest mRequest = null;
public int mStatusCode = 0;
public Dictionary<String,String> mHeaderFieldDictionary = null;
public NetworkResponse(int code, Dictionary<String, String> headers)
{
super();
mHeaderFieldDictionary = headers;
mStatusCode = code;
}
public NetworkResponse()
{
super();
}
public Dictionary<String,String> allHeaderFields()
{
return mHeaderFieldDictionary;
}
public int statusCode()
{
return mStatusCode;
}
static public String localizedStringForStatusCode(int statusCode)
{
return null;
}
}
| 731 | 0.749658 | 0.74829 | 38 | 18.236841 | 21.364548 | 69 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1.447368 | false | false | 13 |
3ab48d46b5d393fdccd8239621a9c22ec37d8af5 | 2,001,454,811,115 | b880cb3b878da45019fa2aea9daf9434264858a2 | /rmt2/src/java/com/quote/QuoteFactory.java | 417333e311cffd14b60ee9e74f76de387cad76c4 | [] | no_license | rmt2bsc/projects | https://github.com/rmt2bsc/projects | 7b4217ae7240573f4879eab422ba801fd4a1659b | 639518bacda8f176d0fe5263ac81fbc0b7fc338e | refs/heads/master | 2020-06-17T11:54:17.398000 | 2020-04-26T08:56:12 | 2020-04-26T08:56:12 | 195,858,707 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package com.quote;
import org.apache.log4j.Logger;
import org.apache.log4j.Level;
import com.bean.db.DatabaseConnectionBean;
import com.controller.Request;
import com.entity.Quote;
import com.api.db.DatabaseException;
import com.api.db.orm.DataSourceAdapter;
import com.util.SystemException;
/**
* Contains factory methods for creating quote related entities.
*
* @author appdev
*
*/
public class QuoteFactory extends DataSourceAdapter {
private static Logger logger = Logger.getLogger(QuoteFactory.class);
/**
* Creates an instance of the QuoteApi which is capable of interacting with the database.
*
* @param conBean
* {@link com.bean.db.DatabaseConnectionBean DatabaseConnectionBean}
* @return {@link QuoteApi}
*
*/
public static QuoteApi createApi(DatabaseConnectionBean conBean) {
QuoteApi api = null;
String message = null;
try {
api = new QuoteImpl(conBean);
return api;
}
catch (DatabaseException e) {
message = "Unable to create QuoteApi(DatabaseConnectionBean) due to a database error. Message: " + e.getMessage();
logger.log(Level.ERROR, message);
return null;
}
catch (SystemException e) {
message = "Unable to create QuoteApi(DatabaseConnectionBean) due to a system error. Message: " + e.getMessage();
logger.log(Level.ERROR, message);
return null;
}
}
/**
* Creates an instance of the QuoteApi which is capable of interacting with the database
* and the user's request.
*
* @param conBean
* {@link com.bean.db.DatabaseConnectionBean DatabaseConnectionBean}
* @param request
* {@link com.controller.Request Request}
* @return {@link QuoteApi}
*/
public static QuoteApi createApi(DatabaseConnectionBean conBean, Request request) {
QuoteApi api = null;
String message = null;
try {
api = new QuoteImpl(conBean, request);
return api;
}
catch (DatabaseException e) {
message = "Unable to create QuoteApi(DatabaseConnectionBean, Request) due to a database error. Message: " + e.getMessage();
logger.log(Level.ERROR, message);
return null;
}
catch (SystemException e) {
message = "Unable to create QuoteApi(DatabaseConnectionBean, Request) due to a system error. Message: " + e.getMessage();
logger.log(Level.ERROR, message);
return null;
}
}
/**
* Creates a Quote instance
*
* @return {@link com.entity.Quote Quote}
*/
public static Quote createQuote() {
try {
Quote obj = new Quote();
return obj;
}
catch (Exception e) {
return null;
}
}
/**
* Creates a Quote instance from a Request object.
*
* @param request
* {@link com.controller.Request Request}
* @return {@link com.entity.Quote Quote}
*/
public static Quote createQuote(Request request) {
Quote obj = QuoteFactory.createQuote();
try {
QuoteFactory.packageBean(request, obj);
return obj;
}
catch (SystemException e) {
e.printStackTrace();
return null;
}
}
}
| UTF-8 | Java | 3,122 | java | QuoteFactory.java | Java | [
{
"context": "or creating quote related entities.\n * \n * @author appdev\n *\n */\npublic class QuoteFactory extends DataSour",
"end": 390,
"score": 0.9995479583740234,
"start": 384,
"tag": "USERNAME",
"value": "appdev"
}
] | null | [] | package com.quote;
import org.apache.log4j.Logger;
import org.apache.log4j.Level;
import com.bean.db.DatabaseConnectionBean;
import com.controller.Request;
import com.entity.Quote;
import com.api.db.DatabaseException;
import com.api.db.orm.DataSourceAdapter;
import com.util.SystemException;
/**
* Contains factory methods for creating quote related entities.
*
* @author appdev
*
*/
public class QuoteFactory extends DataSourceAdapter {
private static Logger logger = Logger.getLogger(QuoteFactory.class);
/**
* Creates an instance of the QuoteApi which is capable of interacting with the database.
*
* @param conBean
* {@link com.bean.db.DatabaseConnectionBean DatabaseConnectionBean}
* @return {@link QuoteApi}
*
*/
public static QuoteApi createApi(DatabaseConnectionBean conBean) {
QuoteApi api = null;
String message = null;
try {
api = new QuoteImpl(conBean);
return api;
}
catch (DatabaseException e) {
message = "Unable to create QuoteApi(DatabaseConnectionBean) due to a database error. Message: " + e.getMessage();
logger.log(Level.ERROR, message);
return null;
}
catch (SystemException e) {
message = "Unable to create QuoteApi(DatabaseConnectionBean) due to a system error. Message: " + e.getMessage();
logger.log(Level.ERROR, message);
return null;
}
}
/**
* Creates an instance of the QuoteApi which is capable of interacting with the database
* and the user's request.
*
* @param conBean
* {@link com.bean.db.DatabaseConnectionBean DatabaseConnectionBean}
* @param request
* {@link com.controller.Request Request}
* @return {@link QuoteApi}
*/
public static QuoteApi createApi(DatabaseConnectionBean conBean, Request request) {
QuoteApi api = null;
String message = null;
try {
api = new QuoteImpl(conBean, request);
return api;
}
catch (DatabaseException e) {
message = "Unable to create QuoteApi(DatabaseConnectionBean, Request) due to a database error. Message: " + e.getMessage();
logger.log(Level.ERROR, message);
return null;
}
catch (SystemException e) {
message = "Unable to create QuoteApi(DatabaseConnectionBean, Request) due to a system error. Message: " + e.getMessage();
logger.log(Level.ERROR, message);
return null;
}
}
/**
* Creates a Quote instance
*
* @return {@link com.entity.Quote Quote}
*/
public static Quote createQuote() {
try {
Quote obj = new Quote();
return obj;
}
catch (Exception e) {
return null;
}
}
/**
* Creates a Quote instance from a Request object.
*
* @param request
* {@link com.controller.Request Request}
* @return {@link com.entity.Quote Quote}
*/
public static Quote createQuote(Request request) {
Quote obj = QuoteFactory.createQuote();
try {
QuoteFactory.packageBean(request, obj);
return obj;
}
catch (SystemException e) {
e.printStackTrace();
return null;
}
}
}
| 3,122 | 0.659833 | 0.659193 | 118 | 25.457626 | 28.575397 | 129 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.805085 | false | false | 13 |
5935826e8cbc332f560662564621760e1d792f64 | 19,791,209,340,758 | 6b9ed6079161596039354a92f2d623edd74ab19d | /yestonConsole-dao/src/main/java/com/mrbt/yeston/web/mapper/YtCooperativeContactMapper.java | cd6c44916d86529f44944cb1612ce51a03f40d14 | [] | no_license | daiedaie/yestonConsole | https://github.com/daiedaie/yestonConsole | 985eafc00618e314ef4e6e7a19fb7369c404a335 | 1ab3782431f3d9de383b39ca9a55b75feeee338a | refs/heads/master | 2020-05-01T09:52:41.348000 | 2018-06-15T02:50:18 | 2018-06-15T02:50:18 | 177,409,836 | 3 | 0 | null | true | 2019-03-24T12:10:58 | 2019-03-24T12:10:58 | 2018-06-21T02:56:52 | 2018-06-15T02:50:21 | 2,896 | 0 | 0 | 0 | null | false | null | package com.mrbt.yeston.web.mapper;
import com.mrbt.yeston.web.model.YtCooperativeContact;
import com.mrbt.yeston.web.model.YtCooperativeContactExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface YtCooperativeContactMapper {
int countByExample(YtCooperativeContactExample example);
int deleteByExample(YtCooperativeContactExample example);
int deleteByPrimaryKey(Integer id);
int insert(YtCooperativeContact record);
int insertSelective(YtCooperativeContact record);
List<YtCooperativeContact> selectByExample(YtCooperativeContactExample example);
YtCooperativeContact selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") YtCooperativeContact record, @Param("example") YtCooperativeContactExample example);
int updateByExample(@Param("record") YtCooperativeContact record, @Param("example") YtCooperativeContactExample example);
int updateByPrimaryKeySelective(YtCooperativeContact record);
int updateByPrimaryKey(YtCooperativeContact record);
} | UTF-8 | Java | 1,067 | java | YtCooperativeContactMapper.java | Java | [] | null | [] | package com.mrbt.yeston.web.mapper;
import com.mrbt.yeston.web.model.YtCooperativeContact;
import com.mrbt.yeston.web.model.YtCooperativeContactExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface YtCooperativeContactMapper {
int countByExample(YtCooperativeContactExample example);
int deleteByExample(YtCooperativeContactExample example);
int deleteByPrimaryKey(Integer id);
int insert(YtCooperativeContact record);
int insertSelective(YtCooperativeContact record);
List<YtCooperativeContact> selectByExample(YtCooperativeContactExample example);
YtCooperativeContact selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") YtCooperativeContact record, @Param("example") YtCooperativeContactExample example);
int updateByExample(@Param("record") YtCooperativeContact record, @Param("example") YtCooperativeContactExample example);
int updateByPrimaryKeySelective(YtCooperativeContact record);
int updateByPrimaryKey(YtCooperativeContact record);
} | 1,067 | 0.817245 | 0.817245 | 30 | 34.599998 | 36.980717 | 134 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.6 | false | false | 13 |
c1f322b2d4f6f1a32afad0bacf7fd67fb80ca040 | 35,064,113,018,707 | 6579442e2f324c3505928270b6eabd6ce00dc1a0 | /app/src/main/java/com/shn/jetpacktest/widget/tab/TabView.java | 376bb1cd8bed85e063d42a8497551ed68304ec8c | [] | no_license | bugbug2022/JetpackTest | https://github.com/bugbug2022/JetpackTest | f14d21cb9909e16dcdc9ffeb643cb39f1de35aa6 | 7ba871ee776504dbe2bdd9680d4a668d03645bad | refs/heads/master | 2023-07-12T05:36:05.973000 | 2021-08-05T01:38:47 | 2021-08-05T01:38:47 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package com.shn.jetpacktest.widget.tab;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.FrameLayout;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
public class TabView extends FrameLayout {
public TabView(@NonNull Context context) {
super(context);
}
public TabView(@NonNull Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
}
public TabView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
public TabView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
}
public static interface ITabProvider {
TabView getTabView();
}
}
| UTF-8 | Java | 818 | java | TabView.java | Java | [] | null | [] | package com.shn.jetpacktest.widget.tab;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.FrameLayout;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
public class TabView extends FrameLayout {
public TabView(@NonNull Context context) {
super(context);
}
public TabView(@NonNull Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
}
public TabView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
public TabView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
}
public static interface ITabProvider {
TabView getTabView();
}
}
| 818 | 0.759169 | 0.759169 | 30 | 26.266666 | 28.158993 | 109 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.766667 | false | false | 13 |
3936801b8830e480834d791d9b1f604572fbc511 | 18,227,841,212,378 | 9ea0126f22af93934be7a47b343f48cbb80d60c5 | /app/src/main/java/com/sumavision/talktv2/ui/adapter/SearchListInfoLivePlayAdapter.java | d5b81519ec0d5491e5d32a226c5c9ecfff90707f | [] | no_license | PioneerLab/talkTV4.0 | https://github.com/PioneerLab/talkTV4.0 | 88e19ded64176116b89320a6469b733cc2e35968 | ab77ca3c4ed3b53268f85e8c6dad0ead46af0cbc | refs/heads/master | 2021-06-16T00:17:25.383000 | 2017-04-13T19:54:38 | 2017-04-13T19:54:41 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package com.sumavision.talktv2.ui.adapter;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.sumavision.talktv2.R;
import com.sumavision.talktv2.http.GlideProxy;
import com.sumavision.talktv2.model.entity.decor.SearchInfoItem;
import com.sumavision.talktv2.ui.activity.SearchActivity;
import com.sumavision.talktv2.ui.activity.TVFANActivity;
import com.umeng.analytics.MobclickAgent;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
/**
* Created by zhoutao on 2016/8/24.
* 这是搜索页面直播结果显示的adapter
*/
public class SearchListInfoLivePlayAdapter extends RecyclerView.Adapter<SearchListInfoLivePlayAdapter.MyViewHolder> {
private Context context;
private List<SearchInfoItem> results;
public SearchListInfoLivePlayAdapter(Context context){
this.context = context;
results = new ArrayList<>();
}
public void setListData(List<SearchInfoItem> liveFinalResultes){
if (results.size()>0){
results.clear();
}
results.addAll(liveFinalResultes);
notifyDataSetChanged();
}
@Override
public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View itemView = LayoutInflater.from(parent.getContext()).inflate(R.layout.liveplay_item_search, parent, false);
/*ViewGroup.LayoutParams params = itemView.getLayoutParams();
params.height = CommonUtil.screenWidth(context)/3*80/120 + CommonUtil.dip2px(context,34);
itemView.setLayoutParams(params);*/
return new MyViewHolder(itemView);
}
@Override
public void onBindViewHolder(final MyViewHolder holder, int position) {
holder.bean = results.get(position);
holder.iv_search_liveplay_item_title.setText(results.get(position).name);
GlideProxy.getInstance().loadHImage(context,"http://tvfan.cn/photo/channel/image/android"+results.get(position).code+".png",holder.iv_search_liveplay_item_img);
}
@Override
public int getItemCount() {
return results.size();
}
public class MyViewHolder extends RecyclerView.ViewHolder{
SearchInfoItem bean;
@BindView(R.id.iv_search_liveplay_item_title)
public TextView iv_search_liveplay_item_title;
@BindView(R.id.iv_search_liveplay_item_img)
public ImageView iv_search_liveplay_item_img;
@OnClick(R.id.rl_liveplay_search_item)
public void ClickItem(){
//跳转到直播播放器
Intent intent = new Intent(context, TVFANActivity.class);
Bundle b = new Bundle();
intent.putExtra("enterLivePlay","enterLivePlay");
intent.putExtra("id",bean.code);
context.startActivity(intent);
((SearchActivity)context).finish();
/*if(onLiveClick !=null)
onLiveClick.liveClick(bean.code);*/
MobclickAgent.onEvent(context, "4ssjg");
}
public MyViewHolder(View itemView) {
super(itemView);
ButterKnife.bind(this, itemView);
}
}
/*public interface OnLiveClick{
void liveClick(String id);
}
private OnLiveClick onLiveClick;
public void setOnLiveClick(OnLiveClick onLiveClick) {
this.onLiveClick = onLiveClick;
}*/
}
| UTF-8 | Java | 3,621 | java | SearchListInfoLivePlayAdapter.java | Java | [
{
"context": "fe;\nimport butterknife.OnClick;\n\n/**\n * Created by zhoutao on 2016/8/24.\n * 这是搜索页面直播结果显示的adapter\n */\npublic ",
"end": 809,
"score": 0.9979581236839294,
"start": 802,
"tag": "USERNAME",
"value": "zhoutao"
}
] | null | [] | package com.sumavision.talktv2.ui.adapter;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.sumavision.talktv2.R;
import com.sumavision.talktv2.http.GlideProxy;
import com.sumavision.talktv2.model.entity.decor.SearchInfoItem;
import com.sumavision.talktv2.ui.activity.SearchActivity;
import com.sumavision.talktv2.ui.activity.TVFANActivity;
import com.umeng.analytics.MobclickAgent;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
/**
* Created by zhoutao on 2016/8/24.
* 这是搜索页面直播结果显示的adapter
*/
public class SearchListInfoLivePlayAdapter extends RecyclerView.Adapter<SearchListInfoLivePlayAdapter.MyViewHolder> {
private Context context;
private List<SearchInfoItem> results;
public SearchListInfoLivePlayAdapter(Context context){
this.context = context;
results = new ArrayList<>();
}
public void setListData(List<SearchInfoItem> liveFinalResultes){
if (results.size()>0){
results.clear();
}
results.addAll(liveFinalResultes);
notifyDataSetChanged();
}
@Override
public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View itemView = LayoutInflater.from(parent.getContext()).inflate(R.layout.liveplay_item_search, parent, false);
/*ViewGroup.LayoutParams params = itemView.getLayoutParams();
params.height = CommonUtil.screenWidth(context)/3*80/120 + CommonUtil.dip2px(context,34);
itemView.setLayoutParams(params);*/
return new MyViewHolder(itemView);
}
@Override
public void onBindViewHolder(final MyViewHolder holder, int position) {
holder.bean = results.get(position);
holder.iv_search_liveplay_item_title.setText(results.get(position).name);
GlideProxy.getInstance().loadHImage(context,"http://tvfan.cn/photo/channel/image/android"+results.get(position).code+".png",holder.iv_search_liveplay_item_img);
}
@Override
public int getItemCount() {
return results.size();
}
public class MyViewHolder extends RecyclerView.ViewHolder{
SearchInfoItem bean;
@BindView(R.id.iv_search_liveplay_item_title)
public TextView iv_search_liveplay_item_title;
@BindView(R.id.iv_search_liveplay_item_img)
public ImageView iv_search_liveplay_item_img;
@OnClick(R.id.rl_liveplay_search_item)
public void ClickItem(){
//跳转到直播播放器
Intent intent = new Intent(context, TVFANActivity.class);
Bundle b = new Bundle();
intent.putExtra("enterLivePlay","enterLivePlay");
intent.putExtra("id",bean.code);
context.startActivity(intent);
((SearchActivity)context).finish();
/*if(onLiveClick !=null)
onLiveClick.liveClick(bean.code);*/
MobclickAgent.onEvent(context, "4ssjg");
}
public MyViewHolder(View itemView) {
super(itemView);
ButterKnife.bind(this, itemView);
}
}
/*public interface OnLiveClick{
void liveClick(String id);
}
private OnLiveClick onLiveClick;
public void setOnLiveClick(OnLiveClick onLiveClick) {
this.onLiveClick = onLiveClick;
}*/
}
| 3,621 | 0.697681 | 0.690696 | 101 | 34.435642 | 28.42444 | 168 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.643564 | false | false | 13 |
601e9aff513b28438586ad6d6afba5bdae452f0d | 11,373,073,453,886 | a8ec1ffbde43606518c01a2a00ef93d936a3f8dc | /Lecture Activities/AbstractionNotes/src/Driver.java | b72002bace23add9a5d215080d0d9b9d139ed778 | [] | no_license | naru1998/CSCE314_ICAS | https://github.com/naru1998/CSCE314_ICAS | f2e45a48f9d4316e88522fda49a7b64609076158 | f6c8483d55e984cae425a460c0189cdb47ed7310 | refs/heads/master | 2020-06-27T17:14:49.155000 | 2019-04-24T23:38:36 | 2019-04-24T23:38:36 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | public class Driver {
public static void main(String[] args) {
Employee Lupoli = new SalariedEmployee("Lupoli", new Date(7, 1, 2010), 80000);
Employee Dima = new HourlyEmployee("Dima", new Date(8, 18, 2013), 50, 10);
System.out.println(Lupoli + "\n");
System.out.println(Dima);
}
}
| UTF-8 | Java | 296 | java | Driver.java | Java | [
{
"context": "args) {\n\t\tEmployee Lupoli = new SalariedEmployee(\"Lupoli\", new Date(7, 1, 2010), 80000);\n\t\tEmployee Dima =",
"end": 113,
"score": 0.9996640086174011,
"start": 107,
"tag": "NAME",
"value": "Lupoli"
},
{
"context": "0), 80000);\n\t\tEmployee Dima = new HourlyEmplo... | null | [] | public class Driver {
public static void main(String[] args) {
Employee Lupoli = new SalariedEmployee("Lupoli", new Date(7, 1, 2010), 80000);
Employee Dima = new HourlyEmployee("Dima", new Date(8, 18, 2013), 50, 10);
System.out.println(Lupoli + "\n");
System.out.println(Dima);
}
}
| 296 | 0.668919 | 0.594595 | 12 | 23.666666 | 28.29409 | 80 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1.916667 | false | false | 13 |
645cfeddef73ca7ba800f6e95df7073e0e59f80f | 29,729,763,689,969 | c2228325fe23a4e7fc99bf58c4493476125f5463 | /src/main/java/com/cssl/tiantian/pojo/User.java | 1d765ba28abbc58802a7f8ff4c705373b0b25c90 | [] | no_license | java30project/tiantian | https://github.com/java30project/tiantian | 5019f4fc84238fb7a9096c93476cbc9f616eaff9 | d7394ad33274375cd68e1b1b1366e178501b5d2a | refs/heads/master | 2022-12-23T07:55:33.195000 | 2019-12-22T08:27:08 | 2019-12-22T08:27:08 | 163,474,487 | 0 | 1 | null | false | 2022-06-21T00:54:17 | 2018-12-29T04:04:32 | 2019-12-22T08:30:24 | 2022-06-21T00:54:16 | 9,488 | 0 | 1 | 4 | JavaScript | false | false | package com.cssl.tiantian.pojo;
import java.io.Serializable;
import java.sql.Date;
import java.util.List;
public class User implements Serializable {
private static final long serialVersionUID = -3384071261794990175L;
private int userId;
private String userName;
private String password;
private int userType;
private String nickName;
private String realName;
private int sex;
private String phone;
private String email;
private Date birthday;
private String identity;
private String userUrl;
private Double money;
private int integra;
private String address;
private Areas areas;
//一对多
private List<Shop> shops;
private List<RecAddress> recAddresses;
private List<ProScore> proScores;
private List<Order> orders;
public List<Shop> getShops() {
return shops;
}
public void setShops(List<Shop> shops) {
this.shops = shops;
}
public List<RecAddress> getRecAddresses() {
return recAddresses;
}
public void setRecAddresses(List<RecAddress> recAddresses) {
this.recAddresses = recAddresses;
}
public List<ProScore> getProScores() {
return proScores;
}
public void setProScores(List<ProScore> proScores) {
this.proScores = proScores;
}
public List<Order> getOrders() {
return orders;
}
public void setOrders(List<Order> orders) {
this.orders = orders;
}
public int getUserId() {
return userId;
}
public void setUserId(int userId) {
this.userId = userId;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public int getUserType() {
return userType;
}
public void setUserType(int userType) {
this.userType = userType;
}
public String getNickName() {
return nickName;
}
public void setNickName(String nickName) {
this.nickName = nickName;
}
public String getRealName() {
return realName;
}
public void setRealName(String realName) {
this.realName = realName;
}
public int getSex() {
return sex;
}
public void setSex(int sex) {
this.sex = sex;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public Date getBirthday() {
return birthday;
}
public void setBirthday(Date birthday) {
this.birthday = birthday;
}
public String getIdentity() {
return identity;
}
public void setIdentity(String identity) {
this.identity = identity;
}
public String getUserUrl() {
return userUrl;
}
public void setUserUrl(String userUrl) {
this.userUrl = userUrl;
}
public Double getMoney() {
return money;
}
public void setMoney(Double money) {
this.money = money;
}
public int getIntegra() {
return integra;
}
public void setIntegra(int integra) {
this.integra = integra;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public Areas getAreas() {
return areas;
}
public void setAreas(Areas areas) {
this.areas = areas;
}
}
| UTF-8 | Java | 3,785 | java | User.java | Java | [
{
"context": "\n\n public String getUserName() {\n return userName;\n }\n\n public void setUserName(String userNa",
"end": 1669,
"score": 0.9842014908790588,
"start": 1661,
"tag": "USERNAME",
"value": "userName"
},
{
"context": "serName(String userName) {\n thi... | null | [] | package com.cssl.tiantian.pojo;
import java.io.Serializable;
import java.sql.Date;
import java.util.List;
public class User implements Serializable {
private static final long serialVersionUID = -3384071261794990175L;
private int userId;
private String userName;
private String password;
private int userType;
private String nickName;
private String realName;
private int sex;
private String phone;
private String email;
private Date birthday;
private String identity;
private String userUrl;
private Double money;
private int integra;
private String address;
private Areas areas;
//一对多
private List<Shop> shops;
private List<RecAddress> recAddresses;
private List<ProScore> proScores;
private List<Order> orders;
public List<Shop> getShops() {
return shops;
}
public void setShops(List<Shop> shops) {
this.shops = shops;
}
public List<RecAddress> getRecAddresses() {
return recAddresses;
}
public void setRecAddresses(List<RecAddress> recAddresses) {
this.recAddresses = recAddresses;
}
public List<ProScore> getProScores() {
return proScores;
}
public void setProScores(List<ProScore> proScores) {
this.proScores = proScores;
}
public List<Order> getOrders() {
return orders;
}
public void setOrders(List<Order> orders) {
this.orders = orders;
}
public int getUserId() {
return userId;
}
public void setUserId(int userId) {
this.userId = userId;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public int getUserType() {
return userType;
}
public void setUserType(int userType) {
this.userType = userType;
}
public String getNickName() {
return nickName;
}
public void setNickName(String nickName) {
this.nickName = nickName;
}
public String getRealName() {
return realName;
}
public void setRealName(String realName) {
this.realName = realName;
}
public int getSex() {
return sex;
}
public void setSex(int sex) {
this.sex = sex;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public Date getBirthday() {
return birthday;
}
public void setBirthday(Date birthday) {
this.birthday = birthday;
}
public String getIdentity() {
return identity;
}
public void setIdentity(String identity) {
this.identity = identity;
}
public String getUserUrl() {
return userUrl;
}
public void setUserUrl(String userUrl) {
this.userUrl = userUrl;
}
public Double getMoney() {
return money;
}
public void setMoney(Double money) {
this.money = money;
}
public int getIntegra() {
return integra;
}
public void setIntegra(int integra) {
this.integra = integra;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public Areas getAreas() {
return areas;
}
public void setAreas(Areas areas) {
this.areas = areas;
}
}
| 3,785 | 0.608891 | 0.603863 | 191 | 18.785341 | 16.250042 | 71 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.340314 | false | false | 13 |
ceaf55ddad1ce3f432ed39d2313688f3ea2a7ecc | 23,957,327,605,378 | add49f5ec5e3dc5b59f3341c509d0ac16e5fba7a | /src/exception4.java | 719d9b924437717dfbd87aef42e53462bbbdbf98 | [] | no_license | udaydikshit/focp2 | https://github.com/udaydikshit/focp2 | 8e6f2f805c230645b94f7934212135d14f87b3ac | be6c4337a45dda6bd1b8c161ee8144b44658102b | refs/heads/master | 2020-04-16T01:24:47.295000 | 2019-02-03T16:47:05 | 2019-02-03T16:47:05 | 165,171,944 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | //Author Uday Dikshit
//Version 1.020
//Purpose Define an object reference and initialize it to null. Try to call a method through this reference. Now wrap the code in a try-catch clause to catch the exception.
class exception4
{
public static void main(String args[])
{
String a;
try
{
a=null;
System.out.println(a.toString());
}
catch(NullPointerException e)
{
System.out.println("a can't be null");
}
}
} | UTF-8 | Java | 512 | java | exception4.java | Java | [
{
"context": "//Author Uday Dikshit\n//Version 1.020\n//Purpose Define an object refere",
"end": 21,
"score": 0.9998771548271179,
"start": 9,
"tag": "NAME",
"value": "Uday Dikshit"
}
] | null | [] | //Author <NAME>
//Version 1.020
//Purpose Define an object reference and initialize it to null. Try to call a method through this reference. Now wrap the code in a try-catch clause to catch the exception.
class exception4
{
public static void main(String args[])
{
String a;
try
{
a=null;
System.out.println(a.toString());
}
catch(NullPointerException e)
{
System.out.println("a can't be null");
}
}
} | 506 | 0.591797 | 0.582031 | 19 | 26 | 37.336308 | 172 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.210526 | false | false | 13 |
87684d5cbd807174b4302655454393b66972be39 | 292,057,780,382 | 032dffedf87b0862455d7ae7970c2437b6d8b4ce | /mecanicaApoloSistem/src/main/java/br/com/sistemaoptimus/dao/FaturaDAOImpl.java | a11e1f46b721d5c4792f881c36713fab25c232c4 | [] | no_license | fabriciojacob211/projetos | https://github.com/fabriciojacob211/projetos | c9f5df111c7517fb2c1926d3f0d8e8445bda29fb | 4777b39af5f9ebdeb3d524d5d3edc897e2604491 | refs/heads/master | 2020-03-02T13:19:46.688000 | 2018-09-16T01:31:36 | 2018-09-16T01:31:36 | 91,886,648 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package br.com.sistemaoptimus.dao;
import java.io.Serializable;
import javax.annotation.PostConstruct;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.transaction.Transactional;
import org.springframework.stereotype.Repository;
import br.com.sistemaoptimus.model.Fatura;
@Repository
public class FaturaDAOImpl implements FaturaDAO, Serializable{
private static final long serialVersionUID = -1144654608724863023L;
@PersistenceContext
EntityManager em;
private DAO<Fatura> dao;
@PostConstruct
void init() {
dao = new DAO<>(this.em, Fatura.class);
}
@Override
@Transactional
public void salvar(Fatura fatura) throws Exception {
dao.adiciona(fatura);
}
}
| UTF-8 | Java | 731 | java | FaturaDAOImpl.java | Java | [] | null | [] | package br.com.sistemaoptimus.dao;
import java.io.Serializable;
import javax.annotation.PostConstruct;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.transaction.Transactional;
import org.springframework.stereotype.Repository;
import br.com.sistemaoptimus.model.Fatura;
@Repository
public class FaturaDAOImpl implements FaturaDAO, Serializable{
private static final long serialVersionUID = -1144654608724863023L;
@PersistenceContext
EntityManager em;
private DAO<Fatura> dao;
@PostConstruct
void init() {
dao = new DAO<>(this.em, Fatura.class);
}
@Override
@Transactional
public void salvar(Fatura fatura) throws Exception {
dao.adiciona(fatura);
}
}
| 731 | 0.793434 | 0.767442 | 35 | 19.885714 | 20.284788 | 68 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.942857 | false | false | 13 |
78c30c222cdab7739383b0164d195c3417bc938f | 7,181,185,363,768 | 254f2310d6ce00bf127e1c4dd91dad2481764dcb | /src/main/java/com/hackathon/lighthouse/repository/EnrolmentRepository.java | 1c58f93c599c4988990cd43dfb8dcf0673147129 | [] | no_license | masterpeter/lighthouse | https://github.com/masterpeter/lighthouse | 14fa136f2fdddca652a60edb48594853fac50743 | 049fc0158923bbfdae5934496676b1e013a68049 | refs/heads/master | 2016-03-22T17:50:05.013000 | 2015-07-19T20:50:02 | 2015-07-19T20:50:02 | 38,942,231 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | package com.hackathon.lighthouse.repository;
import java.util.Collection;
import org.bson.types.ObjectId;
import org.springframework.data.mongodb.repository.MongoRepository;
import com.hackathon.lighthouse.documents.Enrolment;
public interface EnrolmentRepository extends MongoRepository<Enrolment, ObjectId> {
Collection<Enrolment> findByAccountId(String accountId);
}
| UTF-8 | Java | 377 | java | EnrolmentRepository.java | Java | [] | null | [] | package com.hackathon.lighthouse.repository;
import java.util.Collection;
import org.bson.types.ObjectId;
import org.springframework.data.mongodb.repository.MongoRepository;
import com.hackathon.lighthouse.documents.Enrolment;
public interface EnrolmentRepository extends MongoRepository<Enrolment, ObjectId> {
Collection<Enrolment> findByAccountId(String accountId);
}
| 377 | 0.840849 | 0.840849 | 14 | 25.928572 | 28.786068 | 83 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.571429 | false | false | 13 |
2692b70ec50dd974e02de6734cc36400a3f7fc4b | 17,617,955,903,539 | a6fecfa0a99027fff3c0be452689824c7695a743 | /space2/wssc/src/com/wssc/service/UserService.java | 362fe9dcf86ef7a00d40c5f39ac68ad148764de3 | [] | no_license | huguohui1314/IdeaProjects | https://github.com/huguohui1314/IdeaProjects | 33d4ca2e746b40d993549d2a74bad940b1c2f5d6 | 98d0860791e90e986440430c94c0f3c52ad64f83 | refs/heads/master | 2020-03-17T23:43:36.835000 | 2020-03-16T14:46:03 | 2020-03-16T14:46:03 | 134,057,591 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package com.wssc.service;
import com.wssc.entity.User;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
/**
* @Author: hugh
* @Time: 2017/12/31 7:27 PM
* @Discraption:
*/
public class UserService extends HttpServlet{
private static final long serialVersionUID = -3070149580518254460L;
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
String name = req.getParameter("name");
}
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
doGet(req, resp);
}
}
| UTF-8 | Java | 816 | java | UserService.java | Java | [
{
"context": "Exception;\nimport java.util.List;\n\n/**\n * @Author: hugh\n * @Time: 2017/12/31 7:27 PM\n * @Discraption:\n */",
"end": 300,
"score": 0.9977889060974121,
"start": 296,
"tag": "USERNAME",
"value": "hugh"
}
] | null | [] | package com.wssc.service;
import com.wssc.entity.User;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
/**
* @Author: hugh
* @Time: 2017/12/31 7:27 PM
* @Discraption:
*/
public class UserService extends HttpServlet{
private static final long serialVersionUID = -3070149580518254460L;
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
String name = req.getParameter("name");
}
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
doGet(req, resp);
}
}
| 816 | 0.756127 | 0.719363 | 30 | 26.200001 | 29.651756 | 114 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.533333 | false | false | 13 |
5b0c38394c89fb971f1af6bafd28f9c11f3bd6a3 | 28,166,395,535,232 | 3e7ca6c5befd656d8cc3011eed9c019f0a9a5a03 | /src/main/java/com/banas/market/checkout/Checkout.java | d7e348484918de7b3a97658a9da354433a9ee979 | [] | no_license | FullStackForce/marketcheckout | https://github.com/FullStackForce/marketcheckout | ee4deb221e30e2a88e3433c461eb9836dc2e697f | b581135aaa66cfbfbfd9374d341a22c1c1d792e6 | refs/heads/master | 2020-04-08T19:46:48.973000 | 2017-08-03T19:43:27 | 2017-08-03T19:43:27 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package com.banas.market.checkout;
import com.banas.market.checkout.discount.ManualDiscount;
import com.banas.market.checkout.inventory.Item;
import com.banas.market.checkout.receipt.Receipt;
import com.banas.market.checkout.receipt.ReceiptFactory;
import com.banas.market.checkout.receipt.ReceiptRepository;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import javax.annotation.PostConstruct;
@Component
@Service
@Scope("prototype")
public class Checkout {
private static final Logger LOGGER = LoggerFactory.getLogger(Checkout.class);
private boolean paymentDone = false;
private Receipt receipt;
@Autowired
private ReceiptRepository receiptRepository;
@Autowired
private ReceiptFactory receiptFactory;
@PostConstruct
public void startNewReceipt() {
LOGGER.info("Starting new receipt");
receipt = receiptFactory.createReceipt();
}
public void addItem(Item item) {
LOGGER.info("Adding item to receipt");
receipt.addItem(item);
}
public void addManualDiscount(ManualDiscount manualDiscount) {
receipt.addManualDiscount(manualDiscount);
}
public void pay() {
paymentDone = true;
}
public void printReceipt() {
if (paymentDone) {
LOGGER.info("Printing receipt.");
receipt.print();
receiptRepository.save(receipt);
} else {
LOGGER.warn("The receipt is not paid. Client has to pay receipt before printing it out.");
}
}
}
| UTF-8 | Java | 1,743 | java | Checkout.java | Java | [] | null | [] | package com.banas.market.checkout;
import com.banas.market.checkout.discount.ManualDiscount;
import com.banas.market.checkout.inventory.Item;
import com.banas.market.checkout.receipt.Receipt;
import com.banas.market.checkout.receipt.ReceiptFactory;
import com.banas.market.checkout.receipt.ReceiptRepository;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import javax.annotation.PostConstruct;
@Component
@Service
@Scope("prototype")
public class Checkout {
private static final Logger LOGGER = LoggerFactory.getLogger(Checkout.class);
private boolean paymentDone = false;
private Receipt receipt;
@Autowired
private ReceiptRepository receiptRepository;
@Autowired
private ReceiptFactory receiptFactory;
@PostConstruct
public void startNewReceipt() {
LOGGER.info("Starting new receipt");
receipt = receiptFactory.createReceipt();
}
public void addItem(Item item) {
LOGGER.info("Adding item to receipt");
receipt.addItem(item);
}
public void addManualDiscount(ManualDiscount manualDiscount) {
receipt.addManualDiscount(manualDiscount);
}
public void pay() {
paymentDone = true;
}
public void printReceipt() {
if (paymentDone) {
LOGGER.info("Printing receipt.");
receipt.print();
receiptRepository.save(receipt);
} else {
LOGGER.warn("The receipt is not paid. Client has to pay receipt before printing it out.");
}
}
}
| 1,743 | 0.719449 | 0.718302 | 60 | 28.049999 | 23.291933 | 102 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.466667 | false | false | 13 |
5a9b74b08c125b77bd19c5f6a6ec615a4c85c1aa | 14,302,241,097,595 | 41adbde51a4d994c1500688a78e500a6b2c59a0d | /src/molab/main/java/component/AssetsComponent.java | 36c84e3a4b19328a800b2b94561496562a9d665e | [] | no_license | cocoy2006/ast_molab | https://github.com/cocoy2006/ast_molab | 8701f87d216e2b1eda72db3f8abe3d205a68e5bb | e2c173600990c84aa189288b873f395cb81747b7 | refs/heads/master | 2021-08-19T14:05:46.830000 | 2017-11-26T14:34:01 | 2017-11-26T14:34:01 | 112,073,485 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package molab.main.java.component;
public class AssetsComponent {
private int assets;
private int total;
private int state;
private String message;
/**
* @return the assets
*/
public int getAssets() {
return assets;
}
/**
* @param assets
* the assets to set
*/
public void setAssets(int assets) {
this.assets = assets;
}
/**
* @return the total
*/
public int getTotal() {
return total;
}
/**
* @param total
* the total to set
*/
public void setTotal(int total) {
this.total = total;
}
/**
* @return the state
*/
public int getState() {
return state;
}
/**
* @param state
* the state to set
*/
public void setState(int state) {
this.state = state;
}
/**
* @return the message
*/
public String getMessage() {
return message;
}
/**
* @param message
* the message to set
*/
public void setMessage(String message) {
this.message = message;
}
}
| UTF-8 | Java | 978 | java | AssetsComponent.java | Java | [] | null | [] | package molab.main.java.component;
public class AssetsComponent {
private int assets;
private int total;
private int state;
private String message;
/**
* @return the assets
*/
public int getAssets() {
return assets;
}
/**
* @param assets
* the assets to set
*/
public void setAssets(int assets) {
this.assets = assets;
}
/**
* @return the total
*/
public int getTotal() {
return total;
}
/**
* @param total
* the total to set
*/
public void setTotal(int total) {
this.total = total;
}
/**
* @return the state
*/
public int getState() {
return state;
}
/**
* @param state
* the state to set
*/
public void setState(int state) {
this.state = state;
}
/**
* @return the message
*/
public String getMessage() {
return message;
}
/**
* @param message
* the message to set
*/
public void setMessage(String message) {
this.message = message;
}
}
| 978 | 0.586912 | 0.586912 | 70 | 12.971429 | 12.105455 | 41 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1.1 | false | false | 13 |
2a1a77677629261df7057902992352bcc3f5caa4 | 8,744,553,471,237 | 6af4089c83a6bfda0e4c4789b778fe4064d0a1b9 | /lintCode/397_longest-increasing-continuous-subsequence/longest-increasing-continuous-subsequence.java | d03a3c772871ade158d1cc690f2f2b2d47fc7080 | [
"Apache-2.0"
] | permissive | chenjiayao/Leetcode | https://github.com/chenjiayao/Leetcode | 50f8a59a45ec127f9cd4569def411ea3e416c3e1 | ab8bc66acd82ba9cd4011964b1d27390d10421c1 | refs/heads/master | 2021-06-10T11:49:49.194000 | 2017-01-25T13:55:48 | 2017-01-25T13:55:48 | 41,348,392 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | /*
@Copyright:LintCode
@Author: chenjiayaooo
@Problem: http://www.lintcode.com/problem/longest-increasing-continuous-subsequence
@Language: Java
@Datetime: 17-01-22 12:05
*/
public class Solution {
/**
* @param A an array of Integer
* @return an integer
*/
public int longestIncreasingContinuousSubsequence(int[] A) {
// Write your code here
if (A.length == 1 || A.length == 0) {
return A.length;
}
int trend = A[0] > A[1] ? -1 : 1;
int res = 1;
int step = 1;
for (int i = 0; i < A.length - 1; i++) {
if ((A[i] > A[i + 1] && trend == -1) || (A[i] < A[i + 1] && trend == 1)) {
step++;
continue;
}
res = res < step ? step : res;
trend = A[i] > A[i + 1] ? -1 : 1;
step = 2;
}
return res > step ? res : step;
}
} | UTF-8 | Java | 922 | java | longest-increasing-continuous-subsequence.java | Java | [
{
"context": "/*\n@Copyright:LintCode\n@Author: chenjiayaooo\n@Problem: http://www.lintcode.com/problem/longes",
"end": 46,
"score": 0.9983035922050476,
"start": 34,
"tag": "NAME",
"value": "chenjiayaooo"
}
] | null | [] | /*
@Copyright:LintCode
@Author: chenjiayaooo
@Problem: http://www.lintcode.com/problem/longest-increasing-continuous-subsequence
@Language: Java
@Datetime: 17-01-22 12:05
*/
public class Solution {
/**
* @param A an array of Integer
* @return an integer
*/
public int longestIncreasingContinuousSubsequence(int[] A) {
// Write your code here
if (A.length == 1 || A.length == 0) {
return A.length;
}
int trend = A[0] > A[1] ? -1 : 1;
int res = 1;
int step = 1;
for (int i = 0; i < A.length - 1; i++) {
if ((A[i] > A[i + 1] && trend == -1) || (A[i] < A[i + 1] && trend == 1)) {
step++;
continue;
}
res = res < step ? step : res;
trend = A[i] > A[i + 1] ? -1 : 1;
step = 2;
}
return res > step ? res : step;
}
} | 922 | 0.463124 | 0.432755 | 35 | 25.371429 | 21.625496 | 86 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.457143 | false | false | 13 |
9c3fd1af7acef2abcb6f672236f14101839fc06e | 8,744,553,473,366 | 191bd68552a033d6318ad65e1d1ead5e0207eed4 | /src/br/com/fundamento/modelos/Caixa.java | 094f9659fc52ab592e137a41154fa8ff854fbf8a | [] | no_license | AndrePereira22/Consultorio | https://github.com/AndrePereira22/Consultorio | 53df2aa0deb0488db25536804073b965da773abe | 096a79014fba2d33984bb4a86e15824fcef0a60a | refs/heads/master | 2022-07-20T01:38:29.101000 | 2019-06-01T18:10:11 | 2019-06-01T18:10:11 | 189,763,004 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package br.com.fundamento.modelos;
import java.util.List;
/**
*
* @author Glenda Alves de Lima
*/
public class Caixa {
private int numero;
private double valor_abertura;
private double valor_fechamento;
private double valor_receita;
private boolean status;
private String data;
private int id;
private Funcionario funcionario;
private List<Pagamento> pagamentos;
public Caixa(){
}
/**
* @return the numero
*/
public int getNumero() {
return numero;
}
/**
* @param numero the numero to set
*/
public void setNumero(int numero) {
this.numero = numero;
}
/**
* @return the valor_abertura
*/
public double getValor_abertura() {
return valor_abertura;
}
/**
* @param valor_abertura the valor_abertura to set
*/
public void setValor_abertura(double valor_abertura) {
this.valor_abertura = valor_abertura;
}
/**
* @return the valor_fechamento
*/
public double getValor_fechamento() {
return valor_fechamento;
}
/**
* @param valor_fechamento the valor_fechamento to set
*/
public void setValor_fechamento(double valor_fechamento) {
this.valor_fechamento = valor_fechamento;
}
/**
* @return the valor_receita
*/
public double getValor_receita() {
return valor_receita;
}
/**
* @param valor_receita the valor_receita to set
*/
public void setValor_receita(double valor_receita) {
this.valor_receita = valor_receita;
}
/**
* @return the status
*/
public boolean isStatus() {
return status;
}
/**
* @param status the status to set
*/
public void setStatus(boolean status) {
this.status = status;
}
/**
* @return the pagamentos
*/
public List<Pagamento> getPagamentos() {
return pagamentos;
}
/**
* @param pagamentos the pagamentos to set
*/
public void setPagamentos(List<Pagamento> pagamentos) {
this.pagamentos = pagamentos;
}
/**
* @return the data
*/
public String getData() {
return data;
}
/**
* @param data the data to set
*/
public void setData(String data) {
this.data = data;
}
/**
* @return the id
*/
public int getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(int id) {
this.id = id;
}
/**
* @return the funcionario
*/
public Funcionario getFuncionario() {
return funcionario;
}
/**
* @param funcionario the funcionario to set
*/
public void setFuncionario(Funcionario funcionario) {
this.funcionario = funcionario;
}
}
| UTF-8 | Java | 3,285 | java | Caixa.java | Java | [
{
"context": ";\r\n\r\nimport java.util.List;\r\n\r\n/**\r\n *\r\n * @author Glenda Alves de Lima\r\n */\r\npublic class Caixa {\r\n \r\n private int",
"end": 294,
"score": 0.999882161617279,
"start": 274,
"tag": "NAME",
"value": "Glenda Alves de Lima"
}
] | null | [] | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package br.com.fundamento.modelos;
import java.util.List;
/**
*
* @author <NAME>
*/
public class Caixa {
private int numero;
private double valor_abertura;
private double valor_fechamento;
private double valor_receita;
private boolean status;
private String data;
private int id;
private Funcionario funcionario;
private List<Pagamento> pagamentos;
public Caixa(){
}
/**
* @return the numero
*/
public int getNumero() {
return numero;
}
/**
* @param numero the numero to set
*/
public void setNumero(int numero) {
this.numero = numero;
}
/**
* @return the valor_abertura
*/
public double getValor_abertura() {
return valor_abertura;
}
/**
* @param valor_abertura the valor_abertura to set
*/
public void setValor_abertura(double valor_abertura) {
this.valor_abertura = valor_abertura;
}
/**
* @return the valor_fechamento
*/
public double getValor_fechamento() {
return valor_fechamento;
}
/**
* @param valor_fechamento the valor_fechamento to set
*/
public void setValor_fechamento(double valor_fechamento) {
this.valor_fechamento = valor_fechamento;
}
/**
* @return the valor_receita
*/
public double getValor_receita() {
return valor_receita;
}
/**
* @param valor_receita the valor_receita to set
*/
public void setValor_receita(double valor_receita) {
this.valor_receita = valor_receita;
}
/**
* @return the status
*/
public boolean isStatus() {
return status;
}
/**
* @param status the status to set
*/
public void setStatus(boolean status) {
this.status = status;
}
/**
* @return the pagamentos
*/
public List<Pagamento> getPagamentos() {
return pagamentos;
}
/**
* @param pagamentos the pagamentos to set
*/
public void setPagamentos(List<Pagamento> pagamentos) {
this.pagamentos = pagamentos;
}
/**
* @return the data
*/
public String getData() {
return data;
}
/**
* @param data the data to set
*/
public void setData(String data) {
this.data = data;
}
/**
* @return the id
*/
public int getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(int id) {
this.id = id;
}
/**
* @return the funcionario
*/
public Funcionario getFuncionario() {
return funcionario;
}
/**
* @param funcionario the funcionario to set
*/
public void setFuncionario(Funcionario funcionario) {
this.funcionario = funcionario;
}
}
| 3,271 | 0.534247 | 0.534247 | 167 | 17.670658 | 17.626343 | 79 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.191617 | false | false | 13 |
9a47b88cd06ecd1c0eb3efd965adabbb81186c27 | 11,476,152,655,753 | eacfc7cf6b777649e8e017bf2805f6099cb9385d | /APK Source/src/com/heyzap/house/model/NativeModel.java | 00fa9c54cef6ce74cd72e622143d9483d2f956ff | [] | no_license | maartenpeels/WordonHD | https://github.com/maartenpeels/WordonHD | 8b171cfd085e1f23150162ea26ed6967945005e2 | 4d316eb33bc1286c4b8813c4afd478820040bf05 | refs/heads/master | 2021-03-27T16:51:40.569000 | 2017-06-12T13:32:51 | 2017-06-12T13:32:51 | 44,254,944 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | // Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.heyzap.house.model;
import android.content.Context;
import java.io.Serializable;
import org.json.JSONException;
import org.json.JSONObject;
// Referenced classes of package com.heyzap.house.model:
// AdModel
public class NativeModel extends AdModel
implements Serializable
{
public static String FORMAT = "native";
public JSONObject data;
public NativeModel(JSONObject jsonobject)
throws Exception, JSONException
{
super(jsonobject);
creativeType = FORMAT;
if (jsonobject.has("data") && !jsonobject.isNull("data"))
{
data = jsonobject.getJSONObject("data");
return;
} else
{
throw new Exception("no_data");
}
}
public void cleanup(Context context)
throws Exception
{
}
public void doPostFetchActions(Context context, AdModel.ModelPostFetchCompleteListener modelpostfetchcompletelistener)
{
if (modelpostfetchcompletelistener != null)
{
modelpostfetchcompletelistener.onComplete(this, null);
}
}
}
| UTF-8 | Java | 1,295 | java | NativeModel.java | Java | [
{
"context": "// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.\n// Jad home page: http://www.geocities.com/kpdus",
"end": 61,
"score": 0.9996669292449951,
"start": 45,
"tag": "NAME",
"value": "Pavel Kouznetsov"
}
] | null | [] | // Decompiled by Jad v1.5.8e. Copyright 2001 <NAME>.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.heyzap.house.model;
import android.content.Context;
import java.io.Serializable;
import org.json.JSONException;
import org.json.JSONObject;
// Referenced classes of package com.heyzap.house.model:
// AdModel
public class NativeModel extends AdModel
implements Serializable
{
public static String FORMAT = "native";
public JSONObject data;
public NativeModel(JSONObject jsonobject)
throws Exception, JSONException
{
super(jsonobject);
creativeType = FORMAT;
if (jsonobject.has("data") && !jsonobject.isNull("data"))
{
data = jsonobject.getJSONObject("data");
return;
} else
{
throw new Exception("no_data");
}
}
public void cleanup(Context context)
throws Exception
{
}
public void doPostFetchActions(Context context, AdModel.ModelPostFetchCompleteListener modelpostfetchcompletelistener)
{
if (modelpostfetchcompletelistener != null)
{
modelpostfetchcompletelistener.onComplete(this, null);
}
}
}
| 1,285 | 0.662548 | 0.657143 | 50 | 24.9 | 24.757423 | 122 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.32 | false | false | 13 |
80d4f140b717d59349ac96708f8491e7ef0b50d4 | 11,476,152,655,290 | 5d6be6df73a370ce66b3f7f673da150fbc9a2020 | /proyecto final java/proyecto final java-ejb/src/java/conexion/ConexionBD.java | e866c3594bf3e51581285882268cb00885177a24 | [] | no_license | DiegoMMR/WD_proyecto_final | https://github.com/DiegoMMR/WD_proyecto_final | f6befaca3f85bba9e29f0dbbfc67fff25bfe35a1 | 9002a5fe72b4d6a6bbf5f417acf82dc7273558c4 | refs/heads/master | 2023-03-12T03:53:39.593000 | 2018-11-03T03:06:20 | 2018-11-03T03:06:20 | 154,991,317 | 0 | 0 | null | false | 2023-03-03T06:20:41 | 2018-10-27T17:31:15 | 2021-05-18T21:54:23 | 2023-03-03T06:20:41 | 44,945 | 0 | 0 | 3 | JavaScript | false | false | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package conexion;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
*
* @author Diego
*/
public class ConexionBD {
public static String url = "jdbc:sqlserver://DIEGOLENOVO:1433;databaseName=proveedor";
public static String usuario = "usuario_java";
public static String pass = "123456";
public static Connection con;
ConexionBD() {
try{
//cargar driver
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
//conectar a base de datos
con = DriverManager.getConnection(url, usuario, pass);
/** test de conexion
Statement sentencia = con.createStatement();
ResultSet rs = sentencia.executeQuery("select * from historial_codigos");
//obtener datos
while (rs.next()) {
System.out.println(rs.getString("cod_cliente"));
}
*/
} catch (ClassNotFoundException | SQLException ex) {
System.out.println(ex);
}
}
public static void main(String[] args) {
ConexionBD conexionBD = new ConexionBD();
//conexionBD.insertHistorial("cod112", "cliet1215");
}
public void insertHistorial (String cod_autorizacion, String cod_cliente) {
try{
Statement sentencia = con.createStatement();
Date fecha = new Date();
String fecha_consulta = new SimpleDateFormat("yyyy-MM-dd").format(fecha);
PreparedStatement stmt = con.prepareStatement("INSERT INTO historial_codigos VALUES (?,?,?)");
stmt.setString(1, cod_autorizacion);
stmt.setString(2, cod_cliente);
stmt.setString(3, fecha_consulta);
stmt.executeUpdate();
} catch ( SQLException ex) {
System.out.println(ex);
}
}
}
| UTF-8 | Java | 2,358 | java | ConexionBD.java | Java | [
{
"context": "eFormat;\nimport java.util.Date;\n\n/**\n *\n * @author Diego\n */\npublic class ConexionBD {\n \n public sta",
"end": 464,
"score": 0.9874711036682129,
"start": 459,
"tag": "NAME",
"value": "Diego"
},
{
"context": "e=proveedor\";\n public static String usuario... | null | [] | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package conexion;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
*
* @author Diego
*/
public class ConexionBD {
public static String url = "jdbc:sqlserver://DIEGOLENOVO:1433;databaseName=proveedor";
public static String usuario = "usuario_java";
public static String pass = "<PASSWORD>";
public static Connection con;
ConexionBD() {
try{
//cargar driver
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
//conectar a base de datos
con = DriverManager.getConnection(url, usuario, pass);
/** test de conexion
Statement sentencia = con.createStatement();
ResultSet rs = sentencia.executeQuery("select * from historial_codigos");
//obtener datos
while (rs.next()) {
System.out.println(rs.getString("cod_cliente"));
}
*/
} catch (ClassNotFoundException | SQLException ex) {
System.out.println(ex);
}
}
public static void main(String[] args) {
ConexionBD conexionBD = new ConexionBD();
//conexionBD.insertHistorial("cod112", "cliet1215");
}
public void insertHistorial (String cod_autorizacion, String cod_cliente) {
try{
Statement sentencia = con.createStatement();
Date fecha = new Date();
String fecha_consulta = new SimpleDateFormat("yyyy-MM-dd").format(fecha);
PreparedStatement stmt = con.prepareStatement("INSERT INTO historial_codigos VALUES (?,?,?)");
stmt.setString(1, cod_autorizacion);
stmt.setString(2, cod_cliente);
stmt.setString(3, fecha_consulta);
stmt.executeUpdate();
} catch ( SQLException ex) {
System.out.println(ex);
}
}
}
| 2,362 | 0.589059 | 0.580577 | 80 | 28.475 | 25.306114 | 106 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.55 | false | false | 13 |
943ebd5e368456b91f75d916be65fc671105de18 | 3,831,110,882,786 | 90a8e1cce43d8d55e8d605369c80f8032d8adb40 | /src/netcollector/Server.java | 93d4082533955998595519b72c3f0611fa9c2abb | [] | no_license | AppShelf/NetCollector | https://github.com/AppShelf/NetCollector | 2184577e2ff67bff9131cbc23070115b22252ad2 | b20031762a7d16856864b34ac2a8215f328cea4b | refs/heads/master | 2021-01-12T07:58:17.749000 | 2016-12-21T15:20:31 | 2016-12-21T15:20:31 | 77,062,777 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | /*
* NetCollector Server
*/
package netcollector;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.net.ServerSocket;
import java.net.Socket;
/**
*
* @author SistemiQuintaBi1617
*/
public class Server {
ServerSocket serverSocket;
Socket socket;
BufferedReader in;
PrintWriter out;
String message;
void run() {
try {
// apre il file in cui collezionare le informazioni ricevute
PrintWriter log = new PrintWriter("data/NetCollector.txt");
log.println("Nuova sessione.");
// crea il socket server e si pone in ascolto
serverSocket = new ServerSocket(NetCollector.PORT, 1024);
while (true) {
// mi pongo in ascolto di connessioni entranti
System.out.println("Waiting for connection");
socket = serverSocket.accept();
System.out.println("Connection received from " + socket.getInetAddress().getHostName());
// get Input and Output streams
in = new BufferedReader( new InputStreamReader( socket.getInputStream() ));
out = new PrintWriter( new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())), true );
// servo la specifica richiesta
String s = in.readLine();
if (s.equalsIgnoreCase("QUIT")) break;
log.println(s);
System.out.println("client>" + s);
s = in.readLine();
log.println(s);
System.out.println("client>" + s);
s = in.readLine();
log.println(s);
System.out.println("client>" + s);
socket.close();
log.flush();
}
serverSocket.close();
log.close();
} catch (IOException ex) {
System.out.println("ERRORE: " + ex.getMessage());
}
}
}
| UTF-8 | Java | 2,240 | java | Server.java | Java | [
{
"context": "t;\r\nimport java.net.Socket;\r\n\r\n/**\r\n *\r\n * @author SistemiQuintaBi1617\r\n */\r\npublic class Server {\r\n\r\n ServerSocket s",
"end": 348,
"score": 0.966562032699585,
"start": 329,
"tag": "USERNAME",
"value": "SistemiQuintaBi1617"
}
] | null | [] | /*
* NetCollector Server
*/
package netcollector;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.net.ServerSocket;
import java.net.Socket;
/**
*
* @author SistemiQuintaBi1617
*/
public class Server {
ServerSocket serverSocket;
Socket socket;
BufferedReader in;
PrintWriter out;
String message;
void run() {
try {
// apre il file in cui collezionare le informazioni ricevute
PrintWriter log = new PrintWriter("data/NetCollector.txt");
log.println("Nuova sessione.");
// crea il socket server e si pone in ascolto
serverSocket = new ServerSocket(NetCollector.PORT, 1024);
while (true) {
// mi pongo in ascolto di connessioni entranti
System.out.println("Waiting for connection");
socket = serverSocket.accept();
System.out.println("Connection received from " + socket.getInetAddress().getHostName());
// get Input and Output streams
in = new BufferedReader( new InputStreamReader( socket.getInputStream() ));
out = new PrintWriter( new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())), true );
// servo la specifica richiesta
String s = in.readLine();
if (s.equalsIgnoreCase("QUIT")) break;
log.println(s);
System.out.println("client>" + s);
s = in.readLine();
log.println(s);
System.out.println("client>" + s);
s = in.readLine();
log.println(s);
System.out.println("client>" + s);
socket.close();
log.flush();
}
serverSocket.close();
log.close();
} catch (IOException ex) {
System.out.println("ERRORE: " + ex.getMessage());
}
}
}
| 2,240 | 0.534375 | 0.530804 | 70 | 30 | 24.8228 | 116 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.557143 | false | false | 13 |
46bac718fbac82b882eec05dd9c978b71ec926e6 | 28,604,482,192,224 | 7e1ae35b0f639a4d1dc249e371a018227b34b5ff | /src/main/java/com/dmruczek/poe_arbitrage_helper/CurrencyTradeListing.java | 0cd57995abc21381cba669b298a6cef1fd9954b9 | [] | no_license | dmruczek/poe-arbitrage-helper | https://github.com/dmruczek/poe-arbitrage-helper | 64bddb0fcfe2b4b1fe9aefdcfb28aaf327385ce0 | 50ff5c695f502030673d43f50ae7cf91e04ed6ab | refs/heads/master | 2020-04-06T03:36:41.203000 | 2016-12-22T22:02:54 | 2016-12-22T22:02:54 | 60,907,139 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package com.dmruczek.poe_arbitrage_helper;
import java.math.BigDecimal;
public class CurrencyTradeListing {
private BigDecimal sellOffer;
private BigDecimal buyOffer;
private int sellType;
private int buyType;
public BigDecimal getSellOffer() {
return sellOffer;
}
public void setSellOffer(BigDecimal sellOffer) {
this.sellOffer = sellOffer;
}
public BigDecimal getBuyOffer() {
return buyOffer;
}
public void setBuyOffer(BigDecimal buyOffer) {
this.buyOffer = buyOffer;
}
public int getSellType() {
return sellType;
}
public void setSellType(int sellType) {
this.sellType = sellType;
}
public int getBuyType() {
return buyType;
}
public void setBuyType(int buyType) {
this.buyType = buyType;
}
}
| UTF-8 | Java | 790 | java | CurrencyTradeListing.java | Java | [] | null | [] | package com.dmruczek.poe_arbitrage_helper;
import java.math.BigDecimal;
public class CurrencyTradeListing {
private BigDecimal sellOffer;
private BigDecimal buyOffer;
private int sellType;
private int buyType;
public BigDecimal getSellOffer() {
return sellOffer;
}
public void setSellOffer(BigDecimal sellOffer) {
this.sellOffer = sellOffer;
}
public BigDecimal getBuyOffer() {
return buyOffer;
}
public void setBuyOffer(BigDecimal buyOffer) {
this.buyOffer = buyOffer;
}
public int getSellType() {
return sellType;
}
public void setSellType(int sellType) {
this.sellType = sellType;
}
public int getBuyType() {
return buyType;
}
public void setBuyType(int buyType) {
this.buyType = buyType;
}
}
| 790 | 0.694937 | 0.694937 | 45 | 15.555555 | 15.807952 | 49 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1.111111 | false | false | 13 |
359c19b94c64530ac9d7fb051a5b90ab5caba4e8 | 27,333,171,929,111 | 1637b42bfe66763990223d674aa470aa239a240b | /ttsd-sms-wrapper/src/main/java/com/tuotiansudai/smswrapper/repository/mapper/RegisterCaptchaMapper.java | d62f346fb3699519504738c2fc6fa45315fb0f80 | [] | no_license | haifeiforwork/tuotiansudai | https://github.com/haifeiforwork/tuotiansudai | 11feef3e42f02c3e590ca2b7c081f106b706f7da | 891fefef783a96f86c3283ce377ba18e80db0c81 | refs/heads/master | 2020-12-12T09:16:06.320000 | 2019-03-08T09:34:26 | 2019-03-08T09:34:26 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package com.tuotiansudai.smswrapper.repository.mapper;
import org.springframework.stereotype.Repository;
@Repository
public interface RegisterCaptchaMapper extends BaseMapper {
}
| UTF-8 | Java | 183 | java | RegisterCaptchaMapper.java | Java | [] | null | [] | package com.tuotiansudai.smswrapper.repository.mapper;
import org.springframework.stereotype.Repository;
@Repository
public interface RegisterCaptchaMapper extends BaseMapper {
}
| 183 | 0.846995 | 0.846995 | 9 | 19.333334 | 24.846193 | 59 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.222222 | false | false | 13 |
d3fed12146cfaa3e2f1c010e76228a3a4144d9cf | 32,590,211,842,922 | 73d1400b4f92aeaf861baf8df5efdb9002f6f07e | /src/main/java/tr/com/tumed/config/audit/package-info.java | f95c8409f053c2f3b9330a517e901f0223321c68 | [] | no_license | habibmevlut/tumed | https://github.com/habibmevlut/tumed | 7038d7d0ef3d1cf57c1a109a0b7be6435adafc48 | cb891dc16d2f17de10d062345ca522d1d6171673 | refs/heads/master | 2023-02-04T22:53:42.579000 | 2020-12-27T19:43:53 | 2020-12-27T19:43:53 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | /**
* Audit specific code.
*/
package tr.com.tumed.config.audit;
| UTF-8 | Java | 67 | java | package-info.java | Java | [] | null | [] | /**
* Audit specific code.
*/
package tr.com.tumed.config.audit;
| 67 | 0.671642 | 0.671642 | 4 | 15.75 | 13.329947 | 34 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | false | false | 13 |
1c0cb85effded5e8816f0ce5bba20ed5a49832b8 | 5,171,140,649,066 | d3b5c87819879568f8b86077a12ef0c4423cc5cb | /ejb/src/main/java/com/test/domain/WardEntity.java | 5d0f456e087ec7cf98d7d04399f3a28afed5947b | [] | no_license | anhdhnguyen/HomeLand | https://github.com/anhdhnguyen/HomeLand | 99dd6315c76bd9a45e9db8f2c87d96fad9de0c2e | 90494877ec0e10f29a298d8316ff14e52e73889c | refs/heads/master | 2023-04-17T15:00:04.192000 | 2017-12-10T03:30:22 | 2017-12-10T03:30:22 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package com.test.domain;
import javax.persistence.*;
/**
* Created with IntelliJ IDEA.
* User: nkhang
* Date: 10/15/15
* Time: 10:25 AM
* To change this template use File | Settings | File Templates.
*/
@javax.persistence.Table(name = "ward")
@Entity
public class WardEntity {
private Integer wardId;
private DistrictEntity district;
private String wardName;
private Float longitude;
private Float latitude;
@javax.persistence.Column(name = "WardID")
@Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
public Integer getWardId() {
return wardId;
}
public void setWardId(Integer wardId) {
this.wardId = wardId;
}
@ManyToOne
@javax.persistence.JoinColumn(name = "DistrictID")
public DistrictEntity getDistrict() {
return district;
}
public void setDistrict(DistrictEntity district) {
this.district = district;
}
@javax.persistence.Column(name = "WardName")
@Basic
public String getWardName() {
return wardName;
}
public void setWardName(String wardName) {
this.wardName = wardName;
}
@javax.persistence.Column(name = "Longitude")
@Basic
public Float getLongitude() {
return longitude;
}
public void setLongitude(Float longitude) {
this.longitude = longitude;
}
@javax.persistence.Column(name = "Latitude")
@Basic
public Float getLatitude() {
return latitude;
}
public void setLatitude(Float latitude) {
this.latitude = latitude;
}
}
| UTF-8 | Java | 1,577 | java | WardEntity.java | Java | [
{
"context": "ce.*;\n\n/**\n * Created with IntelliJ IDEA.\n * User: nkhang\n * Date: 10/15/15\n * Time: 10:25 AM\n * To change ",
"end": 105,
"score": 0.9995980858802795,
"start": 99,
"tag": "USERNAME",
"value": "nkhang"
}
] | null | [] | package com.test.domain;
import javax.persistence.*;
/**
* Created with IntelliJ IDEA.
* User: nkhang
* Date: 10/15/15
* Time: 10:25 AM
* To change this template use File | Settings | File Templates.
*/
@javax.persistence.Table(name = "ward")
@Entity
public class WardEntity {
private Integer wardId;
private DistrictEntity district;
private String wardName;
private Float longitude;
private Float latitude;
@javax.persistence.Column(name = "WardID")
@Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
public Integer getWardId() {
return wardId;
}
public void setWardId(Integer wardId) {
this.wardId = wardId;
}
@ManyToOne
@javax.persistence.JoinColumn(name = "DistrictID")
public DistrictEntity getDistrict() {
return district;
}
public void setDistrict(DistrictEntity district) {
this.district = district;
}
@javax.persistence.Column(name = "WardName")
@Basic
public String getWardName() {
return wardName;
}
public void setWardName(String wardName) {
this.wardName = wardName;
}
@javax.persistence.Column(name = "Longitude")
@Basic
public Float getLongitude() {
return longitude;
}
public void setLongitude(Float longitude) {
this.longitude = longitude;
}
@javax.persistence.Column(name = "Latitude")
@Basic
public Float getLatitude() {
return latitude;
}
public void setLatitude(Float latitude) {
this.latitude = latitude;
}
}
| 1,577 | 0.6487 | 0.642359 | 71 | 21.211267 | 17.856955 | 64 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.267606 | false | false | 13 |
d1978594d1a12cb8aaed0afd1a29407e81b98b43 | 34,608,846,504,713 | 0e06e096a9f95ab094b8078ea2cd310759af008b | /classes39-dex2jar/com/kongregate/o/g/f.java | 9bc64bfa7090a72f6cf6802329e1884a909ad093 | [] | no_license | Manifold0/adcom_decompile | https://github.com/Manifold0/adcom_decompile | 4bc2907a057c73703cf141dc0749ed4c014ebe55 | fce3d59b59480abe91f90ba05b0df4eaadd849f7 | refs/heads/master | 2020-05-21T02:01:59.787000 | 2019-05-10T00:36:27 | 2019-05-10T00:36:27 | 185,856,424 | 1 | 2 | null | false | 2019-05-10T00:36:28 | 2019-05-09T19:04:28 | 2019-05-09T22:35:26 | 2019-05-10T00:36:27 | 95,641 | 0 | 2 | 0 | Java | false | false | //
// Decompiled by Procyon v0.5.34
//
package com.kongregate.o.g;
import java.io.Serializable;
import com.kongregate.android.internal.util.StringUtils;
import java.util.Iterator;
import com.kongregate.android.internal.util.j;
import java.util.HashMap;
import java.util.Map;
import java.util.StringTokenizer;
import java.util.HashSet;
import java.util.Arrays;
import java.net.HttpCookie;
import java.util.Set;
import android.webkit.CookieManager;
import android.webkit.CookieSyncManager;
import java.util.List;
public class f
{
public static final String a = "_kongregate_session";
public static final String b = "kong_sec";
public static final String c = "kongregateMobileApi";
public static final String d = "m_pass";
public static final String e = "kong_svid";
public static final List<String> f;
private final List<String> g;
private final List<String> h;
private final String i;
private final CookieSyncManager j;
private final CookieManager k;
private final String l;
private final Set<HttpCookie> m;
static {
f = Arrays.asList("_kongregate_session", "kong_sec", "kong_flash_messages");
}
public f(final String l) {
this.g = Arrays.asList("_kongregate_session", "kong_sec");
this.h = Arrays.asList("kong_svid");
this.i = "; ";
this.m = new HashSet<HttpCookie>();
this.j = CookieSyncManager.getInstance();
this.k = CookieManager.getInstance();
this.l = l;
this.a();
}
private String c(final HttpCookie httpCookie) {
final StringBuilder sb = new StringBuilder(256);
sb.append(httpCookie.getName()).append("=").append(httpCookie.getValue());
sb.append("; path=").append(httpCookie.getPath());
if (httpCookie.getSecure()) {
sb.append("; secure");
}
if (this.g.contains(httpCookie.getName())) {
sb.append("; HttpOnly");
}
if (httpCookie.getMaxAge() > 0L) {
sb.append("; max-age=" + httpCookie.getMaxAge());
}
return sb.toString();
}
private HttpCookie e(String s) {
final StringTokenizer stringTokenizer = new StringTokenizer(s, ";");
s = stringTokenizer.nextToken();
final int index = s.indexOf(61);
if (index != -1) {
final HttpCookie httpCookie = new HttpCookie(s.substring(0, index).trim(), s.substring(index + 1));
httpCookie.setDomain(this.l);
httpCookie.setPath("/");
while (stringTokenizer.hasMoreTokens()) {
s = stringTokenizer.nextToken();
final int index2 = s.indexOf(61);
if (index2 == -1) {
s = s.trim();
}
else {
s = s.substring(0, index2).trim();
}
if (s.equalsIgnoreCase("secure")) {
httpCookie.setSecure(true);
break;
}
}
return httpCookie;
}
throw new IllegalArgumentException("Malformed cookie");
}
private Map<String, HttpCookie> g() {
final String cookie = this.k.getCookie("https://" + this.l);
final HashMap<String, HttpCookie> hashMap = new HashMap<String, HttpCookie>();
if (cookie != null && cookie.length() > 0) {
final String[] split = cookie.split("; ");
for (int length = split.length, i = 0; i < length; ++i) {
final String s = split[i];
if (s != null) {
final String[] split2 = s.split("=");
if (split2 != null && split2.length >= 2) {
final HttpCookie a = this.a(split2[0], split2[1]);
if ("kong_sec".equals(a.getName())) {
a.setSecure(true);
}
hashMap.put(a.getName(), a);
}
}
}
}
return hashMap;
}
public HttpCookie a(final String s, final String s2) {
return this.a(s, s2, false);
}
public HttpCookie a(final String s, String s2, final boolean b) {
try {
final Object o;
s2 = (String)(o = new HttpCookie(s, s2));
final f f = this;
final String s3 = f.l;
((HttpCookie)o).setDomain(s3);
final String s4 = s2;
final String s5 = "/";
((HttpCookie)s4).setPath(s5);
final String s6 = s2;
final boolean b2 = b;
((HttpCookie)s6).setSecure(b2);
final String s7 = s2;
return (HttpCookie)s7;
}
catch (IllegalArgumentException ex) {
s2 = null;
}
while (true) {
try {
final Object o = s2;
final f f = this;
final String s3 = f.l;
((HttpCookie)o).setDomain(s3);
final String s4 = s2;
final String s5 = "/";
((HttpCookie)s4).setPath(s5);
final String s6 = s2;
final boolean b2 = b;
((HttpCookie)s6).setSecure(b2);
final String s7 = s2;
return (HttpCookie)s7;
final IllegalArgumentException ex;
com.kongregate.android.internal.util.j.c("unable to build cookie. malformed name: " + s, ex);
return (HttpCookie)s2;
}
catch (IllegalArgumentException ex) {
continue;
}
break;
}
}
public void a() {
synchronized (this) {
com.kongregate.android.internal.util.j.a("Reloading cookies from webview: " + this.l);
this.m.clear();
final Iterator<HttpCookie> iterator = this.g().values().iterator();
while (iterator.hasNext()) {
this.m.add(iterator.next());
}
}
com.kongregate.android.internal.util.j.a("cookies loaded");
}
// monitorexit(this)
public void a(final String s) {
synchronized (this) {
try {
final HttpCookie e = this.e(s);
if (e != null) {
this.a(e);
}
}
catch (IllegalArgumentException ex) {
com.kongregate.android.internal.util.j.c("Illegal cookie", ex);
}
catch (NullPointerException ex2) {
com.kongregate.android.internal.util.j.c("NPE parsing cookies", ex2);
}
}
}
public void a(final HttpCookie httpCookie) {
synchronized (this) {
this.a(httpCookie, false);
}
}
public void a(final HttpCookie httpCookie, final boolean b) {
// monitorenter(this)
Label_0015: {
if (httpCookie != null) {
break Label_0015;
}
try {
com.kongregate.android.internal.util.j.a("Can't add a null cookie.");
Label_0012: {
return;
}
com.kongregate.android.internal.util.j.a("Cookie added: " + httpCookie.getName());
this.m.add(httpCookie);
// iftrue(Label_0012:, !b)
this.k.setCookie("https://" + this.l, this.c(httpCookie));
this.j.sync();
}
finally {
}
// monitorexit(this)
}
}
public void a(final boolean b) {
synchronized (this) {
final Map<String, HttpCookie> g = this.g();
for (final HttpCookie httpCookie : this.f()) {
if (b || !g.containsKey(httpCookie.getName()) || this.h.contains(httpCookie.getName())) {
this.k.setCookie("https://" + this.l, this.c(httpCookie));
}
}
}
this.j.sync();
}
// monitorexit(this)
public String b(String value) {
synchronized (this) {
for (final HttpCookie httpCookie : this.f()) {
if (httpCookie.getName().equals(value)) {
value = httpCookie.getValue();
return value;
}
}
value = null;
return value;
}
}
public void b() {
synchronized (this) {
final Iterator<String> iterator = com.kongregate.o.g.f.f.iterator();
while (iterator.hasNext()) {
this.k.setCookie("https://" + this.l, iterator.next() + "=");
}
}
this.j.sync();
this.a();
}
// monitorexit(this)
public void b(final HttpCookie httpCookie) {
synchronized (this) {
if (!this.g.contains(httpCookie.getName())) {
this.m.add(httpCookie);
}
}
}
public String c() {
StringBuffer sb;
while (true) {
while (true) {
Label_0115: {
synchronized (this) {
com.kongregate.android.internal.util.j.a("getSharedKongregateCookies from webview cookie store");
this.a();
sb = new StringBuffer();
for (Serializable append : com.kongregate.o.g.f.f) {
final String b = this.b((String)append);
if (sb.length() > 0) {
sb.append("; ");
}
append = new StringBuilder().append((String)append).append("=");
if (b == null) {
break Label_0115;
}
sb.append(((StringBuilder)append).append(b).toString());
}
break;
}
}
final String b = "";
continue;
}
}
final String b2 = this.b("kong_svid");
if (!StringUtils.a((CharSequence)b2)) {
if (sb.length() > 0) {
sb.append("; ");
}
sb.append("kong_svid=" + b2);
}
// monitorexit(this)
return sb.toString();
}
public void c(final String p0) {
//
// This method could not be decompiled.
//
// Original Bytecode:
//
// 1: monitorenter
// 2: ldc_w "setting shared cookies from shared storage: "
// 5: invokestatic com/kongregate/android/internal/util/j.a:(Ljava/lang/String;)V
// 8: aload_1
// 9: invokestatic com/kongregate/android/internal/util/StringUtils.a:(Ljava/lang/CharSequence;)Z
// 12: ifne 257
// 15: aload_1
// 16: ldc "; "
// 18: invokevirtual java/lang/String.split:(Ljava/lang/String;)[Ljava/lang/String;
// 21: astore 5
// 23: aload 5
// 25: arraylength
// 26: istore_3
// 27: iconst_0
// 28: istore_2
// 29: iload_2
// 30: iload_3
// 31: if_icmpge 207
// 34: aload 5
// 36: iload_2
// 37: aaload
// 38: astore 6
// 40: aload 6
// 42: ldc "="
// 44: invokevirtual java/lang/String.split:(Ljava/lang/String;)[Ljava/lang/String;
// 47: astore 7
// 49: aload 7
// 51: arraylength
// 52: istore 4
// 54: iload 4
// 56: iconst_2
// 57: if_icmpne 189
// 60: new Ljava/net/HttpCookie;
// 63: dup
// 64: aload 7
// 66: iconst_0
// 67: aaload
// 68: aload 7
// 70: iconst_1
// 71: aaload
// 72: invokespecial java/net/HttpCookie.<init>:(Ljava/lang/String;Ljava/lang/String;)V
// 75: astore 8
// 77: aload 8
// 79: aload_0
// 80: getfield com/kongregate/o/g/f.l:Ljava/lang/String;
// 83: invokevirtual java/net/HttpCookie.setDomain:(Ljava/lang/String;)V
// 86: aload 8
// 88: ldc "/"
// 90: invokevirtual java/net/HttpCookie.setPath:(Ljava/lang/String;)V
// 93: ldc "kong_sec"
// 95: aload 7
// 97: iconst_0
// 98: aaload
// 99: invokevirtual java/lang/String.equals:(Ljava/lang/Object;)Z
// 102: ifeq 111
// 105: aload 8
// 107: iconst_1
// 108: invokevirtual java/net/HttpCookie.setSecure:(Z)V
// 111: aload_0
// 112: getfield com/kongregate/o/g/f.k:Landroid/webkit/CookieManager;
// 115: new Ljava/lang/StringBuilder;
// 118: dup
// 119: invokespecial java/lang/StringBuilder.<init>:()V
// 122: ldc "https://"
// 124: invokevirtual java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
// 127: aload_0
// 128: getfield com/kongregate/o/g/f.l:Ljava/lang/String;
// 131: invokevirtual java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
// 134: invokevirtual java/lang/StringBuilder.toString:()Ljava/lang/String;
// 137: aload_0
// 138: aload 8
// 140: invokespecial com/kongregate/o/g/f.c:(Ljava/net/HttpCookie;)Ljava/lang/String;
// 143: invokevirtual android/webkit/CookieManager.setCookie:(Ljava/lang/String;Ljava/lang/String;)V
// 146: iload_2
// 147: iconst_1
// 148: iadd
// 149: istore_2
// 150: goto 29
// 153: astore 7
// 155: new Ljava/lang/StringBuilder;
// 158: dup
// 159: invokespecial java/lang/StringBuilder.<init>:()V
// 162: ldc_w "malformed cookie: "
// 165: invokevirtual java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
// 168: aload 6
// 170: invokevirtual java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
// 173: invokevirtual java/lang/StringBuilder.toString:()Ljava/lang/String;
// 176: aload 7
// 178: invokestatic com/kongregate/android/internal/util/j.c:(Ljava/lang/String;Ljava/lang/Throwable;)V
// 181: goto 146
// 184: astore_1
// 185: aload_0
// 186: monitorexit
// 187: aload_1
// 188: athrow
// 189: aload 7
// 191: arraylength
// 192: iconst_1
// 193: if_icmpne 146
// 196: aload_0
// 197: aload 7
// 199: iconst_0
// 200: aaload
// 201: invokevirtual com/kongregate/o/g/f.d:(Ljava/lang/String;)V
// 204: goto 146
// 207: getstatic com/kongregate/o/g/f.f:Ljava/util/List;
// 210: invokeinterface java/util/List.iterator:()Ljava/util/Iterator;
// 215: astore 5
// 217: aload 5
// 219: invokeinterface java/util/Iterator.hasNext:()Z
// 224: ifeq 257
// 227: aload 5
// 229: invokeinterface java/util/Iterator.next:()Ljava/lang/Object;
// 234: checkcast Ljava/lang/String;
// 237: astore 6
// 239: aload_1
// 240: aload 6
// 242: invokevirtual java/lang/String.contains:(Ljava/lang/CharSequence;)Z
// 245: ifne 217
// 248: aload_0
// 249: aload 6
// 251: invokevirtual com/kongregate/o/g/f.d:(Ljava/lang/String;)V
// 254: goto 217
// 257: aload_0
// 258: getfield com/kongregate/o/g/f.j:Landroid/webkit/CookieSyncManager;
// 261: invokevirtual android/webkit/CookieSyncManager.sync:()V
// 264: aload_0
// 265: invokevirtual com/kongregate/o/g/f.a:()V
// 268: aload_0
// 269: monitorexit
// 270: return
// Exceptions:
// Try Handler
// Start End Start End Type
// ----- ----- ----- ----- ------------------------------------
// 2 27 184 189 Any
// 40 54 184 189 Any
// 60 111 153 184 Ljava/lang/IllegalArgumentException;
// 60 111 184 189 Any
// 111 146 153 184 Ljava/lang/IllegalArgumentException;
// 111 146 184 189 Any
// 155 181 184 189 Any
// 189 204 184 189 Any
// 207 217 184 189 Any
// 217 254 184 189 Any
// 257 268 184 189 Any
//
// The error that occurred was:
//
// java.lang.NullPointerException
// at com.strobel.assembler.ir.StackMappingVisitor.push(StackMappingVisitor.java:290)
// at com.strobel.assembler.ir.StackMappingVisitor$InstructionAnalyzer.execute(StackMappingVisitor.java:833)
// at com.strobel.assembler.ir.StackMappingVisitor$InstructionAnalyzer.visit(StackMappingVisitor.java:398)
// at com.strobel.decompiler.ast.AstBuilder.performStackAnalysis(AstBuilder.java:2030)
// at com.strobel.decompiler.ast.AstBuilder.build(AstBuilder.java:108)
// at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:211)
// at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:99)
// at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethodBody(AstBuilder.java:782)
// at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethod(AstBuilder.java:675)
// at com.strobel.decompiler.languages.java.ast.AstBuilder.addTypeMembers(AstBuilder.java:552)
// at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeCore(AstBuilder.java:519)
// at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeNoCache(AstBuilder.java:161)
// at com.strobel.decompiler.languages.java.ast.AstBuilder.createType(AstBuilder.java:150)
// at com.strobel.decompiler.languages.java.ast.AstBuilder.addType(AstBuilder.java:125)
// at com.strobel.decompiler.languages.java.JavaLanguage.buildAst(JavaLanguage.java:71)
// at com.strobel.decompiler.languages.java.JavaLanguage.decompileType(JavaLanguage.java:59)
// at com.strobel.decompiler.DecompilerDriver.decompileType(DecompilerDriver.java:330)
// at com.strobel.decompiler.DecompilerDriver.decompileJar(DecompilerDriver.java:251)
// at com.strobel.decompiler.DecompilerDriver.main(DecompilerDriver.java:126)
//
throw new IllegalStateException("An error occurred while decompiling this method.");
}
public void d() {
synchronized (this) {
com.kongregate.android.internal.util.j.a("Clearing all cookies");
this.m.clear();
this.k.removeAllCookie();
this.k.setCookie("https://" + this.l, "");
this.j.sync();
}
}
public void d(final String s) {
synchronized (this) {
final HttpCookie httpCookie = new HttpCookie(s, "");
httpCookie.setDomain(this.l);
httpCookie.setPath("/");
if ("kong_sec".equals(s)) {
httpCookie.setSecure(true);
}
this.k.setCookie("https://" + this.l, this.c(httpCookie));
this.m.remove(httpCookie);
this.j.sync();
}
}
public String e() {
synchronized (this) {
final StringBuilder sb = new StringBuilder(1024);
for (final HttpCookie httpCookie : this.f()) {
sb.append(httpCookie.getName()).append("=").append(httpCookie.getValue()).append("; ");
}
}
final StringBuilder sb2;
// monitorexit(this)
return sb2.toString();
}
protected Set<HttpCookie> f() {
return this.m;
}
}
| UTF-8 | Java | 21,424 | java | f.java | Java | [] | null | [] | //
// Decompiled by Procyon v0.5.34
//
package com.kongregate.o.g;
import java.io.Serializable;
import com.kongregate.android.internal.util.StringUtils;
import java.util.Iterator;
import com.kongregate.android.internal.util.j;
import java.util.HashMap;
import java.util.Map;
import java.util.StringTokenizer;
import java.util.HashSet;
import java.util.Arrays;
import java.net.HttpCookie;
import java.util.Set;
import android.webkit.CookieManager;
import android.webkit.CookieSyncManager;
import java.util.List;
public class f
{
public static final String a = "_kongregate_session";
public static final String b = "kong_sec";
public static final String c = "kongregateMobileApi";
public static final String d = "m_pass";
public static final String e = "kong_svid";
public static final List<String> f;
private final List<String> g;
private final List<String> h;
private final String i;
private final CookieSyncManager j;
private final CookieManager k;
private final String l;
private final Set<HttpCookie> m;
static {
f = Arrays.asList("_kongregate_session", "kong_sec", "kong_flash_messages");
}
public f(final String l) {
this.g = Arrays.asList("_kongregate_session", "kong_sec");
this.h = Arrays.asList("kong_svid");
this.i = "; ";
this.m = new HashSet<HttpCookie>();
this.j = CookieSyncManager.getInstance();
this.k = CookieManager.getInstance();
this.l = l;
this.a();
}
private String c(final HttpCookie httpCookie) {
final StringBuilder sb = new StringBuilder(256);
sb.append(httpCookie.getName()).append("=").append(httpCookie.getValue());
sb.append("; path=").append(httpCookie.getPath());
if (httpCookie.getSecure()) {
sb.append("; secure");
}
if (this.g.contains(httpCookie.getName())) {
sb.append("; HttpOnly");
}
if (httpCookie.getMaxAge() > 0L) {
sb.append("; max-age=" + httpCookie.getMaxAge());
}
return sb.toString();
}
private HttpCookie e(String s) {
final StringTokenizer stringTokenizer = new StringTokenizer(s, ";");
s = stringTokenizer.nextToken();
final int index = s.indexOf(61);
if (index != -1) {
final HttpCookie httpCookie = new HttpCookie(s.substring(0, index).trim(), s.substring(index + 1));
httpCookie.setDomain(this.l);
httpCookie.setPath("/");
while (stringTokenizer.hasMoreTokens()) {
s = stringTokenizer.nextToken();
final int index2 = s.indexOf(61);
if (index2 == -1) {
s = s.trim();
}
else {
s = s.substring(0, index2).trim();
}
if (s.equalsIgnoreCase("secure")) {
httpCookie.setSecure(true);
break;
}
}
return httpCookie;
}
throw new IllegalArgumentException("Malformed cookie");
}
private Map<String, HttpCookie> g() {
final String cookie = this.k.getCookie("https://" + this.l);
final HashMap<String, HttpCookie> hashMap = new HashMap<String, HttpCookie>();
if (cookie != null && cookie.length() > 0) {
final String[] split = cookie.split("; ");
for (int length = split.length, i = 0; i < length; ++i) {
final String s = split[i];
if (s != null) {
final String[] split2 = s.split("=");
if (split2 != null && split2.length >= 2) {
final HttpCookie a = this.a(split2[0], split2[1]);
if ("kong_sec".equals(a.getName())) {
a.setSecure(true);
}
hashMap.put(a.getName(), a);
}
}
}
}
return hashMap;
}
public HttpCookie a(final String s, final String s2) {
return this.a(s, s2, false);
}
public HttpCookie a(final String s, String s2, final boolean b) {
try {
final Object o;
s2 = (String)(o = new HttpCookie(s, s2));
final f f = this;
final String s3 = f.l;
((HttpCookie)o).setDomain(s3);
final String s4 = s2;
final String s5 = "/";
((HttpCookie)s4).setPath(s5);
final String s6 = s2;
final boolean b2 = b;
((HttpCookie)s6).setSecure(b2);
final String s7 = s2;
return (HttpCookie)s7;
}
catch (IllegalArgumentException ex) {
s2 = null;
}
while (true) {
try {
final Object o = s2;
final f f = this;
final String s3 = f.l;
((HttpCookie)o).setDomain(s3);
final String s4 = s2;
final String s5 = "/";
((HttpCookie)s4).setPath(s5);
final String s6 = s2;
final boolean b2 = b;
((HttpCookie)s6).setSecure(b2);
final String s7 = s2;
return (HttpCookie)s7;
final IllegalArgumentException ex;
com.kongregate.android.internal.util.j.c("unable to build cookie. malformed name: " + s, ex);
return (HttpCookie)s2;
}
catch (IllegalArgumentException ex) {
continue;
}
break;
}
}
public void a() {
synchronized (this) {
com.kongregate.android.internal.util.j.a("Reloading cookies from webview: " + this.l);
this.m.clear();
final Iterator<HttpCookie> iterator = this.g().values().iterator();
while (iterator.hasNext()) {
this.m.add(iterator.next());
}
}
com.kongregate.android.internal.util.j.a("cookies loaded");
}
// monitorexit(this)
public void a(final String s) {
synchronized (this) {
try {
final HttpCookie e = this.e(s);
if (e != null) {
this.a(e);
}
}
catch (IllegalArgumentException ex) {
com.kongregate.android.internal.util.j.c("Illegal cookie", ex);
}
catch (NullPointerException ex2) {
com.kongregate.android.internal.util.j.c("NPE parsing cookies", ex2);
}
}
}
public void a(final HttpCookie httpCookie) {
synchronized (this) {
this.a(httpCookie, false);
}
}
public void a(final HttpCookie httpCookie, final boolean b) {
// monitorenter(this)
Label_0015: {
if (httpCookie != null) {
break Label_0015;
}
try {
com.kongregate.android.internal.util.j.a("Can't add a null cookie.");
Label_0012: {
return;
}
com.kongregate.android.internal.util.j.a("Cookie added: " + httpCookie.getName());
this.m.add(httpCookie);
// iftrue(Label_0012:, !b)
this.k.setCookie("https://" + this.l, this.c(httpCookie));
this.j.sync();
}
finally {
}
// monitorexit(this)
}
}
public void a(final boolean b) {
synchronized (this) {
final Map<String, HttpCookie> g = this.g();
for (final HttpCookie httpCookie : this.f()) {
if (b || !g.containsKey(httpCookie.getName()) || this.h.contains(httpCookie.getName())) {
this.k.setCookie("https://" + this.l, this.c(httpCookie));
}
}
}
this.j.sync();
}
// monitorexit(this)
public String b(String value) {
synchronized (this) {
for (final HttpCookie httpCookie : this.f()) {
if (httpCookie.getName().equals(value)) {
value = httpCookie.getValue();
return value;
}
}
value = null;
return value;
}
}
public void b() {
synchronized (this) {
final Iterator<String> iterator = com.kongregate.o.g.f.f.iterator();
while (iterator.hasNext()) {
this.k.setCookie("https://" + this.l, iterator.next() + "=");
}
}
this.j.sync();
this.a();
}
// monitorexit(this)
public void b(final HttpCookie httpCookie) {
synchronized (this) {
if (!this.g.contains(httpCookie.getName())) {
this.m.add(httpCookie);
}
}
}
public String c() {
StringBuffer sb;
while (true) {
while (true) {
Label_0115: {
synchronized (this) {
com.kongregate.android.internal.util.j.a("getSharedKongregateCookies from webview cookie store");
this.a();
sb = new StringBuffer();
for (Serializable append : com.kongregate.o.g.f.f) {
final String b = this.b((String)append);
if (sb.length() > 0) {
sb.append("; ");
}
append = new StringBuilder().append((String)append).append("=");
if (b == null) {
break Label_0115;
}
sb.append(((StringBuilder)append).append(b).toString());
}
break;
}
}
final String b = "";
continue;
}
}
final String b2 = this.b("kong_svid");
if (!StringUtils.a((CharSequence)b2)) {
if (sb.length() > 0) {
sb.append("; ");
}
sb.append("kong_svid=" + b2);
}
// monitorexit(this)
return sb.toString();
}
public void c(final String p0) {
//
// This method could not be decompiled.
//
// Original Bytecode:
//
// 1: monitorenter
// 2: ldc_w "setting shared cookies from shared storage: "
// 5: invokestatic com/kongregate/android/internal/util/j.a:(Ljava/lang/String;)V
// 8: aload_1
// 9: invokestatic com/kongregate/android/internal/util/StringUtils.a:(Ljava/lang/CharSequence;)Z
// 12: ifne 257
// 15: aload_1
// 16: ldc "; "
// 18: invokevirtual java/lang/String.split:(Ljava/lang/String;)[Ljava/lang/String;
// 21: astore 5
// 23: aload 5
// 25: arraylength
// 26: istore_3
// 27: iconst_0
// 28: istore_2
// 29: iload_2
// 30: iload_3
// 31: if_icmpge 207
// 34: aload 5
// 36: iload_2
// 37: aaload
// 38: astore 6
// 40: aload 6
// 42: ldc "="
// 44: invokevirtual java/lang/String.split:(Ljava/lang/String;)[Ljava/lang/String;
// 47: astore 7
// 49: aload 7
// 51: arraylength
// 52: istore 4
// 54: iload 4
// 56: iconst_2
// 57: if_icmpne 189
// 60: new Ljava/net/HttpCookie;
// 63: dup
// 64: aload 7
// 66: iconst_0
// 67: aaload
// 68: aload 7
// 70: iconst_1
// 71: aaload
// 72: invokespecial java/net/HttpCookie.<init>:(Ljava/lang/String;Ljava/lang/String;)V
// 75: astore 8
// 77: aload 8
// 79: aload_0
// 80: getfield com/kongregate/o/g/f.l:Ljava/lang/String;
// 83: invokevirtual java/net/HttpCookie.setDomain:(Ljava/lang/String;)V
// 86: aload 8
// 88: ldc "/"
// 90: invokevirtual java/net/HttpCookie.setPath:(Ljava/lang/String;)V
// 93: ldc "kong_sec"
// 95: aload 7
// 97: iconst_0
// 98: aaload
// 99: invokevirtual java/lang/String.equals:(Ljava/lang/Object;)Z
// 102: ifeq 111
// 105: aload 8
// 107: iconst_1
// 108: invokevirtual java/net/HttpCookie.setSecure:(Z)V
// 111: aload_0
// 112: getfield com/kongregate/o/g/f.k:Landroid/webkit/CookieManager;
// 115: new Ljava/lang/StringBuilder;
// 118: dup
// 119: invokespecial java/lang/StringBuilder.<init>:()V
// 122: ldc "https://"
// 124: invokevirtual java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
// 127: aload_0
// 128: getfield com/kongregate/o/g/f.l:Ljava/lang/String;
// 131: invokevirtual java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
// 134: invokevirtual java/lang/StringBuilder.toString:()Ljava/lang/String;
// 137: aload_0
// 138: aload 8
// 140: invokespecial com/kongregate/o/g/f.c:(Ljava/net/HttpCookie;)Ljava/lang/String;
// 143: invokevirtual android/webkit/CookieManager.setCookie:(Ljava/lang/String;Ljava/lang/String;)V
// 146: iload_2
// 147: iconst_1
// 148: iadd
// 149: istore_2
// 150: goto 29
// 153: astore 7
// 155: new Ljava/lang/StringBuilder;
// 158: dup
// 159: invokespecial java/lang/StringBuilder.<init>:()V
// 162: ldc_w "malformed cookie: "
// 165: invokevirtual java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
// 168: aload 6
// 170: invokevirtual java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
// 173: invokevirtual java/lang/StringBuilder.toString:()Ljava/lang/String;
// 176: aload 7
// 178: invokestatic com/kongregate/android/internal/util/j.c:(Ljava/lang/String;Ljava/lang/Throwable;)V
// 181: goto 146
// 184: astore_1
// 185: aload_0
// 186: monitorexit
// 187: aload_1
// 188: athrow
// 189: aload 7
// 191: arraylength
// 192: iconst_1
// 193: if_icmpne 146
// 196: aload_0
// 197: aload 7
// 199: iconst_0
// 200: aaload
// 201: invokevirtual com/kongregate/o/g/f.d:(Ljava/lang/String;)V
// 204: goto 146
// 207: getstatic com/kongregate/o/g/f.f:Ljava/util/List;
// 210: invokeinterface java/util/List.iterator:()Ljava/util/Iterator;
// 215: astore 5
// 217: aload 5
// 219: invokeinterface java/util/Iterator.hasNext:()Z
// 224: ifeq 257
// 227: aload 5
// 229: invokeinterface java/util/Iterator.next:()Ljava/lang/Object;
// 234: checkcast Ljava/lang/String;
// 237: astore 6
// 239: aload_1
// 240: aload 6
// 242: invokevirtual java/lang/String.contains:(Ljava/lang/CharSequence;)Z
// 245: ifne 217
// 248: aload_0
// 249: aload 6
// 251: invokevirtual com/kongregate/o/g/f.d:(Ljava/lang/String;)V
// 254: goto 217
// 257: aload_0
// 258: getfield com/kongregate/o/g/f.j:Landroid/webkit/CookieSyncManager;
// 261: invokevirtual android/webkit/CookieSyncManager.sync:()V
// 264: aload_0
// 265: invokevirtual com/kongregate/o/g/f.a:()V
// 268: aload_0
// 269: monitorexit
// 270: return
// Exceptions:
// Try Handler
// Start End Start End Type
// ----- ----- ----- ----- ------------------------------------
// 2 27 184 189 Any
// 40 54 184 189 Any
// 60 111 153 184 Ljava/lang/IllegalArgumentException;
// 60 111 184 189 Any
// 111 146 153 184 Ljava/lang/IllegalArgumentException;
// 111 146 184 189 Any
// 155 181 184 189 Any
// 189 204 184 189 Any
// 207 217 184 189 Any
// 217 254 184 189 Any
// 257 268 184 189 Any
//
// The error that occurred was:
//
// java.lang.NullPointerException
// at com.strobel.assembler.ir.StackMappingVisitor.push(StackMappingVisitor.java:290)
// at com.strobel.assembler.ir.StackMappingVisitor$InstructionAnalyzer.execute(StackMappingVisitor.java:833)
// at com.strobel.assembler.ir.StackMappingVisitor$InstructionAnalyzer.visit(StackMappingVisitor.java:398)
// at com.strobel.decompiler.ast.AstBuilder.performStackAnalysis(AstBuilder.java:2030)
// at com.strobel.decompiler.ast.AstBuilder.build(AstBuilder.java:108)
// at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:211)
// at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:99)
// at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethodBody(AstBuilder.java:782)
// at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethod(AstBuilder.java:675)
// at com.strobel.decompiler.languages.java.ast.AstBuilder.addTypeMembers(AstBuilder.java:552)
// at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeCore(AstBuilder.java:519)
// at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeNoCache(AstBuilder.java:161)
// at com.strobel.decompiler.languages.java.ast.AstBuilder.createType(AstBuilder.java:150)
// at com.strobel.decompiler.languages.java.ast.AstBuilder.addType(AstBuilder.java:125)
// at com.strobel.decompiler.languages.java.JavaLanguage.buildAst(JavaLanguage.java:71)
// at com.strobel.decompiler.languages.java.JavaLanguage.decompileType(JavaLanguage.java:59)
// at com.strobel.decompiler.DecompilerDriver.decompileType(DecompilerDriver.java:330)
// at com.strobel.decompiler.DecompilerDriver.decompileJar(DecompilerDriver.java:251)
// at com.strobel.decompiler.DecompilerDriver.main(DecompilerDriver.java:126)
//
throw new IllegalStateException("An error occurred while decompiling this method.");
}
public void d() {
synchronized (this) {
com.kongregate.android.internal.util.j.a("Clearing all cookies");
this.m.clear();
this.k.removeAllCookie();
this.k.setCookie("https://" + this.l, "");
this.j.sync();
}
}
public void d(final String s) {
synchronized (this) {
final HttpCookie httpCookie = new HttpCookie(s, "");
httpCookie.setDomain(this.l);
httpCookie.setPath("/");
if ("kong_sec".equals(s)) {
httpCookie.setSecure(true);
}
this.k.setCookie("https://" + this.l, this.c(httpCookie));
this.m.remove(httpCookie);
this.j.sync();
}
}
public String e() {
synchronized (this) {
final StringBuilder sb = new StringBuilder(1024);
for (final HttpCookie httpCookie : this.f()) {
sb.append(httpCookie.getName()).append("=").append(httpCookie.getValue()).append("; ");
}
}
final StringBuilder sb2;
// monitorexit(this)
return sb2.toString();
}
protected Set<HttpCookie> f() {
return this.m;
}
}
| 21,424 | 0.493512 | 0.460325 | 527 | 39.652752 | 27.068802 | 128 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.481973 | false | false | 13 |
90304aa54cfa62d153d888d2867bd0e2c59acb63 | 36,996,848,297,647 | 69b35b2bf08fbec0494612a540ea57ebde167424 | /app/src/main/java/com/example/infispace/HomeActivity.java | 0134b0b5676112c5e0cf23f50f55791b9fd17508 | [] | no_license | mr1holmes/InfiSpaceAndroid | https://github.com/mr1holmes/InfiSpaceAndroid | 8acccc49951f1c2ce16fa119e5b0e97db239580d | 36442bd22f7918e5ba7238ff327d4c3c183041c7 | refs/heads/master | 2021-03-16T05:11:42.064000 | 2017-10-24T19:56:53 | 2017-10-24T19:56:53 | 107,894,525 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package com.example.infispace;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.EditText;
import com.example.infispace.ui.FeedFragment;
import com.example.infispace.ui.ProfileFragment;
import com.example.infispace.util.AccountsUtil;
public class HomeActivity extends AppCompatActivity {
private Toolbar mToolbar;
private ViewPager mViewPager;
private HomePagerAdapter mHomePagerAdapter;
private String[] mTabNames = {"Feed", "Profile"};
private TabLayout mTabLayout;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
// setup toolbar
mToolbar = (Toolbar) findViewById(R.id.my_toolbar);
setSupportActionBar(mToolbar);
mViewPager = (ViewPager) findViewById(R.id.pager);
mHomePagerAdapter = new HomePagerAdapter(getSupportFragmentManager());
mViewPager.setAdapter(mHomePagerAdapter);
mTabLayout = (TabLayout) findViewById(R.id.home_sliding_tabs);
mTabLayout.setupWithViewPager(mViewPager);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
AlertDialog.Builder alert = new AlertDialog.Builder(this);
alert.setTitle("Server URL");
alert.setMessage("Change Server URL");
final EditText input = new EditText(this);
alert.setView(input);
input.setText(AccountsUtil.getServerUrl(this));
alert.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
String value = input.getText().toString();
AccountsUtil.setServerUrl(value, HomeActivity.this);
}
});
alert.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
// Canceled.
}
});
alert.show();
return true;
}
return super.onOptionsItemSelected(item);
}
private class HomePagerAdapter extends FragmentPagerAdapter {
public HomePagerAdapter(FragmentManager fm) {
super(fm);
}
@Override
public Fragment getItem(int position) {
if (position == 0) {
FeedFragment feedFragment = new FeedFragment();
return feedFragment;
} else {
ProfileFragment profileFragment = new ProfileFragment();
return profileFragment;
}
}
@Override
public int getCount() {
return 2;
}
@Override
public CharSequence getPageTitle(int position) {
return mTabNames[position];
}
}
}
| UTF-8 | Java | 4,058 | java | HomeActivity.java | Java | [] | null | [] | package com.example.infispace;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.EditText;
import com.example.infispace.ui.FeedFragment;
import com.example.infispace.ui.ProfileFragment;
import com.example.infispace.util.AccountsUtil;
public class HomeActivity extends AppCompatActivity {
private Toolbar mToolbar;
private ViewPager mViewPager;
private HomePagerAdapter mHomePagerAdapter;
private String[] mTabNames = {"Feed", "Profile"};
private TabLayout mTabLayout;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
// setup toolbar
mToolbar = (Toolbar) findViewById(R.id.my_toolbar);
setSupportActionBar(mToolbar);
mViewPager = (ViewPager) findViewById(R.id.pager);
mHomePagerAdapter = new HomePagerAdapter(getSupportFragmentManager());
mViewPager.setAdapter(mHomePagerAdapter);
mTabLayout = (TabLayout) findViewById(R.id.home_sliding_tabs);
mTabLayout.setupWithViewPager(mViewPager);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
AlertDialog.Builder alert = new AlertDialog.Builder(this);
alert.setTitle("Server URL");
alert.setMessage("Change Server URL");
final EditText input = new EditText(this);
alert.setView(input);
input.setText(AccountsUtil.getServerUrl(this));
alert.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
String value = input.getText().toString();
AccountsUtil.setServerUrl(value, HomeActivity.this);
}
});
alert.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
// Canceled.
}
});
alert.show();
return true;
}
return super.onOptionsItemSelected(item);
}
private class HomePagerAdapter extends FragmentPagerAdapter {
public HomePagerAdapter(FragmentManager fm) {
super(fm);
}
@Override
public Fragment getItem(int position) {
if (position == 0) {
FeedFragment feedFragment = new FeedFragment();
return feedFragment;
} else {
ProfileFragment profileFragment = new ProfileFragment();
return profileFragment;
}
}
@Override
public int getCount() {
return 2;
}
@Override
public CharSequence getPageTitle(int position) {
return mTabNames[position];
}
}
}
| 4,058 | 0.655988 | 0.65377 | 129 | 30.457365 | 24.835274 | 85 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.511628 | false | false | 13 |
f29e0b72a5e7a0b0ecb2ff029bc1c0b967dde474 | 36,859,409,357,872 | 1c3b15c7d9043aed48fb7b56d0cd82bbc3c2a04d | /src/view/Frame.java | 14f877f6e8d2aee90281b1e6e60da2dcf2730165 | [] | no_license | tjstinso/tjstinso-tetris | https://github.com/tjstinso/tjstinso-tetris | 16b880bf98edd2915c8ab6db54ff9fbc569487cd | bfa4bb55b5a786218cf7c6e3e5e08ece05ac0c04 | refs/heads/master | 2018-01-11T17:22:02.297000 | 2015-12-03T10:06:14 | 2015-12-03T10:06:14 | 47,323,562 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | /*
* Tyler Stinson
* TCSS 305 – Autumn 2015
* Assignment 6 – Tetris A
*/
package view;
import controllers.MyKeyListener;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.util.Observable;
import javax.swing.JFrame;
import javax.swing.JMenuBar;
import javax.swing.Timer;
import keys.KeyCodes;
import model.Board;
import view.menu.MenuBar;
/**
* Class used to create an Observable JFrame.
* @author Tyler Stinson
* @version 1
*/
public class Frame extends Observable {
/** The base dimension of this frame. */
private static final Dimension DIMENSION = new Dimension(600, 644);
/** The JFrame of this object. */
private final JFrame myFrame;
/**
* The constructor for this object.
* @param theBoard The board passed into children.
* @param theKeys The Keys passed into children.
* @param theTimer The timer passed into children.
*/
public Frame(final Board theBoard, final KeyCodes theKeys, final Timer theTimer) {
super();
myFrame = new ResizeFrame();
myFrame.setPreferredSize(DIMENSION);
setup(theBoard, theKeys, theTimer);
}
/**
* Function used to resize frame.
* @param theDimension theDimension sent to the Observers
*/
public void resize(final Dimension theDimension) {
if (!theDimension.equals(myFrame.getSize())) {
myFrame.setSize(theDimension);
setChanged();
notifyObservers(theDimension);
}
}
/**
* Helper function which sets up JFrame for tetris game.
* @param theBoard Board object used to maintain game state.
* @param theKeys KeyObject used to maintain keys mappings.
* @param theTimer Timer object used to pause/play game.
*/
private void setup(final Board theBoard, final KeyCodes theKeys,
final Timer theTimer) {
final MyGamePanel gPanel = new MyGamePanel(theBoard, theTimer);
final StatusPanel panel = new StatusPanel(theBoard, theKeys);
final JMenuBar menuBar = MenuBar.createMenuBar(
myFrame, theBoard, theKeys, theTimer, this);
myFrame.add(gPanel, BorderLayout.WEST);
myFrame.add(panel.getPanel(), BorderLayout.EAST);
myFrame.add(menuBar, BorderLayout.NORTH);
gPanel.addKeyListener(new MyKeyListener(theBoard, theTimer, theKeys));
theBoard.addObserver(gPanel);
addObserver(gPanel);
addObserver(panel);
gPanel.setFocusable(true);
gPanel.requestFocusInWindow();
}
/**
* Returns a runnable JFrame.
* @return Runnablegg JFrame.
*/
public Runnable createFrame() {
return new Runnable() {
@Override
public void run() {
myFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
myFrame.setVisible(true);
myFrame.pack();
}
};
}
/**
* JFrame that maintains a set aspect ratio with the consideration of a menu.
* This frame also informs all observers of the size when changed.
* @author Tyler Stinson
* @version 1
*/
private class ResizeFrame extends JFrame {
/** Generated serial version id. */
private static final long serialVersionUID = -6356355310149745112L;
/** Height of menu. Used to offset size of menu. */
private static final int MENU_OFFSET = 44;
@Override
public void validate() {
super.validate();
setChanged();
setSize(getWidth(), getWidth() + MENU_OFFSET);
final Dimension d = new Dimension(getWidth(), getWidth());
notifyObservers(d);
}
}
}
| UTF-8 | Java | 3,774 | java | Frame.java | Java | [
{
"context": "/*\n* Tyler Stinson\n* TCSS 305 – Autumn 2015\n* Assignment 6 – Tetris ",
"end": 18,
"score": 0.9998493194580078,
"start": 5,
"tag": "NAME",
"value": "Tyler Stinson"
},
{
"context": "ss used to create an Observable JFrame.\n * @author Tyler Stinson\n * @version 1\n */\n... | null | [] | /*
* <NAME>
* TCSS 305 – Autumn 2015
* Assignment 6 – Tetris A
*/
package view;
import controllers.MyKeyListener;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.util.Observable;
import javax.swing.JFrame;
import javax.swing.JMenuBar;
import javax.swing.Timer;
import keys.KeyCodes;
import model.Board;
import view.menu.MenuBar;
/**
* Class used to create an Observable JFrame.
* @author <NAME>
* @version 1
*/
public class Frame extends Observable {
/** The base dimension of this frame. */
private static final Dimension DIMENSION = new Dimension(600, 644);
/** The JFrame of this object. */
private final JFrame myFrame;
/**
* The constructor for this object.
* @param theBoard The board passed into children.
* @param theKeys The Keys passed into children.
* @param theTimer The timer passed into children.
*/
public Frame(final Board theBoard, final KeyCodes theKeys, final Timer theTimer) {
super();
myFrame = new ResizeFrame();
myFrame.setPreferredSize(DIMENSION);
setup(theBoard, theKeys, theTimer);
}
/**
* Function used to resize frame.
* @param theDimension theDimension sent to the Observers
*/
public void resize(final Dimension theDimension) {
if (!theDimension.equals(myFrame.getSize())) {
myFrame.setSize(theDimension);
setChanged();
notifyObservers(theDimension);
}
}
/**
* Helper function which sets up JFrame for tetris game.
* @param theBoard Board object used to maintain game state.
* @param theKeys KeyObject used to maintain keys mappings.
* @param theTimer Timer object used to pause/play game.
*/
private void setup(final Board theBoard, final KeyCodes theKeys,
final Timer theTimer) {
final MyGamePanel gPanel = new MyGamePanel(theBoard, theTimer);
final StatusPanel panel = new StatusPanel(theBoard, theKeys);
final JMenuBar menuBar = MenuBar.createMenuBar(
myFrame, theBoard, theKeys, theTimer, this);
myFrame.add(gPanel, BorderLayout.WEST);
myFrame.add(panel.getPanel(), BorderLayout.EAST);
myFrame.add(menuBar, BorderLayout.NORTH);
gPanel.addKeyListener(new MyKeyListener(theBoard, theTimer, theKeys));
theBoard.addObserver(gPanel);
addObserver(gPanel);
addObserver(panel);
gPanel.setFocusable(true);
gPanel.requestFocusInWindow();
}
/**
* Returns a runnable JFrame.
* @return Runnablegg JFrame.
*/
public Runnable createFrame() {
return new Runnable() {
@Override
public void run() {
myFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
myFrame.setVisible(true);
myFrame.pack();
}
};
}
/**
* JFrame that maintains a set aspect ratio with the consideration of a menu.
* This frame also informs all observers of the size when changed.
* @author <NAME>
* @version 1
*/
private class ResizeFrame extends JFrame {
/** Generated serial version id. */
private static final long serialVersionUID = -6356355310149745112L;
/** Height of menu. Used to offset size of menu. */
private static final int MENU_OFFSET = 44;
@Override
public void validate() {
super.validate();
setChanged();
setSize(getWidth(), getWidth() + MENU_OFFSET);
final Dimension d = new Dimension(getWidth(), getWidth());
notifyObservers(d);
}
}
}
| 3,753 | 0.625729 | 0.615915 | 126 | 28.920635 | 23.172783 | 86 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.5 | false | false | 13 |
82ffffd0c57cf23ccd89468773e2b69950e7dc22 | 37,185,826,866,400 | fa5b3f6e879b37a68e643e8f23ea1ede26f9f96e | /app/src/main/java/com/example/asus/medic_schedule/MainActivity.java | b5cc9845a0340e5c94ea50b085f9059e90fb0c21 | [] | no_license | DivyaPrajapati09/MedicSchedule | https://github.com/DivyaPrajapati09/MedicSchedule | 787baadaf6e7546b563ccd85e18407324670ff33 | 1305f990c9d3f6d0530be00bd849e862b6771219 | refs/heads/master | 2020-12-31T06:45:59.320000 | 2016-06-10T18:42:46 | 2016-06-10T18:42:46 | 59,402,889 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package com.example.asus.medic_schedule;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.AdapterView;
import com.mikepenz.iconics.typeface.FontAwesome;
import com.mikepenz.materialdrawer.Drawer;
import com.mikepenz.materialdrawer.accountswitcher.AccountHeader;
import com.mikepenz.materialdrawer.model.DividerDrawerItem;
import com.mikepenz.materialdrawer.model.PrimaryDrawerItem;
import com.mikepenz.materialdrawer.model.ProfileDrawerItem;
import com.mikepenz.materialdrawer.model.SecondaryDrawerItem;
import com.mikepenz.materialdrawer.model.interfaces.IDrawerItem;
import com.mikepenz.materialdrawer.model.interfaces.IProfile;
public class MainActivity extends AppCompatActivity {
private static final int PROFILE_SETTING = 1;
private AccountHeader.Result headerResult = null;
private Drawer.Result result = null;
private Toolbar toolbar;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// getActionBar().setDisplayHomeAsUpEnabled(true);
// getActionBar().setHomeButtonEnabled(true);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
final IProfile profile = new ProfileDrawerItem().withName("Divya Prajapati").withEmail("divya4337@gmail.com").withIcon(getResources().getDrawable(R.drawable.home));
headerResult = new AccountHeader()
.withActivity(this)
// .withCompactStyle(true)
.withHeaderBackground(R.drawable.download)
.addProfiles(
profile
// profile1,
//don't ask but google uses 14dp for the add account icon in gmail but 20dp for the normal icons (like manage account)
// new ProfileSettingDrawerItem().withName("Add Account").withDescription("Add new GitHub Account").withIcon(new IconicsDrawable(this, GoogleMaterial.Icon.gmd_add).actionBarSize().paddingDp(5)).withIdentifier(PROFILE_SETTING),
// new ProfileSettingDrawerItem().withName("Manage Account").withIcon(GoogleMaterial.Icon.gmd_settings)
)
.withSavedInstance(savedInstanceState)
.build();
result = new Drawer()
.withActivity(this)
.withToolbar(toolbar)
.withActionBarDrawerToggle(true)
.withAccountHeader(headerResult) //set the AccountHeader we created earlier for the header
.addDrawerItems(
new PrimaryDrawerItem().withName(R.string.drawer_item_home).withIcon(FontAwesome.Icon.faw_home).withIdentifier(1).withCheckable(false),
new PrimaryDrawerItem().withName(R.string.drawer_item_medlist).withIcon(FontAwesome.Icon.faw_medkit).withIdentifier(9).withCheckable(false),
new DividerDrawerItem(),
new SecondaryDrawerItem().withName(R.string.drawer_item_Blood_Pressure).withIcon(FontAwesome.Icon.faw_stethoscope).withIdentifier(2).withCheckable(false),
new SecondaryDrawerItem().withName(R.string.drawer_item_Blood_Sugar).withIcon(FontAwesome.Icon.faw_stethoscope).withIdentifier(3).withCheckable(false),
new SecondaryDrawerItem().withName(R.string.drawer_item_Search).withIcon(FontAwesome.Icon.faw_search).withIdentifier(4).withCheckable(false),
new SecondaryDrawerItem().withName(R.string.drawer_item_Hospital).withIcon(FontAwesome.Icon.faw_hospital_o).withIdentifier(5).withCheckable(false),
new SecondaryDrawerItem().withName(R.string.drawer_item_Medical).withIcon(FontAwesome.Icon.faw_medkit).withIdentifier(6).withCheckable(false),
new SecondaryDrawerItem().withName(R.string.drawer_item_Ambulance).withIcon(FontAwesome.Icon.faw_ambulance).withIdentifier(7).withCheckable(false),
new SecondaryDrawerItem().withName(R.string.drawer_item_settings).withIcon(FontAwesome.Icon.faw_gear).withIdentifier(8).withCheckable(false)
)
.withOnDrawerItemClickListener(new Drawer.OnDrawerItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id, IDrawerItem drawerItem) {
if (drawerItem != null) {
if (drawerItem.getIdentifier() == 1) {
Intent intent = new Intent(MainActivity.this, MainActivity.class);
MainActivity.this.startActivity(intent);
} else if (drawerItem.getIdentifier() == 2) {
Intent intent = new Intent(MainActivity.this, DataList_bp.class);
MainActivity.this.startActivity(intent);
} else if (drawerItem.getIdentifier() == 3) {
Intent intent = new Intent(MainActivity.this, DataList_su.class);
MainActivity.this.startActivity(intent);
} else if (drawerItem.getIdentifier() == 4) {
Intent intent = new Intent(MainActivity.this, Places.class);
MainActivity.this.startActivity(intent);
} else if (drawerItem.getIdentifier() == 5) {
Intent intent = new Intent(MainActivity.this, ClinicList.class);
MainActivity.this.startActivity(intent);
} else if (drawerItem.getIdentifier() == 6) {
Intent intent = new Intent(MainActivity.this, MedicalList.class);
MainActivity.this.startActivity(intent);
} else if (drawerItem.getIdentifier() == 7) {
Intent intent = new Intent(MainActivity.this, Ambulance.class);
MainActivity.this.startActivity(intent);
} else if (drawerItem.getIdentifier() == 8) {
Intent intent = new Intent(MainActivity.this, SystemSettings.class);
MainActivity.this.startActivity(intent);
}else if (drawerItem.getIdentifier() == 9) {
Intent intent = new Intent(MainActivity.this, DMedicine_List.class);
MainActivity.this.startActivity(intent);
}
// set the selection to the item with the identifier 5
result.setSelectionByIdentifier(1, false);
}
}
})
.withSavedInstance(savedInstanceState)
.build();
}
} | UTF-8 | Java | 7,257 | java | MainActivity.java | Java | [
{
"context": "ofile profile = new ProfileDrawerItem().withName(\"Divya Prajapati\").withEmail(\"divya4337@gmail.com\").withIcon(getRe",
"end": 1536,
"score": 0.9998908042907715,
"start": 1521,
"tag": "NAME",
"value": "Divya Prajapati"
},
{
"context": "awerItem().withName(\"Divya Praj... | null | [] | package com.example.asus.medic_schedule;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.AdapterView;
import com.mikepenz.iconics.typeface.FontAwesome;
import com.mikepenz.materialdrawer.Drawer;
import com.mikepenz.materialdrawer.accountswitcher.AccountHeader;
import com.mikepenz.materialdrawer.model.DividerDrawerItem;
import com.mikepenz.materialdrawer.model.PrimaryDrawerItem;
import com.mikepenz.materialdrawer.model.ProfileDrawerItem;
import com.mikepenz.materialdrawer.model.SecondaryDrawerItem;
import com.mikepenz.materialdrawer.model.interfaces.IDrawerItem;
import com.mikepenz.materialdrawer.model.interfaces.IProfile;
public class MainActivity extends AppCompatActivity {
private static final int PROFILE_SETTING = 1;
private AccountHeader.Result headerResult = null;
private Drawer.Result result = null;
private Toolbar toolbar;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// getActionBar().setDisplayHomeAsUpEnabled(true);
// getActionBar().setHomeButtonEnabled(true);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
final IProfile profile = new ProfileDrawerItem().withName("<NAME>").withEmail("<EMAIL>").withIcon(getResources().getDrawable(R.drawable.home));
headerResult = new AccountHeader()
.withActivity(this)
// .withCompactStyle(true)
.withHeaderBackground(R.drawable.download)
.addProfiles(
profile
// profile1,
//don't ask but google uses 14dp for the add account icon in gmail but 20dp for the normal icons (like manage account)
// new ProfileSettingDrawerItem().withName("Add Account").withDescription("Add new GitHub Account").withIcon(new IconicsDrawable(this, GoogleMaterial.Icon.gmd_add).actionBarSize().paddingDp(5)).withIdentifier(PROFILE_SETTING),
// new ProfileSettingDrawerItem().withName("Manage Account").withIcon(GoogleMaterial.Icon.gmd_settings)
)
.withSavedInstance(savedInstanceState)
.build();
result = new Drawer()
.withActivity(this)
.withToolbar(toolbar)
.withActionBarDrawerToggle(true)
.withAccountHeader(headerResult) //set the AccountHeader we created earlier for the header
.addDrawerItems(
new PrimaryDrawerItem().withName(R.string.drawer_item_home).withIcon(FontAwesome.Icon.faw_home).withIdentifier(1).withCheckable(false),
new PrimaryDrawerItem().withName(R.string.drawer_item_medlist).withIcon(FontAwesome.Icon.faw_medkit).withIdentifier(9).withCheckable(false),
new DividerDrawerItem(),
new SecondaryDrawerItem().withName(R.string.drawer_item_Blood_Pressure).withIcon(FontAwesome.Icon.faw_stethoscope).withIdentifier(2).withCheckable(false),
new SecondaryDrawerItem().withName(R.string.drawer_item_Blood_Sugar).withIcon(FontAwesome.Icon.faw_stethoscope).withIdentifier(3).withCheckable(false),
new SecondaryDrawerItem().withName(R.string.drawer_item_Search).withIcon(FontAwesome.Icon.faw_search).withIdentifier(4).withCheckable(false),
new SecondaryDrawerItem().withName(R.string.drawer_item_Hospital).withIcon(FontAwesome.Icon.faw_hospital_o).withIdentifier(5).withCheckable(false),
new SecondaryDrawerItem().withName(R.string.drawer_item_Medical).withIcon(FontAwesome.Icon.faw_medkit).withIdentifier(6).withCheckable(false),
new SecondaryDrawerItem().withName(R.string.drawer_item_Ambulance).withIcon(FontAwesome.Icon.faw_ambulance).withIdentifier(7).withCheckable(false),
new SecondaryDrawerItem().withName(R.string.drawer_item_settings).withIcon(FontAwesome.Icon.faw_gear).withIdentifier(8).withCheckable(false)
)
.withOnDrawerItemClickListener(new Drawer.OnDrawerItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id, IDrawerItem drawerItem) {
if (drawerItem != null) {
if (drawerItem.getIdentifier() == 1) {
Intent intent = new Intent(MainActivity.this, MainActivity.class);
MainActivity.this.startActivity(intent);
} else if (drawerItem.getIdentifier() == 2) {
Intent intent = new Intent(MainActivity.this, DataList_bp.class);
MainActivity.this.startActivity(intent);
} else if (drawerItem.getIdentifier() == 3) {
Intent intent = new Intent(MainActivity.this, DataList_su.class);
MainActivity.this.startActivity(intent);
} else if (drawerItem.getIdentifier() == 4) {
Intent intent = new Intent(MainActivity.this, Places.class);
MainActivity.this.startActivity(intent);
} else if (drawerItem.getIdentifier() == 5) {
Intent intent = new Intent(MainActivity.this, ClinicList.class);
MainActivity.this.startActivity(intent);
} else if (drawerItem.getIdentifier() == 6) {
Intent intent = new Intent(MainActivity.this, MedicalList.class);
MainActivity.this.startActivity(intent);
} else if (drawerItem.getIdentifier() == 7) {
Intent intent = new Intent(MainActivity.this, Ambulance.class);
MainActivity.this.startActivity(intent);
} else if (drawerItem.getIdentifier() == 8) {
Intent intent = new Intent(MainActivity.this, SystemSettings.class);
MainActivity.this.startActivity(intent);
}else if (drawerItem.getIdentifier() == 9) {
Intent intent = new Intent(MainActivity.this, DMedicine_List.class);
MainActivity.this.startActivity(intent);
}
// set the selection to the item with the identifier 5
result.setSelectionByIdentifier(1, false);
}
}
})
.withSavedInstance(savedInstanceState)
.build();
}
} | 7,236 | 0.611547 | 0.607 | 118 | 60.508476 | 48.872498 | 250 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.635593 | false | false | 13 |
05899246961f687e7ef800f086f619b4f8c65191 | 15,410,342,691,189 | 366d709331d04133d1222e45cd3d14d09e038b0f | /HandlingElements/alerts/AlertWithOKButton.java | 3f24b86cee0eb9ced8f94c11365c0a4e98193da9 | [] | no_license | DorababuServion/SeleniumClass | https://github.com/DorababuServion/SeleniumClass | aa9954ff4ecccddf45dd3fc57a0458acb4530ff2 | 079cce6c168f40154bf811ee1ea09311659304da | refs/heads/main | 2023-03-21T04:36:33.337000 | 2021-03-10T04:46:27 | 2021-03-10T04:46:27 | 346,233,758 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package HandlingElements;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class AlertWithOKButton {
public static void main(String[] args) throws InterruptedException {
System.setProperty("webdriver.chrome.driver","C://Drivers/chromedriver_win32/chromedriver.exe");
WebDriver driver=new ChromeDriver();
driver.get("http://demo.automationtesting.in/Alerts.html");
driver.findElement(By.xpath("//*[@id='OKTab']/button")).click(); // Clicking on the button
Thread.sleep(5000);
driver.switchTo().alert().accept(); // close alert box by clicking on OK button
}
}
| UTF-8 | Java | 671 | java | AlertWithOKButton.java | Java | [] | null | [] | package HandlingElements;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class AlertWithOKButton {
public static void main(String[] args) throws InterruptedException {
System.setProperty("webdriver.chrome.driver","C://Drivers/chromedriver_win32/chromedriver.exe");
WebDriver driver=new ChromeDriver();
driver.get("http://demo.automationtesting.in/Alerts.html");
driver.findElement(By.xpath("//*[@id='OKTab']/button")).click(); // Clicking on the button
Thread.sleep(5000);
driver.switchTo().alert().accept(); // close alert box by clicking on OK button
}
}
| 671 | 0.734724 | 0.725782 | 24 | 26.958334 | 31.434427 | 98 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1.583333 | false | false | 13 |
6b179d9146fa7fac093c6ec0fdd9681dc34ed54c | 18,038,862,678,163 | 5e527ee9f9f48fe64f47ea31965c917a4f246156 | /src/main/java/container/TryConcurrentHashMap.java | 3bab164bb45b621a13c19d206350eb8e431cef18 | [] | no_license | TerenceG-cn/multithreading-and-concurrency | https://github.com/TerenceG-cn/multithreading-and-concurrency | 9c4dd67b0920c28656f1441dee41e37c79b28df8 | 03d717beaf0fb4b336321b65216bca2c08739751 | refs/heads/master | 2023-05-10T07:38:40.410000 | 2021-06-13T15:21:27 | 2021-06-13T15:21:27 | 278,818,971 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package container;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
public class TryConcurrentHashMap {
public static void main(String[] args){
Map<Integer,Integer> concurrentHashMap = new ConcurrentHashMap<Integer, Integer>();
//Map<Integer,Integer> hashmap=new HashMap<Integer, Integer>();
/**
* 额外的原子操作
*/
concurrentHashMap.putIfAbsent(1,1);//V putIfAbsent(K key,V value)
/*
public V putIfAbsent(K key, V value) {
return putVal(key, value, true);
}
*/
concurrentHashMap.remove(1,1 );
/*
public boolean remove(Object key, Object value) {
if (key == null)
throw new NullPointerException();
return value != null && replaceNode(key, null, value) != null;
}
*/
concurrentHashMap.replace(1, 1, 0);
concurrentHashMap.replace(1, 2);
/*
public boolean replace(K key, V oldValue, V newValue) {
if (key == null || oldValue == null || newValue == null)
throw new NullPointerException();
return replaceNode(key, newValue, oldValue) != null;
}
*/
}
}
| UTF-8 | Java | 1,282 | java | TryConcurrentHashMap.java | Java | [] | null | [] | package container;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
public class TryConcurrentHashMap {
public static void main(String[] args){
Map<Integer,Integer> concurrentHashMap = new ConcurrentHashMap<Integer, Integer>();
//Map<Integer,Integer> hashmap=new HashMap<Integer, Integer>();
/**
* 额外的原子操作
*/
concurrentHashMap.putIfAbsent(1,1);//V putIfAbsent(K key,V value)
/*
public V putIfAbsent(K key, V value) {
return putVal(key, value, true);
}
*/
concurrentHashMap.remove(1,1 );
/*
public boolean remove(Object key, Object value) {
if (key == null)
throw new NullPointerException();
return value != null && replaceNode(key, null, value) != null;
}
*/
concurrentHashMap.replace(1, 1, 0);
concurrentHashMap.replace(1, 2);
/*
public boolean replace(K key, V oldValue, V newValue) {
if (key == null || oldValue == null || newValue == null)
throw new NullPointerException();
return replaceNode(key, newValue, oldValue) != null;
}
*/
}
}
| 1,282 | 0.552839 | 0.545741 | 38 | 32.36842 | 25.633471 | 91 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1 | false | false | 13 |
544e27197401ea183af1677bfe5c09e6652c9455 | 24,610,162,664,028 | 1ff91b0589116e734752e1d951fc1831057d8e4f | /src/main/java/com/kimjh/simpleblog/controller/PostController.java | 176fd57de1d60050db8d3556b1755afe849d8387 | [
"MIT"
] | permissive | jinhak/SimpleBlog | https://github.com/jinhak/SimpleBlog | 7f084b7292263ab35fd02313dab3f77ba02521d5 | c8e766c4adca096f96b56956884a5302ad0d307d | refs/heads/master | 2020-06-12T17:31:14.137000 | 2019-07-07T23:32:28 | 2019-07-07T23:32:28 | 194,372,938 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | package com.kimjh.simpleblog.controller;
import com.kimjh.simpleblog.common.controller.AbstractBaseDataController;
import com.kimjh.simpleblog.db.PostDB;
import com.kimjh.simpleblog.model.PostModel;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.io.IOException;
import java.util.concurrent.ExecutionException;
@Controller
@PreAuthorize("isAuthenticated()")
@RequestMapping("/post")
public class PostController extends AbstractBaseDataController {
@PostMapping("/add")
@ResponseBody
public boolean doAdd(@ModelAttribute PostModel postModel) throws IOException {
return PostDB.addPost(postModel);
}
@PostMapping("/edit")
@ResponseBody
public boolean doEdit(@ModelAttribute PostModel postModel) throws IOException {
return PostDB.editPost(postModel);
}
@PostMapping("/editVisible")
@ResponseBody
public boolean doEditVisible(@ModelAttribute PostModel postModel) throws IOException {
return PostDB.editPostVisible(postModel);
}
@PostMapping("/delete")
@ResponseBody
public boolean doDelete(@ModelAttribute PostModel postModel) throws IOException, ExecutionException, InterruptedException {
return PostDB.deletePost(postModel);
}
}
| UTF-8 | Java | 1,557 | java | PostController.java | Java | [] | null | [] | package com.kimjh.simpleblog.controller;
import com.kimjh.simpleblog.common.controller.AbstractBaseDataController;
import com.kimjh.simpleblog.db.PostDB;
import com.kimjh.simpleblog.model.PostModel;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.io.IOException;
import java.util.concurrent.ExecutionException;
@Controller
@PreAuthorize("isAuthenticated()")
@RequestMapping("/post")
public class PostController extends AbstractBaseDataController {
@PostMapping("/add")
@ResponseBody
public boolean doAdd(@ModelAttribute PostModel postModel) throws IOException {
return PostDB.addPost(postModel);
}
@PostMapping("/edit")
@ResponseBody
public boolean doEdit(@ModelAttribute PostModel postModel) throws IOException {
return PostDB.editPost(postModel);
}
@PostMapping("/editVisible")
@ResponseBody
public boolean doEditVisible(@ModelAttribute PostModel postModel) throws IOException {
return PostDB.editPostVisible(postModel);
}
@PostMapping("/delete")
@ResponseBody
public boolean doDelete(@ModelAttribute PostModel postModel) throws IOException, ExecutionException, InterruptedException {
return PostDB.deletePost(postModel);
}
}
| 1,557 | 0.785485 | 0.785485 | 44 | 34.386364 | 29.492075 | 127 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.409091 | false | false | 13 |
fdadbdf2dfd7c0aa6526799da812c87b150afd60 | 30,339,649,040,832 | cf66ae359417732c172597177769261b63cb17cc | /Algorithms/Strings/Anagram.java | 9ae858d3c25cd34a3551ba01de6cae2c0f479b35 | [
"Unlicense"
] | permissive | jerubball/HackerRank | https://github.com/jerubball/HackerRank | fec45be53669d195c41d2edf0fbcb5eeb2f9de6f | c484532d6e4cd57227d17f049df5dd754611f281 | refs/heads/master | 2021-06-12T11:05:07.408000 | 2019-10-02T21:57:46 | 2019-10-02T21:57:46 | 135,625,201 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package Algorithms.Strings;
import java.io.*;
import java.math.*;
import java.security.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.regex.*;
/**
* HackerRank Algorithms Strings 18
* https://www.hackerrank.com/challenges/anagram/problem
* @author Hasol
*/
public class Anagram {
static final int ALPHABET = 26;
// Complete the anagram function below.
static int anagram(String s) {
if (s.length()%2 != 0)
return -1;
else {
int size = s.length()/2;
String a = s.substring(0,size), b = s.substring(size);
int[] af = frequency(a), bf = frequency(b);
int diff = 0;
for (int i=0; i<ALPHABET; i++)
diff += Math.abs(af[i] - bf[i]);
return diff/2;
}
}
static int[] frequency(String s) {
int[] freq = new int[ALPHABET];
for (char c: s.toCharArray())
freq[c-'a']++;
return freq;
}
private static final Scanner scanner = new Scanner(System.in);
public static void main(String[] args) throws IOException {
BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(System.getenv("OUTPUT_PATH")));
int q = scanner.nextInt();
scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?");
for (int qItr=0; qItr<q; qItr++) {
String s = scanner.nextLine();
int result = anagram(s);
bufferedWriter.write(String.valueOf(result));
bufferedWriter.newLine();
}
bufferedWriter.close();
scanner.close();
}
}
| UTF-8 | Java | 1,628 | java | Anagram.java | Java | [
{
"context": "ckerrank.com/challenges/anagram/problem\n * @author Hasol\n */\npublic class Anagram {\n static final int A",
"end": 300,
"score": 0.9994113445281982,
"start": 295,
"tag": "NAME",
"value": "Hasol"
}
] | null | [] | package Algorithms.Strings;
import java.io.*;
import java.math.*;
import java.security.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.regex.*;
/**
* HackerRank Algorithms Strings 18
* https://www.hackerrank.com/challenges/anagram/problem
* @author Hasol
*/
public class Anagram {
static final int ALPHABET = 26;
// Complete the anagram function below.
static int anagram(String s) {
if (s.length()%2 != 0)
return -1;
else {
int size = s.length()/2;
String a = s.substring(0,size), b = s.substring(size);
int[] af = frequency(a), bf = frequency(b);
int diff = 0;
for (int i=0; i<ALPHABET; i++)
diff += Math.abs(af[i] - bf[i]);
return diff/2;
}
}
static int[] frequency(String s) {
int[] freq = new int[ALPHABET];
for (char c: s.toCharArray())
freq[c-'a']++;
return freq;
}
private static final Scanner scanner = new Scanner(System.in);
public static void main(String[] args) throws IOException {
BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(System.getenv("OUTPUT_PATH")));
int q = scanner.nextInt();
scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?");
for (int qItr=0; qItr<q; qItr++) {
String s = scanner.nextLine();
int result = anagram(s);
bufferedWriter.write(String.valueOf(result));
bufferedWriter.newLine();
}
bufferedWriter.close();
scanner.close();
}
}
| 1,628 | 0.571867 | 0.556511 | 50 | 31.559999 | 19.854631 | 105 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.74 | false | false | 13 |
141cc9f7f20e8aba4c74822eaa95f102bf7d4346 | 11,063,835,814,407 | 79b17b0a705d8c4e944cf904cd6e8f2a47b2904b | /src/main/java/hu/tilos/radio/backend/content/page/PageRepository.java | 3e69f449ec85640bd5c83536a83a68e146b60ca0 | [] | no_license | tilosradio/web2-backend | https://github.com/tilosradio/web2-backend | c17e4a7fc5337f2bccbef579b09aadc2fb5f05e7 | e9ee545fd06ca13d31f4d53271d54f51394911fc | refs/heads/master | 2020-01-27T19:14:58.425000 | 2018-10-16T17:45:16 | 2018-10-16T17:45:16 | 26,058,309 | 0 | 1 | null | false | 2018-10-16T17:45:18 | 2014-11-01T17:53:43 | 2017-09-24T09:47:56 | 2018-10-16T17:45:17 | 36,758 | 0 | 1 | 0 | Java | false | null | package hu.tilos.radio.backend.content.page;
import org.springframework.data.mongodb.repository.MongoRepository;
public interface PageRepository extends MongoRepository<Page, String> {
Page findByAlias(String alias);
Page findByAliasOrId(String alias, String id);
Long deletePageByAlias(String alias);
}
| UTF-8 | Java | 322 | java | PageRepository.java | Java | [] | null | [] | package hu.tilos.radio.backend.content.page;
import org.springframework.data.mongodb.repository.MongoRepository;
public interface PageRepository extends MongoRepository<Page, String> {
Page findByAlias(String alias);
Page findByAliasOrId(String alias, String id);
Long deletePageByAlias(String alias);
}
| 322 | 0.78882 | 0.78882 | 13 | 23.76923 | 27.072989 | 71 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.538462 | false | false | 13 |
69f0fb9dc39ac75d080c4841f097deded87fba3a | 8,074,538,559,615 | adce1ed3eb8461e38d9e9c4207a5e629456f885b | /Assignment2a/src/assignment2a/ChessDriver.java | b86b977fbe33eacc5fd4f477c26cb85025ebd220 | [] | no_license | hwchan/chess | https://github.com/hwchan/chess | 2561d40dd219c09f36f0a219a3de2bef3fe71f36 | 7345ddd6c6e7ab2c79407acde153c5222fffa8c4 | refs/heads/master | 2021-01-10T10:10:44.667000 | 2015-11-29T09:18:12 | 2015-11-29T09:18:12 | 45,762,510 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package assignment2a;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.*;
import javax.swing.*;
import javax.swing.filechooser.FileFilter;
import javax.swing.filechooser.FileNameExtensionFilter;
public class ChessDriver extends JFrame implements ActionListener {
JMenuBar menuBar;
JMenu menu;
JMenuItem saveMenuItem, loadMenuItem;
static GameBoard game;
static ChessDriver cd;
final JFileChooser fc = new JFileChooser();
int returnVal;
String fileName;
public static void main(String[] args) {
cd = new ChessDriver();
cd.setUpFrame(cd);
game = new GameBoard();
cd.add(game);
cd.pack();
cd.setUpBoard();
}
private void setUpFrame(ChessDriver cd) {
cd.setTitle("Chess");
cd.setPreferredSize(new Dimension(480, 480));
cd.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
cd.setVisible(true);
cd.menuBar = new JMenuBar();
cd.menu = new JMenu("File");
cd.menuBar.add(cd.menu);
cd.setJMenuBar(cd.menuBar);
cd.saveMenuItem = new JMenuItem("Save");
cd.saveMenuItem.addActionListener(cd);
cd.loadMenuItem = new JMenuItem("Load");
cd.loadMenuItem.addActionListener(cd);
cd.menu.add(cd.saveMenuItem);
cd.menu.add(cd.loadMenuItem);
}
private void setUpBoard() {
game.initializeBoard();
game.addPiece(new Rook(false), 0, 0);
game.addPiece(new Knight(false), 1, 0);
game.addPiece(new Bishop(false), 2, 0);
game.addPiece(new Queen(false), 3, 0);
game.addPiece(new King(false), 4, 0);
game.addPiece(new Bishop(false), 5, 0);
game.addPiece(new Knight(false), 6, 0);
game.addPiece(new Rook(false), 7, 0);
for (int i = 0; i < 8; i++) {
game.addPiece(new Pawn(false), i, 1);
}
game.addPiece(new Rook(true), 0, 7);
game.addPiece(new Knight(true), 1, 7);
game.addPiece(new Bishop(true), 2, 7);
game.addPiece(new Queen(true), 3, 7);
game.addPiece(new King(true), 4, 7);
game.addPiece(new Bishop(true), 5, 7);
game.addPiece(new Knight(true), 6, 7);
game.addPiece(new Rook(true), 7, 7);
for (int i = 0; i < 8; i++) {
game.addPiece(new Pawn(true), i, 6);
}
}
@Override
public void actionPerformed(ActionEvent e) {
// save
if (e.getSource() == saveMenuItem) {
returnVal = fc.showSaveDialog(this);
if(returnVal == JFileChooser.APPROVE_OPTION) {
// check if extension is already .chess
fileName = fc.getSelectedFile().getAbsolutePath();
if(fileName.lastIndexOf(".") == -1 || !fileName.substring(fileName.lastIndexOf("."), fileName.length()).equals(".chess")) {
fileName = fileName + ".chess";
}
// save it
try {
FileOutputStream fileOut = new FileOutputStream(fileName);
ObjectOutputStream out = new ObjectOutputStream(fileOut);
out.writeObject(game);
out.close();
fileOut.close();
System.out.println("Game saved to " + fileName);
} catch (IOException i) {
}
}
} // load
else if (e.getSource() == loadMenuItem) {
FileFilter filter = new FileNameExtensionFilter("Chess file", new String[] {"chess"});
fc.addChoosableFileFilter(filter);
fc.setAcceptAllFileFilterUsed(false);
returnVal = fc.showOpenDialog(this);
if(returnVal == JFileChooser.APPROVE_OPTION) {
fileName = fc.getCurrentDirectory() + File.separator + fc.getSelectedFile().getName();
try {
FileInputStream fileIn = new FileInputStream(fileName);
ObjectInputStream in = new ObjectInputStream(fileIn);
GameBoard loadGame = (GameBoard) in.readObject();
in.close();
fileIn.close();
// replace the GameBoard
cd.remove(game);
cd.add(loadGame);
game = loadGame;
cd.pack();
cd.repaint();
System.out.println("Loading " + fileName);
// print the turn
if(game.isPlayer1Turn()) {
System.out.println("WHITE's move");
} else {
System.out.println("BLACK's move");
}
} catch (IOException i) {
System.out.println("Error reading file");
} catch (ClassNotFoundException c) {
System.out.println("Invalid save file");
}
}
}
}
}
| UTF-8 | Java | 5,090 | java | ChessDriver.java | Java | [] | null | [] | package assignment2a;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.*;
import javax.swing.*;
import javax.swing.filechooser.FileFilter;
import javax.swing.filechooser.FileNameExtensionFilter;
public class ChessDriver extends JFrame implements ActionListener {
JMenuBar menuBar;
JMenu menu;
JMenuItem saveMenuItem, loadMenuItem;
static GameBoard game;
static ChessDriver cd;
final JFileChooser fc = new JFileChooser();
int returnVal;
String fileName;
public static void main(String[] args) {
cd = new ChessDriver();
cd.setUpFrame(cd);
game = new GameBoard();
cd.add(game);
cd.pack();
cd.setUpBoard();
}
private void setUpFrame(ChessDriver cd) {
cd.setTitle("Chess");
cd.setPreferredSize(new Dimension(480, 480));
cd.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
cd.setVisible(true);
cd.menuBar = new JMenuBar();
cd.menu = new JMenu("File");
cd.menuBar.add(cd.menu);
cd.setJMenuBar(cd.menuBar);
cd.saveMenuItem = new JMenuItem("Save");
cd.saveMenuItem.addActionListener(cd);
cd.loadMenuItem = new JMenuItem("Load");
cd.loadMenuItem.addActionListener(cd);
cd.menu.add(cd.saveMenuItem);
cd.menu.add(cd.loadMenuItem);
}
private void setUpBoard() {
game.initializeBoard();
game.addPiece(new Rook(false), 0, 0);
game.addPiece(new Knight(false), 1, 0);
game.addPiece(new Bishop(false), 2, 0);
game.addPiece(new Queen(false), 3, 0);
game.addPiece(new King(false), 4, 0);
game.addPiece(new Bishop(false), 5, 0);
game.addPiece(new Knight(false), 6, 0);
game.addPiece(new Rook(false), 7, 0);
for (int i = 0; i < 8; i++) {
game.addPiece(new Pawn(false), i, 1);
}
game.addPiece(new Rook(true), 0, 7);
game.addPiece(new Knight(true), 1, 7);
game.addPiece(new Bishop(true), 2, 7);
game.addPiece(new Queen(true), 3, 7);
game.addPiece(new King(true), 4, 7);
game.addPiece(new Bishop(true), 5, 7);
game.addPiece(new Knight(true), 6, 7);
game.addPiece(new Rook(true), 7, 7);
for (int i = 0; i < 8; i++) {
game.addPiece(new Pawn(true), i, 6);
}
}
@Override
public void actionPerformed(ActionEvent e) {
// save
if (e.getSource() == saveMenuItem) {
returnVal = fc.showSaveDialog(this);
if(returnVal == JFileChooser.APPROVE_OPTION) {
// check if extension is already .chess
fileName = fc.getSelectedFile().getAbsolutePath();
if(fileName.lastIndexOf(".") == -1 || !fileName.substring(fileName.lastIndexOf("."), fileName.length()).equals(".chess")) {
fileName = fileName + ".chess";
}
// save it
try {
FileOutputStream fileOut = new FileOutputStream(fileName);
ObjectOutputStream out = new ObjectOutputStream(fileOut);
out.writeObject(game);
out.close();
fileOut.close();
System.out.println("Game saved to " + fileName);
} catch (IOException i) {
}
}
} // load
else if (e.getSource() == loadMenuItem) {
FileFilter filter = new FileNameExtensionFilter("Chess file", new String[] {"chess"});
fc.addChoosableFileFilter(filter);
fc.setAcceptAllFileFilterUsed(false);
returnVal = fc.showOpenDialog(this);
if(returnVal == JFileChooser.APPROVE_OPTION) {
fileName = fc.getCurrentDirectory() + File.separator + fc.getSelectedFile().getName();
try {
FileInputStream fileIn = new FileInputStream(fileName);
ObjectInputStream in = new ObjectInputStream(fileIn);
GameBoard loadGame = (GameBoard) in.readObject();
in.close();
fileIn.close();
// replace the GameBoard
cd.remove(game);
cd.add(loadGame);
game = loadGame;
cd.pack();
cd.repaint();
System.out.println("Loading " + fileName);
// print the turn
if(game.isPlayer1Turn()) {
System.out.println("WHITE's move");
} else {
System.out.println("BLACK's move");
}
} catch (IOException i) {
System.out.println("Error reading file");
} catch (ClassNotFoundException c) {
System.out.println("Invalid save file");
}
}
}
}
}
| 5,090 | 0.533595 | 0.524361 | 139 | 35.618706 | 22.503204 | 139 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.935252 | false | false | 13 |
49c61c0ccee241cf7bd453b9c1a6e7815798016f | 16,647,293,246,510 | 5c894e1b5f5fdc515565aa429ecc337c76f9815f | /RetrofitApp/app/src/main/java/com/example/sda/retrofitapp/base/BaseMvpView.java | 01f05a4a820dabe8eea0ecc80cfe6d735ecd2e83 | [] | no_license | manieks/SDA_AND | https://github.com/manieks/SDA_AND | e4f6450965ecbcddf9838d7d9a2090dc0bb9b4f2 | 9a1814c2c5d19ab33c4c98bb671750967bef52ff | refs/heads/master | 2021-01-20T09:37:10.354000 | 2017-06-28T16:55:08 | 2017-06-28T16:55:08 | 90,265,931 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package com.example.sda.retrofitapp.base;
/**
* Created by manieks on 26.06.17.
*/
public interface BaseMvpView {
}
| UTF-8 | Java | 120 | java | BaseMvpView.java | Java | [
{
"context": "m.example.sda.retrofitapp.base;\n\n/**\n * Created by manieks on 26.06.17.\n */\n\npublic interface BaseMvpView {\n",
"end": 68,
"score": 0.9995753765106201,
"start": 61,
"tag": "USERNAME",
"value": "manieks"
}
] | null | [] | package com.example.sda.retrofitapp.base;
/**
* Created by manieks on 26.06.17.
*/
public interface BaseMvpView {
}
| 120 | 0.708333 | 0.658333 | 8 | 14 | 16.537836 | 41 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.125 | false | false | 13 |
7d7ad87d1dc9d871935ea1470481fdafb1d9b512 | 2,637,109,955,560 | 0226222631a2ec6ce01ce3ad09b6b6b0a55af9ee | /PersonalKanban/src/mg/proyecto/evolutivo/kanban/Program.java | 757efcb77cdee1e84e302180e13aa0bc022a2ec0 | [] | no_license | Miguelitos88/ProyectoE | https://github.com/Miguelitos88/ProyectoE | abeb45d6b0fbad1b605b29be0fc07a92fc06ebeb | 9077b6992ba20641327e1c3f7fe041879f9b8067 | refs/heads/master | 2020-05-19T10:39:29.962000 | 2014-06-04T13:28:22 | 2014-06-04T13:28:22 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package mg.proyecto.evolutivo.kanban;
import java.util.Date;
import java.util.Random;
import mg.proyecto.evolutivo.kanban.model.*;
public class Program {
public static IDashboard dashboard = new DashboardList();
public static void main(String[] args) throws Exception {
System.out.println("Start" + new Date());
User user;
for(int i = 0; i < 15; i++){
user = new User();
user.setName("Title " + i);
int priority = 1 + (int) (Math.random()*((10-1)+1));
user.setPriority(priority);
user.start();
}
System.out.println("End " + new Date());
/*Task task;
IDashboard dashboard = new DashboardList();
for (int i = 0; i < 15; i++) {
task = new Task("Task " + (i+1), State.DO_TO);
if(task.save()&& dashboard.add(task)){
if (dashboard.add(task)) {
System.out.println("Saved " + task.getTitle());
System.out.println("End " + new Date());
}
if(task.add()){
System.out.println("Added " + task.getTitle());
}
}*/
}
}
| UTF-8 | Java | 980 | java | Program.java | Java | [] | null | [] | package mg.proyecto.evolutivo.kanban;
import java.util.Date;
import java.util.Random;
import mg.proyecto.evolutivo.kanban.model.*;
public class Program {
public static IDashboard dashboard = new DashboardList();
public static void main(String[] args) throws Exception {
System.out.println("Start" + new Date());
User user;
for(int i = 0; i < 15; i++){
user = new User();
user.setName("Title " + i);
int priority = 1 + (int) (Math.random()*((10-1)+1));
user.setPriority(priority);
user.start();
}
System.out.println("End " + new Date());
/*Task task;
IDashboard dashboard = new DashboardList();
for (int i = 0; i < 15; i++) {
task = new Task("Task " + (i+1), State.DO_TO);
if(task.save()&& dashboard.add(task)){
if (dashboard.add(task)) {
System.out.println("Saved " + task.getTitle());
System.out.println("End " + new Date());
}
if(task.add()){
System.out.println("Added " + task.getTitle());
}
}*/
}
}
| 980 | 0.617347 | 0.605102 | 37 | 25.486486 | 19.212358 | 58 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 2.54054 | false | false | 13 |
9eb5dde952797353004ffb874f53484f1fd32f16 | 14,113,262,583,938 | 939223262838585bc17d24b3263674b8f1946505 | /code/android_main/java/holo_final/LightActivity.java | b4fde57e9772e31aa121413ca3a2a5ce18eec782 | [] | no_license | joswoo/Maker | https://github.com/joswoo/Maker | 75e97b1a2b0134affba7e2910e51f0037519788e | 0841d0d8876bf80cb482d3cc5e5c2ade3df28135 | refs/heads/master | 2020-03-20T04:25:54.439000 | 2018-07-11T04:13:58 | 2018-07-11T04:13:58 | 137,182,022 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package com.example.qhdud.holo_final;
import android.os.Bundle;
import android.support.constraint.ConstraintLayout;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.NumberPicker;
import android.widget.Switch;
import android.widget.TextView;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;
public class LightActivity extends AppCompatActivity {
FirebaseDatabase database;
DatabaseReference SWITCH;
DatabaseReference Time;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_light);
final ConstraintLayout mylayout = (ConstraintLayout) findViewById(R.id.mainlayout);
/*if (!calledAlready)
{
FirebaseDatabase.getInstance().setPersistenceEnabled(true); // 다른 인스턴스보다 먼저 실행되어야 한다.
calledAlready = true;
}*/
database = FirebaseDatabase.getInstance();
SWITCH = database.getReference("SWITCH");
Time = database.getReference("AUTO");
final Switch LedSwitch = (Switch) findViewById(R.id.led_switch);
Button AutoButton = (Button) findViewById(R.id.button_auto);
final NumberPicker NumPick1 = (NumberPicker) findViewById(R.id.numpicker1);
final NumberPicker NumPick2 = (NumberPicker) findViewById(R.id.numpicker2);
NumPick1.setMinValue(1);
NumPick2.setMinValue(1);
NumPick1.setMaxValue(24);
NumPick2.setMaxValue(24);
NumPick1.setWrapSelectorWheel(true);
NumPick2.setWrapSelectorWheel(true);
NumPick1.setDescendantFocusability(NumPick1.FOCUS_BLOCK_DESCENDANTS);
NumPick2.setDescendantFocusability(NumPick2.FOCUS_BLOCK_DESCENDANTS);
Time.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
TextView timeView1 = (TextView) findViewById(R.id.setTime1);
TextView timeView2 = (TextView) findViewById(R.id.setTime2);
int value_time1 = Integer.parseInt(dataSnapshot.child("time1").getValue(String.class));
int value_time2 = Integer.parseInt(dataSnapshot.child("time2").getValue(String.class));
timeView1.setText(value_time1 + ":00");
timeView2.setText(value_time2 + ":00");
NumPick1.setValue(value_time1);
NumPick2.setValue(value_time2);
}
@Override
public void onCancelled(DatabaseError databaseError) {
}
});
NumPick1.setOnValueChangedListener(new NumberPicker.OnValueChangeListener() {
@Override
public void onValueChange(NumberPicker picker, int oldVal, int newVal) {
//Display the newly selected number from picker
}
});
NumPick2.setOnValueChangedListener(new NumberPicker.OnValueChangeListener() {
@Override
public void onValueChange(NumberPicker picker, int oldVal, int newVal) {
//Display the newly selected number from picker
// Time.child("time2").setValue(newVal);
}
});
LedSwitch.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (LedSwitch.isChecked()) {
SWITCH.setValue("0");
mylayout.setBackgroundResource(R.drawable.light1);
} else {
SWITCH.setValue("1");
mylayout.setBackgroundResource(R.drawable.light0);
}
}
});
AutoButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
//버튼이 눌렸을때 동작 설정
SWITCH.setValue("2");
String numpick1 = String.valueOf(NumPick1.getValue());
String numpick2 = String.valueOf(NumPick2.getValue());
Time.child("time1").setValue(numpick1);
Time.child("time2").setValue(numpick2);
}
});
}
}
| UTF-8 | Java | 4,642 | java | LightActivity.java | Java | [] | null | [] | package com.example.qhdud.holo_final;
import android.os.Bundle;
import android.support.constraint.ConstraintLayout;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.NumberPicker;
import android.widget.Switch;
import android.widget.TextView;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;
public class LightActivity extends AppCompatActivity {
FirebaseDatabase database;
DatabaseReference SWITCH;
DatabaseReference Time;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_light);
final ConstraintLayout mylayout = (ConstraintLayout) findViewById(R.id.mainlayout);
/*if (!calledAlready)
{
FirebaseDatabase.getInstance().setPersistenceEnabled(true); // 다른 인스턴스보다 먼저 실행되어야 한다.
calledAlready = true;
}*/
database = FirebaseDatabase.getInstance();
SWITCH = database.getReference("SWITCH");
Time = database.getReference("AUTO");
final Switch LedSwitch = (Switch) findViewById(R.id.led_switch);
Button AutoButton = (Button) findViewById(R.id.button_auto);
final NumberPicker NumPick1 = (NumberPicker) findViewById(R.id.numpicker1);
final NumberPicker NumPick2 = (NumberPicker) findViewById(R.id.numpicker2);
NumPick1.setMinValue(1);
NumPick2.setMinValue(1);
NumPick1.setMaxValue(24);
NumPick2.setMaxValue(24);
NumPick1.setWrapSelectorWheel(true);
NumPick2.setWrapSelectorWheel(true);
NumPick1.setDescendantFocusability(NumPick1.FOCUS_BLOCK_DESCENDANTS);
NumPick2.setDescendantFocusability(NumPick2.FOCUS_BLOCK_DESCENDANTS);
Time.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
TextView timeView1 = (TextView) findViewById(R.id.setTime1);
TextView timeView2 = (TextView) findViewById(R.id.setTime2);
int value_time1 = Integer.parseInt(dataSnapshot.child("time1").getValue(String.class));
int value_time2 = Integer.parseInt(dataSnapshot.child("time2").getValue(String.class));
timeView1.setText(value_time1 + ":00");
timeView2.setText(value_time2 + ":00");
NumPick1.setValue(value_time1);
NumPick2.setValue(value_time2);
}
@Override
public void onCancelled(DatabaseError databaseError) {
}
});
NumPick1.setOnValueChangedListener(new NumberPicker.OnValueChangeListener() {
@Override
public void onValueChange(NumberPicker picker, int oldVal, int newVal) {
//Display the newly selected number from picker
}
});
NumPick2.setOnValueChangedListener(new NumberPicker.OnValueChangeListener() {
@Override
public void onValueChange(NumberPicker picker, int oldVal, int newVal) {
//Display the newly selected number from picker
// Time.child("time2").setValue(newVal);
}
});
LedSwitch.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (LedSwitch.isChecked()) {
SWITCH.setValue("0");
mylayout.setBackgroundResource(R.drawable.light1);
} else {
SWITCH.setValue("1");
mylayout.setBackgroundResource(R.drawable.light0);
}
}
});
AutoButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
//버튼이 눌렸을때 동작 설정
SWITCH.setValue("2");
String numpick1 = String.valueOf(NumPick1.getValue());
String numpick2 = String.valueOf(NumPick2.getValue());
Time.child("time1").setValue(numpick1);
Time.child("time2").setValue(numpick2);
}
});
}
}
| 4,642 | 0.620366 | 0.607937 | 119 | 36.537815 | 28.328146 | 103 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.537815 | false | false | 13 |
6590f30260f4ab37da90ac757a9af285b68b8d9a | 3,015,067,106,732 | c0e09ebc7d67faad881c14e4f5747d3676b48f5e | /app/src/main/java/com/example/shivani/aspire1/TabTwo.java | de46d22057b1f0be4439f93f899de6a3a48633c4 | [] | no_license | DroidHut/SnapperProperties | https://github.com/DroidHut/SnapperProperties | 10ddb87e19b25cefba6766d5a43fc72ea2fd652f | d7b1656353c0d46715e592bf3cb6f8f0a56d0b6f | refs/heads/master | 2021-08-29T16:37:11.913000 | 2017-12-14T10:02:54 | 2017-12-14T10:02:54 | 114,234,008 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package com.example.shivani.aspire1;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CheckBox;
import android.widget.CheckedTextView;
import android.widget.RadioButton;
import android.widget.RadioGroup;
public class TabTwo extends Fragment {
private RadioGroup radioGroup;
private RadioButton radioButton1,radioButton2,radioButton3;
private CheckedTextView checkedTextView;
private CheckBox checkBox;
public TabTwo() {
// Required empty public constructor
}
public static TabTwo newInstance(String param1, String param2) {
TabTwo fragment = new TabTwo();
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view=inflater.inflate(R.layout.fragment_tab_two, container, false);
return view;
}
} | UTF-8 | Java | 1,216 | java | TabTwo.java | Java | [
{
"context": "package com.example.shivani.aspire1;\n\nimport android.os.Bundle;\nimport androi",
"end": 27,
"score": 0.9489564895629883,
"start": 20,
"tag": "USERNAME",
"value": "shivani"
}
] | null | [] | package com.example.shivani.aspire1;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CheckBox;
import android.widget.CheckedTextView;
import android.widget.RadioButton;
import android.widget.RadioGroup;
public class TabTwo extends Fragment {
private RadioGroup radioGroup;
private RadioButton radioButton1,radioButton2,radioButton3;
private CheckedTextView checkedTextView;
private CheckBox checkBox;
public TabTwo() {
// Required empty public constructor
}
public static TabTwo newInstance(String param1, String param2) {
TabTwo fragment = new TabTwo();
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view=inflater.inflate(R.layout.fragment_tab_two, container, false);
return view;
}
} | 1,216 | 0.708882 | 0.703125 | 47 | 24.893618 | 22.192804 | 80 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.553191 | false | false | 13 |
47eac8a07d02647b645da1c645955b0fd6c47097 | 10,737,418,260,304 | ff9292b4d50fa21729c8349858f501a8212d4fa2 | /src/com/company/Main.java | 40606dbab5ce9a6024eeb981844621050899264c | [] | no_license | jcblefler/FindingValueInArray | https://github.com/jcblefler/FindingValueInArray | 0b7655a999709bbc70e8668f277f04a6baca063f | f08e1b150eaa082c8da73b5f572d22984121e0bd | refs/heads/master | 2020-05-16T13:04:49.776000 | 2019-04-23T17:33:45 | 2019-04-23T17:33:45 | 183,064,745 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package com.company;
import java.util.ArrayList;
public class Main {
public static void main(String[] args) {
ArrayList<Integer> numList = new ArrayList<>();
numList.add(17);
numList.add(29);
numList.add(11);
numList.add(17);
numList.add(39);
numList.add(50);
numList.add(1);
numList.add(17);
numList.add(26);
// Finds if value is equal to 17 and will print it out everytime it is found
for (int i : numList){
if (i == 17){
System.out.println(i + " is in the ArrayList.");
}
}
// Finds values of 17 and prints out how many times it was found
int count = 0;
for (int i : numList){
if (i == 17){
count++;
}
}
System.out.println("17 was found " + count + " times.");
}
}
| UTF-8 | Java | 906 | java | Main.java | Java | [] | null | [] | package com.company;
import java.util.ArrayList;
public class Main {
public static void main(String[] args) {
ArrayList<Integer> numList = new ArrayList<>();
numList.add(17);
numList.add(29);
numList.add(11);
numList.add(17);
numList.add(39);
numList.add(50);
numList.add(1);
numList.add(17);
numList.add(26);
// Finds if value is equal to 17 and will print it out everytime it is found
for (int i : numList){
if (i == 17){
System.out.println(i + " is in the ArrayList.");
}
}
// Finds values of 17 and prints out how many times it was found
int count = 0;
for (int i : numList){
if (i == 17){
count++;
}
}
System.out.println("17 was found " + count + " times.");
}
}
| 906 | 0.502208 | 0.471302 | 45 | 19.133333 | 20.443527 | 79 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.355556 | false | false | 13 |
9118b919ea99f68dff714faf3712e38056e6bde5 | 24,661,702,263,423 | 1cdbee661d9069c4903a35fe6a9e878d65a18a88 | /ASpyLiveAudio/src/vn/vhc/live/liveaudio/PipeFactory.java | e55a9f41ffaf10e6e6a5ac875ae6afc8ef2cc857 | [] | no_license | Lehuutuong/Console | https://github.com/Lehuutuong/Console | 68e8bec24903d8c2671133bf8944716d2b7d1b25 | 5a6764e91318b95c574c1eb24baa6d090aacc286 | refs/heads/master | 2020-03-26T05:24:49.250000 | 2020-02-24T05:22:31 | 2020-02-24T05:22:31 | 144,555,859 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package vn.vhc.live.liveaudio;
import vn.vhc.live.UtilGame;
import android.telephony.TelephonyManager;
public class PipeFactory {
private FFMPEGWrapper ffWrapper;
private String ffmpegCommand;
public PipeFactory() {
ffWrapper = FFMPEGWrapper.getInstance();
ffmpegCommand = ffWrapper.data_location + ffWrapper.ffmpeg;
}
public AudioInputPipe getADPCMAudioInputPipe(String publisherString) {
String command = ffmpegCommand
+ " -analyzeduration 0 -i pipe:0 -re -vn -acodec "
+ AudioCodec.ADPCM_SWF.name + " -ar "
+ AudioCodec.ADPCM_SWF.RATE_11025 + " -ac 1 -f flv "
+ publisherString;
return newAudioInputPipe(command);
}
//using this option
public AudioInputPipe getNellymoserAudioInputPipe(String publisherString) {
// String command = ffmpegCommand
// + " -analyzeduration 0 -muxdelay 0 -muxpreload 0 -i pipe:0 -re -vn -acodec "
// + AudioCodec.Nellymoser.name
// + " -ar 8000 -ac 1 -ab 16k -f flv " + publisherString;
// return newAudioInputPipe(command);
String command = ffmpegCommand
+ " -analyzeduration 0 -muxdelay 0 -muxpreload 0 -i pipe:0 -re -vn -acodec "
+ AudioCodec.Nellymoser.name
+ " -ar 8000 -ac 1 64k -f flv " + publisherString;
return newAudioInputPipe(command);
}
public String getBitRate()
{
if(UtilGame.speedConnect.toLowerCase().equals("wifi")) return " -ab 128k";
return getBitRateBasedSpeed(UtilGame.typeSubNet);
}
public String getBitRateBasedSpeed(int subType){
switch(subType)
{
case TelephonyManager.NETWORK_TYPE_1xRTT:
return " -ab 64k";
case TelephonyManager.NETWORK_TYPE_CDMA:
return " -ab 32k";
case TelephonyManager.NETWORK_TYPE_EDGE:
return " -ab 64k";
case TelephonyManager.NETWORK_TYPE_EVDO_0:
return " -ab 128k";
case TelephonyManager.NETWORK_TYPE_EVDO_A:
return " -ab 64k";
case TelephonyManager.NETWORK_TYPE_GPRS:
return " -ab 64k";
case TelephonyManager.NETWORK_TYPE_HSDPA:
return " -ab 128k";
case TelephonyManager.NETWORK_TYPE_HSPA:
return " -ab 128k";
case TelephonyManager.NETWORK_TYPE_HSUPA:
return " -ab 128k";
case TelephonyManager.NETWORK_TYPE_UMTS:
return " -ab 128k"; // ~ 400-7000 kbps
// Unknown
case TelephonyManager.NETWORK_TYPE_UNKNOWN:
default:
return " -ab 32k";
}
}
public AudioInputPipe getAACAudioInputPipe(String publisherString)
throws Exception {
// String command = ffmpegCommand
// + " -strict experimental -analyzeduration 0 -muxdelay 0 -muxpreload 0 -i pipe:0 -re -vn -acodec "
// + AudioCodec.AAC.name + " -ac 1 -ar 8000 -ab 16k -f flv "
// + publisherString;
// return newAudioInputPipe(command);
String command = ffmpegCommand
+ " -strict experimental -analyzeduration 0 -muxdelay 0 -muxpreload 0 -i pipe:0 -re -vn -acodec "
+ AudioCodec.AAC.name + " -ac 1 -ar 44100 -ab 32k -f flv "
+ publisherString;
return newAudioInputPipe(command);
}
public AudioOutputPipe getAudioOutputPipe(String publisherString,
int audioFileFormat, String codecName, String sourceCodec) {
String command;
// add -strict experimental and acodec for AAC
if (sourceCodec.equals(AudioCodec.AAC.name)) {
command = ffmpegCommand
+ " -strict experimental -acodec aac -analyzeduration 0 -muxdelay 0 -muxpreload 0 -vn -itsoffset -2 -i "
+ publisherString + " -re -vn -acodec ";
} else if (sourceCodec.equals(AudioCodec.Nellymoser.name)) {
command = ffmpegCommand
+ " -analyzeduration 0 -vn -itsoffset -5 -acodec nellymoser -ar 8000 -ac 1 -i "
+ publisherString + " -re -vn -acodec ";
} else if (sourceCodec.equals(AudioCodec.ADPCM_SWF.name)) {
command = ffmpegCommand
+ " -acodec adpcm_swf -analyzeduration 0 -muxdelay 0 -muxpreload 0 -vn -itsoffset -2 -i "
+ publisherString + " -re -vn -acodec ";
} else {
throw new UnsupportedOperationException(
"no support dor source codec [" + sourceCodec + "]");
}
if (audioFileFormat == AudioCodec.AUDIO_FILE_FORMAT_WAV) {
if (codecName.equals(AudioCodec.PCM_S16LE.name)) {
command += AudioCodec.PCM_S16LE.name + " -ar "
+ AudioCodec.PCM_S16LE.RATE_11025 + " -ac 1";
}
command += " -f wav pipe:1";
}
FFMPEGAudioOutputPipe pipe = new FFMPEGAudioOutputPipe(command);
return pipe;
}
private FFMPEGAudioInputPipe newAudioInputPipe(String command) {
FFMPEGAudioInputPipe pipe = new FFMPEGAudioInputPipe(command);
pipe.setBootstrap(FFMPEGBootstrap.AMR_BOOTSTRAP);
return pipe;
}
public AudioInputPipe getVideoInputPipe(String publisherString) {
String command = ffmpegCommand
+ " -analyzeduration 0 -i pipe:0 -re -an -r 25 -f flv -b 100k -s 320x240 "
+ publisherString;
FFMPEGAudioInputPipe pipe = new FFMPEGAudioInputPipe(command);
return pipe;
}
}
| UTF-8 | Java | 5,037 | java | PipeFactory.java | Java | [] | null | [] | package vn.vhc.live.liveaudio;
import vn.vhc.live.UtilGame;
import android.telephony.TelephonyManager;
public class PipeFactory {
private FFMPEGWrapper ffWrapper;
private String ffmpegCommand;
public PipeFactory() {
ffWrapper = FFMPEGWrapper.getInstance();
ffmpegCommand = ffWrapper.data_location + ffWrapper.ffmpeg;
}
public AudioInputPipe getADPCMAudioInputPipe(String publisherString) {
String command = ffmpegCommand
+ " -analyzeduration 0 -i pipe:0 -re -vn -acodec "
+ AudioCodec.ADPCM_SWF.name + " -ar "
+ AudioCodec.ADPCM_SWF.RATE_11025 + " -ac 1 -f flv "
+ publisherString;
return newAudioInputPipe(command);
}
//using this option
public AudioInputPipe getNellymoserAudioInputPipe(String publisherString) {
// String command = ffmpegCommand
// + " -analyzeduration 0 -muxdelay 0 -muxpreload 0 -i pipe:0 -re -vn -acodec "
// + AudioCodec.Nellymoser.name
// + " -ar 8000 -ac 1 -ab 16k -f flv " + publisherString;
// return newAudioInputPipe(command);
String command = ffmpegCommand
+ " -analyzeduration 0 -muxdelay 0 -muxpreload 0 -i pipe:0 -re -vn -acodec "
+ AudioCodec.Nellymoser.name
+ " -ar 8000 -ac 1 64k -f flv " + publisherString;
return newAudioInputPipe(command);
}
public String getBitRate()
{
if(UtilGame.speedConnect.toLowerCase().equals("wifi")) return " -ab 128k";
return getBitRateBasedSpeed(UtilGame.typeSubNet);
}
public String getBitRateBasedSpeed(int subType){
switch(subType)
{
case TelephonyManager.NETWORK_TYPE_1xRTT:
return " -ab 64k";
case TelephonyManager.NETWORK_TYPE_CDMA:
return " -ab 32k";
case TelephonyManager.NETWORK_TYPE_EDGE:
return " -ab 64k";
case TelephonyManager.NETWORK_TYPE_EVDO_0:
return " -ab 128k";
case TelephonyManager.NETWORK_TYPE_EVDO_A:
return " -ab 64k";
case TelephonyManager.NETWORK_TYPE_GPRS:
return " -ab 64k";
case TelephonyManager.NETWORK_TYPE_HSDPA:
return " -ab 128k";
case TelephonyManager.NETWORK_TYPE_HSPA:
return " -ab 128k";
case TelephonyManager.NETWORK_TYPE_HSUPA:
return " -ab 128k";
case TelephonyManager.NETWORK_TYPE_UMTS:
return " -ab 128k"; // ~ 400-7000 kbps
// Unknown
case TelephonyManager.NETWORK_TYPE_UNKNOWN:
default:
return " -ab 32k";
}
}
public AudioInputPipe getAACAudioInputPipe(String publisherString)
throws Exception {
// String command = ffmpegCommand
// + " -strict experimental -analyzeduration 0 -muxdelay 0 -muxpreload 0 -i pipe:0 -re -vn -acodec "
// + AudioCodec.AAC.name + " -ac 1 -ar 8000 -ab 16k -f flv "
// + publisherString;
// return newAudioInputPipe(command);
String command = ffmpegCommand
+ " -strict experimental -analyzeduration 0 -muxdelay 0 -muxpreload 0 -i pipe:0 -re -vn -acodec "
+ AudioCodec.AAC.name + " -ac 1 -ar 44100 -ab 32k -f flv "
+ publisherString;
return newAudioInputPipe(command);
}
public AudioOutputPipe getAudioOutputPipe(String publisherString,
int audioFileFormat, String codecName, String sourceCodec) {
String command;
// add -strict experimental and acodec for AAC
if (sourceCodec.equals(AudioCodec.AAC.name)) {
command = ffmpegCommand
+ " -strict experimental -acodec aac -analyzeduration 0 -muxdelay 0 -muxpreload 0 -vn -itsoffset -2 -i "
+ publisherString + " -re -vn -acodec ";
} else if (sourceCodec.equals(AudioCodec.Nellymoser.name)) {
command = ffmpegCommand
+ " -analyzeduration 0 -vn -itsoffset -5 -acodec nellymoser -ar 8000 -ac 1 -i "
+ publisherString + " -re -vn -acodec ";
} else if (sourceCodec.equals(AudioCodec.ADPCM_SWF.name)) {
command = ffmpegCommand
+ " -acodec adpcm_swf -analyzeduration 0 -muxdelay 0 -muxpreload 0 -vn -itsoffset -2 -i "
+ publisherString + " -re -vn -acodec ";
} else {
throw new UnsupportedOperationException(
"no support dor source codec [" + sourceCodec + "]");
}
if (audioFileFormat == AudioCodec.AUDIO_FILE_FORMAT_WAV) {
if (codecName.equals(AudioCodec.PCM_S16LE.name)) {
command += AudioCodec.PCM_S16LE.name + " -ar "
+ AudioCodec.PCM_S16LE.RATE_11025 + " -ac 1";
}
command += " -f wav pipe:1";
}
FFMPEGAudioOutputPipe pipe = new FFMPEGAudioOutputPipe(command);
return pipe;
}
private FFMPEGAudioInputPipe newAudioInputPipe(String command) {
FFMPEGAudioInputPipe pipe = new FFMPEGAudioInputPipe(command);
pipe.setBootstrap(FFMPEGBootstrap.AMR_BOOTSTRAP);
return pipe;
}
public AudioInputPipe getVideoInputPipe(String publisherString) {
String command = ffmpegCommand
+ " -analyzeduration 0 -i pipe:0 -re -an -r 25 -f flv -b 100k -s 320x240 "
+ publisherString;
FFMPEGAudioInputPipe pipe = new FFMPEGAudioInputPipe(command);
return pipe;
}
}
| 5,037 | 0.662299 | 0.635894 | 142 | 34.471832 | 25.969835 | 109 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1.985916 | false | false | 13 |
93846f7dc739835a027a4a7c98b4bf10cea777f0 | 28,656,021,863,011 | 5832bfb6c8ded3e4d8f64b3ad43aca8715b15e9f | /MoreThanOrEqual.java | b0c1bd828a0adfb1d1d767c1abc7edbd4611482f | [] | no_license | liumiao-p/happycoding | https://github.com/liumiao-p/happycoding | 41da75cdd0b22cbbf2a6bdcb93cd04de046d65af | 7ce3adb2b4fe26a68e089b3c3d82efe81fd46c6f | refs/heads/master | 2020-03-31T11:55:30.532000 | 2019-01-07T05:11:41 | 2019-01-07T05:11:41 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package software_testing_homework_10;
import org.hamcrest.*;
import org.junit.Before;
import org.junit.Test;
public class MoreThanOrEqual<T extends Comparable<T>> extends BaseMatcher<Comparable<T>> {
private final Comparable<T> expectedValue;
public MoreThanOrEqual(T expectedValue) {
this.expectedValue = expectedValue;
}
@Override
public void describeTo(Description description) {
description.appendText("more than or equal (>=)" + expectedValue);
}
@Override
public boolean matches(Object t) {
int compareTo = expectedValue.compareTo((T)t);
return compareTo < 1;
}
@Factory
public static<T extends Comparable<T>> Matcher<T> moreThanOrEqual(T t){
return new MoreThanOrEqual(t);
}
}
| UTF-8 | Java | 706 | java | MoreThanOrEqual.java | Java | [] | null | [] | package software_testing_homework_10;
import org.hamcrest.*;
import org.junit.Before;
import org.junit.Test;
public class MoreThanOrEqual<T extends Comparable<T>> extends BaseMatcher<Comparable<T>> {
private final Comparable<T> expectedValue;
public MoreThanOrEqual(T expectedValue) {
this.expectedValue = expectedValue;
}
@Override
public void describeTo(Description description) {
description.appendText("more than or equal (>=)" + expectedValue);
}
@Override
public boolean matches(Object t) {
int compareTo = expectedValue.compareTo((T)t);
return compareTo < 1;
}
@Factory
public static<T extends Comparable<T>> Matcher<T> moreThanOrEqual(T t){
return new MoreThanOrEqual(t);
}
}
| 706 | 0.759207 | 0.754957 | 23 | 29.695652 | 24.138071 | 90 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1.391304 | false | false | 13 |
baca276a5fa25d8c8c5d8073097d021b79e7b298 | 8,650,064,184,467 | 48684f2e9751525b8f5dd0ac93397e5b4eba0521 | /성적처리V031_주요클래스_Refactoring/src/DAOs/CGwamokDAO.java | ade86b86fdc8aa2023aa9cc508475b7651230c34 | [] | no_license | chokojung12/2015_java | https://github.com/chokojung12/2015_java | e3af2fec03026b4609d92f16f44626eec1353ef4 | 2c7ce2b4bc17c623ab324e3038ed61c3d3f23b9b | refs/heads/master | 2015-08-22T08:01:10.946000 | 2015-03-30T06:42:02 | 2015-03-30T06:42:02 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package DAOs;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import entity.CGwamok;
import entity.CMember;
public class CGwamokDAO {
public CGwamok read(){ return null; }
public void write(CGwamok gwamok){
System.out.println("과목ID : " + gwamok.getId());
System.out.println("과목명 : " + gwamok.getName());
//일단암기. 파일통째로 읽음. 오브젝트를 시리얼라이즈
/*
//c에서의 시리얼라이제이션 serialize
File file = new File("testoutput);//진짜 코드가아니고 스케치다.
//fP = file.open("testOutput");
//gwamok.write(fp);
* gwamok.write(file);
//fp.close();
file.close();
*/
// serialize
//에러잡기를 할때 add throws를 하지말어라 그러면 모든 프로그램을 변경해야한다.
try {
ObjectOutputStream /*objectOutputStream*/out =
new ObjectOutputStream(new FileOutputStream("testOut"));
out.writeObject(gwamok);//오브젝트를 홀라당 쌈 (쌈싸듯이)
out.close();
//오브젝트 이름(포인터, 주소)만 알려주면 전부 저장해버린다.
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {//exception컨트롤한다 라고함.
// TODO Auto-generated catch block
e.printStackTrace();
}//통째로 파일을 바꿀수가있게됨. 변형을 시켜서 파일 아웃풋에 주게됨
};
}
| UHC | Java | 1,554 | java | CGwamokDAO.java | Java | [] | null | [] | package DAOs;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import entity.CGwamok;
import entity.CMember;
public class CGwamokDAO {
public CGwamok read(){ return null; }
public void write(CGwamok gwamok){
System.out.println("과목ID : " + gwamok.getId());
System.out.println("과목명 : " + gwamok.getName());
//일단암기. 파일통째로 읽음. 오브젝트를 시리얼라이즈
/*
//c에서의 시리얼라이제이션 serialize
File file = new File("testoutput);//진짜 코드가아니고 스케치다.
//fP = file.open("testOutput");
//gwamok.write(fp);
* gwamok.write(file);
//fp.close();
file.close();
*/
// serialize
//에러잡기를 할때 add throws를 하지말어라 그러면 모든 프로그램을 변경해야한다.
try {
ObjectOutputStream /*objectOutputStream*/out =
new ObjectOutputStream(new FileOutputStream("testOut"));
out.writeObject(gwamok);//오브젝트를 홀라당 쌈 (쌈싸듯이)
out.close();
//오브젝트 이름(포인터, 주소)만 알려주면 전부 저장해버린다.
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {//exception컨트롤한다 라고함.
// TODO Auto-generated catch block
e.printStackTrace();
}//통째로 파일을 바꿀수가있게됨. 변형을 시켜서 파일 아웃풋에 주게됨
};
}
| 1,554 | 0.6576 | 0.6576 | 48 | 24.041666 | 17.702353 | 61 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 2.104167 | false | false | 13 |
ba1799a9b1a97fc442045a95894ae0e7117104cf | 24,438,363,964,800 | dc930c3aafd408636ad09af9a202f34021421fc4 | /Project06/src/cn/com.java | 9a8a18256e61e2a4f36df821ea669c0017800066 | [] | no_license | theretothere/- | https://github.com/theretothere/- | 025d4753f946859800313119d67b800049c4bb72 | ea1ed7394caae6daf2e08c237782acfff6fa303a | refs/heads/master | 2023-01-08T06:25:36.377000 | 2020-11-12T07:01:50 | 2020-11-12T07:01:50 | 312,193,708 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package cn;
public class com {
public static void main(String[] args) {
//通过对象调用普通方法
com c = new com();
c.hello();
}
public void hello(){
System.out.println("hello . world!");
}
}
| UTF-8 | Java | 250 | java | com.java | Java | [] | null | [] | package cn;
public class com {
public static void main(String[] args) {
//通过对象调用普通方法
com c = new com();
c.hello();
}
public void hello(){
System.out.println("hello . world!");
}
}
| 250 | 0.521739 | 0.521739 | 13 | 16.692308 | 14.704184 | 45 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.307692 | false | false | 13 |
121f0849544b32537f744f5388719712afd0da9b | 7,327,214,211,715 | 8194ed7317cd9c62d394f6a22f34b48ed163469f | /app/src/main/java/com/example/android/a7learntutorialapp/data/model/Weather/WeatherWind.java | d3052ceec4f0e08a95d5c07d54e6ee924f90b4e1 | [] | no_license | a-donyagard/7learnTutorialApp | https://github.com/a-donyagard/7learnTutorialApp | 763362eeeaf08b18c7e868e41881a6dac6758900 | 8ea39d805410497907e9a184bf3aa9df470d8227 | refs/heads/master | 2020-08-06T11:53:08.919000 | 2019-11-06T19:54:59 | 2019-11-06T19:54:59 | 212,965,453 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package com.example.android.a7learntutorialapp.data.model.Weather;
import android.os.Parcel;
import android.os.Parcelable;
import com.google.gson.annotations.SerializedName;
public class WeatherWind implements Parcelable {
@SerializedName("speed")
private final float speed;
@SerializedName("deg")
private final float degree;
public WeatherWind(float speed, float degree) {
this.speed = speed;
this.degree = degree;
}
public float getSpeed() {
return speed;
}
public float getDegree() {
return degree;
}
protected WeatherWind(Parcel in) {
speed = in.readFloat();
degree = in.readFloat();
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeFloat(speed);
dest.writeFloat(degree);
}
@SuppressWarnings("unused")
public static final Parcelable.Creator<WeatherWind> CREATOR = new Parcelable.Creator<WeatherWind>() {
@Override
public WeatherWind createFromParcel(Parcel in) {
return new WeatherWind(in);
}
@Override
public WeatherWind[] newArray(int size) {
return new WeatherWind[size];
}
};
} | UTF-8 | Java | 1,303 | java | WeatherWind.java | Java | [] | null | [] | package com.example.android.a7learntutorialapp.data.model.Weather;
import android.os.Parcel;
import android.os.Parcelable;
import com.google.gson.annotations.SerializedName;
public class WeatherWind implements Parcelable {
@SerializedName("speed")
private final float speed;
@SerializedName("deg")
private final float degree;
public WeatherWind(float speed, float degree) {
this.speed = speed;
this.degree = degree;
}
public float getSpeed() {
return speed;
}
public float getDegree() {
return degree;
}
protected WeatherWind(Parcel in) {
speed = in.readFloat();
degree = in.readFloat();
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeFloat(speed);
dest.writeFloat(degree);
}
@SuppressWarnings("unused")
public static final Parcelable.Creator<WeatherWind> CREATOR = new Parcelable.Creator<WeatherWind>() {
@Override
public WeatherWind createFromParcel(Parcel in) {
return new WeatherWind(in);
}
@Override
public WeatherWind[] newArray(int size) {
return new WeatherWind[size];
}
};
} | 1,303 | 0.636992 | 0.635457 | 55 | 22.709091 | 21.04685 | 105 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.363636 | false | false | 13 |
07414eaaac167337a452213901bb3950a6c60c0e | 11,570,641,952,239 | 5f72d6f11ffdd1927510df9851d2ec26f81cf290 | /2018课程设计/RecordApp/RecordManagement/src/RecordManagement/ManagementLogin.java | ee293294567c6f43c0eecdf1995b8a8dfb843d61 | [] | no_license | Cassiezys/individual-acount | https://github.com/Cassiezys/individual-acount | 90a3760976fd21d110d1364b335b4d6dcd198cd6 | fd7ed66ed104b4d01794bd2f6f4fb7bc7da5bfc3 | refs/heads/master | 2021-01-04T19:52:54.901000 | 2020-02-15T15:30:20 | 2020-02-15T15:30:20 | 240,736,354 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package RecordManagement;
import java.awt.*;
import java.awt.event.*;
import java.sql.*;
import java.util.*;
import javax.swing.*;
import javax.swing.filechooser.FileNameExtensionFilter;
import javax.swing.table.*;
public class ManagementLogin extends JPanel implements ActionListener {
private JPanel messPanel, downPanel, tablePanel;// 登录信息和表格信息
private JLabel label;
private CardLayout card;
private JButton btnIn, btnReset, btnDel, btnModify;// 登录,重置,修改按钮
private JTextField userText, passwordText;
private JLabel promptLabel;// 提示信息
private Connection conn;
private JTable table;
private DefaultTableModel tableModel;
/**
* 构造方法:初始化管理员界面
*/
public ManagementLogin(Connection c) {
conn = c;
promptLabel = new JLabel("欢迎管理员登录:", JLabel.LEFT);
promptLabel.setFont(new Font("宋体", Font.BOLD, 13));
promptLabel.setForeground(Color.RED);
/*
* promptLabel.setOpaque(true);//不透明 promptLabel.setBackground(new
* Color(216,224,231));//设置背景颜色
*/
initMessPanel();// 初始化登录界面
initTablePanel();// 初始化表格界面
initDownPanel();// 初始化下方card界面
JSplitPane splitH = new JSplitPane(JSplitPane.VERTICAL_SPLIT, messPanel, downPanel);
add(promptLabel, BorderLayout.NORTH);
add(splitH, BorderLayout.CENTER);
}
/**
* 初始化登陆界面
*/
public void initMessPanel() {
/**
* Box 类可以创建几种影响布局的不可见组件 胶水;经可能将组件分开
*/
JLabel lblUser = new JLabel("用户名:", JLabel.CENTER);
userText = new JTextField(10);
Box userBox = Box.createHorizontalBox();// 添加水平Box
userBox.add(lblUser);
userBox.add(userText);
JLabel lblPassword = new JLabel(" 密码:", JLabel.CENTER);
passwordText = new JTextField(10);
Box passwordBox = Box.createHorizontalBox();// 添加水平Box
passwordBox.add(lblPassword);
passwordBox.add(passwordText);
btnIn = new JButton("登录");
btnReset = new JButton("重置");
Box buttonBox = Box.createHorizontalBox();// 添加水平Box
buttonBox.add(btnIn);
buttonBox.add(btnReset);
Box boxH = Box.createVerticalBox();
boxH.add(userBox);
boxH.add(passwordBox);
boxH.add(buttonBox);
boxH.add(Box.createVerticalGlue());// 添加垂直胶水
btnIn.addActionListener(this);
btnReset.addActionListener(this);
messPanel = new JPanel();
messPanel.add(boxH);
}
/**
* 初始化下方的界面
*/
public void initDownPanel() {
card = new CardLayout();
downPanel = new JPanel();
downPanel.setLayout(card);
downPanel.add("未登录界面", label);
downPanel.add("已登录界面", tablePanel);
}
/**
* 表格内容的初始化
*/
public void initTabelContent(){
Vector rowData = UserUtil.getRows();
Vector columnNames = UserUtil.getHead();
tableModel.setDataVector(rowData, columnNames);
table.setModel(tableModel);
}
/**
* 初始化表格界面
*/
public void initTablePanel() {
label = new JLabel(" ", JLabel.CENTER);
label.setIcon(new ImageIcon("design.jpg"));
label.setFont(new Font("隶书", Font.BOLD, 36));
label.setHorizontalTextPosition(SwingConstants.CENTER);
label.setForeground(Color.green);
tableModel = new DefaultTableModel();
table = new JTable(tableModel);
initTabelContent();
btnDel = new JButton("删除");
btnModify = new JButton("修改");
Box buttonBox = Box.createHorizontalBox();// 添加水平Box
buttonBox.add(btnDel);
buttonBox.add(btnModify);
Box boxH = Box.createVerticalBox();
boxH.add(new JScrollPane(table));
boxH.add(buttonBox);
boxH.add(Box.createVerticalGlue());// 添加垂直胶水
btnDel.addActionListener(this);
btnModify.addActionListener(this);
tablePanel = new JPanel();
tablePanel.add(boxH);
}
/**
* 点击登录,重置,删除,保存按钮时执行的操作
*/
@Override
public void actionPerformed(ActionEvent e) {
// TODO Auto-generated method stub
if (e.getSource() == btnIn) {
String name = userText.getText().trim();
String password = passwordText.getText();
if (name.equals("") || password.equals("")) {
JOptionPane.showMessageDialog(null, "用户名和密码不能为空");
} else {
String sql = "select * from managers where id='" + name + "' and password='" + password + "'";
try {
PreparedStatement pstmt = conn.prepareStatement(sql);
ResultSet rs = pstmt.executeQuery();
if (rs.next()) {
if (rs.getString(1).equals(name) && rs.getString(2).equals(password)) {
System.out.println("成功登录");
/**
* 登录成功界面,下方表格可以显示
*
*/
card.show(downPanel, "已登录界面");
}
} else {
JOptionPane.showMessageDialog(null, "用户名或密码错误");
}
} catch (SQLException e1) {
e1.printStackTrace();
}
}
} else if (e.getSource() == btnReset) {
userText.setText("");
passwordText.setText("");
} else if (e.getSource() == btnDel) {
int k = JOptionPane.showConfirmDialog(null, "请确定要从数据库中删除此记录", "删除", JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.QUESTION_MESSAGE);
if (k == JOptionPane.YES_OPTION) {
int row = table.getSelectedRow();
if (row >= 0) {
String name = table.getValueAt(row, 0).toString();
String password = table.getValueAt(row, 1).toString();
tableModel.removeRow(row);
try {
String sql = "delete from users where id='" + name + "' and code='" + password + "'";
PreparedStatement pstmt = conn.prepareStatement(sql);
pstmt.executeUpdate();
} catch (SQLException e1) {
e1.printStackTrace();
}
}
}
} else if (e.getSource() == btnModify) {
/**
* 修改:
*/
int column=table.getSelectedColumn();
int row=table.getSelectedRow();
String id=table.getValueAt(row, 0).toString();
String code=table.getValueAt(row, 1).toString();
String email=table.getValueAt(row, 2).toString();
String tel=table.getValueAt(row, 3).toString();
String file=table.getValueAt(row, 4).toString();
switch(column){
case 0:JOptionPane.showMessageDialog(null,"用户名无法更改");break;
case 1:String codeStr=JOptionPane.showInputDialog("请输入新密码");
if(codeStr==null||codeStr.equals("")){
JOptionPane.showMessageDialog(null, "修改失败");
}else
code=codeStr;break;
case 2:String emailStr=JOptionPane.showInputDialog("请输入新邮箱",email);
if(emailStr==null||emailStr.equals("")){
JOptionPane.showMessageDialog(null, "修改失败");
}else
email=emailStr;break;
case 3:String telStr=JOptionPane.showInputDialog("请输入新电话号码",tel);
if(telStr==null||telStr.equals("")){
JOptionPane.showMessageDialog(null, "修改失败");
}else
tel=telStr;break;
case 4:JFileChooser jfc=new JFileChooser();
FileNameExtensionFilter filter=new FileNameExtensionFilter("Excel & xls & txt & obj","xls","txt","obj");
jfc.setAcceptAllFileFilterUsed(false);
jfc.setFileFilter(filter);
int value=jfc.showSaveDialog(this);
if(value==JFileChooser.APPROVE_OPTION){
file=new String(jfc.getSelectedFile().getAbsolutePath());
}break;
}
try {
PreparedStatement pstmt=conn.prepareStatement("update users set code='"+code+"', email='"+email+"',tele='"+tel+"' where id='"+id+"'");
pstmt.executeUpdate();
initTabelContent();
} catch (SQLException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
}
/**
* 将显示的信息清空
*/
public void clearMessage() {
userText.setText(null);
passwordText.setText(null);
card.show(downPanel, "未登录界面");
}
}
| GB18030 | Java | 7,761 | java | ManagementLogin.java | Java | [
{
"context": "managers where id='\" + name + \"' and password='\" + password + \"'\";\n\t\t\t\ttry {\n\t\t\t\t\tPreparedStatement pstmt = c",
"end": 3906,
"score": 0.8402782082557678,
"start": 3898,
"tag": "PASSWORD",
"value": "password"
}
] | null | [] | package RecordManagement;
import java.awt.*;
import java.awt.event.*;
import java.sql.*;
import java.util.*;
import javax.swing.*;
import javax.swing.filechooser.FileNameExtensionFilter;
import javax.swing.table.*;
public class ManagementLogin extends JPanel implements ActionListener {
private JPanel messPanel, downPanel, tablePanel;// 登录信息和表格信息
private JLabel label;
private CardLayout card;
private JButton btnIn, btnReset, btnDel, btnModify;// 登录,重置,修改按钮
private JTextField userText, passwordText;
private JLabel promptLabel;// 提示信息
private Connection conn;
private JTable table;
private DefaultTableModel tableModel;
/**
* 构造方法:初始化管理员界面
*/
public ManagementLogin(Connection c) {
conn = c;
promptLabel = new JLabel("欢迎管理员登录:", JLabel.LEFT);
promptLabel.setFont(new Font("宋体", Font.BOLD, 13));
promptLabel.setForeground(Color.RED);
/*
* promptLabel.setOpaque(true);//不透明 promptLabel.setBackground(new
* Color(216,224,231));//设置背景颜色
*/
initMessPanel();// 初始化登录界面
initTablePanel();// 初始化表格界面
initDownPanel();// 初始化下方card界面
JSplitPane splitH = new JSplitPane(JSplitPane.VERTICAL_SPLIT, messPanel, downPanel);
add(promptLabel, BorderLayout.NORTH);
add(splitH, BorderLayout.CENTER);
}
/**
* 初始化登陆界面
*/
public void initMessPanel() {
/**
* Box 类可以创建几种影响布局的不可见组件 胶水;经可能将组件分开
*/
JLabel lblUser = new JLabel("用户名:", JLabel.CENTER);
userText = new JTextField(10);
Box userBox = Box.createHorizontalBox();// 添加水平Box
userBox.add(lblUser);
userBox.add(userText);
JLabel lblPassword = new JLabel(" 密码:", JLabel.CENTER);
passwordText = new JTextField(10);
Box passwordBox = Box.createHorizontalBox();// 添加水平Box
passwordBox.add(lblPassword);
passwordBox.add(passwordText);
btnIn = new JButton("登录");
btnReset = new JButton("重置");
Box buttonBox = Box.createHorizontalBox();// 添加水平Box
buttonBox.add(btnIn);
buttonBox.add(btnReset);
Box boxH = Box.createVerticalBox();
boxH.add(userBox);
boxH.add(passwordBox);
boxH.add(buttonBox);
boxH.add(Box.createVerticalGlue());// 添加垂直胶水
btnIn.addActionListener(this);
btnReset.addActionListener(this);
messPanel = new JPanel();
messPanel.add(boxH);
}
/**
* 初始化下方的界面
*/
public void initDownPanel() {
card = new CardLayout();
downPanel = new JPanel();
downPanel.setLayout(card);
downPanel.add("未登录界面", label);
downPanel.add("已登录界面", tablePanel);
}
/**
* 表格内容的初始化
*/
public void initTabelContent(){
Vector rowData = UserUtil.getRows();
Vector columnNames = UserUtil.getHead();
tableModel.setDataVector(rowData, columnNames);
table.setModel(tableModel);
}
/**
* 初始化表格界面
*/
public void initTablePanel() {
label = new JLabel(" ", JLabel.CENTER);
label.setIcon(new ImageIcon("design.jpg"));
label.setFont(new Font("隶书", Font.BOLD, 36));
label.setHorizontalTextPosition(SwingConstants.CENTER);
label.setForeground(Color.green);
tableModel = new DefaultTableModel();
table = new JTable(tableModel);
initTabelContent();
btnDel = new JButton("删除");
btnModify = new JButton("修改");
Box buttonBox = Box.createHorizontalBox();// 添加水平Box
buttonBox.add(btnDel);
buttonBox.add(btnModify);
Box boxH = Box.createVerticalBox();
boxH.add(new JScrollPane(table));
boxH.add(buttonBox);
boxH.add(Box.createVerticalGlue());// 添加垂直胶水
btnDel.addActionListener(this);
btnModify.addActionListener(this);
tablePanel = new JPanel();
tablePanel.add(boxH);
}
/**
* 点击登录,重置,删除,保存按钮时执行的操作
*/
@Override
public void actionPerformed(ActionEvent e) {
// TODO Auto-generated method stub
if (e.getSource() == btnIn) {
String name = userText.getText().trim();
String password = passwordText.getText();
if (name.equals("") || password.equals("")) {
JOptionPane.showMessageDialog(null, "用户名和密码不能为空");
} else {
String sql = "select * from managers where id='" + name + "' and password='" + <PASSWORD> + "'";
try {
PreparedStatement pstmt = conn.prepareStatement(sql);
ResultSet rs = pstmt.executeQuery();
if (rs.next()) {
if (rs.getString(1).equals(name) && rs.getString(2).equals(password)) {
System.out.println("成功登录");
/**
* 登录成功界面,下方表格可以显示
*
*/
card.show(downPanel, "已登录界面");
}
} else {
JOptionPane.showMessageDialog(null, "用户名或密码错误");
}
} catch (SQLException e1) {
e1.printStackTrace();
}
}
} else if (e.getSource() == btnReset) {
userText.setText("");
passwordText.setText("");
} else if (e.getSource() == btnDel) {
int k = JOptionPane.showConfirmDialog(null, "请确定要从数据库中删除此记录", "删除", JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.QUESTION_MESSAGE);
if (k == JOptionPane.YES_OPTION) {
int row = table.getSelectedRow();
if (row >= 0) {
String name = table.getValueAt(row, 0).toString();
String password = table.getValueAt(row, 1).toString();
tableModel.removeRow(row);
try {
String sql = "delete from users where id='" + name + "' and code='" + password + "'";
PreparedStatement pstmt = conn.prepareStatement(sql);
pstmt.executeUpdate();
} catch (SQLException e1) {
e1.printStackTrace();
}
}
}
} else if (e.getSource() == btnModify) {
/**
* 修改:
*/
int column=table.getSelectedColumn();
int row=table.getSelectedRow();
String id=table.getValueAt(row, 0).toString();
String code=table.getValueAt(row, 1).toString();
String email=table.getValueAt(row, 2).toString();
String tel=table.getValueAt(row, 3).toString();
String file=table.getValueAt(row, 4).toString();
switch(column){
case 0:JOptionPane.showMessageDialog(null,"用户名无法更改");break;
case 1:String codeStr=JOptionPane.showInputDialog("请输入新密码");
if(codeStr==null||codeStr.equals("")){
JOptionPane.showMessageDialog(null, "修改失败");
}else
code=codeStr;break;
case 2:String emailStr=JOptionPane.showInputDialog("请输入新邮箱",email);
if(emailStr==null||emailStr.equals("")){
JOptionPane.showMessageDialog(null, "修改失败");
}else
email=emailStr;break;
case 3:String telStr=JOptionPane.showInputDialog("请输入新电话号码",tel);
if(telStr==null||telStr.equals("")){
JOptionPane.showMessageDialog(null, "修改失败");
}else
tel=telStr;break;
case 4:JFileChooser jfc=new JFileChooser();
FileNameExtensionFilter filter=new FileNameExtensionFilter("Excel & xls & txt & obj","xls","txt","obj");
jfc.setAcceptAllFileFilterUsed(false);
jfc.setFileFilter(filter);
int value=jfc.showSaveDialog(this);
if(value==JFileChooser.APPROVE_OPTION){
file=new String(jfc.getSelectedFile().getAbsolutePath());
}break;
}
try {
PreparedStatement pstmt=conn.prepareStatement("update users set code='"+code+"', email='"+email+"',tele='"+tel+"' where id='"+id+"'");
pstmt.executeUpdate();
initTabelContent();
} catch (SQLException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
}
/**
* 将显示的信息清空
*/
public void clearMessage() {
userText.setText(null);
passwordText.setText(null);
card.show(downPanel, "未登录界面");
}
}
| 7,763 | 0.679359 | 0.67402 | 230 | 29.943478 | 21.789732 | 138 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 3.326087 | false | false | 13 |
4e4dfa64e2e568c5062ad7ded60b3af030b4c163 | 17,841,294,192,358 | d4cf5a6e6e77e9ef48f39dd4502aca45a0ef2b62 | /src/com/gt/sys/controller/SysLogController.java | 76e9b734ddb8855a8b2cf784b0645128a04f7867 | [] | no_license | stevenceo/layssh | https://github.com/stevenceo/layssh | 404738f885c5fdb6b39a685034becf81e7dc0fe6 | 00de30a5332a3c6eb2ef0acf7798ca94357a65e3 | refs/heads/master | 2020-03-28T15:43:55.954000 | 2018-03-13T03:14:47 | 2018-03-13T03:15:12 | 148,620,646 | 1 | 0 | null | true | 2018-09-13T10:15:44 | 2018-09-13T10:15:44 | 2018-09-13T10:15:23 | 2018-04-10T01:32:50 | 25,396 | 0 | 0 | 0 | null | false | null | package com.gt.sys.controller;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.gt.pageModel.DatagridForLayUI;
import com.gt.pageModel.SysLog;
import com.gt.sys.service.ISysLogService;
/**
*
* @功能说明:系统管理
* @作者: herun
* @创建日期:2015-09-24
* @版本号:V1.0
*/
@Controller
@RequestMapping("/sysLog")
public class SysLogController extends BaseController {
private ISysLogService sysLogService;
public ISysLogService getSysLogService() {
return sysLogService;
}
@Autowired
public void setSysLogService(ISysLogService sysLogService) {
this.sysLogService = sysLogService;
}
/**
* 获取datagrid数据
*/
@RequestMapping("/datagrid")
@ResponseBody
public DatagridForLayUI datagrid(SysLog sysLog,HttpServletRequest request) {
// String numString=request.getParameter("limit");
// System.out.println(numString);
// String page=request.getParameter("page");
// System.out.println("--->"+page);
return sysLogService.datagrid(sysLog);
}
}
| UTF-8 | Java | 1,254 | java | SysLogController.java | Java | [
{
"context": "ice.ISysLogService;\n\n/**\n * \n * @功能说明:系统管理\n * @作者: herun\n * @创建日期:2015-09-24\n * @版本号:V1.0\n */\n@Controller\n",
"end": 470,
"score": 0.9993689060211182,
"start": 465,
"tag": "USERNAME",
"value": "herun"
}
] | null | [] | package com.gt.sys.controller;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.gt.pageModel.DatagridForLayUI;
import com.gt.pageModel.SysLog;
import com.gt.sys.service.ISysLogService;
/**
*
* @功能说明:系统管理
* @作者: herun
* @创建日期:2015-09-24
* @版本号:V1.0
*/
@Controller
@RequestMapping("/sysLog")
public class SysLogController extends BaseController {
private ISysLogService sysLogService;
public ISysLogService getSysLogService() {
return sysLogService;
}
@Autowired
public void setSysLogService(ISysLogService sysLogService) {
this.sysLogService = sysLogService;
}
/**
* 获取datagrid数据
*/
@RequestMapping("/datagrid")
@ResponseBody
public DatagridForLayUI datagrid(SysLog sysLog,HttpServletRequest request) {
// String numString=request.getParameter("limit");
// System.out.println(numString);
// String page=request.getParameter("page");
// System.out.println("--->"+page);
return sysLogService.datagrid(sysLog);
}
}
| 1,254 | 0.768719 | 0.760399 | 49 | 23.530613 | 22.022346 | 77 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.918367 | false | false | 13 |
6e2ec934c6441e668929d140b14aebfd06ef2f92 | 15,616,501,112,077 | bb7ade9ef2b6c0902410cc4e5c559e528d5b0cc1 | /src/com/onsemi/matrix/api/tests/maintenance/FirmwareGainSpanWifiUpgradeTest.java | 26c0a0ae2972d9477165908015445cbc3808cb09 | [
"Apache-2.0"
] | permissive | ONSemiconductor/MatrixAPITests | https://github.com/ONSemiconductor/MatrixAPITests | e51e299be7d3fb22ca640aee9952fa1c88eddd72 | 39737e8fb57ccf858fa126bf9e5dcded94af1da1 | refs/heads/master | 2020-04-15T05:51:44.146000 | 2015-07-28T20:41:57 | 2015-07-28T20:41:57 | 31,052,996 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | /** Copyright 2015 ON Semiconductor
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
package com.onsemi.matrix.api.tests.maintenance;
import static com.eclipsesource.restfuse.Assert.assertOk;
import static com.eclipsesource.restfuse.AuthenticationType.BASIC;
import static org.junit.Assert.assertTrue;
import org.junit.After;
import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.rules.Timeout;
import org.junit.runner.RunWith;
import com.eclipsesource.restfuse.Destination;
import com.eclipsesource.restfuse.HttpJUnitRunner;
import com.eclipsesource.restfuse.Method;
import com.eclipsesource.restfuse.Response;
import com.eclipsesource.restfuse.annotation.Authentication;
import com.eclipsesource.restfuse.annotation.Context;
import com.eclipsesource.restfuse.annotation.HttpTest;
import com.onsemi.matrix.api.Settings;
import com.onsemi.matrix.api.Utils;
@RunWith( HttpJUnitRunner.class )
public class FirmwareGainSpanWifiUpgradeTest {
@Rule
public Destination restfuse = new Destination(this, Settings.getUrl());
@Rule
public Timeout timeout = new Timeout(Settings.getDefaultTimeout());
@BeforeClass
public static void resetSettingBeforeTests() {
Utils.setValue("firmwareupgrade_gs", "0");
}
@After
public void resetSettingAfterTest() throws InterruptedException {
Utils.setValue("firmwareupgrade_gs", "0");
Thread.sleep(Settings.getAfterTestDelay());
}
@Context
private Response response;
@HttpTest(method = Method.GET, path = "/vb.htm?paratest=firmwareupgrade_gs",
authentications = { @Authentication(type = BASIC, user = Settings.Username, password = Settings.Password) }, order = 0)
public void gainspanwifiupgrade_GetValue_ShouldReturnOK() {
Utils.printResponse(response);
assertOk(response);
Utils.verifyResponse(response, "OK firmwareupgrade_gs", "response doesn't contain 'OK firmwareupgrade_gs'");
}
@HttpTest(method = Method.GET, path = "/vb.htm?firmwareupgrade_gs=0",
authentications = { @Authentication(type = BASIC, user = Settings.Username, password = Settings.Password) }, order = 1)
public void gainspanwifiupgrade_SetTo0_ValueShouldBe0() {
Utils.printResponse(response);
assertOk(response);
Utils.verifyResponse(response, "OK firmwareupgrade_gs", "response doesn't contain 'OK firmwareupgrade_gs'");
Utils.verifyResponse(Utils.sendRequest("/vb.htm?paratest=firmwareupgrade_gs"),
"firmwareupgrade_gs=0", "firmwareupgrade_gs value isn't 0");
}
@HttpTest(method = Method.GET, path = "/vb.htm?firmwareupgrade_gs=1",
authentications = { @Authentication(type = BASIC, user = Settings.Username, password = Settings.Password) }, order = 2)
public void gainspanwifiupgrade_SetTo1_ValueShouldBe1() {
Utils.printResponse(response);
assertOk(response);
Utils.verifyResponse(response, "OK firmwareupgrade_gs", "response doesn't contain 'OK firmwareupgrade_gs'");
Utils.verifyResponse(Utils.sendRequest("/vb.htm?paratest=firmwareupgrade_gs"),
"firmwareupgrade_gs=1", "firmwareupgrade_gs value isn't 1");
}
@HttpTest(method = Method.GET, path = "/vb.htm?firmwareupgrade_gs=NaN",
authentications = { @Authentication(type = BASIC, user = Settings.Username, password = Settings.Password) }, order = 3)
public void gainspanwifiupgrade_SetToNaN_ShouldReturnNG() {
Utils.printResponse(response);
Utils.verifyResponse(response, "NG firmwareupgrade_gs", "response doesn't contain 'NG firmwareupgrade_gs'");
String firmwareupgradegsGetResponse = Utils.sendRequest("/vb.htm?paratest=firmwareupgrade_gs").getBody();
assertTrue("firmwareupgrade_gs doesn't have default value", firmwareupgradegsGetResponse.contains("firmwareupgrade_gs=0"));
}
@HttpTest(method = Method.GET, path = "/vb.htm?firmwareupgrade_gs=-1",
authentications = { @Authentication(type = BASIC, user = Settings.Username, password = Settings.Password) }, order = 4)
public void gainspanwifiupgrade_SetToNegativeNumber_ShouldReturnNG() {
Utils.printResponse(response);
Utils.verifyResponse(response, "NG firmwareupgrade_gs", "response doesn't contain 'NG firmwareupgrade_gs'");
String firmwareupgradegsGetResponse = Utils.sendRequest("/vb.htm?paratest=firmwareupgrade_gs").getBody();
assertTrue("firmwareupgrade_gs doesn't have default value", firmwareupgradegsGetResponse.contains("firmwareupgrade_gs=0"));
}
@HttpTest(method = Method.GET, path = "/vb.htm?firmwareupgrade_gs=",
authentications = { @Authentication(type = BASIC, user = Settings.Username, password = Settings.Password) }, order = 5)
public void gainspanwifiupgrade_SetToEmpty_ShouldReturnNG() {
Utils.printResponse(response);
Utils.verifyResponse(response, "NG firmwareupgrade_gs", "response doesn't contain 'NG firmwareupgrade_gs'");
String firmwareupgradegsGetResponse = Utils.sendRequest("/vb.htm?paratest=firmwareupgrade_gs").getBody();
assertTrue("firmwareupgrade_gs doesn't have default value", firmwareupgradegsGetResponse.contains("firmwareupgrade_gs=0"));
}
}
| UTF-8 | Java | 5,456 | java | FirmwareGainSpanWifiUpgradeTest.java | Java | [
{
"context": "type = BASIC, user = Settings.Username, password = Settings.Password) }, order = 1)\n\tpublic void gainspanwifiupgrade_S",
"end": 2564,
"score": 0.9384522438049316,
"start": 2547,
"tag": "PASSWORD",
"value": "Settings.Password"
},
{
"context": "type = BASIC, user = Sett... | null | [] | /** Copyright 2015 ON Semiconductor
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
package com.onsemi.matrix.api.tests.maintenance;
import static com.eclipsesource.restfuse.Assert.assertOk;
import static com.eclipsesource.restfuse.AuthenticationType.BASIC;
import static org.junit.Assert.assertTrue;
import org.junit.After;
import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.rules.Timeout;
import org.junit.runner.RunWith;
import com.eclipsesource.restfuse.Destination;
import com.eclipsesource.restfuse.HttpJUnitRunner;
import com.eclipsesource.restfuse.Method;
import com.eclipsesource.restfuse.Response;
import com.eclipsesource.restfuse.annotation.Authentication;
import com.eclipsesource.restfuse.annotation.Context;
import com.eclipsesource.restfuse.annotation.HttpTest;
import com.onsemi.matrix.api.Settings;
import com.onsemi.matrix.api.Utils;
@RunWith( HttpJUnitRunner.class )
public class FirmwareGainSpanWifiUpgradeTest {
@Rule
public Destination restfuse = new Destination(this, Settings.getUrl());
@Rule
public Timeout timeout = new Timeout(Settings.getDefaultTimeout());
@BeforeClass
public static void resetSettingBeforeTests() {
Utils.setValue("firmwareupgrade_gs", "0");
}
@After
public void resetSettingAfterTest() throws InterruptedException {
Utils.setValue("firmwareupgrade_gs", "0");
Thread.sleep(Settings.getAfterTestDelay());
}
@Context
private Response response;
@HttpTest(method = Method.GET, path = "/vb.htm?paratest=firmwareupgrade_gs",
authentications = { @Authentication(type = BASIC, user = Settings.Username, password = Settings.Password) }, order = 0)
public void gainspanwifiupgrade_GetValue_ShouldReturnOK() {
Utils.printResponse(response);
assertOk(response);
Utils.verifyResponse(response, "OK firmwareupgrade_gs", "response doesn't contain 'OK firmwareupgrade_gs'");
}
@HttpTest(method = Method.GET, path = "/vb.htm?firmwareupgrade_gs=0",
authentications = { @Authentication(type = BASIC, user = Settings.Username, password = <PASSWORD>) }, order = 1)
public void gainspanwifiupgrade_SetTo0_ValueShouldBe0() {
Utils.printResponse(response);
assertOk(response);
Utils.verifyResponse(response, "OK firmwareupgrade_gs", "response doesn't contain 'OK firmwareupgrade_gs'");
Utils.verifyResponse(Utils.sendRequest("/vb.htm?paratest=firmwareupgrade_gs"),
"firmwareupgrade_gs=0", "firmwareupgrade_gs value isn't 0");
}
@HttpTest(method = Method.GET, path = "/vb.htm?firmwareupgrade_gs=1",
authentications = { @Authentication(type = BASIC, user = Settings.Username, password = <PASSWORD>) }, order = 2)
public void gainspanwifiupgrade_SetTo1_ValueShouldBe1() {
Utils.printResponse(response);
assertOk(response);
Utils.verifyResponse(response, "OK firmwareupgrade_gs", "response doesn't contain 'OK firmwareupgrade_gs'");
Utils.verifyResponse(Utils.sendRequest("/vb.htm?paratest=firmwareupgrade_gs"),
"firmwareupgrade_gs=1", "firmwareupgrade_gs value isn't 1");
}
@HttpTest(method = Method.GET, path = "/vb.htm?firmwareupgrade_gs=NaN",
authentications = { @Authentication(type = BASIC, user = Settings.Username, password = Settings.Password) }, order = 3)
public void gainspanwifiupgrade_SetToNaN_ShouldReturnNG() {
Utils.printResponse(response);
Utils.verifyResponse(response, "NG firmwareupgrade_gs", "response doesn't contain 'NG firmwareupgrade_gs'");
String firmwareupgradegsGetResponse = Utils.sendRequest("/vb.htm?paratest=firmwareupgrade_gs").getBody();
assertTrue("firmwareupgrade_gs doesn't have default value", firmwareupgradegsGetResponse.contains("firmwareupgrade_gs=0"));
}
@HttpTest(method = Method.GET, path = "/vb.htm?firmwareupgrade_gs=-1",
authentications = { @Authentication(type = BASIC, user = Settings.Username, password = <PASSWORD>) }, order = 4)
public void gainspanwifiupgrade_SetToNegativeNumber_ShouldReturnNG() {
Utils.printResponse(response);
Utils.verifyResponse(response, "NG firmwareupgrade_gs", "response doesn't contain 'NG firmwareupgrade_gs'");
String firmwareupgradegsGetResponse = Utils.sendRequest("/vb.htm?paratest=firmwareupgrade_gs").getBody();
assertTrue("firmwareupgrade_gs doesn't have default value", firmwareupgradegsGetResponse.contains("firmwareupgrade_gs=0"));
}
@HttpTest(method = Method.GET, path = "/vb.htm?firmwareupgrade_gs=",
authentications = { @Authentication(type = BASIC, user = Settings.Username, password = <PASSWORD>) }, order = 5)
public void gainspanwifiupgrade_SetToEmpty_ShouldReturnNG() {
Utils.printResponse(response);
Utils.verifyResponse(response, "NG firmwareupgrade_gs", "response doesn't contain 'NG firmwareupgrade_gs'");
String firmwareupgradegsGetResponse = Utils.sendRequest("/vb.htm?paratest=firmwareupgrade_gs").getBody();
assertTrue("firmwareupgrade_gs doesn't have default value", firmwareupgradegsGetResponse.contains("firmwareupgrade_gs=0"));
}
}
| 5,428 | 0.770711 | 0.765213 | 114 | 46.85965 | 39.007393 | 125 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1.877193 | false | false | 13 |
6d968c6747da04d04173f26732f7ca8bf73fe881 | 24,257,975,345,828 | ebe0f98b763df2182b19cb93f23509919decfe88 | /src/main/java/com/epam/store/template/api/domain/builder/DoSmthResponseBuilder.java | 5bfc6f6022707647237600149d137ca1af189112 | [] | no_license | sychou-uladzimir/commercetools-template | https://github.com/sychou-uladzimir/commercetools-template | 78a55ac77c7e86c51479441a8d2585a6ee730f4e | 4056884a4da4eb9cd02f18c1c42e53874db07b39 | refs/heads/master | 2020-04-02T16:20:48.303000 | 2018-10-29T12:14:01 | 2018-10-29T12:14:01 | 154,607,513 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package com.epam.store.template.api.domain.builder;
import com.epam.store.template.api.domain.DoSmthResponse;
public final class DoSmthResponseBuilder {
private String field;
private DoSmthResponseBuilder() {
}
public static DoSmthResponseBuilder aDoSmthResponse() {
return new DoSmthResponseBuilder();
}
public DoSmthResponseBuilder withField(String field) {
this.field = field;
return this;
}
public DoSmthResponse build() {
DoSmthResponse doSmthResponse = new DoSmthResponse();
doSmthResponse.setField(field);
return doSmthResponse;
}
}
| UTF-8 | Java | 568 | java | DoSmthResponseBuilder.java | Java | [] | null | [] | package com.epam.store.template.api.domain.builder;
import com.epam.store.template.api.domain.DoSmthResponse;
public final class DoSmthResponseBuilder {
private String field;
private DoSmthResponseBuilder() {
}
public static DoSmthResponseBuilder aDoSmthResponse() {
return new DoSmthResponseBuilder();
}
public DoSmthResponseBuilder withField(String field) {
this.field = field;
return this;
}
public DoSmthResponse build() {
DoSmthResponse doSmthResponse = new DoSmthResponse();
doSmthResponse.setField(field);
return doSmthResponse;
}
}
| 568 | 0.776408 | 0.776408 | 26 | 20.846153 | 21.351801 | 57 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1.153846 | false | false | 13 |
6ae7aa539dc2850f649d8294b047d2cc19043598 | 21,655,225,170,152 | b7764610c3c0043774e0c368868aedc2f88112ed | /Basics/Test2 (10).java | 0ca6b3fab26b6cc482689c6f94035f5386940102 | [] | no_license | singh-nayan/CPD | https://github.com/singh-nayan/CPD | 5b97c5df9b6c5eca2bf1ecad4937fbf72e62bc94 | 7ac284c2e604e6bbf79a01c3be872c3e3e01dadb | refs/heads/master | 2020-03-24T22:54:28.927000 | 2018-08-01T05:29:45 | 2018-08-01T05:29:45 | 143,107,808 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package mar12;
public class Test2
{
public static void main(String[] args)
{
int x = 48, y = 36;
int z = x&y;
int p= x|y;
int q=~x;
System.out.println("X & Y = "+z);
System.out.println("X | Y = "+p);
System.out.println("~X = "+q);
int a=49, b=2;
System.out.println("A >> B = "+(a>>b));
System.out.println("A << B = "+(a<<b));
}
} | UTF-8 | Java | 451 | java | Test2 (10).java | Java | [] | null | [] | package mar12;
public class Test2
{
public static void main(String[] args)
{
int x = 48, y = 36;
int z = x&y;
int p= x|y;
int q=~x;
System.out.println("X & Y = "+z);
System.out.println("X | Y = "+p);
System.out.println("~X = "+q);
int a=49, b=2;
System.out.println("A >> B = "+(a>>b));
System.out.println("A << B = "+(a<<b));
}
} | 451 | 0.416851 | 0.394679 | 19 | 21.842106 | 16.131901 | 47 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.789474 | false | false | 13 |
0dc3feb1fc5cf612fdff68d34a618247f061aed8 | 19,877,108,711,332 | 648c2663950f5250d7153351174dcd6443849e9d | /Level2/PhoneBookHashMap/src/phonebookhashmap/PhoneBookHashMap.java | 1db6ba0d740932195d0763c9a2f344d4dd602a12 | [] | no_license | Contia/Java-Exercises | https://github.com/Contia/Java-Exercises | d432cdf9ca07fb11e8ead41b7134ccfe38369c76 | 155df1e41d35943bae34622a6126076f6ce4dcf9 | refs/heads/master | 2021-01-23T00:25:06.714000 | 2017-03-31T16:00:22 | 2017-03-31T16:00:22 | 85,716,913 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package phonebookhashmap;
import java.util.Scanner;
/**
*
* @author contia
*/
public class PhoneBookHashMap {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
boolean endOfExecution=false;
Menu menu = new Menu();
PhoneBook phoneBook = new PhoneBook();
while (!endOfExecution){
System.out.println("------MENU------");
System.out.println("1: Add Contact");
System.out.println("2: Get Contact");
System.out.println("3: Exit");
Scanner sc = new Scanner(System.in);
switch(sc.nextInt()){
case 1: menu.addContact(phoneBook); break;
case 2: menu.getContact(phoneBook); break;
case 3: endOfExecution = menu.exit();
}
}
}
}
| UTF-8 | Java | 1,093 | java | PhoneBookHashMap.java | Java | [
{
"context": "map;\n\nimport java.util.Scanner;\n\n/**\n *\n * @author contia\n */\npublic class PhoneBookHashMap {\n\n /**\n ",
"end": 263,
"score": 0.9978630542755127,
"start": 257,
"tag": "USERNAME",
"value": "contia"
}
] | null | [] | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package phonebookhashmap;
import java.util.Scanner;
/**
*
* @author contia
*/
public class PhoneBookHashMap {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
boolean endOfExecution=false;
Menu menu = new Menu();
PhoneBook phoneBook = new PhoneBook();
while (!endOfExecution){
System.out.println("------MENU------");
System.out.println("1: Add Contact");
System.out.println("2: Get Contact");
System.out.println("3: Exit");
Scanner sc = new Scanner(System.in);
switch(sc.nextInt()){
case 1: menu.addContact(phoneBook); break;
case 2: menu.getContact(phoneBook); break;
case 3: endOfExecution = menu.exit();
}
}
}
}
| 1,093 | 0.576395 | 0.570906 | 38 | 27.763159 | 21.965803 | 79 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.473684 | false | false | 13 |
6a35fef1180f31d17cf504c9264e220ccac49bec | 10,591,389,367,974 | 0c490cb7f1bb71d2227500cd7ab517511e2619cf | /src/main/java/com/neuedu/controller/portal/OrderController.java | 3e4e2ed73275e183794d0fb9f4055a2e7bc11a04 | [] | no_license | yxy07112420/Shopping_Project | https://github.com/yxy07112420/Shopping_Project | 64359c0e59a6e9ffa1549611c8891e013d8caab9 | a99d4c2fcb23590818ca9df65963de9cfd346dd4 | refs/heads/master | 2020-04-14T20:10:01.334000 | 2019-01-14T05:35:07 | 2019-01-14T05:35:07 | 164,084,095 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package com.neuedu.controller.portal;
import com.alipay.api.AlipayApiException;
import com.alipay.api.internal.util.AlipaySignature;
import com.alipay.demo.trade.config.Configs;
import com.google.common.collect.Maps;
import com.neuedu.common.ResponseCord;
import com.neuedu.common.ServerResponse;
import com.neuedu.pojo.UserInfo;
import com.neuedu.service.OrderService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
/**
*订单模块
*/
@RestController
@RequestMapping(value = "/order")
public class OrderController {
@Autowired
OrderService orderService;
/**
* 创建订单
*/
@RequestMapping(value = "/create.do")
public ServerResponse create(HttpSession session,Integer shippingId){
UserInfo userInfo = (UserInfo) session.getAttribute(ResponseCord.CURRENTUSER);
if(userInfo == null){
return ServerResponse.responseIsError("请登录");
}
return orderService.create(userInfo.getId(),shippingId);
}
/**
* 取消订单
*/
@RequestMapping(value = "/cancel.do")
public ServerResponse cancel(HttpSession session,Long orderNo){
UserInfo userInfo = (UserInfo) session.getAttribute(ResponseCord.CURRENTUSER);
if(userInfo == null){
return ServerResponse.responseIsError("请登录");
}
return orderService.cancel(userInfo.getId(),orderNo);
}
/**
*获取订单的商品信息
*/
@RequestMapping(value = "/get_order_cart_product.do")
public ServerResponse get_order_cart_product(HttpSession session){
UserInfo userInfo = (UserInfo) session.getAttribute(ResponseCord.CURRENTUSER);
if(userInfo == null){
return ServerResponse.responseIsError("请登录");
}
return orderService.get_order_cart_product(userInfo.getId());
}
/**
* 查询订单,分页查询
*/
@RequestMapping(value = "/list.do")
public ServerResponse list(HttpSession session,
@RequestParam(required = false,defaultValue = "1")Integer pageNum,
@RequestParam(required = false,defaultValue = "10")Integer pageSize){
UserInfo userInfo = (UserInfo) session.getAttribute(ResponseCord.CURRENTUSER);
if(userInfo == null){
return ServerResponse.responseIsError("请登录");
}
return orderService.list(userInfo.getId(),pageNum,pageSize);
}
/**
* 获取订单详情
*/
@RequestMapping(value = "/detail.do")
public ServerResponse detail(HttpSession session,Long orderNo){
UserInfo userInfo = (UserInfo) session.getAttribute(ResponseCord.CURRENTUSER);
if(userInfo == null){
return ServerResponse.responseIsError("请登录");
}
return orderService.detail(userInfo.getId(),orderNo);
}
/**
* 支付接口
*/
@RequestMapping(value = "/pay.do")
public ServerResponse pay(HttpSession session,Long orderNo){
//验证是否有用户登录
UserInfo userInfo = (UserInfo) session.getAttribute(ResponseCord.CURRENTUSER);
if(userInfo == null){
return ServerResponse.responseIsError("当前无用户登录或用户登录已超时");
}
return orderService.pay(userInfo.getId(),orderNo);
}
/**
* 支付宝回调参数
*/
@RequestMapping(value = "/alipay_callback.do")
public ServerResponse alipay_callback(HttpServletRequest request){
//拿到支付宝的回调参数
Map<String, String[]> parameterMap = request.getParameterMap();
//遍历map集合,value用“,”隔开
Iterator<String> iterator = parameterMap.keySet().iterator();
Map<String,String> paraValues= Maps.newHashMap();
while (iterator.hasNext()){
String key = iterator.next();
String[] strings = parameterMap.get(key);
String value = "";
for (int i = 0;i < strings.length;i++){
value = (i == strings.length - 1)?value+strings[i]:value + strings[i]+",";
System.out.println("value:"+value);
}
paraValues.put(key,value);
}
//进行支付宝的验签
try {
paraValues.remove("sign_type");//使验签可以通过
System.out.println("验证通过");
boolean result = AlipaySignature.rsaCheckV2(paraValues, Configs.getAlipayPublicKey(),"UTF-8",Configs.getSignType());
if(!result){
return ServerResponse.responseIsError("非法请求,验证不通过");
}
} catch (AlipayApiException e) {
e.printStackTrace();
}
System.out.println("===================");
return orderService.alipay_callback(paraValues);
}
/**
* 查询支付信息
*/
@RequestMapping(value = "/query_order_pay_status.do")
public ServerResponse query_order_pay_status(HttpSession session,Long orderNo){
//验证是否有用户登录
UserInfo userInfo = (UserInfo) session.getAttribute(ResponseCord.CURRENTUSER);
if(userInfo == null){
return ServerResponse.responseIsError("当前无用户登录或用户登录已超时");
}
return orderService.query_order_pay_status(orderNo);
}
}
| UTF-8 | Java | 5,751 | java | OrderController.java | Java | [] | null | [] | package com.neuedu.controller.portal;
import com.alipay.api.AlipayApiException;
import com.alipay.api.internal.util.AlipaySignature;
import com.alipay.demo.trade.config.Configs;
import com.google.common.collect.Maps;
import com.neuedu.common.ResponseCord;
import com.neuedu.common.ServerResponse;
import com.neuedu.pojo.UserInfo;
import com.neuedu.service.OrderService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
/**
*订单模块
*/
@RestController
@RequestMapping(value = "/order")
public class OrderController {
@Autowired
OrderService orderService;
/**
* 创建订单
*/
@RequestMapping(value = "/create.do")
public ServerResponse create(HttpSession session,Integer shippingId){
UserInfo userInfo = (UserInfo) session.getAttribute(ResponseCord.CURRENTUSER);
if(userInfo == null){
return ServerResponse.responseIsError("请登录");
}
return orderService.create(userInfo.getId(),shippingId);
}
/**
* 取消订单
*/
@RequestMapping(value = "/cancel.do")
public ServerResponse cancel(HttpSession session,Long orderNo){
UserInfo userInfo = (UserInfo) session.getAttribute(ResponseCord.CURRENTUSER);
if(userInfo == null){
return ServerResponse.responseIsError("请登录");
}
return orderService.cancel(userInfo.getId(),orderNo);
}
/**
*获取订单的商品信息
*/
@RequestMapping(value = "/get_order_cart_product.do")
public ServerResponse get_order_cart_product(HttpSession session){
UserInfo userInfo = (UserInfo) session.getAttribute(ResponseCord.CURRENTUSER);
if(userInfo == null){
return ServerResponse.responseIsError("请登录");
}
return orderService.get_order_cart_product(userInfo.getId());
}
/**
* 查询订单,分页查询
*/
@RequestMapping(value = "/list.do")
public ServerResponse list(HttpSession session,
@RequestParam(required = false,defaultValue = "1")Integer pageNum,
@RequestParam(required = false,defaultValue = "10")Integer pageSize){
UserInfo userInfo = (UserInfo) session.getAttribute(ResponseCord.CURRENTUSER);
if(userInfo == null){
return ServerResponse.responseIsError("请登录");
}
return orderService.list(userInfo.getId(),pageNum,pageSize);
}
/**
* 获取订单详情
*/
@RequestMapping(value = "/detail.do")
public ServerResponse detail(HttpSession session,Long orderNo){
UserInfo userInfo = (UserInfo) session.getAttribute(ResponseCord.CURRENTUSER);
if(userInfo == null){
return ServerResponse.responseIsError("请登录");
}
return orderService.detail(userInfo.getId(),orderNo);
}
/**
* 支付接口
*/
@RequestMapping(value = "/pay.do")
public ServerResponse pay(HttpSession session,Long orderNo){
//验证是否有用户登录
UserInfo userInfo = (UserInfo) session.getAttribute(ResponseCord.CURRENTUSER);
if(userInfo == null){
return ServerResponse.responseIsError("当前无用户登录或用户登录已超时");
}
return orderService.pay(userInfo.getId(),orderNo);
}
/**
* 支付宝回调参数
*/
@RequestMapping(value = "/alipay_callback.do")
public ServerResponse alipay_callback(HttpServletRequest request){
//拿到支付宝的回调参数
Map<String, String[]> parameterMap = request.getParameterMap();
//遍历map集合,value用“,”隔开
Iterator<String> iterator = parameterMap.keySet().iterator();
Map<String,String> paraValues= Maps.newHashMap();
while (iterator.hasNext()){
String key = iterator.next();
String[] strings = parameterMap.get(key);
String value = "";
for (int i = 0;i < strings.length;i++){
value = (i == strings.length - 1)?value+strings[i]:value + strings[i]+",";
System.out.println("value:"+value);
}
paraValues.put(key,value);
}
//进行支付宝的验签
try {
paraValues.remove("sign_type");//使验签可以通过
System.out.println("验证通过");
boolean result = AlipaySignature.rsaCheckV2(paraValues, Configs.getAlipayPublicKey(),"UTF-8",Configs.getSignType());
if(!result){
return ServerResponse.responseIsError("非法请求,验证不通过");
}
} catch (AlipayApiException e) {
e.printStackTrace();
}
System.out.println("===================");
return orderService.alipay_callback(paraValues);
}
/**
* 查询支付信息
*/
@RequestMapping(value = "/query_order_pay_status.do")
public ServerResponse query_order_pay_status(HttpSession session,Long orderNo){
//验证是否有用户登录
UserInfo userInfo = (UserInfo) session.getAttribute(ResponseCord.CURRENTUSER);
if(userInfo == null){
return ServerResponse.responseIsError("当前无用户登录或用户登录已超时");
}
return orderService.query_order_pay_status(orderNo);
}
}
| 5,751 | 0.645691 | 0.644399 | 147 | 35.863945 | 27.54505 | 128 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.55102 | false | false | 13 |
b5e5a3281b319ed7bc0d345fdbce0bc767517d70 | 28,106,266,012,149 | a7c84dace4b4f9921601507afce125dc695456a2 | /app/src/main/java/com/xbx/employer/utils/HttpURLUtils.java | da9191f1ae93772055f85517e5853b5274993d68 | [] | no_license | liushaoxuan/xianbuxianemployer | https://github.com/liushaoxuan/xianbuxianemployer | df6f7526ea06d3645d6f3b56e8ae0ff159035baf | a43282ab2099fffd01421d7e0b27d18434a879bb | refs/heads/master | 2017-12-12T12:20:52.338000 | 2017-01-13T05:26:24 | 2017-01-13T05:26:24 | 78,617,833 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package com.xbx.employer.utils;
/**
* Created by lx on 2016/11/8.
* 网络请求URL
*/
public class HttpURLUtils {
// public static String BaseUrl = "http://192.168.100.115:8080/xbx/api/";
// public static String ImageUrl = "http://192.168.100.115:8080/xbx/resource/";
/**
* 正式环境
*/
// public static String BaseUrl = "http://server.myxbx.com:8080/xbx/api";
// public static String ImageUrl = "http://server.myxbx.com:8080/xbx/resource/";
// public static String BaseUrl = "http://116.62.42.213:8080/xbx/api/";
// public static String ImageUrl = "http://116.62.42.213:8080/xbx/resource/";
/**
* 测试
*/
public static String BaseUrl = "http://jiri.kyguoxue.com:8080/xbx/api/";
public static String ImageUrl = "http://jiri.kyguoxue.com:8080/xbx/resource/";
/**
* 系统参数取得
*/
public static String GetConfig = BaseUrl + "GetConfig";
/**
* 上传文件
*/
public static String UploadFile = BaseUrl + "UploadFile";
/**
* 获取验证码
*/
public static String GetCode = BaseUrl + "CreateVerificationCode";
/**
* 登录
*/
public static String LoginUrl = BaseUrl + "R_EmployerLogin";
/**
* 注册
*/
public static String RegisterUrl = BaseUrl + "R_EmployerRegister";
/**
* 上传所在城市
*/
public static String UpLoadCityName = BaseUrl + "E_EmployeeCity";
/**
* 取得雇主账户信息
*/
public static String GetUserAccountInfo = BaseUrl + "R_EmployerAccountInfo";
/**
* 广告一览取得
*/
public static String GetE_BannerList = BaseUrl + "E_BannerList";
/**
* 取得服务公司信息
*/
public static String GetServiceCompanyMst = BaseUrl + "ServiceCompanyMst";
/**
* 取得商圈信息
*/
public static String GetTradeAreaMst = BaseUrl + "TradeAreaMst";
/**
* 取得行业职位信息
*/
public static String GetJobPosition = BaseUrl + "ProfessionJobMst";
/**
* 取得雇主推送消息一览
*/
public static String PullMesageUrl = BaseUrl + "R_EmployerMessageList";
/**
* 取得雇主账户履历
*/
public static String AccountHistoryUrl = BaseUrl + "R_EmployerAccountHistory";
/**
* 取得雇主账户支出详情
*/
public static String GetAccounDetail = BaseUrl + "R_RmployerAccountDetail";
/**
* 雇主信息提交
*/
public static String UpLoadInfomation = BaseUrl + "R_EmployerInformation";
/**
* 取得雇员信息
*/
public static String GetEmployeeInfo = BaseUrl + "R_EmployeeInformation";
/**
* 雇员拉黑
*/
public static String PutEmployeeBlackList = BaseUrl + "R_EmployeeBlackList";
/**
* 职位一览取得
*/
public static String GetJobList = BaseUrl + "R_JobList";
/**
* 职位详细取得
*/
public static String GetJobDetail = BaseUrl + "R_JobDetail";
/**
* 职位发布
*/
public static String ReleasJob = BaseUrl + "R_JobSubmit";
/**
* 职位申请确认(雇主)
*/
public static String ApplyConfirm = BaseUrl + "R_JobApplicationConfirm";
/**
* 拒绝职位申请
*/
public static String RefuseJobApply = BaseUrl + "R_JobRefuse";
/**
* 上班打卡(雇主)
*/
public static String WorkStartClock = BaseUrl + "R_JobStart";
/**
* 下班打卡(雇主)
*/
public static String WorkEndClock = BaseUrl + "R_JobEnd";
/**
* 职位打卡确认(雇主)
*/
public static String JobClockConfirm = BaseUrl + "R_JobConfirm";
/**
* 职位评分
*/
public static String JobEvaluateSource = BaseUrl + "R_JobEmployeeScore";
/**
* 取得平台服务费单价
*/
public static String GetR_ServicePrice = BaseUrl + "R_ServicePrice";
/**
* 修改密码
*/
public static String ChangePassword = BaseUrl + "R_EmployerPassword";
/**
* 取得申请一览
*/
public static String GetApplyList = BaseUrl + "R_JobApplyList";
/**
* 取消职位
*/
public static String CancelJobUrl = BaseUrl + "R_JobCancel";
/**
* 取消职位
*/
public static String EndApplyJob = BaseUrl + "R_JobApplyEnd";
/**
* 取得评论一览
*/
public static String GetCommentList = BaseUrl + "R_CommentList";
/**
* 取得评论详情
*/
public static String GetCommentDetail = BaseUrl + "R_CommentDetail";
/**
* 取得可打卡职位一览
*/
public static String GetCanClockJobList = BaseUrl + "R_JobClockList";
/**
* 取得职位雇员一览
*/
public static String GetJobEmployeeList = BaseUrl + "R_JobEmployeeList";
/**
* 取得职位打卡信息
*/
public static String GetJobClockInfo = BaseUrl + "R_JobClockInformation";
/**
* 忘记密码
*/
public static String LostPassword = BaseUrl + "E_EmployerForgetPwd";
/**
* 雇员违约
*/
public static String R_JobBreakContract = BaseUrl + "R_JobBreakContract";
/**
* 回复评论
*/
public static String R_CommentReply = BaseUrl + "R_CommentReply";
/**
* 点赞 /取消点赞
*/
public static String R_CommentLike = BaseUrl + "R_CommentLike";
/**
* 取得雇主信息
*/
public static String R_EmployerGetInfo = BaseUrl + "R_EmployerGetInfo";
/**
* 取得职位发布默认信息
*/
public static String R_CurrentJobDetail = BaseUrl + "R_CurrentJobDetail";
/**
* 修改职位
*/
public static String R_JobAmend = BaseUrl + "R_JobAmend";
/**
* 发表评论
*/
public static String R_CommentPublish = BaseUrl + "R_CommentPublish";
/**
* 取得评论标签信息
*/
public static String GetCommentLabelMst = BaseUrl + "CommentLabelMst";
/**
* 出发打卡
*/
public static String R_JobGo = BaseUrl + "R_JobGo";
/**
* 更新上下班打卡时间
*
*/
public static String R_JobUpdateCheckTime = BaseUrl + "R_JobUpdateCheckTime";
}
| UTF-8 | Java | 6,243 | java | HttpURLUtils.java | Java | [
{
"context": "package com.xbx.employer.utils;\n\n/**\n * Created by lx on 2016/11/8.\n * 网络请求URL\n */\npublic class HttpURL",
"end": 53,
"score": 0.9958205223083496,
"start": 51,
"tag": "USERNAME",
"value": "lx"
},
{
"context": "ls {\n// public static String BaseUrl = \"http://192... | null | [] | package com.xbx.employer.utils;
/**
* Created by lx on 2016/11/8.
* 网络请求URL
*/
public class HttpURLUtils {
// public static String BaseUrl = "http://192.168.100.115:8080/xbx/api/";
// public static String ImageUrl = "http://192.168.100.115:8080/xbx/resource/";
/**
* 正式环境
*/
// public static String BaseUrl = "http://server.myxbx.com:8080/xbx/api";
// public static String ImageUrl = "http://server.myxbx.com:8080/xbx/resource/";
// public static String BaseUrl = "http://192.168.3.11:8080/xbx/api/";
// public static String ImageUrl = "http://192.168.3.11:8080/xbx/resource/";
/**
* 测试
*/
public static String BaseUrl = "http://jiri.kyguoxue.com:8080/xbx/api/";
public static String ImageUrl = "http://jiri.kyguoxue.com:8080/xbx/resource/";
/**
* 系统参数取得
*/
public static String GetConfig = BaseUrl + "GetConfig";
/**
* 上传文件
*/
public static String UploadFile = BaseUrl + "UploadFile";
/**
* 获取验证码
*/
public static String GetCode = BaseUrl + "CreateVerificationCode";
/**
* 登录
*/
public static String LoginUrl = BaseUrl + "R_EmployerLogin";
/**
* 注册
*/
public static String RegisterUrl = BaseUrl + "R_EmployerRegister";
/**
* 上传所在城市
*/
public static String UpLoadCityName = BaseUrl + "E_EmployeeCity";
/**
* 取得雇主账户信息
*/
public static String GetUserAccountInfo = BaseUrl + "R_EmployerAccountInfo";
/**
* 广告一览取得
*/
public static String GetE_BannerList = BaseUrl + "E_BannerList";
/**
* 取得服务公司信息
*/
public static String GetServiceCompanyMst = BaseUrl + "ServiceCompanyMst";
/**
* 取得商圈信息
*/
public static String GetTradeAreaMst = BaseUrl + "TradeAreaMst";
/**
* 取得行业职位信息
*/
public static String GetJobPosition = BaseUrl + "ProfessionJobMst";
/**
* 取得雇主推送消息一览
*/
public static String PullMesageUrl = BaseUrl + "R_EmployerMessageList";
/**
* 取得雇主账户履历
*/
public static String AccountHistoryUrl = BaseUrl + "R_EmployerAccountHistory";
/**
* 取得雇主账户支出详情
*/
public static String GetAccounDetail = BaseUrl + "R_RmployerAccountDetail";
/**
* 雇主信息提交
*/
public static String UpLoadInfomation = BaseUrl + "R_EmployerInformation";
/**
* 取得雇员信息
*/
public static String GetEmployeeInfo = BaseUrl + "R_EmployeeInformation";
/**
* 雇员拉黑
*/
public static String PutEmployeeBlackList = BaseUrl + "R_EmployeeBlackList";
/**
* 职位一览取得
*/
public static String GetJobList = BaseUrl + "R_JobList";
/**
* 职位详细取得
*/
public static String GetJobDetail = BaseUrl + "R_JobDetail";
/**
* 职位发布
*/
public static String ReleasJob = BaseUrl + "R_JobSubmit";
/**
* 职位申请确认(雇主)
*/
public static String ApplyConfirm = BaseUrl + "R_JobApplicationConfirm";
/**
* 拒绝职位申请
*/
public static String RefuseJobApply = BaseUrl + "R_JobRefuse";
/**
* 上班打卡(雇主)
*/
public static String WorkStartClock = BaseUrl + "R_JobStart";
/**
* 下班打卡(雇主)
*/
public static String WorkEndClock = BaseUrl + "R_JobEnd";
/**
* 职位打卡确认(雇主)
*/
public static String JobClockConfirm = BaseUrl + "R_JobConfirm";
/**
* 职位评分
*/
public static String JobEvaluateSource = BaseUrl + "R_JobEmployeeScore";
/**
* 取得平台服务费单价
*/
public static String GetR_ServicePrice = BaseUrl + "R_ServicePrice";
/**
* 修改密码
*/
public static String ChangePassword = BaseUrl + "R_EmployerPassword";
/**
* 取得申请一览
*/
public static String GetApplyList = BaseUrl + "R_JobApplyList";
/**
* 取消职位
*/
public static String CancelJobUrl = BaseUrl + "R_JobCancel";
/**
* 取消职位
*/
public static String EndApplyJob = BaseUrl + "R_JobApplyEnd";
/**
* 取得评论一览
*/
public static String GetCommentList = BaseUrl + "R_CommentList";
/**
* 取得评论详情
*/
public static String GetCommentDetail = BaseUrl + "R_CommentDetail";
/**
* 取得可打卡职位一览
*/
public static String GetCanClockJobList = BaseUrl + "R_JobClockList";
/**
* 取得职位雇员一览
*/
public static String GetJobEmployeeList = BaseUrl + "R_JobEmployeeList";
/**
* 取得职位打卡信息
*/
public static String GetJobClockInfo = BaseUrl + "R_JobClockInformation";
/**
* 忘记密码
*/
public static String LostPassword = BaseUrl + "E_EmployerForgetPwd";
/**
* 雇员违约
*/
public static String R_JobBreakContract = BaseUrl + "R_JobBreakContract";
/**
* 回复评论
*/
public static String R_CommentReply = BaseUrl + "R_CommentReply";
/**
* 点赞 /取消点赞
*/
public static String R_CommentLike = BaseUrl + "R_CommentLike";
/**
* 取得雇主信息
*/
public static String R_EmployerGetInfo = BaseUrl + "R_EmployerGetInfo";
/**
* 取得职位发布默认信息
*/
public static String R_CurrentJobDetail = BaseUrl + "R_CurrentJobDetail";
/**
* 修改职位
*/
public static String R_JobAmend = BaseUrl + "R_JobAmend";
/**
* 发表评论
*/
public static String R_CommentPublish = BaseUrl + "R_CommentPublish";
/**
* 取得评论标签信息
*/
public static String GetCommentLabelMst = BaseUrl + "CommentLabelMst";
/**
* 出发打卡
*/
public static String R_JobGo = BaseUrl + "R_JobGo";
/**
* 更新上下班打卡时间
*
*/
public static String R_JobUpdateCheckTime = BaseUrl + "R_JobUpdateCheckTime";
}
| 6,241 | 0.586976 | 0.572288 | 261 | 20.65134 | 27.057997 | 87 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.214559 | false | false | 13 |
06afbf5f7cb504cf3c75a10a1cb79e29e6428dfd | 27,032,524,217,431 | a5dfb6f0a0152d6142e6ddd0bc7c842fdea3daf9 | /projects/SDJ3_Project_SlaughterHouse/Test2/src/mediator/DatabaseAdapter.java | 83ed84a7d7aba1c24425e7eba6b51e9b10dffe5e | [] | no_license | jimmi280586/Java_school_projects | https://github.com/jimmi280586/Java_school_projects | e7c97dfe380cd3f872487232f1cc060e1fabdc1c | 86b0cb5d38c65e4f7696bc841e3c5eed74e4d552 | refs/heads/master | 2021-01-11T11:58:06.578000 | 2016-12-16T20:55:48 | 2016-12-16T20:55:48 | 76,685,030 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package mediator;
import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
import model.Animal;
import model.Part;
import model.Tray;
import model.Product;
import model.Market;
public class DatabaseAdapter implements Persistence {
private MyDatabase db;
private static final String DB_NAME = "Slaughterhouse";
public DatabaseAdapter() throws ClassNotFoundException {
this.db = new MyDatabase(DB_NAME);
}
public Animal[] loadAnimals() throws IOException {
ArrayList<Animal> array = new ArrayList<Animal>();
Animal[] result = null;
String sql = "SELECT * FROM animal";
try {
ArrayList<Object[]> results = db.query(sql);
for (int i = 0; i < results.size(); i++) {
Object[] row = results.get(i);
int animalId = Integer.parseInt(row[0].toString());
String type = row[1].toString();
float weight = Float.parseFloat(row[2].toString());
array.add(new Animal(weight, animalId, type));
}
result = new Animal[array.size()];
for (int i = 0; i < array.size(); i++) {
result[i] = array.get(i);
}
} catch (Exception e) {
throw new IOException(e.getMessage());
}
return result;
}
public Part[] loadParts() throws IOException {
ArrayList<Part> array = new ArrayList<Part>();
Part[] result = null;
String sql = "SELECT * FROM part";
try {
ArrayList<Object[]> results = db.query(sql);
for (int i = 0; i < results.size(); i++) {
Object[] row = results.get(i);
int partId = Integer.parseInt(row[0].toString());
float weight = Float.parseFloat(row[1].toString());
String type = row[2].toString();
int animalId = Integer.parseInt(row[3].toString());
array.add(new Part(animalId, type, partId, weight));
}
result = new Part[array.size()];
for (int i = 0; i < array.size(); i++) {
result[i] = array.get(i);
}
} catch (Exception e) {
throw new IOException(e.getMessage());
}
return result;
}
public Tray[] loadTrays() throws IOException {
ArrayList<Tray> trays = new ArrayList<Tray>();
Tray[] result = null;
String sql = "SELECT * FROM tray";
try {
ArrayList<Object[]> results = db.query(sql);
for (int i = 0; i < results.size(); i++) {
Object[] row = results.get(i);
int trayId = Integer.parseInt(row[0].toString());
String type = row[1].toString();
float maxWeight = Float.parseFloat(row[2].toString());
ArrayList<Part> parts = new ArrayList<Part>();
String sql2 = "SELECT * FROM part WHERE tray_id = " + trayId;
ArrayList<Object[]> results2 = db.query(sql2);
for (int j = 0; j < results2.size(); j++) {
Object[] row2 = results2.get(j);
int partId = Integer.parseInt(row2[0].toString());
float weight = Float.parseFloat(row2[1].toString());
String type2 = row2[2].toString();
int animalId = Integer.parseInt(row2[3].toString());
parts.add(new Part(animalId, type2, partId, weight));
}
trays.add(new Tray(type, trayId, maxWeight, parts));
}
result = new Tray[trays.size()];
for (int i = 0; i < trays.size(); i++) {
result[i] = trays.get(i);
}
} catch (Exception e) {
throw new IOException(e.getMessage());
}
return result;
}
public Market[] loadMarkets() throws IOException {
ArrayList<Market> markets = new ArrayList<Market>();
Market[] result = null;
String sql = "SELECT * FROM market";
try {
ArrayList<Object[]> results = db.query(sql);
for (int i = 0; i < results.size(); i++) {
Object[] row = results.get(i);
int marketId = Integer.parseInt(row[0].toString());
String address = row[1].toString();
ArrayList<Product> products = new ArrayList<Product>();
String sql2 = "SELECT * FROM product WHERE market_id = " + marketId;
ArrayList<Object[]> results2 = db.query(sql2);
for (int j = 0; j < results2.size(); j++) {
Object[] row2 = results2.get(j);
int productId = Integer.parseInt(row2[0].toString());
String type = row2[1].toString();
float weight = Float.parseFloat(row2[3].toString());
products.add(new Product(productId, type, weight));
}
markets.add(new Market(marketId, address, products));
}
result = new Market[markets.size()];
for (int i = 0; i < markets.size(); i++) {
result[i] = markets.get(i);
}
} catch (Exception e) {
throw new IOException(e.getMessage());
}
return result;
}
public Product[] loadProducts() throws IOException {
ArrayList<Product> products = new ArrayList<Product>();
Product[] result = null;
String sql = "SELECT * FROM product";
try {
ArrayList<Object[]> results = db.query(sql);
for (int i = 0; i < results.size(); i++) {
Object[] row = results.get(i);
int productId = Integer.parseInt(row[0].toString());
String type = row[1].toString();
float weight = Float.parseFloat(row[3].toString());
ArrayList<Part> parts = new ArrayList<Part>();
String sql2 = "SELECT tray_id FROM packing WHERE product_id = " + productId;
ArrayList<Object[]> results2 = db.query(sql2);
for (int j = 0; j < results2.size(); j++) {
Object[] row2 = results2.get(j);
int trayId = Integer.parseInt(row2[0].toString());
String sql3 = "SELECT * FROM part WHERE tray_id = " + trayId;
ArrayList<Object[]> results3 = db.query(sql3);
for (int k = 0; k < results3.size(); k++) {
Object[] row3 = results3.get(k);
int partId = Integer.parseInt(row3[0].toString());
float weight2 = Float.parseFloat(row3[1].toString());
String type2 = row3[2].toString();
int animalId = Integer.parseInt(row3[3].toString());
parts.add(new Part(animalId, type2, partId, weight2));
}
}
products.add(new Product(parts, productId, type, weight));
}
result = new Product[products.size()];
for (int i = 0; i < products.size(); i++) {
result[i] = products.get(i);
}
} catch (Exception e) {
throw new IOException(e.getMessage());
}
return result;
}
public void updateAnimal(int animalId, float weight) {
String sql = "UPDATE animal SET weight="+weight+" WHERE animal_id=" + animalId;
try {
db.update(sql);
} catch (SQLException e) {
e.printStackTrace();
}
}
public void saveAnimal(float weight, String type) {
String sql = "INSERT INTO animal (weight, type) VALUES (" + weight + ", '" + type + "');";
try {
db.update(sql);
} catch (SQLException e) {
e.printStackTrace();
}
}
public void savePart(int animalId, String type, float weight) {
String sql = "INSERT INTO part(weight, type, animal_id ) SELECT " + weight + ", '" + type
+ "', animal_id FROM animal WHERE animal_id = " + animalId;
try {
db.update(sql);
} catch (SQLException e) {
e.printStackTrace();
}
}
public void saveTray(String type, float maxWeight) {
String sql = "INSERT INTO tray (type, max_weight) VALUES ('" + type + "', " + maxWeight + ");";
try {
db.update(sql);
} catch (SQLException e) {
e.printStackTrace();
}
}
public void addToTray(int partId, int trayId) {
String sql = "UPDATE part SET tray_id = " + trayId + " WHERE part_id = " + partId;
try {
db.update(sql);
} catch (SQLException e) {
e.printStackTrace();
}
}
public void saveMarket(String address) {
String sql = "INSERT INTO market (address) VALUES ('" + address + "');";
try {
db.update(sql);
} catch (SQLException e) {
e.printStackTrace();
}
}
public void packTraysToProduct(String type, float weight, Tray[] trays) {
String sql = "INSERT INTO product (type, weight) VALUES ('" + type + "', " + weight + ")";
int productId;
try {
db.update(sql);
ArrayList<Object[]> r = db.query("SELECT MAX(product_id) FROM product;");
Object[] row = r.get(0);
productId = Integer.parseInt(row[0].toString());
for(int i=0;i<trays.length;i++){
String sql2 = "INSERT INTO packing (tray_id, product_id) VALUES (" + trays[i].getTrayId() + ", " + productId +");";
db.update(sql2);
}
} catch (SQLException e) {
e.printStackTrace();
}
}
public void transportTomarket(int productId, int marketId){
String sql = "UPDATE product SET market_id = " + marketId + " WHERE product_id = " + productId;
try {
db.update(sql);
} catch (SQLException e) {
e.printStackTrace();
}
}
}
| UTF-8 | Java | 8,264 | java | DatabaseAdapter.java | Java | [] | null | [] | package mediator;
import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
import model.Animal;
import model.Part;
import model.Tray;
import model.Product;
import model.Market;
public class DatabaseAdapter implements Persistence {
private MyDatabase db;
private static final String DB_NAME = "Slaughterhouse";
public DatabaseAdapter() throws ClassNotFoundException {
this.db = new MyDatabase(DB_NAME);
}
public Animal[] loadAnimals() throws IOException {
ArrayList<Animal> array = new ArrayList<Animal>();
Animal[] result = null;
String sql = "SELECT * FROM animal";
try {
ArrayList<Object[]> results = db.query(sql);
for (int i = 0; i < results.size(); i++) {
Object[] row = results.get(i);
int animalId = Integer.parseInt(row[0].toString());
String type = row[1].toString();
float weight = Float.parseFloat(row[2].toString());
array.add(new Animal(weight, animalId, type));
}
result = new Animal[array.size()];
for (int i = 0; i < array.size(); i++) {
result[i] = array.get(i);
}
} catch (Exception e) {
throw new IOException(e.getMessage());
}
return result;
}
public Part[] loadParts() throws IOException {
ArrayList<Part> array = new ArrayList<Part>();
Part[] result = null;
String sql = "SELECT * FROM part";
try {
ArrayList<Object[]> results = db.query(sql);
for (int i = 0; i < results.size(); i++) {
Object[] row = results.get(i);
int partId = Integer.parseInt(row[0].toString());
float weight = Float.parseFloat(row[1].toString());
String type = row[2].toString();
int animalId = Integer.parseInt(row[3].toString());
array.add(new Part(animalId, type, partId, weight));
}
result = new Part[array.size()];
for (int i = 0; i < array.size(); i++) {
result[i] = array.get(i);
}
} catch (Exception e) {
throw new IOException(e.getMessage());
}
return result;
}
public Tray[] loadTrays() throws IOException {
ArrayList<Tray> trays = new ArrayList<Tray>();
Tray[] result = null;
String sql = "SELECT * FROM tray";
try {
ArrayList<Object[]> results = db.query(sql);
for (int i = 0; i < results.size(); i++) {
Object[] row = results.get(i);
int trayId = Integer.parseInt(row[0].toString());
String type = row[1].toString();
float maxWeight = Float.parseFloat(row[2].toString());
ArrayList<Part> parts = new ArrayList<Part>();
String sql2 = "SELECT * FROM part WHERE tray_id = " + trayId;
ArrayList<Object[]> results2 = db.query(sql2);
for (int j = 0; j < results2.size(); j++) {
Object[] row2 = results2.get(j);
int partId = Integer.parseInt(row2[0].toString());
float weight = Float.parseFloat(row2[1].toString());
String type2 = row2[2].toString();
int animalId = Integer.parseInt(row2[3].toString());
parts.add(new Part(animalId, type2, partId, weight));
}
trays.add(new Tray(type, trayId, maxWeight, parts));
}
result = new Tray[trays.size()];
for (int i = 0; i < trays.size(); i++) {
result[i] = trays.get(i);
}
} catch (Exception e) {
throw new IOException(e.getMessage());
}
return result;
}
public Market[] loadMarkets() throws IOException {
ArrayList<Market> markets = new ArrayList<Market>();
Market[] result = null;
String sql = "SELECT * FROM market";
try {
ArrayList<Object[]> results = db.query(sql);
for (int i = 0; i < results.size(); i++) {
Object[] row = results.get(i);
int marketId = Integer.parseInt(row[0].toString());
String address = row[1].toString();
ArrayList<Product> products = new ArrayList<Product>();
String sql2 = "SELECT * FROM product WHERE market_id = " + marketId;
ArrayList<Object[]> results2 = db.query(sql2);
for (int j = 0; j < results2.size(); j++) {
Object[] row2 = results2.get(j);
int productId = Integer.parseInt(row2[0].toString());
String type = row2[1].toString();
float weight = Float.parseFloat(row2[3].toString());
products.add(new Product(productId, type, weight));
}
markets.add(new Market(marketId, address, products));
}
result = new Market[markets.size()];
for (int i = 0; i < markets.size(); i++) {
result[i] = markets.get(i);
}
} catch (Exception e) {
throw new IOException(e.getMessage());
}
return result;
}
public Product[] loadProducts() throws IOException {
ArrayList<Product> products = new ArrayList<Product>();
Product[] result = null;
String sql = "SELECT * FROM product";
try {
ArrayList<Object[]> results = db.query(sql);
for (int i = 0; i < results.size(); i++) {
Object[] row = results.get(i);
int productId = Integer.parseInt(row[0].toString());
String type = row[1].toString();
float weight = Float.parseFloat(row[3].toString());
ArrayList<Part> parts = new ArrayList<Part>();
String sql2 = "SELECT tray_id FROM packing WHERE product_id = " + productId;
ArrayList<Object[]> results2 = db.query(sql2);
for (int j = 0; j < results2.size(); j++) {
Object[] row2 = results2.get(j);
int trayId = Integer.parseInt(row2[0].toString());
String sql3 = "SELECT * FROM part WHERE tray_id = " + trayId;
ArrayList<Object[]> results3 = db.query(sql3);
for (int k = 0; k < results3.size(); k++) {
Object[] row3 = results3.get(k);
int partId = Integer.parseInt(row3[0].toString());
float weight2 = Float.parseFloat(row3[1].toString());
String type2 = row3[2].toString();
int animalId = Integer.parseInt(row3[3].toString());
parts.add(new Part(animalId, type2, partId, weight2));
}
}
products.add(new Product(parts, productId, type, weight));
}
result = new Product[products.size()];
for (int i = 0; i < products.size(); i++) {
result[i] = products.get(i);
}
} catch (Exception e) {
throw new IOException(e.getMessage());
}
return result;
}
public void updateAnimal(int animalId, float weight) {
String sql = "UPDATE animal SET weight="+weight+" WHERE animal_id=" + animalId;
try {
db.update(sql);
} catch (SQLException e) {
e.printStackTrace();
}
}
public void saveAnimal(float weight, String type) {
String sql = "INSERT INTO animal (weight, type) VALUES (" + weight + ", '" + type + "');";
try {
db.update(sql);
} catch (SQLException e) {
e.printStackTrace();
}
}
public void savePart(int animalId, String type, float weight) {
String sql = "INSERT INTO part(weight, type, animal_id ) SELECT " + weight + ", '" + type
+ "', animal_id FROM animal WHERE animal_id = " + animalId;
try {
db.update(sql);
} catch (SQLException e) {
e.printStackTrace();
}
}
public void saveTray(String type, float maxWeight) {
String sql = "INSERT INTO tray (type, max_weight) VALUES ('" + type + "', " + maxWeight + ");";
try {
db.update(sql);
} catch (SQLException e) {
e.printStackTrace();
}
}
public void addToTray(int partId, int trayId) {
String sql = "UPDATE part SET tray_id = " + trayId + " WHERE part_id = " + partId;
try {
db.update(sql);
} catch (SQLException e) {
e.printStackTrace();
}
}
public void saveMarket(String address) {
String sql = "INSERT INTO market (address) VALUES ('" + address + "');";
try {
db.update(sql);
} catch (SQLException e) {
e.printStackTrace();
}
}
public void packTraysToProduct(String type, float weight, Tray[] trays) {
String sql = "INSERT INTO product (type, weight) VALUES ('" + type + "', " + weight + ")";
int productId;
try {
db.update(sql);
ArrayList<Object[]> r = db.query("SELECT MAX(product_id) FROM product;");
Object[] row = r.get(0);
productId = Integer.parseInt(row[0].toString());
for(int i=0;i<trays.length;i++){
String sql2 = "INSERT INTO packing (tray_id, product_id) VALUES (" + trays[i].getTrayId() + ", " + productId +");";
db.update(sql2);
}
} catch (SQLException e) {
e.printStackTrace();
}
}
public void transportTomarket(int productId, int marketId){
String sql = "UPDATE product SET market_id = " + marketId + " WHERE product_id = " + productId;
try {
db.update(sql);
} catch (SQLException e) {
e.printStackTrace();
}
}
}
| 8,264 | 0.626331 | 0.615682 | 289 | 27.595156 | 24.578638 | 119 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 2.989619 | false | false | 13 |
e588caf13d9276036a8faf87e952bf8d7855d1d8 | 20,813,411,572,618 | 65ebd9cc9b8ac76522f77c84b70fdc8b2c6d77e6 | /src/main/java/com/github/graph/SingleSourceShortestPath.java | b044f5e9c8619468654819dc5f364367b7ffa2af | [] | no_license | SlumDunk/leetcode | https://github.com/SlumDunk/leetcode | 30af765c7f5e61317983af43230bafa23362e25a | c242f13e7b3a3ea67cdd70f3d8b216e83bd65829 | refs/heads/master | 2021-08-20T01:58:11.309000 | 2021-07-25T17:07:10 | 2021-07-25T17:07:10 | 121,602,686 | 0 | 0 | null | false | 2020-11-08T03:34:35 | 2018-02-15T07:38:45 | 2020-11-08T03:32:36 | 2020-11-08T03:34:34 | 1,627 | 1 | 0 | 0 | Java | false | false | package com.github.graph;
import java.util.LinkedList;
import java.util.Stack;
/**
* @Author: zerongliu
* @Date: 9/5/19 09:41
* @Description: 单源最短路径
* 地杰斯特拉算法和贝尔曼福特算法
* Dijkstra要求图中不存在边权值之和为负数的环路,否则算法无法收敛;
* Bellman-Ford算法可以检测出图中是否存在权值之和为负数的环路。
*/
public class SingleSourceShortestPath {
public static class Graph {
private int vertexSize;//顶点数量
public int getVertexSize() {
return vertexSize;
}
public void setVertexSize(int vertexSize) {
this.vertexSize = vertexSize;
}
private int[] vertexs;//顶点数组
/**
* 用邻接矩阵存储图的结构
*/
private int[][] matrix;
public int[][] getMatrix() {
return matrix;
}
public void setMatrix(int[][] matrix) {
this.matrix = matrix;
}
/**
* 表示不可达节点的权重
*/
public static final int MAX_WEIGHT = 1000;
private boolean[] isVisited;
public Graph(int vertextSize) {
this.vertexSize = vertextSize;
matrix = new int[vertextSize][vertextSize];
vertexs = new int[vertextSize];
for (int i = 0; i < vertextSize; i++) {
vertexs[i] = i;
}
isVisited = new boolean[vertextSize];
}
/**
* 创建图的过程
*/
public void createGraph() {
int[] a1 = new int[]{0, 1, 5, MAX_WEIGHT, MAX_WEIGHT, MAX_WEIGHT, MAX_WEIGHT, MAX_WEIGHT, MAX_WEIGHT};
int[] a2 = new int[]{1, 0, 3, 7, 5, MAX_WEIGHT, MAX_WEIGHT, MAX_WEIGHT, MAX_WEIGHT};
int[] a3 = new int[]{5, 3, 0, MAX_WEIGHT, 1, 7, MAX_WEIGHT, MAX_WEIGHT, MAX_WEIGHT};
int[] a4 = new int[]{MAX_WEIGHT, 7, MAX_WEIGHT, 0, 2, MAX_WEIGHT, 3, MAX_WEIGHT, MAX_WEIGHT};
int[] a5 = new int[]{MAX_WEIGHT, 5, 1, 2, 0, 3, 6, 9, MAX_WEIGHT};
int[] a6 = new int[]{MAX_WEIGHT, MAX_WEIGHT, 7, MAX_WEIGHT, 3, 0, MAX_WEIGHT, 5, MAX_WEIGHT};
int[] a7 = new int[]{MAX_WEIGHT, MAX_WEIGHT, MAX_WEIGHT, 3, 6, MAX_WEIGHT, 0, 2, 7};
int[] a8 = new int[]{MAX_WEIGHT, MAX_WEIGHT, MAX_WEIGHT, MAX_WEIGHT, 9, 5, 2, 0, 4};
int[] a9 = new int[]{MAX_WEIGHT, MAX_WEIGHT, MAX_WEIGHT, MAX_WEIGHT, MAX_WEIGHT, MAX_WEIGHT, 7, 4, 0};
matrix[0] = a1;
matrix[1] = a2;
matrix[2] = a3;
matrix[3] = a4;
matrix[4] = a5;
matrix[5] = a6;
matrix[6] = a7;
matrix[7] = a8;
matrix[8] = a9;
}
}
/**
* 迪杰斯特拉算法
* O(n^2)
*/
public static class Dijkstra {
private final static int MAXVEX = 9;
private final static int MAXWEIGHT = 1000;
/**
* 记录的是V0到某顶点的最短路径值
*/
private int shortTablePath[] = new int[MAXVEX];
public void shortestPathDijkstra(Graph graph) {
int min;
//记录每次要加进来的点的下标
int k = 0;
//标记是否从源节点到当前节点的路径
boolean isGetPath[] = new boolean[MAXVEX];
//初始化shortTablePath
shortTablePath = graph.getMatrix()[0];
shortTablePath[0] = 0;
isGetPath[0] = true;
for (int v = 1; v < graph.getVertexSize(); v++) {
min = MAXWEIGHT;
//寻找可拓展的边中的最短路径
for (int i = 0; i < graph.getVertexSize(); i++) {
if (!isGetPath[i] && shortTablePath[i] < min) {
k = i;
min = shortTablePath[i];
}
}
//标志k的位置当前是最短路径
isGetPath[k] = true;
// 更新源节点到未访问节点的最短路径
for (int j = 0; j < graph.getVertexSize(); j++) {
if (!isGetPath[j] && (min + graph.getMatrix()[k][j]) < shortTablePath[j]) {
shortTablePath[j] = min + graph.getMatrix()[k][j];
}
}
//打印当前步骤(非必须)
for (int i = 0; i < shortTablePath.length; i++) {
System.out.print(shortTablePath[i] + " ");
}
System.out.println();
for (int i = 0; i < isGetPath.length; i++) {
System.out.print(isGetPath[i] + " ");
}
System.out.println();
System.out.println();
System.out.println();
}
//打印到各个节点的最短路径
for (int i = 0; i < shortTablePath.length; i++) {
System.out.println("V0到V" + i + "最短路径为 " + shortTablePath[i]);
}
}
//打印当期那的邻接矩阵
public void printGraph(Graph graph) {
for (int i = 0; i < graph.getVertexSize(); i++) {
for (int j = 0; j < graph.getMatrix()[i].length; j++) {
if (graph.getMatrix()[i][j] < Graph.MAX_WEIGHT) {
System.out.print(graph.getMatrix()[i][j] + " ");
} else {
System.out.print("∞" + " ");
}
}
System.out.println();
}
}
}
public static class Edge {
private int v1;
private int v2;
private int weight;
public Edge(int v1, int v2, int weight) {
this.v1 = v1;
this.v2 = v2;
this.weight = weight;
}
public boolean equals(Edge edge) {
return this.v1 == edge.getV1() && this.v2 == edge.getV2() && this.weight == edge.getWeight();
}
public int getV1() {
return v1;
}
public int getV2() {
return v2;
}
public int getWeight() {
return weight;
}
public String toString() {
String str = "[ " + v1 + " , " + v2 + " , " + weight + " ]";
return str;
}
}
/**
* 贝尔曼福特算法 O(VE)
*/
public static class Graph2 {
private LinkedList<Edge>[] edgeLinks;
private int vNum; //顶点数
private int edgeNum; //边数
private int[] distance; //存放v.d
private int[] prenode; //存放前驱节点
public static final int INF = 10000; //无穷大
public static final int NIL = -1; //表示不存在
public Graph2(int vnum) {
this.vNum = vnum;
edgeLinks = new LinkedList[vnum];
edgeNum = 0;
distance = new int[vnum];
prenode = new int[vnum];
for (int i = 0; i < vnum; i++)
edgeLinks[i] = new LinkedList<>();
}
public void insertEdge(Edge edge) {
int v1 = edge.getV1();
edgeLinks[v1].add(edge);
edgeNum++;
}
/**
* 遍历打印出整个图信息
*/
public void bianli() {
System.out.println("共有 " + vNum + " 个顶点, " + edgeNum + " 条边");
for (int i = 0; i < vNum; i++) {
LinkedList<Edge> list = (LinkedList<Edge>) edgeLinks[i].clone();
while (!list.isEmpty()) {
Edge edge = list.pop();
System.out.println(edge.toString());
}
}
}
/**
* 对最短路径估计和前驱节点进行初始化
*
* @param start
*/
public void initiate(int start) {
for (int i = 0; i < vNum; i++) {
distance[i] = INF;
prenode[i] = NIL;
}
distance[start] = 0;
}
/**
* 松弛
*
* @param edge
*/
public void relax(Edge edge) {
int v1 = edge.getV1();
int v2 = edge.getV2();
int w = edge.getWeight();
if (distance[v2] > distance[v1] + w) {
distance[v2] = distance[v1] + w;
prenode[v2] = v1;
}
}
/**
* Bellman-Ford算法实现
*
* @return 是否没有负环
*/
public boolean bellmanFord(int start) {
initiate(start);
//对每条边进行V-1次松弛操作 因为找源点到剩下的V-1个点的路径
for (int i = 0; i < vNum - 1; i++) {
for (int j = 0; j < vNum; j++) {
LinkedList<Edge> list = (LinkedList<Edge>) edgeLinks[j].clone();
while (!list.isEmpty()) {
Edge edge = list.pop();
relax(edge);
}
}
}
//检测是否存在环
for (int i = 0; i < vNum; i++) {
LinkedList<Edge> list = (LinkedList<Edge>) edgeLinks[i].clone();
while (!list.isEmpty()) {
Edge edge = list.pop();
int v1 = edge.getV1();
int v2 = edge.getV2();
int w = edge.getWeight();
if (distance[v2] > distance[v1] + w)
return false;
}
}
return true;
}
/**
* 显示结果 利用堆栈
*/
public void showResult() {
Stack<Integer>[] routes = new Stack[vNum];
for (int i = 0; i < vNum; i++) {
routes[i] = new Stack<>();
int j = i;
while (j != NIL) {
routes[i].push(j);
j = prenode[j];
}
System.out.print(i + "(" + distance[i] + ") : ");
while (!routes[i].isEmpty()) {
int k = routes[i].pop();
System.out.print("-->" + k);
}
System.out.println();
}
}
public int[] getDistance() {
return distance;
}
public int[] getPrenode() {
return prenode;
}
}
/**
* 调用贝尔曼福特算法
*/
public static void callBellmanFord() {
int vnum = 5;
Graph2 graph = new Graph2(vnum);
Edge[] edges = new Edge[10];
edges[0] = new Edge(0, 1, 6);
edges[1] = new Edge(0, 3, 7);
edges[2] = new Edge(1, 2, 5);
edges[3] = new Edge(1, 3, 8);
edges[4] = new Edge(1, 4, -4);
edges[5] = new Edge(2, 1, -2);
edges[6] = new Edge(3, 2, -3);
edges[7] = new Edge(3, 4, 9);
edges[8] = new Edge(4, 0, 2);
edges[9] = new Edge(4, 2, 7);
for (int i = 0; i < 10; i++) {
graph.insertEdge(edges[i]);
}
graph.bianli();
boolean success = graph.bellmanFord(0);
if (success) {
System.out.println("没有负环");
graph.showResult();
} else {
System.out.println("存在负环");
}
}
public static void main(String[] args) {
Graph graph = new Graph(Dijkstra.MAXVEX);
graph.createGraph();
Dijkstra dijkstra = new Dijkstra();
dijkstra.printGraph(graph);
dijkstra.shortestPathDijkstra(graph);
}
}
| UTF-8 | Java | 11,796 | java | SingleSourceShortestPath.java | Java | [
{
"context": "nkedList;\nimport java.util.Stack;\n\n/**\n * @Author: zerongliu\n * @Date: 9/5/19 09:41\n * @Description: 单源最短路径\n *",
"end": 106,
"score": 0.9946788549423218,
"start": 97,
"tag": "USERNAME",
"value": "zerongliu"
}
] | null | [] | package com.github.graph;
import java.util.LinkedList;
import java.util.Stack;
/**
* @Author: zerongliu
* @Date: 9/5/19 09:41
* @Description: 单源最短路径
* 地杰斯特拉算法和贝尔曼福特算法
* Dijkstra要求图中不存在边权值之和为负数的环路,否则算法无法收敛;
* Bellman-Ford算法可以检测出图中是否存在权值之和为负数的环路。
*/
public class SingleSourceShortestPath {
public static class Graph {
private int vertexSize;//顶点数量
public int getVertexSize() {
return vertexSize;
}
public void setVertexSize(int vertexSize) {
this.vertexSize = vertexSize;
}
private int[] vertexs;//顶点数组
/**
* 用邻接矩阵存储图的结构
*/
private int[][] matrix;
public int[][] getMatrix() {
return matrix;
}
public void setMatrix(int[][] matrix) {
this.matrix = matrix;
}
/**
* 表示不可达节点的权重
*/
public static final int MAX_WEIGHT = 1000;
private boolean[] isVisited;
public Graph(int vertextSize) {
this.vertexSize = vertextSize;
matrix = new int[vertextSize][vertextSize];
vertexs = new int[vertextSize];
for (int i = 0; i < vertextSize; i++) {
vertexs[i] = i;
}
isVisited = new boolean[vertextSize];
}
/**
* 创建图的过程
*/
public void createGraph() {
int[] a1 = new int[]{0, 1, 5, MAX_WEIGHT, MAX_WEIGHT, MAX_WEIGHT, MAX_WEIGHT, MAX_WEIGHT, MAX_WEIGHT};
int[] a2 = new int[]{1, 0, 3, 7, 5, MAX_WEIGHT, MAX_WEIGHT, MAX_WEIGHT, MAX_WEIGHT};
int[] a3 = new int[]{5, 3, 0, MAX_WEIGHT, 1, 7, MAX_WEIGHT, MAX_WEIGHT, MAX_WEIGHT};
int[] a4 = new int[]{MAX_WEIGHT, 7, MAX_WEIGHT, 0, 2, MAX_WEIGHT, 3, MAX_WEIGHT, MAX_WEIGHT};
int[] a5 = new int[]{MAX_WEIGHT, 5, 1, 2, 0, 3, 6, 9, MAX_WEIGHT};
int[] a6 = new int[]{MAX_WEIGHT, MAX_WEIGHT, 7, MAX_WEIGHT, 3, 0, MAX_WEIGHT, 5, MAX_WEIGHT};
int[] a7 = new int[]{MAX_WEIGHT, MAX_WEIGHT, MAX_WEIGHT, 3, 6, MAX_WEIGHT, 0, 2, 7};
int[] a8 = new int[]{MAX_WEIGHT, MAX_WEIGHT, MAX_WEIGHT, MAX_WEIGHT, 9, 5, 2, 0, 4};
int[] a9 = new int[]{MAX_WEIGHT, MAX_WEIGHT, MAX_WEIGHT, MAX_WEIGHT, MAX_WEIGHT, MAX_WEIGHT, 7, 4, 0};
matrix[0] = a1;
matrix[1] = a2;
matrix[2] = a3;
matrix[3] = a4;
matrix[4] = a5;
matrix[5] = a6;
matrix[6] = a7;
matrix[7] = a8;
matrix[8] = a9;
}
}
/**
* 迪杰斯特拉算法
* O(n^2)
*/
public static class Dijkstra {
private final static int MAXVEX = 9;
private final static int MAXWEIGHT = 1000;
/**
* 记录的是V0到某顶点的最短路径值
*/
private int shortTablePath[] = new int[MAXVEX];
public void shortestPathDijkstra(Graph graph) {
int min;
//记录每次要加进来的点的下标
int k = 0;
//标记是否从源节点到当前节点的路径
boolean isGetPath[] = new boolean[MAXVEX];
//初始化shortTablePath
shortTablePath = graph.getMatrix()[0];
shortTablePath[0] = 0;
isGetPath[0] = true;
for (int v = 1; v < graph.getVertexSize(); v++) {
min = MAXWEIGHT;
//寻找可拓展的边中的最短路径
for (int i = 0; i < graph.getVertexSize(); i++) {
if (!isGetPath[i] && shortTablePath[i] < min) {
k = i;
min = shortTablePath[i];
}
}
//标志k的位置当前是最短路径
isGetPath[k] = true;
// 更新源节点到未访问节点的最短路径
for (int j = 0; j < graph.getVertexSize(); j++) {
if (!isGetPath[j] && (min + graph.getMatrix()[k][j]) < shortTablePath[j]) {
shortTablePath[j] = min + graph.getMatrix()[k][j];
}
}
//打印当前步骤(非必须)
for (int i = 0; i < shortTablePath.length; i++) {
System.out.print(shortTablePath[i] + " ");
}
System.out.println();
for (int i = 0; i < isGetPath.length; i++) {
System.out.print(isGetPath[i] + " ");
}
System.out.println();
System.out.println();
System.out.println();
}
//打印到各个节点的最短路径
for (int i = 0; i < shortTablePath.length; i++) {
System.out.println("V0到V" + i + "最短路径为 " + shortTablePath[i]);
}
}
//打印当期那的邻接矩阵
public void printGraph(Graph graph) {
for (int i = 0; i < graph.getVertexSize(); i++) {
for (int j = 0; j < graph.getMatrix()[i].length; j++) {
if (graph.getMatrix()[i][j] < Graph.MAX_WEIGHT) {
System.out.print(graph.getMatrix()[i][j] + " ");
} else {
System.out.print("∞" + " ");
}
}
System.out.println();
}
}
}
public static class Edge {
private int v1;
private int v2;
private int weight;
public Edge(int v1, int v2, int weight) {
this.v1 = v1;
this.v2 = v2;
this.weight = weight;
}
public boolean equals(Edge edge) {
return this.v1 == edge.getV1() && this.v2 == edge.getV2() && this.weight == edge.getWeight();
}
public int getV1() {
return v1;
}
public int getV2() {
return v2;
}
public int getWeight() {
return weight;
}
public String toString() {
String str = "[ " + v1 + " , " + v2 + " , " + weight + " ]";
return str;
}
}
/**
* 贝尔曼福特算法 O(VE)
*/
public static class Graph2 {
private LinkedList<Edge>[] edgeLinks;
private int vNum; //顶点数
private int edgeNum; //边数
private int[] distance; //存放v.d
private int[] prenode; //存放前驱节点
public static final int INF = 10000; //无穷大
public static final int NIL = -1; //表示不存在
public Graph2(int vnum) {
this.vNum = vnum;
edgeLinks = new LinkedList[vnum];
edgeNum = 0;
distance = new int[vnum];
prenode = new int[vnum];
for (int i = 0; i < vnum; i++)
edgeLinks[i] = new LinkedList<>();
}
public void insertEdge(Edge edge) {
int v1 = edge.getV1();
edgeLinks[v1].add(edge);
edgeNum++;
}
/**
* 遍历打印出整个图信息
*/
public void bianli() {
System.out.println("共有 " + vNum + " 个顶点, " + edgeNum + " 条边");
for (int i = 0; i < vNum; i++) {
LinkedList<Edge> list = (LinkedList<Edge>) edgeLinks[i].clone();
while (!list.isEmpty()) {
Edge edge = list.pop();
System.out.println(edge.toString());
}
}
}
/**
* 对最短路径估计和前驱节点进行初始化
*
* @param start
*/
public void initiate(int start) {
for (int i = 0; i < vNum; i++) {
distance[i] = INF;
prenode[i] = NIL;
}
distance[start] = 0;
}
/**
* 松弛
*
* @param edge
*/
public void relax(Edge edge) {
int v1 = edge.getV1();
int v2 = edge.getV2();
int w = edge.getWeight();
if (distance[v2] > distance[v1] + w) {
distance[v2] = distance[v1] + w;
prenode[v2] = v1;
}
}
/**
* Bellman-Ford算法实现
*
* @return 是否没有负环
*/
public boolean bellmanFord(int start) {
initiate(start);
//对每条边进行V-1次松弛操作 因为找源点到剩下的V-1个点的路径
for (int i = 0; i < vNum - 1; i++) {
for (int j = 0; j < vNum; j++) {
LinkedList<Edge> list = (LinkedList<Edge>) edgeLinks[j].clone();
while (!list.isEmpty()) {
Edge edge = list.pop();
relax(edge);
}
}
}
//检测是否存在环
for (int i = 0; i < vNum; i++) {
LinkedList<Edge> list = (LinkedList<Edge>) edgeLinks[i].clone();
while (!list.isEmpty()) {
Edge edge = list.pop();
int v1 = edge.getV1();
int v2 = edge.getV2();
int w = edge.getWeight();
if (distance[v2] > distance[v1] + w)
return false;
}
}
return true;
}
/**
* 显示结果 利用堆栈
*/
public void showResult() {
Stack<Integer>[] routes = new Stack[vNum];
for (int i = 0; i < vNum; i++) {
routes[i] = new Stack<>();
int j = i;
while (j != NIL) {
routes[i].push(j);
j = prenode[j];
}
System.out.print(i + "(" + distance[i] + ") : ");
while (!routes[i].isEmpty()) {
int k = routes[i].pop();
System.out.print("-->" + k);
}
System.out.println();
}
}
public int[] getDistance() {
return distance;
}
public int[] getPrenode() {
return prenode;
}
}
/**
* 调用贝尔曼福特算法
*/
public static void callBellmanFord() {
int vnum = 5;
Graph2 graph = new Graph2(vnum);
Edge[] edges = new Edge[10];
edges[0] = new Edge(0, 1, 6);
edges[1] = new Edge(0, 3, 7);
edges[2] = new Edge(1, 2, 5);
edges[3] = new Edge(1, 3, 8);
edges[4] = new Edge(1, 4, -4);
edges[5] = new Edge(2, 1, -2);
edges[6] = new Edge(3, 2, -3);
edges[7] = new Edge(3, 4, 9);
edges[8] = new Edge(4, 0, 2);
edges[9] = new Edge(4, 2, 7);
for (int i = 0; i < 10; i++) {
graph.insertEdge(edges[i]);
}
graph.bianli();
boolean success = graph.bellmanFord(0);
if (success) {
System.out.println("没有负环");
graph.showResult();
} else {
System.out.println("存在负环");
}
}
public static void main(String[] args) {
Graph graph = new Graph(Dijkstra.MAXVEX);
graph.createGraph();
Dijkstra dijkstra = new Dijkstra();
dijkstra.printGraph(graph);
dijkstra.shortestPathDijkstra(graph);
}
}
| 11,796 | 0.434582 | 0.415762 | 381 | 28.007874 | 22.677296 | 114 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.721785 | false | false | 13 |
ac118bc315cb948a42a44919a050d5895caaab8a | 352,187,364,395 | 3e42e11fc4dea76823be6380a4b074d13d24bc29 | /app/src/main/java/com/example/fragmentview/Fragment_db/NotificationFragment_db.java | db5f608dc39fc45c131244eac20f11e1ac8d4685 | [] | no_license | vaishnavikattekola/MockKPulse | https://github.com/vaishnavikattekola/MockKPulse | 989a405ee7a912503d6f64839493544c9f2c6275 | 224187be7b62f3b4921f132877afaf5f139ac744 | refs/heads/master | 2020-12-21T16:51:55.506000 | 2020-02-28T06:12:55 | 2020-02-28T06:12:55 | 236,494,018 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package com.example.fragmentview.Fragment_db;
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.media.Ringtone;
import android.media.RingtoneManager;
import android.net.Uri;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.Toast;
import com.example.fragmentview.R;
public class NotificationFragment_db extends Fragment {
Button btn_notification;
RemainderBroadcast remainderBroadcast;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
final View view = inflater.inflate(R.layout.fragment_notification_db, container, false);
btn_notification = view.findViewById(R.id.btn_notification);
btn_notification.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(v.getContext(), "Remainder Set!", Toast.LENGTH_LONG).show();
Intent intent = new Intent(v.getContext(), RemainderBroadcast.class);
PendingIntent pendingIntent = PendingIntent.getBroadcast(v.getContext(), 0, intent, 0);
AlarmManager alarmManager = (AlarmManager) v.getContext().getSystemService(Context.ALARM_SERVICE);
long timeAtButtonClick = System.currentTimeMillis();
long tenSecondsInMillis = 1000 * 10;{
}
alarmManager.set(AlarmManager.RTC_WAKEUP,
timeAtButtonClick + tenSecondsInMillis,
pendingIntent);
}
});
return view;
}
}
| UTF-8 | Java | 1,838 | java | NotificationFragment_db.java | Java | [] | null | [] | package com.example.fragmentview.Fragment_db;
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.media.Ringtone;
import android.media.RingtoneManager;
import android.net.Uri;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.Toast;
import com.example.fragmentview.R;
public class NotificationFragment_db extends Fragment {
Button btn_notification;
RemainderBroadcast remainderBroadcast;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
final View view = inflater.inflate(R.layout.fragment_notification_db, container, false);
btn_notification = view.findViewById(R.id.btn_notification);
btn_notification.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(v.getContext(), "Remainder Set!", Toast.LENGTH_LONG).show();
Intent intent = new Intent(v.getContext(), RemainderBroadcast.class);
PendingIntent pendingIntent = PendingIntent.getBroadcast(v.getContext(), 0, intent, 0);
AlarmManager alarmManager = (AlarmManager) v.getContext().getSystemService(Context.ALARM_SERVICE);
long timeAtButtonClick = System.currentTimeMillis();
long tenSecondsInMillis = 1000 * 10;{
}
alarmManager.set(AlarmManager.RTC_WAKEUP,
timeAtButtonClick + tenSecondsInMillis,
pendingIntent);
}
});
return view;
}
}
| 1,838 | 0.690424 | 0.686072 | 54 | 33.037037 | 30.80522 | 114 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.759259 | false | false | 13 |
d774580a1cb517539ae423427a2b254422cfc818 | 32,409,823,239,555 | 48c2bc8180d40bb1ae44a0df43967258d3d3bd64 | /src/main/java/hiperf/modelo/repo/RegiaoRepo.java | ea3a5e64e7096d8cfe7f10089cad40b41beca542 | [] | no_license | lgalvao/hiperf | https://github.com/lgalvao/hiperf | 0a8312eb70cee0e2ffe94499dbde8a96d157db5d | 51827831f0139e9f78c086ea06c1f8862b4e8755 | refs/heads/master | 2022-12-18T12:18:57.094000 | 2020-10-06T12:14:56 | 2020-10-06T12:14:56 | 301,713,069 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package hiperf.modelo.repo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import hiperf.modelo.Regiao;
@Repository
public interface RegiaoRepo extends JpaRepository<Regiao, Long> {
}
| UTF-8 | Java | 251 | java | RegiaoRepo.java | Java | [] | null | [] | package hiperf.modelo.repo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import hiperf.modelo.Regiao;
@Repository
public interface RegiaoRepo extends JpaRepository<Regiao, Long> {
}
| 251 | 0.836653 | 0.836653 | 9 | 26.888889 | 24.664164 | 65 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.555556 | false | false | 13 |
17b1e580b514dd1fcca69c7756024459a64e4aca | 15,281,493,676,064 | 14bef2bc59568dadfeb76177353f8d42e76f17df | /modules/siddhi-extensions/ml/src/main/java/org/wso2/siddhi/extension/ml/PredictStreamProcessor.java | 628c592c7879ae5d37632933786c712d0b6fca59 | [
"Apache-2.0"
] | permissive | Moni017/siddhi | https://github.com/Moni017/siddhi | 0108886c13af883542b3cb1e61487b71ae8669eb | 8be17766a7dbe4b30fe9aef3086a1d29e1413759 | refs/heads/master | 2021-01-15T15:00:06.259000 | 2015-06-18T18:41:35 | 2015-06-18T18:41:35 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.wso2.siddhi.extension.ml;
import org.wso2.siddhi.core.config.ExecutionPlanContext;
import org.wso2.siddhi.core.event.ComplexEventChunk;
import org.wso2.siddhi.core.event.stream.StreamEvent;
import org.wso2.siddhi.core.event.stream.StreamEventCloner;
import org.wso2.siddhi.core.event.stream.populater.ComplexEventPopulater;
import org.wso2.siddhi.core.exception.ExecutionPlanCreationException;
import org.wso2.siddhi.core.exception.ExecutionPlanRuntimeException;
import org.wso2.siddhi.core.executor.ConstantExpressionExecutor;
import org.wso2.siddhi.core.executor.ExpressionExecutor;
import org.wso2.siddhi.core.executor.VariableExpressionExecutor;
import org.wso2.siddhi.core.query.processor.Processor;
import org.wso2.siddhi.core.query.processor.stream.StreamProcessor;
import org.wso2.siddhi.query.api.definition.AbstractDefinition;
import org.wso2.siddhi.query.api.definition.Attribute;
import org.wso2.siddhi.query.api.exception.ExecutionPlanValidationException;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class PredictStreamProcessor extends StreamProcessor {
private static final String PREDICTION = "prediction";
private ModelHandler modelHandler;
private String modelStorageLocation;
private boolean attributeSelectionAvailable;
private Map<Integer, Integer> attributeIndexMap; // <feature-index, attribute-index> pairs
@Override
protected void process(ComplexEventChunk<StreamEvent> streamEventChunk, Processor nextProcessor, StreamEventCloner streamEventCloner, ComplexEventPopulater complexEventPopulater) {
StreamEvent event = streamEventChunk.getFirst();
Object[] data;
double[] featureValues;
if (attributeSelectionAvailable) {
data = event.getBeforeWindowData();
featureValues = new double[data.length];
} else {
data = event.getOutputData();
featureValues = new double[data.length-1];
}
for(Map.Entry<Integer, Integer> entry : attributeIndexMap.entrySet()) {
int featureIndex = entry.getKey();
int attributeIndex = entry.getValue();
featureValues[featureIndex] = Double.parseDouble(String.valueOf(data[attributeIndex]));
}
if(featureValues != null) {
try {
double predictionResult = modelHandler.predict(featureValues);
Object[] output = new Object[]{predictionResult};
complexEventPopulater.populateComplexEvent(event, output);
nextProcessor.process(streamEventChunk);
} catch (Exception e) {
log.error("Error while predicting", e);
throw new ExecutionPlanRuntimeException("Error while predicting" ,e);
}
}
}
@Override
protected List<Attribute> init(AbstractDefinition inputDefinition, ExpressionExecutor[] attributeExpressionExecutors, ExecutionPlanContext executionPlanContext) {
if(attributeExpressionExecutors.length == 0) {
throw new ExecutionPlanValidationException("ML model storage location has not been defined as the first parameter");
} else if(attributeExpressionExecutors.length == 1) {
attributeSelectionAvailable = false; // model-storage-location
} else {
attributeSelectionAvailable = true; // model-storage-location, stream-attributes list
}
if(attributeExpressionExecutors[0] instanceof ConstantExpressionExecutor) {
Object constantObj = ((ConstantExpressionExecutor) attributeExpressionExecutors[0]).getValue();
modelStorageLocation = (String) constantObj;
} else {
throw new ExecutionPlanValidationException("ML model storage-location has not been defined as the first parameter");
}
return Arrays.asList(new Attribute(PREDICTION, Attribute.Type.DOUBLE));
}
@Override
public void start() {
try {
modelHandler = new ModelHandler(modelStorageLocation);
populateFeatureAttributeMapping();
} catch (Exception e) {
log.error("Error while retrieving ML-model : " + modelStorageLocation, e);
throw new ExecutionPlanCreationException("Error while retrieving ML-model : " + modelStorageLocation + "\n" + e.getMessage());
}
}
/**
* Match the attribute index values of stream with feature index value of the model
* @throws Exception
*/
private void populateFeatureAttributeMapping() throws Exception {
attributeIndexMap = new HashMap<Integer, Integer>();
Map<String, Integer> featureIndexMap = modelHandler.getFeatures();
if(attributeSelectionAvailable) {
int index = 0;
for (ExpressionExecutor expressionExecutor : attributeExpressionExecutors) {
if(expressionExecutor instanceof VariableExpressionExecutor) {
VariableExpressionExecutor variable = (VariableExpressionExecutor) expressionExecutor;
String variableName = variable.getAttribute().getName();
if (featureIndexMap.get(variableName) != null) {
int featureIndex = featureIndexMap.get(variableName);
int attributeIndex = index;
attributeIndexMap.put(featureIndex, attributeIndex);
} else {
throw new ExecutionPlanCreationException("No matching feature name found in the model " +
"for the attribute : " + variableName);
}
index++;
}
}
} else {
String[] attributeNames = inputDefinition.getAttributeNameArray();
for(String attributeName : attributeNames) {
if (featureIndexMap.get(attributeName) != null) {
int featureIndex = featureIndexMap.get(attributeName);
int attributeIndex = inputDefinition.getAttributePosition(attributeName);
attributeIndexMap.put(featureIndex, attributeIndex);
} else {
throw new ExecutionPlanCreationException("No matching feature name found in the model " +
"for the attribute : " + attributeName);
}
}
}
}
@Override
public void stop() {
}
@Override
public Object[] currentState() {
return new Object[0];
}
@Override
public void restoreState(Object[] state) {
}
}
| UTF-8 | Java | 7,311 | java | PredictStreamProcessor.java | Java | [] | null | [] | /*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.wso2.siddhi.extension.ml;
import org.wso2.siddhi.core.config.ExecutionPlanContext;
import org.wso2.siddhi.core.event.ComplexEventChunk;
import org.wso2.siddhi.core.event.stream.StreamEvent;
import org.wso2.siddhi.core.event.stream.StreamEventCloner;
import org.wso2.siddhi.core.event.stream.populater.ComplexEventPopulater;
import org.wso2.siddhi.core.exception.ExecutionPlanCreationException;
import org.wso2.siddhi.core.exception.ExecutionPlanRuntimeException;
import org.wso2.siddhi.core.executor.ConstantExpressionExecutor;
import org.wso2.siddhi.core.executor.ExpressionExecutor;
import org.wso2.siddhi.core.executor.VariableExpressionExecutor;
import org.wso2.siddhi.core.query.processor.Processor;
import org.wso2.siddhi.core.query.processor.stream.StreamProcessor;
import org.wso2.siddhi.query.api.definition.AbstractDefinition;
import org.wso2.siddhi.query.api.definition.Attribute;
import org.wso2.siddhi.query.api.exception.ExecutionPlanValidationException;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class PredictStreamProcessor extends StreamProcessor {
private static final String PREDICTION = "prediction";
private ModelHandler modelHandler;
private String modelStorageLocation;
private boolean attributeSelectionAvailable;
private Map<Integer, Integer> attributeIndexMap; // <feature-index, attribute-index> pairs
@Override
protected void process(ComplexEventChunk<StreamEvent> streamEventChunk, Processor nextProcessor, StreamEventCloner streamEventCloner, ComplexEventPopulater complexEventPopulater) {
StreamEvent event = streamEventChunk.getFirst();
Object[] data;
double[] featureValues;
if (attributeSelectionAvailable) {
data = event.getBeforeWindowData();
featureValues = new double[data.length];
} else {
data = event.getOutputData();
featureValues = new double[data.length-1];
}
for(Map.Entry<Integer, Integer> entry : attributeIndexMap.entrySet()) {
int featureIndex = entry.getKey();
int attributeIndex = entry.getValue();
featureValues[featureIndex] = Double.parseDouble(String.valueOf(data[attributeIndex]));
}
if(featureValues != null) {
try {
double predictionResult = modelHandler.predict(featureValues);
Object[] output = new Object[]{predictionResult};
complexEventPopulater.populateComplexEvent(event, output);
nextProcessor.process(streamEventChunk);
} catch (Exception e) {
log.error("Error while predicting", e);
throw new ExecutionPlanRuntimeException("Error while predicting" ,e);
}
}
}
@Override
protected List<Attribute> init(AbstractDefinition inputDefinition, ExpressionExecutor[] attributeExpressionExecutors, ExecutionPlanContext executionPlanContext) {
if(attributeExpressionExecutors.length == 0) {
throw new ExecutionPlanValidationException("ML model storage location has not been defined as the first parameter");
} else if(attributeExpressionExecutors.length == 1) {
attributeSelectionAvailable = false; // model-storage-location
} else {
attributeSelectionAvailable = true; // model-storage-location, stream-attributes list
}
if(attributeExpressionExecutors[0] instanceof ConstantExpressionExecutor) {
Object constantObj = ((ConstantExpressionExecutor) attributeExpressionExecutors[0]).getValue();
modelStorageLocation = (String) constantObj;
} else {
throw new ExecutionPlanValidationException("ML model storage-location has not been defined as the first parameter");
}
return Arrays.asList(new Attribute(PREDICTION, Attribute.Type.DOUBLE));
}
@Override
public void start() {
try {
modelHandler = new ModelHandler(modelStorageLocation);
populateFeatureAttributeMapping();
} catch (Exception e) {
log.error("Error while retrieving ML-model : " + modelStorageLocation, e);
throw new ExecutionPlanCreationException("Error while retrieving ML-model : " + modelStorageLocation + "\n" + e.getMessage());
}
}
/**
* Match the attribute index values of stream with feature index value of the model
* @throws Exception
*/
private void populateFeatureAttributeMapping() throws Exception {
attributeIndexMap = new HashMap<Integer, Integer>();
Map<String, Integer> featureIndexMap = modelHandler.getFeatures();
if(attributeSelectionAvailable) {
int index = 0;
for (ExpressionExecutor expressionExecutor : attributeExpressionExecutors) {
if(expressionExecutor instanceof VariableExpressionExecutor) {
VariableExpressionExecutor variable = (VariableExpressionExecutor) expressionExecutor;
String variableName = variable.getAttribute().getName();
if (featureIndexMap.get(variableName) != null) {
int featureIndex = featureIndexMap.get(variableName);
int attributeIndex = index;
attributeIndexMap.put(featureIndex, attributeIndex);
} else {
throw new ExecutionPlanCreationException("No matching feature name found in the model " +
"for the attribute : " + variableName);
}
index++;
}
}
} else {
String[] attributeNames = inputDefinition.getAttributeNameArray();
for(String attributeName : attributeNames) {
if (featureIndexMap.get(attributeName) != null) {
int featureIndex = featureIndexMap.get(attributeName);
int attributeIndex = inputDefinition.getAttributePosition(attributeName);
attributeIndexMap.put(featureIndex, attributeIndex);
} else {
throw new ExecutionPlanCreationException("No matching feature name found in the model " +
"for the attribute : " + attributeName);
}
}
}
}
@Override
public void stop() {
}
@Override
public Object[] currentState() {
return new Object[0];
}
@Override
public void restoreState(Object[] state) {
}
}
| 7,311 | 0.669539 | 0.665025 | 169 | 42.260357 | 36.31181 | 184 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.544379 | false | false | 13 |
dec3ce1a11a9aaf077880e6f44cdf4a76c110d47 | 6,382,321,433,994 | 3c8d210a2fa96d79628d5884eab0c68c4cbface5 | /sjms/src/main/java/com/example/sjms/state/order/CancelState.java | d6bfdfb0cdb57eaad947b0870d162c3be11cb0cc | [] | no_license | quanpan/springboot-example | https://github.com/quanpan/springboot-example | 5761904ea4c87eaa16782c66ddab34894900fece | 5d8613642878bad811e31e7855286adf3b97746f | refs/heads/master | 2022-07-12T04:32:54.447000 | 2020-01-04T04:11:28 | 2020-01-04T04:11:28 | 230,081,317 | 1 | 0 | null | false | 2022-06-17T02:48:31 | 2019-12-25T09:51:56 | 2020-01-04T04:11:31 | 2022-06-17T02:48:31 | 128 | 1 | 0 | 1 | Java | false | false | package com.example.sjms.state.order;
public class CancelState extends OrderState {
@Override
public void crete(Context context) {
System.out.println("订单重建");
context.setOrderState(new CreateOrderState());
context.create();
}
@Override
public void pay(Context context) {
System.out.println("订单已取消");
}
@Override
public void confirem(Context context) {
System.out.println("订单已取消");
}
@Override
public void cancel(Context context) {
System.out.println("订单已取消");
}
@Override
public void complate(Context context) {
System.out.println("订单已取消");
}
}
| UTF-8 | Java | 722 | java | CancelState.java | Java | [] | null | [] | package com.example.sjms.state.order;
public class CancelState extends OrderState {
@Override
public void crete(Context context) {
System.out.println("订单重建");
context.setOrderState(new CreateOrderState());
context.create();
}
@Override
public void pay(Context context) {
System.out.println("订单已取消");
}
@Override
public void confirem(Context context) {
System.out.println("订单已取消");
}
@Override
public void cancel(Context context) {
System.out.println("订单已取消");
}
@Override
public void complate(Context context) {
System.out.println("订单已取消");
}
}
| 722 | 0.617211 | 0.617211 | 38 | 16.736841 | 17.839466 | 54 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.210526 | false | false | 13 |
5f0bb32104255dc9241540f635dbb6750c77332f | 6,382,321,431,620 | 089a64886c6c1cb35d58e6aa8c7eee79c1e91286 | /src/com/brandon/dossier/state/ArrivingPeople.java | d9949eaaaf031767675a0d9c9c63167139a3fc80 | [] | no_license | itzstatic/Pizza | https://github.com/itzstatic/Pizza | 2a4d51639918d3cfa6371eff2e30acc9a491389e | 0ddd0c4ceb762cfd06be36d9035ce6a2513d86bb | refs/heads/master | 2018-01-09T10:51:32.645000 | 2016-01-12T13:36:52 | 2016-01-12T13:36:52 | 49,500,950 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package com.brandon.dossier.state;
import org.teamresistance.util.state.State;
import org.teamresistance.util.state.StateMachine;
import org.teamresistance.util.state.StateTransition;
import com.brandon.dossier.UI;
import com.brandon.dossier.util.console.Menu;
public class ArrivingPeople extends State {
private UI ui;
private Menu menu;
protected ArrivingPeople(StateMachine stateMachine) {
super(stateMachine);
}
@Override
public void init() {
ui = UI.getInstance();
menu = new Menu("What?");
menu.setInput(ui);
menu.setOutput(ui);
menu.addMenu("Wot", () -> System.out.println("uwot"));
menu.addMenu("Wut", () -> System.out.println("uwut"));
menu.addMenu("Back", () -> super.gotoState("Main"));
}
@Override
public void onEntry(StateTransition e) {
System.out.println("They have begun arriving now, sir...");
ui.clear();
menu.display();
}
@Override
public void update() {
menu.update();
}
@Override
public void onExit(StateTransition e) {
ui.println("They're all here, sir...");
}
}
| UTF-8 | Java | 1,038 | java | ArrivingPeople.java | Java | [] | null | [] | package com.brandon.dossier.state;
import org.teamresistance.util.state.State;
import org.teamresistance.util.state.StateMachine;
import org.teamresistance.util.state.StateTransition;
import com.brandon.dossier.UI;
import com.brandon.dossier.util.console.Menu;
public class ArrivingPeople extends State {
private UI ui;
private Menu menu;
protected ArrivingPeople(StateMachine stateMachine) {
super(stateMachine);
}
@Override
public void init() {
ui = UI.getInstance();
menu = new Menu("What?");
menu.setInput(ui);
menu.setOutput(ui);
menu.addMenu("Wot", () -> System.out.println("uwot"));
menu.addMenu("Wut", () -> System.out.println("uwut"));
menu.addMenu("Back", () -> super.gotoState("Main"));
}
@Override
public void onEntry(StateTransition e) {
System.out.println("They have begun arriving now, sir...");
ui.clear();
menu.display();
}
@Override
public void update() {
menu.update();
}
@Override
public void onExit(StateTransition e) {
ui.println("They're all here, sir...");
}
}
| 1,038 | 0.703276 | 0.703276 | 47 | 21.085106 | 19.777302 | 61 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1.446808 | false | false | 13 |
96c34f90388e3fa19252fe215a7dcb7852b551f2 | 27,066,883,945,096 | 84af8817d9365b45bd2e583ac89aec61812635aa | /app/src/main/java/com/vararg/moviessample/network/NetworkModule.java | c8388a7a42d5d4188a2ee1af61276d79e940323d | [] | no_license | ergoTech/MoviesSample | https://github.com/ergoTech/MoviesSample | ac6b05d195718c3156e0ed6f12ae64a986dcb2cd | a86a4de7e8d1e9daef8713f5d56f10d593636417 | refs/heads/master | 2020-12-02T22:14:07.565000 | 2017-04-12T12:39:05 | 2017-04-12T12:39:05 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package com.vararg.moviessample.network;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.jakewharton.retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory;
import javax.inject.Singleton;
import dagger.Module;
import dagger.Provides;
import okhttp3.OkHttpClient;
import retrofit2.CallAdapter;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
/**
* Created by vararg on 10.04.2017.
*/
@Module
public class NetworkModule {
private String baseUrl;
public NetworkModule(String baseUrl) {
this.baseUrl = baseUrl;
}
@Provides
@Singleton
static Gson provideGson() {
return new GsonBuilder()
.setDateFormat("yyyy-MM-dd")
.create();
}
@Provides
@Singleton
static CallAdapter.Factory provideCallAdapterFactory() {
return RxJava2CallAdapterFactory.create();
}
@Provides
@Singleton
static OkHttpClient provideOkHttpClient() {
return new OkHttpClient();
}
@Provides
Retrofit provideRetrofit(Gson gson, CallAdapter.Factory callAdapterFactory, OkHttpClient okHttpClient) {
return new Retrofit.Builder()
.baseUrl(baseUrl)
.addConverterFactory(GsonConverterFactory.create(gson))
.addCallAdapterFactory(callAdapterFactory)
.client(okHttpClient)
.build();
}
}
| UTF-8 | Java | 1,436 | java | NetworkModule.java | Java | [
{
"context": "rter.gson.GsonConverterFactory;\n\n/**\n * Created by vararg on 10.04.2017.\n */\n\n@Module\npublic class NetworkM",
"end": 427,
"score": 0.993777871131897,
"start": 421,
"tag": "USERNAME",
"value": "vararg"
}
] | null | [] | package com.vararg.moviessample.network;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.jakewharton.retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory;
import javax.inject.Singleton;
import dagger.Module;
import dagger.Provides;
import okhttp3.OkHttpClient;
import retrofit2.CallAdapter;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
/**
* Created by vararg on 10.04.2017.
*/
@Module
public class NetworkModule {
private String baseUrl;
public NetworkModule(String baseUrl) {
this.baseUrl = baseUrl;
}
@Provides
@Singleton
static Gson provideGson() {
return new GsonBuilder()
.setDateFormat("yyyy-MM-dd")
.create();
}
@Provides
@Singleton
static CallAdapter.Factory provideCallAdapterFactory() {
return RxJava2CallAdapterFactory.create();
}
@Provides
@Singleton
static OkHttpClient provideOkHttpClient() {
return new OkHttpClient();
}
@Provides
Retrofit provideRetrofit(Gson gson, CallAdapter.Factory callAdapterFactory, OkHttpClient okHttpClient) {
return new Retrofit.Builder()
.baseUrl(baseUrl)
.addConverterFactory(GsonConverterFactory.create(gson))
.addCallAdapterFactory(callAdapterFactory)
.client(okHttpClient)
.build();
}
}
| 1,436 | 0.681058 | 0.669916 | 59 | 23.338984 | 22.390684 | 108 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.322034 | false | false | 13 |
e8e0fe8bcca445efb8bfba36fd6be733501c02be | 32,633,161,519,242 | a99bf10b3fd053e9f476f005d6c1dfd0adcc32e1 | /example-2021.05.18/src/main/java/io/github/sysker/example20210518/UseCaseTracker.java | aa763a241ac89315142cdf5aeb4738d0c1d812fa | [] | no_license | Faiyong/example-everyday | https://github.com/Faiyong/example-everyday | f3cec11ba6a1c6572871a61952680f4f2bf47c5a | d6b89f6744fe48cf1e8eef43046e6a6d87acaf15 | refs/heads/main | 2023-06-24T22:24:38.378000 | 2021-07-16T06:07:29 | 2021-07-16T06:07:29 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package io.github.sysker.example20210518;
import io.github.sysker.example20210518.annotation.UseCase;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
* tracker
*
* @author sysker
* @version 1.0
* @date 2021-05-19 7:57
*/
public class UseCaseTracker {
public static void trackUseCases(List<Integer> useCases, Class<?> cl) {
for (Method declaredMethod : cl.getDeclaredMethods()) {
UseCase uc = declaredMethod.getAnnotation(UseCase.class);
if (uc != null) {
System.out.println("Found Use Case:" + uc.id() + " " + uc.description());
useCases.remove(new Integer(uc.id()));
}
}
for (Integer useCase : useCases) {
System.out.println("Warning: Missing use case-" + useCase);
}
}
public static void main(String[] args) {
List<Integer> useCases = new ArrayList<>();
Collections.addAll(useCases, 47, 48, 49, 50);
trackUseCases(useCases, PasswordUtils.class);
}
}
| UTF-8 | Java | 1,120 | java | UseCaseTracker.java | Java | [
{
"context": "package io.github.sysker.example20210518;\r\n\r\nimport io.github.sysker.examp",
"end": 24,
"score": 0.9987592697143555,
"start": 18,
"tag": "USERNAME",
"value": "sysker"
},
{
"context": "ithub.sysker.example20210518;\r\n\r\nimport io.github.sysker.example20210518.annot... | null | [] | package io.github.sysker.example20210518;
import io.github.sysker.example20210518.annotation.UseCase;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
* tracker
*
* @author sysker
* @version 1.0
* @date 2021-05-19 7:57
*/
public class UseCaseTracker {
public static void trackUseCases(List<Integer> useCases, Class<?> cl) {
for (Method declaredMethod : cl.getDeclaredMethods()) {
UseCase uc = declaredMethod.getAnnotation(UseCase.class);
if (uc != null) {
System.out.println("Found Use Case:" + uc.id() + " " + uc.description());
useCases.remove(new Integer(uc.id()));
}
}
for (Integer useCase : useCases) {
System.out.println("Warning: Missing use case-" + useCase);
}
}
public static void main(String[] args) {
List<Integer> useCases = new ArrayList<>();
Collections.addAll(useCases, 47, 48, 49, 50);
trackUseCases(useCases, PasswordUtils.class);
}
}
| 1,120 | 0.605357 | 0.572321 | 36 | 29.111111 | 25.363773 | 89 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.527778 | false | false | 13 |
a5e07c810d92f70759d0fa5e44af2a3edd3acfce | 15,710,990,376,712 | d6691d77bf247f0fa0751b3453160a8d11c3f5d4 | /src/com/mashibing/tank/cor/ColliderChain.java | be416182ab73e74d235d89b538e88027793852c1 | [] | no_license | dan031213/tank-s | https://github.com/dan031213/tank-s | f0ba0de991ba93fe0d94ce28d1b42ce1fc99ed4c | 9e30e4ae0b26ed4785c0bcf845641b061c44a33d | refs/heads/master | 2020-05-29T23:39:24.118000 | 2019-05-30T16:02:21 | 2019-05-30T16:02:21 | 189,441,521 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package com.mashibing.tank.cor;
import com.mashibing.tank.GameObject;
import com.mashibing.tank.PropertyMgr;
import java.lang.reflect.InvocationTargetException;
import java.util.LinkedList;
import java.util.List;
public class ColliderChain implements Collider {
List<Collider> colliderChainList = new LinkedList();
void initColliders() {
String[] collidersstr = PropertyMgr.getInstance().get("colliders").toString().split(",");
for (String str : collidersstr
) {
try {
add((Collider) Class.forName(str).getDeclaredConstructor().newInstance());
} catch (InstantiationException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
}
}
public ColliderChain() {
initColliders();
}
void add(Collider collider) {
colliderChainList.add(collider);
}
void remove(Collider collider) {
colliderChainList.remove(collider);
}
@Override
public boolean collide(GameObject go1, GameObject go2) {
boolean b = true;
for (int i = 0; i < colliderChainList.size(); i++) {
if (b) {
b = colliderChainList.get(i).collide(go1, go2);
}
}
return b;
}
}
| UTF-8 | Java | 1,600 | java | ColliderChain.java | Java | [] | null | [] | package com.mashibing.tank.cor;
import com.mashibing.tank.GameObject;
import com.mashibing.tank.PropertyMgr;
import java.lang.reflect.InvocationTargetException;
import java.util.LinkedList;
import java.util.List;
public class ColliderChain implements Collider {
List<Collider> colliderChainList = new LinkedList();
void initColliders() {
String[] collidersstr = PropertyMgr.getInstance().get("colliders").toString().split(",");
for (String str : collidersstr
) {
try {
add((Collider) Class.forName(str).getDeclaredConstructor().newInstance());
} catch (InstantiationException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
}
}
public ColliderChain() {
initColliders();
}
void add(Collider collider) {
colliderChainList.add(collider);
}
void remove(Collider collider) {
colliderChainList.remove(collider);
}
@Override
public boolean collide(GameObject go1, GameObject go2) {
boolean b = true;
for (int i = 0; i < colliderChainList.size(); i++) {
if (b) {
b = colliderChainList.get(i).collide(go1, go2);
}
}
return b;
}
}
| 1,600 | 0.584375 | 0.58125 | 56 | 27.571428 | 22.844862 | 97 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.446429 | false | false | 13 |
f9f86b0d5d391920caa2a412e056c348111b7bb5 | 16,973,710,763,216 | 932cdd1bffc0208a39dbe06904c0d0b1f70da79b | /app/src/main/java/welding/taal/com/welding_23_08_2016/model/FirmwareClass.java | fbf5305342c9a6f5d7b6173c49fa229da2fced54 | [] | no_license | divyasudish/welding_23_8_2016 | https://github.com/divyasudish/welding_23_8_2016 | ba1e36a534efd306c5fb3f35e530881c52604fde | 473ec1bd1e5e7035a28152ec4c3e4d625d0d8b4d | refs/heads/master | 2020-04-24T01:32:01.796000 | 2016-09-08T10:16:07 | 2016-09-08T10:16:07 | 66,913,073 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package welding.taal.com.welding_23_08_2016.model;
/**
* Created by divyashreenair on 18/7/16.
*/
public class FirmwareClass {
private int id;
private String Device;
private String Path;
private boolean mChecked;
public FirmwareClass() {
}
public FirmwareClass(String device, String sub, boolean checked) {
Device = device;
Path = sub;
mChecked = checked;
}
public FirmwareClass(String ip, String device){
Device = device;
}
public String getDevice() {
return Device;
}
public void setDevice(String device) {
Device = device;
}
public String getPath() {
return Path;
}
public void setPath(String path) {
Path = path;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public boolean ismChecked() {
return mChecked;
}
public void setmChecked(boolean mChecked) {
this.mChecked = mChecked;
}
}
| UTF-8 | Java | 1,035 | java | FirmwareClass.java | Java | [
{
"context": "l.com.welding_23_08_2016.model;\n\n/**\n * Created by divyashreenair on 18/7/16.\n */\npublic class FirmwareClass {\n\n ",
"end": 84,
"score": 0.9992912411689758,
"start": 70,
"tag": "USERNAME",
"value": "divyashreenair"
}
] | null | [] | package welding.taal.com.welding_23_08_2016.model;
/**
* Created by divyashreenair on 18/7/16.
*/
public class FirmwareClass {
private int id;
private String Device;
private String Path;
private boolean mChecked;
public FirmwareClass() {
}
public FirmwareClass(String device, String sub, boolean checked) {
Device = device;
Path = sub;
mChecked = checked;
}
public FirmwareClass(String ip, String device){
Device = device;
}
public String getDevice() {
return Device;
}
public void setDevice(String device) {
Device = device;
}
public String getPath() {
return Path;
}
public void setPath(String path) {
Path = path;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public boolean ismChecked() {
return mChecked;
}
public void setmChecked(boolean mChecked) {
this.mChecked = mChecked;
}
}
| 1,035 | 0.585507 | 0.572947 | 57 | 17.157894 | 16.497517 | 70 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.350877 | false | false | 13 |
9c3f34a0450a7b15b38d21142c5bedbf8e0743a7 | 22,651,657,526,761 | ed375fd1014eb91255132d09cb8127ba1733309c | /src/java/pathfinding/MyAStarPathFinderAlgorithm.java | 79ed52f2c97cba8f1363ebb3f12500680eca6b80 | [] | no_license | salomegoosen123/PathFinder | https://github.com/salomegoosen123/PathFinder | 711d811107d35e2b2a8464ab956dcc3312c0eccf | 13c9bea1c1fbbc0e59db05a7bea6f126436e66eb | refs/heads/master | 2021-01-25T12:08:20.660000 | 2013-06-18T07:11:34 | 2013-06-18T07:11:34 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package pathfinding;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import org.apache.log4j.Logger;
public class MyAStarPathFinderAlgorithm extends AbstractAlgorithm {
/*
* // TODO
* possible optimizations:
* - calculate totalCost as soon as past or future costs are set, so it will not have to be
* calculated each time it is retrieved
* - store nodes in openList sorted by their totalCost value.
*/
// Variables and methods for path finding */
/**
* list of type AbstractNode objects containing nodes not yet visited,
* walkable and adjacent to visited node
*/
private List openList; // list of type Node objects
/** list containing nodes already visited/taken care of. */
private List closedList; // list of type Node objects
/** the map of the terrain */
private MyMap terrainMap;
public static Logger LOGGER = Logger.getLogger(MyAStarPathFinderAlgorithm.class);
public MyAStarPathFinderAlgorithm(MyMap terrainMap) {
this.terrainMap = terrainMap;
openList = new LinkedList();
closedList = new LinkedList();
}
/**
* finds an allowed path from start to goal coordinates on this map.
* <p>
* This method uses the A* algorithm. The hCosts value is calculated in the
* given Node implementation.
* <p>
* This method will return a LinkedList containing the start node at the
* beginning followed by the calculated shortest allowed path ending with
* the end node.
* <p>
* If no allowed path exists, an empty list will be returned.
* <p>
* <p>
* x/y must be bigger or equal to 0 and smaller or equal to width/hight.
*
* @param oldX
* @param oldY
* @param newX
* @param newY
* @return list of type node
* @throws Exception
*/
public final List findPath(int oldX, int oldY, int newX, int newY)
throws Exception {
List solution = null;
closedList = new ArrayList();
openList = new ArrayList();
if (!terrainMap.validXY(oldX, oldY))
throw new Exception("Invalid FROM path coordinates");
if (!terrainMap.validXY(newX, newY))
throw new Exception("Invalid TO path coordinates");
AbstractNode goalNode = getNodeAt(newX, newY); // goal node
openList.add(getNodeAt(oldX, oldY)); // add starting node to open list
AbstractNode current;
while (!openList.isEmpty()) {
current = lowestCostNodeInOpenList(); // get node with lowest costs
// from openList
closedList.add(current); // add current node to closed list
openList.remove(current); // delete current node from open list
if ((current.getxPosition() == newX)
&& (current.getyPosition() == newY)) { // found goal
solution = calcPath(getNodeAt(oldX, oldY), current);
return solution;
}
// for all adjacent nodes:
List adjacentNodes = findAdjacentNodesTo(current);
for (int i = 0; i < adjacentNodes.size(); i++) {
AbstractNode currentAdj = (AbstractNode) adjacentNodes.get(i);
if (currentAdj.isWalkable()) {
if (!openList.contains(currentAdj)) { // node is not in
// openList
currentAdj.setPrevious(current); // set current node as
// previous for this
// node
currentAdj.setFuturePathCosts(goalNode); // set
// estimated
// costs to
// goal for
// this node
currentAdj.setPastPathCosts(current); // set costs from
// start to this
// node
openList.add(currentAdj); // add node to openList
} else { // node is in openList
if (currentAdj.getPastPathCosts() > currentAdj
.calculatePastPathCosts(current)) { // costs
// from
// current
// node are
// cheaper
// than
// previous
// costs
currentAdj.setPrevious(current); // set current node
// as previous
// for this node
currentAdj.setPastPathCosts(current); // set costs
// from
// start to
// this node
}
}
}
}
if (openList.isEmpty()) { // no path exists
return new LinkedList(); // return empty list
}
}
return null; // unreachable
}
private AbstractNode getNodeAt(int x, int y) {
return terrainMap.getNode(x, y);
}
public List findAdjacentNodesTo(AbstractNode currentNode)
throws UndefinedPropertyException {
int currX = currentNode.getxPosition(); // 0,1 adjacent is 1,0; 0,2 and
// 1,1
int currY = currentNode.getyPosition(); // 1,0 adjacent is x-1,x,x+1 for
// y-1 x-1,y x+1,y x-1,x,x+1 for
// y+1
List adjacent = new ArrayList();
LOGGER.info("Looking for adjacent nodes to (" + currX + ","
+ currY + "): ");
// add bottom, if exists
LOGGER.info("Bottom: (" + (currX + 1) + "," + currY + ") ");
int bottomX = currX + 1;
adjacent.addAll(findAdjacentForRowFromYPos(bottomX, currY));
// add right
LOGGER.info("Right: (" + currX + "," + (currY + 1) + ")");
AbstractNode temp = this.getNodeAt(currX, currY + 1);
if (temp != null && temp.isWalkable() && !closedList.contains(temp)) {
adjacent.add(temp);
}
// add top if exists
LOGGER.info("Top: (" + (currX - 1) + "," + currY + ") ");
int topX = currX - 1;
if (topX > 0)
adjacent.addAll(findAdjacentForRowFromYPos(currX - 1, currY));
// add left if exists
LOGGER.info("Left: (" + currX + "," + (currY - 1) + ") ");
if (currY - 1 > 0) {
temp = getNodeAt(currX, currY - 1);
if (temp != null && temp.isWalkable() && !closedList.contains(temp))
adjacent.add(temp);
}
LOGGER.info("Found adjacent: "+adjacent.toString());
return adjacent;
}
private List findAdjacentForRowFromYPos(int currX, int currY)
throws UndefinedPropertyException {
List adjacent = new ArrayList();
for (int y = currY - 1; y <= currY + 1; y++) {
if (y > 0) {
LOGGER.info("* (" + currX + "," + y + ") ");
AbstractNode temp = getNodeAt(currX, y);
if (temp != null && temp.isWalkable()
&& !closedList.contains(temp)) {
adjacent.add(temp);
}
}
}
return adjacent;
}
/**
* calculates the found path between two points according to their given
* <code>previousNode</code> field.
*
* @param start
* @param goal
* @return
*/
private List calcPath(AbstractNode start, AbstractNode goal) {
LinkedList path = new LinkedList();
AbstractNode curr = goal;
boolean done = false;
while (!done) { // TODO change to curr.getPrevious() != null
path.addFirst(curr);
curr = curr.getPrevious();
if (curr.equals(start)) {
path.addFirst(start);
done = true;
}
}
return path;
}
/**
* returns the node with the lowest costs.
*
* @return
*/
private AbstractNode lowestCostNodeInOpenList() {
// TODO currently, this is done by going through the whole openList!
AbstractNode cheapest = (AbstractNode) openList.get(0);
for (int i = 0; i < openList.size(); i++) {
if (((AbstractNode) openList.get(i)).getPastPlusFutureCosts() < cheapest
.getPastPlusFutureCosts()) {
cheapest = (AbstractNode) openList.get(i);
}
}
return cheapest;
}
/*
* calls the injected algortihmm class to find the path from the start to
* the goal node
*/
public List findPathToGoal() throws Exception {
int oldX = terrainMap.getStartNode().getxPosition();
int oldY = terrainMap.getStartNode().getyPosition();
int newX = terrainMap.getGoalNode().getxPosition();
int newY = terrainMap.getGoalNode().getyPosition();
List solution = findPath(oldX, oldY, newX, newY);
return solution;
}
public void finalize() {
System.out.println("Finalize class MyAStarPAthFinderAlgorithm");
openList = null;
closedList = null;
terrainMap = null;
}
}
| UTF-8 | Java | 7,827 | java | MyAStarPathFinderAlgorithm.java | Java | [] | null | [] | package pathfinding;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import org.apache.log4j.Logger;
public class MyAStarPathFinderAlgorithm extends AbstractAlgorithm {
/*
* // TODO
* possible optimizations:
* - calculate totalCost as soon as past or future costs are set, so it will not have to be
* calculated each time it is retrieved
* - store nodes in openList sorted by their totalCost value.
*/
// Variables and methods for path finding */
/**
* list of type AbstractNode objects containing nodes not yet visited,
* walkable and adjacent to visited node
*/
private List openList; // list of type Node objects
/** list containing nodes already visited/taken care of. */
private List closedList; // list of type Node objects
/** the map of the terrain */
private MyMap terrainMap;
public static Logger LOGGER = Logger.getLogger(MyAStarPathFinderAlgorithm.class);
public MyAStarPathFinderAlgorithm(MyMap terrainMap) {
this.terrainMap = terrainMap;
openList = new LinkedList();
closedList = new LinkedList();
}
/**
* finds an allowed path from start to goal coordinates on this map.
* <p>
* This method uses the A* algorithm. The hCosts value is calculated in the
* given Node implementation.
* <p>
* This method will return a LinkedList containing the start node at the
* beginning followed by the calculated shortest allowed path ending with
* the end node.
* <p>
* If no allowed path exists, an empty list will be returned.
* <p>
* <p>
* x/y must be bigger or equal to 0 and smaller or equal to width/hight.
*
* @param oldX
* @param oldY
* @param newX
* @param newY
* @return list of type node
* @throws Exception
*/
public final List findPath(int oldX, int oldY, int newX, int newY)
throws Exception {
List solution = null;
closedList = new ArrayList();
openList = new ArrayList();
if (!terrainMap.validXY(oldX, oldY))
throw new Exception("Invalid FROM path coordinates");
if (!terrainMap.validXY(newX, newY))
throw new Exception("Invalid TO path coordinates");
AbstractNode goalNode = getNodeAt(newX, newY); // goal node
openList.add(getNodeAt(oldX, oldY)); // add starting node to open list
AbstractNode current;
while (!openList.isEmpty()) {
current = lowestCostNodeInOpenList(); // get node with lowest costs
// from openList
closedList.add(current); // add current node to closed list
openList.remove(current); // delete current node from open list
if ((current.getxPosition() == newX)
&& (current.getyPosition() == newY)) { // found goal
solution = calcPath(getNodeAt(oldX, oldY), current);
return solution;
}
// for all adjacent nodes:
List adjacentNodes = findAdjacentNodesTo(current);
for (int i = 0; i < adjacentNodes.size(); i++) {
AbstractNode currentAdj = (AbstractNode) adjacentNodes.get(i);
if (currentAdj.isWalkable()) {
if (!openList.contains(currentAdj)) { // node is not in
// openList
currentAdj.setPrevious(current); // set current node as
// previous for this
// node
currentAdj.setFuturePathCosts(goalNode); // set
// estimated
// costs to
// goal for
// this node
currentAdj.setPastPathCosts(current); // set costs from
// start to this
// node
openList.add(currentAdj); // add node to openList
} else { // node is in openList
if (currentAdj.getPastPathCosts() > currentAdj
.calculatePastPathCosts(current)) { // costs
// from
// current
// node are
// cheaper
// than
// previous
// costs
currentAdj.setPrevious(current); // set current node
// as previous
// for this node
currentAdj.setPastPathCosts(current); // set costs
// from
// start to
// this node
}
}
}
}
if (openList.isEmpty()) { // no path exists
return new LinkedList(); // return empty list
}
}
return null; // unreachable
}
private AbstractNode getNodeAt(int x, int y) {
return terrainMap.getNode(x, y);
}
public List findAdjacentNodesTo(AbstractNode currentNode)
throws UndefinedPropertyException {
int currX = currentNode.getxPosition(); // 0,1 adjacent is 1,0; 0,2 and
// 1,1
int currY = currentNode.getyPosition(); // 1,0 adjacent is x-1,x,x+1 for
// y-1 x-1,y x+1,y x-1,x,x+1 for
// y+1
List adjacent = new ArrayList();
LOGGER.info("Looking for adjacent nodes to (" + currX + ","
+ currY + "): ");
// add bottom, if exists
LOGGER.info("Bottom: (" + (currX + 1) + "," + currY + ") ");
int bottomX = currX + 1;
adjacent.addAll(findAdjacentForRowFromYPos(bottomX, currY));
// add right
LOGGER.info("Right: (" + currX + "," + (currY + 1) + ")");
AbstractNode temp = this.getNodeAt(currX, currY + 1);
if (temp != null && temp.isWalkable() && !closedList.contains(temp)) {
adjacent.add(temp);
}
// add top if exists
LOGGER.info("Top: (" + (currX - 1) + "," + currY + ") ");
int topX = currX - 1;
if (topX > 0)
adjacent.addAll(findAdjacentForRowFromYPos(currX - 1, currY));
// add left if exists
LOGGER.info("Left: (" + currX + "," + (currY - 1) + ") ");
if (currY - 1 > 0) {
temp = getNodeAt(currX, currY - 1);
if (temp != null && temp.isWalkable() && !closedList.contains(temp))
adjacent.add(temp);
}
LOGGER.info("Found adjacent: "+adjacent.toString());
return adjacent;
}
private List findAdjacentForRowFromYPos(int currX, int currY)
throws UndefinedPropertyException {
List adjacent = new ArrayList();
for (int y = currY - 1; y <= currY + 1; y++) {
if (y > 0) {
LOGGER.info("* (" + currX + "," + y + ") ");
AbstractNode temp = getNodeAt(currX, y);
if (temp != null && temp.isWalkable()
&& !closedList.contains(temp)) {
adjacent.add(temp);
}
}
}
return adjacent;
}
/**
* calculates the found path between two points according to their given
* <code>previousNode</code> field.
*
* @param start
* @param goal
* @return
*/
private List calcPath(AbstractNode start, AbstractNode goal) {
LinkedList path = new LinkedList();
AbstractNode curr = goal;
boolean done = false;
while (!done) { // TODO change to curr.getPrevious() != null
path.addFirst(curr);
curr = curr.getPrevious();
if (curr.equals(start)) {
path.addFirst(start);
done = true;
}
}
return path;
}
/**
* returns the node with the lowest costs.
*
* @return
*/
private AbstractNode lowestCostNodeInOpenList() {
// TODO currently, this is done by going through the whole openList!
AbstractNode cheapest = (AbstractNode) openList.get(0);
for (int i = 0; i < openList.size(); i++) {
if (((AbstractNode) openList.get(i)).getPastPlusFutureCosts() < cheapest
.getPastPlusFutureCosts()) {
cheapest = (AbstractNode) openList.get(i);
}
}
return cheapest;
}
/*
* calls the injected algortihmm class to find the path from the start to
* the goal node
*/
public List findPathToGoal() throws Exception {
int oldX = terrainMap.getStartNode().getxPosition();
int oldY = terrainMap.getStartNode().getyPosition();
int newX = terrainMap.getGoalNode().getxPosition();
int newY = terrainMap.getGoalNode().getyPosition();
List solution = findPath(oldX, oldY, newX, newY);
return solution;
}
public void finalize() {
System.out.println("Finalize class MyAStarPAthFinderAlgorithm");
openList = null;
closedList = null;
terrainMap = null;
}
}
| 7,827 | 0.631915 | 0.62706 | 255 | 29.694118 | 23.434359 | 92 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 3.815686 | false | false | 13 |
10d550f05bb8fac64ee9d1cc2768bbfbfeaf0f27 | 4,389,456,576,827 | d9e8c0a14ead7f47f666caef2a95fcae337ae88e | /app/src/main/java/Entidades/grilla_transformacion_agregar.java | 5889505f855a937e1910542817b4452e2e43fb4c | [] | no_license | herdumundo/Averiados_APP | https://github.com/herdumundo/Averiados_APP | 662a35f026d482e70266056af7c16690a1fdb93a | 4f67c96eb9400273f79f6adb8cec359d65ab0a1e | refs/heads/master | 2023-03-04T21:20:58.749000 | 2021-02-13T14:41:57 | 2021-02-13T14:41:57 | 338,595,900 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package Entidades;
public class grilla_transformacion_agregar {
private String codigo;
private String nombre_huevo;
private int cantidad;
public grilla_transformacion_agregar(String codigo, int cantidad, String nombre_huevo ) {
this.codigo = codigo;
this.cantidad = cantidad;
this.nombre_huevo=nombre_huevo;
}
public grilla_transformacion_agregar(){
}
public String getCodigo(){
return codigo;
}
public void setCodigo(String codigo) {
this.codigo = codigo;
}
public int getCantidad(){
return cantidad;
}
public void setCantidad(int cantidad) {
this.cantidad = cantidad;
}
public String getNombre_huevo(){
return nombre_huevo;
}
public void setNombre_huevo(String nombre_huevo) {
this.nombre_huevo = nombre_huevo;
}
}
| UTF-8 | Java | 874 | java | grilla_transformacion_agregar.java | Java | [] | null | [] | package Entidades;
public class grilla_transformacion_agregar {
private String codigo;
private String nombre_huevo;
private int cantidad;
public grilla_transformacion_agregar(String codigo, int cantidad, String nombre_huevo ) {
this.codigo = codigo;
this.cantidad = cantidad;
this.nombre_huevo=nombre_huevo;
}
public grilla_transformacion_agregar(){
}
public String getCodigo(){
return codigo;
}
public void setCodigo(String codigo) {
this.codigo = codigo;
}
public int getCantidad(){
return cantidad;
}
public void setCantidad(int cantidad) {
this.cantidad = cantidad;
}
public String getNombre_huevo(){
return nombre_huevo;
}
public void setNombre_huevo(String nombre_huevo) {
this.nombre_huevo = nombre_huevo;
}
}
| 874 | 0.639588 | 0.639588 | 40 | 20.85 | 20.228136 | 93 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.375 | false | false | 13 |
6711e03900920c5cd12e9a3faa277f1dcf68651d | 4,002,909,531,343 | 10d807e56a8bebcc064af11d245b12f06bc5d048 | /java/com/ezzetech/mujib100/apiAdapter/NewsFeedForAdapter.java | 42c8ce541608bf773a9625df88bea27421be1626 | [] | no_license | Nababmithun/Mujib-100 | https://github.com/Nababmithun/Mujib-100 | 91938de16c6c927f93b280c8df0d5b7d2aad72e7 | a709b42b62f31cc6694e5381aa291f709e0af08e | refs/heads/main | 2023-01-07T13:00:24.471000 | 2020-10-28T12:52:21 | 2020-10-28T12:52:21 | 308,007,479 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package com.ezzetech.mujib100.apiAdapter;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.text.Html;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.ezzetech.mujib100.R;
import com.ezzetech.mujib100.activity.NewsFeedDetailsActivity;
import com.ezzetech.mujib100.newsFeedApiModel.Datum;
import com.squareup.picasso.Picasso;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Locale;
public class NewsFeedForAdapter extends RecyclerView.Adapter<NewsFeedForAdapter.NewsFeedViewHoldr> {
Context context;
List<Datum> newsFeedList;
public NewsFeedForAdapter(Context context, List<Datum> newsFeedList) {
this.context = context;
this.newsFeedList = newsFeedList;
}
@NonNull
@Override
public NewsFeedViewHoldr onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(context).inflate(R.layout.news_feed_layout,parent,false);
return new NewsFeedViewHoldr(view);
}
@Override
public void onBindViewHolder(@NonNull NewsFeedViewHoldr holder, int position) {
Datum newsFeed = newsFeedList.get(position);
holder.titleTV.setText(newsFeed.getTitle());
String description = stripHtml(newsFeed.getDescription());
holder.descriptionTV.setText(description);
//holder.publishDateTV.setText(newsFeed.getPublishedDate());
if (newsFeed.getLinkType().equals("video")){
holder.videoIconIV.setVisibility(View.VISIBLE);
}
@SuppressLint("SimpleDateFormat") SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy hh:mm:ss");
try {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss", Locale.getDefault());
Date newDate = format.parse(newsFeed.getPublishedDate());
format = new SimpleDateFormat("dd MMM, yyyy hh:mm a",Locale.getDefault());
String date = format.format(newDate);
holder.publishDateTV.setText(date);
} catch (Exception e) {
e.printStackTrace();
}
Picasso.get().load(newsFeed.getLink()).into(holder.newsImageIV);
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(context, NewsFeedDetailsActivity.class);
intent.putExtra("url", newsFeed.getNewsLink());
context.startActivity(intent);
}
});
}
@Override
public int getItemCount() {
return newsFeedList.size();
}
public class NewsFeedViewHoldr extends RecyclerView.ViewHolder {
ImageView newsImageIV,videoIconIV;
TextView titleTV,descriptionTV,publishDateTV,linkType;
public NewsFeedViewHoldr(@NonNull View itemView) {
super(itemView);
newsImageIV = itemView.findViewById(R.id.newsImageIV);
titleTV = itemView.findViewById(R.id.titleTV);
descriptionTV = itemView.findViewById(R.id.descriptionTV);
publishDateTV = itemView.findViewById(R.id.publishDateTV);
videoIconIV = itemView.findViewById(R.id.videoIconIV);
}
}
public String stripHtml(String html) {
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {
return Html.fromHtml(html, Html.FROM_HTML_MODE_LEGACY).toString();
} else {
return Html.fromHtml(html).toString();
}
}
}
| UTF-8 | Java | 3,920 | java | NewsFeedForAdapter.java | Java | [] | null | [] | package com.ezzetech.mujib100.apiAdapter;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.text.Html;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.ezzetech.mujib100.R;
import com.ezzetech.mujib100.activity.NewsFeedDetailsActivity;
import com.ezzetech.mujib100.newsFeedApiModel.Datum;
import com.squareup.picasso.Picasso;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Locale;
public class NewsFeedForAdapter extends RecyclerView.Adapter<NewsFeedForAdapter.NewsFeedViewHoldr> {
Context context;
List<Datum> newsFeedList;
public NewsFeedForAdapter(Context context, List<Datum> newsFeedList) {
this.context = context;
this.newsFeedList = newsFeedList;
}
@NonNull
@Override
public NewsFeedViewHoldr onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(context).inflate(R.layout.news_feed_layout,parent,false);
return new NewsFeedViewHoldr(view);
}
@Override
public void onBindViewHolder(@NonNull NewsFeedViewHoldr holder, int position) {
Datum newsFeed = newsFeedList.get(position);
holder.titleTV.setText(newsFeed.getTitle());
String description = stripHtml(newsFeed.getDescription());
holder.descriptionTV.setText(description);
//holder.publishDateTV.setText(newsFeed.getPublishedDate());
if (newsFeed.getLinkType().equals("video")){
holder.videoIconIV.setVisibility(View.VISIBLE);
}
@SuppressLint("SimpleDateFormat") SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy hh:mm:ss");
try {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss", Locale.getDefault());
Date newDate = format.parse(newsFeed.getPublishedDate());
format = new SimpleDateFormat("dd MMM, yyyy hh:mm a",Locale.getDefault());
String date = format.format(newDate);
holder.publishDateTV.setText(date);
} catch (Exception e) {
e.printStackTrace();
}
Picasso.get().load(newsFeed.getLink()).into(holder.newsImageIV);
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(context, NewsFeedDetailsActivity.class);
intent.putExtra("url", newsFeed.getNewsLink());
context.startActivity(intent);
}
});
}
@Override
public int getItemCount() {
return newsFeedList.size();
}
public class NewsFeedViewHoldr extends RecyclerView.ViewHolder {
ImageView newsImageIV,videoIconIV;
TextView titleTV,descriptionTV,publishDateTV,linkType;
public NewsFeedViewHoldr(@NonNull View itemView) {
super(itemView);
newsImageIV = itemView.findViewById(R.id.newsImageIV);
titleTV = itemView.findViewById(R.id.titleTV);
descriptionTV = itemView.findViewById(R.id.descriptionTV);
publishDateTV = itemView.findViewById(R.id.publishDateTV);
videoIconIV = itemView.findViewById(R.id.videoIconIV);
}
}
public String stripHtml(String html) {
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {
return Html.fromHtml(html, Html.FROM_HTML_MODE_LEGACY).toString();
} else {
return Html.fromHtml(html).toString();
}
}
}
| 3,920 | 0.667857 | 0.664796 | 110 | 33.636364 | 29.419451 | 115 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.636364 | false | false | 13 |
56a27636b97cf7a73ea6cfc1ef18748f590bb446 | 5,729,486,383,916 | c1277a85980a0ff44d1d78625e8ce81c005d4248 | /src/main/java/leetcode/LongestSubstringWithoutRepeatingChars.java | b1190e917854fa99fb36929e1676ddca2cde950d | [] | no_license | shuowu/alg | https://github.com/shuowu/alg | 7c7646c1267e8a92b6de051ecbbddcd935a9ca2d | 1b85fadf25b05946855484b9f6b5a02fc15ce88a | refs/heads/master | 2020-03-30T11:41:58.813000 | 2018-10-19T03:31:33 | 2018-10-19T03:31:33 | 151,188,097 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package leetcode;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
/**
* Given a string, find the length of the longest substring without repeating characters.
*
* @tag Hash
* @tag Slide Window
* @tag Two Pointers
*/
public class LongestSubstringWithoutRepeatingChars {
public static int bruteForce(String s) {
int max = 0;
for (int i = 0; i < s.length(); i++) {
int len = 1;
Set<Character> set = new HashSet<>();
set.add(s.charAt(i));
for (int j = i + 1; j < s.length(); j++) {
if (set.contains(s.charAt(j))) {
break;
}
set.add(s.charAt(j));
len++;
}
max = Math.max(len, max);
}
return max;
}
/**
* @tag Slide Window
* !IMPORTANT
*/
public static int twoPointersI(String s) {
int max = 0;
int i = 0;
boolean[] existed = new boolean[256];
for (int j = 0; j < s.length(); j++) {
while (existed[s.charAt(j)]) {
existed[s.charAt(i)] = false;
i++;
}
existed[s.charAt(i)] = true;
max = Math.max(j - i + 1, max);
}
return max;
}
public static int twoPointersII(String s) {
int max = 0;
int i = 0;
int[] map = new int[256];
Arrays.fill(map, -1);
for (int j = 0; j < s.length(); j++) {
if (map[s.charAt(j)] > -1) {
i = map[s.charAt(j)] + 1;
}
map[s.charAt(j)] = j;
max = Math.max(j - i + 1, max);
}
return max;
}
} | UTF-8 | Java | 1,498 | java | LongestSubstringWithoutRepeatingChars.java | Java | [] | null | [] | package leetcode;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
/**
* Given a string, find the length of the longest substring without repeating characters.
*
* @tag Hash
* @tag Slide Window
* @tag Two Pointers
*/
public class LongestSubstringWithoutRepeatingChars {
public static int bruteForce(String s) {
int max = 0;
for (int i = 0; i < s.length(); i++) {
int len = 1;
Set<Character> set = new HashSet<>();
set.add(s.charAt(i));
for (int j = i + 1; j < s.length(); j++) {
if (set.contains(s.charAt(j))) {
break;
}
set.add(s.charAt(j));
len++;
}
max = Math.max(len, max);
}
return max;
}
/**
* @tag Slide Window
* !IMPORTANT
*/
public static int twoPointersI(String s) {
int max = 0;
int i = 0;
boolean[] existed = new boolean[256];
for (int j = 0; j < s.length(); j++) {
while (existed[s.charAt(j)]) {
existed[s.charAt(i)] = false;
i++;
}
existed[s.charAt(i)] = true;
max = Math.max(j - i + 1, max);
}
return max;
}
public static int twoPointersII(String s) {
int max = 0;
int i = 0;
int[] map = new int[256];
Arrays.fill(map, -1);
for (int j = 0; j < s.length(); j++) {
if (map[s.charAt(j)] > -1) {
i = map[s.charAt(j)] + 1;
}
map[s.charAt(j)] = j;
max = Math.max(j - i + 1, max);
}
return max;
}
} | 1,498 | 0.514686 | 0.500668 | 73 | 19.534246 | 17.193565 | 89 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.575342 | false | false | 13 |
942779d31e01dccc767df8d3e23476254d402d71 | 6,433,861,021,640 | 069c9ce79414c84a64ce4042d645889ebd52ff18 | /dental-surgery-management-system/src/dental/surgery/management/api/DataProcessor.java | 8a16ef804ad0ce8f6322eddadf564487d21a8dbc | [] | no_license | pvasilev94/Dental-Management-System | https://github.com/pvasilev94/Dental-Management-System | 3f13e291b27ef5a083f14101ac24f81a4c16abc9 | 803e3953310d98671a2d5428e607c7c58dfd8c4e | refs/heads/master | 2021-01-19T18:39:12.845000 | 2016-09-13T13:58:39 | 2016-09-13T13:58:39 | 68,113,666 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package dental.surgery.management.api;
import java.util.List;
public interface DataProcessor {
public void saveProcedure(Procedure procedure);
public void deleteProcedure(int id);
public List<Procedure> getProcedure();
public Procedure getProcedure(int procedureId);
public void savePatient(Patient patient);
public void deletePatient(int id);
public List<Patient> getPatients();
public Patient getPatient(int patientId);
public void savePatientProcedure(int patientId, int procedureId);
public void deletePatientProcedure(int patientId, int procedureId);
public void savePayment(int patientId, Payment payment);
public void deletePayment(int patientId, int paymentId);
public List<Payment> getPayment(int patientId);
public void commit();
public void loadData();
}
| UTF-8 | Java | 861 | java | DataProcessor.java | Java | [] | null | [] | package dental.surgery.management.api;
import java.util.List;
public interface DataProcessor {
public void saveProcedure(Procedure procedure);
public void deleteProcedure(int id);
public List<Procedure> getProcedure();
public Procedure getProcedure(int procedureId);
public void savePatient(Patient patient);
public void deletePatient(int id);
public List<Patient> getPatients();
public Patient getPatient(int patientId);
public void savePatientProcedure(int patientId, int procedureId);
public void deletePatientProcedure(int patientId, int procedureId);
public void savePayment(int patientId, Payment payment);
public void deletePayment(int patientId, int paymentId);
public List<Payment> getPayment(int patientId);
public void commit();
public void loadData();
}
| 861 | 0.730546 | 0.730546 | 36 | 22.916666 | 23.262243 | 73 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1.027778 | false | false | 13 |
b1add2d4fa2a8fae01dfdff9cd88c8bb7090283a | 14,379,550,519,795 | fdaf4ed0a660a1eebefec0189e9b81286995c651 | /src/main/java/com/example/PersonController.java | 9905d639bb66396fd8e2ddb8f16a1ddd1efed85d | [] | no_license | rahulkj/redis-example | https://github.com/rahulkj/redis-example | fad22f0dc249f8edb1bd346fa3e339f3b27baa39 | 52eadbcc8244fde9335aac72ce701bc6bdff99f5 | refs/heads/master | 2021-06-18T05:25:09.266000 | 2017-05-09T19:37:33 | 2017-05-09T19:37:33 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package com.example;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class PersonController {
@Autowired
PersonService personService;
@RequestMapping(value = "/person", method = RequestMethod.POST, consumes = "application/json")
public void save(@RequestBody Person person) {
System.out.println("********* incoming request ********** " + person);
personService.save(person);
}
@RequestMapping(value = "/person/{id}", method = RequestMethod.GET, produces = "application/json")
public Person get(@PathVariable(name = "id") String id) {
return personService.get(id);
}
}
| UTF-8 | Java | 996 | java | PersonController.java | Java | [] | null | [] | package com.example;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class PersonController {
@Autowired
PersonService personService;
@RequestMapping(value = "/person", method = RequestMethod.POST, consumes = "application/json")
public void save(@RequestBody Person person) {
System.out.println("********* incoming request ********** " + person);
personService.save(person);
}
@RequestMapping(value = "/person/{id}", method = RequestMethod.GET, produces = "application/json")
public Person get(@PathVariable(name = "id") String id) {
return personService.get(id);
}
}
| 996 | 0.778112 | 0.778112 | 28 | 34.57143 | 30.712292 | 99 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1.071429 | false | false | 13 |
9e18f28e06b8fe4d0db55b013a52211deab0ccba | 14,379,550,519,401 | 7e41614c9e3ddf095e57ae55ae3a84e2bdcc2844 | /development/workspace(helios)/Poseidon/src/com/gentleware/poseidon/diagrams/gen/node/DslGenVariableCreatorGem.java | 374674d9083cde69fb374116dc28dced0513315d | [] | no_license | ygarba/mde4wsn | https://github.com/ygarba/mde4wsn | 4aaba2fe410563f291312ffeb40837041fb143ff | a05188b316cc05923bf9dee9acdde15534a4961a | refs/heads/master | 2021-08-14T09:52:35.948000 | 2017-11-15T08:02:31 | 2017-11-15T08:02:31 | 109,995,809 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package com.gentleware.poseidon.diagrams.gen.node;
import com.gentleware.poseidon.diagrams.gen.node.DslGenVariableCreateFacet;
import com.gentleware.poseidon.custom.diagrams.node.impl.VariableCreateFacetImpl;
import com.gentleware.poseidon.custom.diagrams.base.CustomBaseCreatorGem;
import com.gentleware.poseidon.diagrams.base.DiagramProperty;
import com.gentleware.poseidon.idraw.utility.ScreenProperties;
/*
* This code is generated. All the hand-written changes will be lost.
*/
public class DslGenVariableCreatorGem extends CustomBaseCreatorGem {
public static final String NAME = "Variable";
private DslGenVariableCreateFacet nodeCreateFacet = new VariableCreateFacetImpl();
public DslGenVariableCreatorGem() {
createProperties();
nodeCreateFacet.setCreatorGem(this);
}
public DslGenVariableCreateFacet getNodeCreateFacet() {
return nodeCreateFacet;
}
private void createProperties() {
}
public String getCreatorName() {
return NAME;
}
}
| UTF-8 | Java | 973 | java | DslGenVariableCreatorGem.java | Java | [] | null | [] | package com.gentleware.poseidon.diagrams.gen.node;
import com.gentleware.poseidon.diagrams.gen.node.DslGenVariableCreateFacet;
import com.gentleware.poseidon.custom.diagrams.node.impl.VariableCreateFacetImpl;
import com.gentleware.poseidon.custom.diagrams.base.CustomBaseCreatorGem;
import com.gentleware.poseidon.diagrams.base.DiagramProperty;
import com.gentleware.poseidon.idraw.utility.ScreenProperties;
/*
* This code is generated. All the hand-written changes will be lost.
*/
public class DslGenVariableCreatorGem extends CustomBaseCreatorGem {
public static final String NAME = "Variable";
private DslGenVariableCreateFacet nodeCreateFacet = new VariableCreateFacetImpl();
public DslGenVariableCreatorGem() {
createProperties();
nodeCreateFacet.setCreatorGem(this);
}
public DslGenVariableCreateFacet getNodeCreateFacet() {
return nodeCreateFacet;
}
private void createProperties() {
}
public String getCreatorName() {
return NAME;
}
}
| 973 | 0.811922 | 0.811922 | 34 | 27.617647 | 29.430891 | 83 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.882353 | false | false | 13 |
6400258f334eab22b61e429bf5a99d5458ca8f04 | 20,160,576,550,763 | 09a50d2836c8f5f71e0f8606b8f625770e4dda1c | /Project1_kmangrum/app/src/main/java/com/example/project1_kmangrum/MainActivity.java | cad15148ba818b3af9318f6bf85586754f4451a0 | [] | no_license | kendallmangrum/CSCI-C323-MobileAppDevelopment | https://github.com/kendallmangrum/CSCI-C323-MobileAppDevelopment | 62d4bb2c734cb4f7f7822ca735488eb642f2cdda | 7eb42affb58883e387d5707a7519029e7b73cb4d | refs/heads/main | 2023-05-24T11:19:52.801000 | 2021-06-15T14:51:53 | 2021-06-15T14:51:53 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package com.example.project1_kmangrum;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
/** The function that converts the number of minutes input into seconds when the button is pressed **/
public void convertToSeconds(View view) {
/** Creating variables for the text fields of both the minutes and seconds by using the ID I gave them **/
EditText minutes = findViewById(R.id.minText);
TextView seconds = findViewById(R.id.secText);
/** Use a try catch to determine if the user inputs a number, if not throw an error message **/
try {
/** Take the user's input and convert it to an int if possible **/
int userNum = Integer.parseInt(minutes.getText().toString());
/** If input was a number, multiply by 60 so that the correct number of seconds is computed **/
int numSeconds = userNum * 60;
/** Replace the text in the seconds view field to be the number of seconds calculated**/
seconds.setText(numSeconds + " seconds");
/** If the user didn't input an int, they will receive an error message in the seconds textview **/
} catch (NumberFormatException e) {
seconds.setText("Error!");
}
}
} | UTF-8 | Java | 1,600 | java | MainActivity.java | Java | [] | null | [] | package com.example.project1_kmangrum;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
/** The function that converts the number of minutes input into seconds when the button is pressed **/
public void convertToSeconds(View view) {
/** Creating variables for the text fields of both the minutes and seconds by using the ID I gave them **/
EditText minutes = findViewById(R.id.minText);
TextView seconds = findViewById(R.id.secText);
/** Use a try catch to determine if the user inputs a number, if not throw an error message **/
try {
/** Take the user's input and convert it to an int if possible **/
int userNum = Integer.parseInt(minutes.getText().toString());
/** If input was a number, multiply by 60 so that the correct number of seconds is computed **/
int numSeconds = userNum * 60;
/** Replace the text in the seconds view field to be the number of seconds calculated**/
seconds.setText(numSeconds + " seconds");
/** If the user didn't input an int, they will receive an error message in the seconds textview **/
} catch (NumberFormatException e) {
seconds.setText("Error!");
}
}
} | 1,600 | 0.673125 | 0.67 | 37 | 42.270271 | 35.651958 | 114 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.459459 | false | false | 13 |
de5c662dd369adc2067260a5cbeadc67615cef1c | 13,297,218,752,041 | 0ba08b9d18b24e6cd69d321ce3879c89c91039f9 | /Deck 2/In Darth Mauls Fußstapfen.java | 3527fb04f6649fdec008e2595b3f69aad83be865 | [
"MIT"
] | permissive | ruleh/rwth-codescape | https://github.com/ruleh/rwth-codescape | 326ff8eccd450d4acd214319d6369d40b48ec9ab | be2a3deedd6ca41743ff37fda0ea8060373a7f98 | refs/heads/master | 2021-06-09T12:06:53.012000 | 2016-11-17T11:25:40 | 2016-11-17T11:25:40 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import codescape.Dogbot;
public class MyDogbot extends Dogbot {
public void run() {
for (int i = 0; i < 6; i++) {
while (!isMovePossible()) {
rest();
}
move();
}
}
}
| UTF-8 | Java | 205 | java | In Darth Mauls Fußstapfen.java | Java | [] | null | [] | import codescape.Dogbot;
public class MyDogbot extends Dogbot {
public void run() {
for (int i = 0; i < 6; i++) {
while (!isMovePossible()) {
rest();
}
move();
}
}
}
| 205 | 0.507317 | 0.497561 | 12 | 16.083334 | 12.951566 | 38 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.416667 | false | false | 13 |
7f36d7d1c1c97a41463420c9574303e5d9a920a2 | 31,464,930,479,115 | 130db18098c6a7e8f1cebe1dca47655a7205a7e6 | /src/ru/fizteh/fivt/students/Bulat_Galiev/storeable/test/TabledbTest.java | 6ae57520a925e48b5c722a2fe24238fc3cb96ed5 | [] | no_license | mbeider/fizteh-java-2014 | https://github.com/mbeider/fizteh-java-2014 | 99051d5252b80bffa5cab3193802691e96dcecfb | 0ebbaff4f1a4b774de7ee785584fba65807fb1f7 | refs/heads/master | 2021-01-21T08:05:50.628000 | 2015-03-30T09:08:44 | 2015-03-30T09:08:44 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package ru.fizteh.fivt.students.Bulat_Galiev.storeable.test;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.List;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import ru.fizteh.fivt.storage.structured.ColumnFormatException;
import ru.fizteh.fivt.storage.structured.Storeable;
import ru.fizteh.fivt.storage.structured.Table;
import ru.fizteh.fivt.storage.structured.TableProvider;
import ru.fizteh.fivt.students.Bulat_Galiev.storeable.TabledbProvider;
public class TabledbTest {
private static final int CHECK_NUMBER_ZERO = 0;
private static final int CHECK_NUMBER_ONE = 1;
private static final int CHECK_NUMBER_TWO = 2;
private static final int CHECK_NUMBER_THREE = 3;
private static List<Class<?>> typeList;
private static List<Class<?>> typeList1;
private TableProvider provider;
Table table;
Table table1;
Path testDir;
private String get(String key) {
Storeable storeableValue = table.get(key);
if (storeableValue == null) {
return null;
}
String stringValue = provider.serialize(table, storeableValue);
return stringValue.substring(2, stringValue.length() - 2);
}
private String put(String key, String value) throws ColumnFormatException,
ParseException {
Storeable storeableValue = table.put(key,
provider.deserialize(table, "[\"" + value + "\"]"));
if (storeableValue == null) {
return null;
}
String stringValue = provider.serialize(table, storeableValue);
return stringValue.substring(2, stringValue.length() - 2);
}
private String remove(String key) {
Storeable storeableValue = table.remove(key);
if (storeableValue == null) {
return null;
}
String stringValue = provider.serialize(table, storeableValue);
return stringValue.substring(2, stringValue.length() - 2);
}
private String get1(String key) {
Storeable storeableValue = table1.get(key);
if (storeableValue == null) {
return null;
}
String stringValue = provider.serialize(table1, storeableValue);
return stringValue.substring(1, stringValue.length() - 1);
}
private String put1(String key, String value, Integer intvalue)
throws ColumnFormatException, ParseException {
Storeable storeableValue = table1.put(
key,
provider.deserialize(table1, "[\"" + value + "\"" + ","
+ Integer.toString(intvalue) + "]"));
if (storeableValue == null) {
return null;
}
String stringValue = provider.serialize(table1, storeableValue);
return stringValue.substring(1, stringValue.length() - 1);
}
private String remove1(String key) {
Storeable storeableValue = table1.remove(key);
if (storeableValue == null) {
return null;
}
String stringValue = provider.serialize(table1, storeableValue);
return stringValue.substring(1, stringValue.length() - 1);
}
@Before
public void setUp() throws Exception {
String tmpDirPrefix = "Swing_";
testDir = Files.createTempDirectory(tmpDirPrefix);
provider = new TabledbProvider(testDir.toString());
typeList = new ArrayList<Class<?>>();
typeList1 = new ArrayList<Class<?>>();
typeList.add(String.class);
typeList1.add(String.class);
typeList1.add(Integer.class);
table = provider.createTable("test", typeList);
table1 = provider.createTable("test1", typeList1);
}
@After
public void tearDown() throws Exception {
Cleaner.clean(testDir.toFile());
}
@Test(expected = IllegalArgumentException.class)
public void testPutNullKey() throws Exception {
put(null, "value");
}
@Test
public void testPutNullValue() throws Exception {
put("key", null);
}
@Test(expected = IllegalArgumentException.class)
public void testGetNull() throws Exception {
get(null);
}
@Test(expected = IllegalArgumentException.class)
public void testRemoveNull() throws Exception {
remove(null);
}
@Test(expected = IllegalArgumentException.class)
public void testPutIncorrectKey() throws Exception {
put(" ", "value");
}
@Test(expected = IllegalArgumentException.class)
public void testGetIncorrectKey() throws Exception {
get(" ");
}
@Test(expected = IllegalArgumentException.class)
public void testRemoveIncorrectKey() throws Exception {
remove(" ");
}
@Test
public void testPutNormal() throws Exception {
Assert.assertNull(put("1", "2"));
}
@Test
public void testPutNormalTwoValues() throws Exception {
Assert.assertNull(put1("1", "2", CHECK_NUMBER_THREE));
}
@Test
public void testPutOverwrite() throws Exception {
put("1", "2");
Assert.assertEquals("2", put("1", "3"));
}
@Test
public void testRemoveNotExistingKey() throws Exception {
Assert.assertNull(remove("NotExistisngKey"));
}
@Test
public void testRemoveNormal() throws Exception {
put("1", "2");
Assert.assertEquals("2", remove("1"));
}
@Test
public void testRemoveNormalTwoValues() throws Exception {
put1("1", "2", CHECK_NUMBER_THREE);
Assert.assertEquals("\"2\", 3", remove1("1"));
}
@Test
public void testGetNotExistingKey() throws Exception {
Assert.assertNull(get("NotExistingKey"));
}
@Test
public void testGetNormal() throws Exception {
put("1", "2");
Assert.assertEquals("2", get("1"));
}
@Test
public void testGetNormalTwoValues() throws Exception {
put1("1", "2", CHECK_NUMBER_THREE);
Assert.assertEquals("\"2\", 3", get1("1"));
}
@Test
public void testRussian() throws Exception {
put("Ключ", "Значение");
Assert.assertEquals("Значение", get("Ключ"));
}
@Test
public void testGetOverwritten() throws Exception {
put("1", "2");
put("1", "3");
Assert.assertEquals("3", get("1"));
}
@Test
public void testGetRemoved() throws Exception {
put("1", "2");
put("3", "d");
Assert.assertEquals("d", get("3"));
remove("3");
Assert.assertNull(get("3"));
}
@Test
public void testCommit() throws Exception {
Assert.assertEquals(CHECK_NUMBER_ZERO, table.commit());
}
@Test
public void testRollback() throws Exception {
Assert.assertEquals(CHECK_NUMBER_ZERO, table.rollback());
}
@Test
public void testSize() throws Exception {
Assert.assertEquals(CHECK_NUMBER_ZERO, table.size());
}
@Test
public void testPutRollbackGet() throws Exception {
put("useless", "void");
table.rollback();
Assert.assertNull(get("useless"));
}
@Test
public void testPutCommitGet() throws Exception {
put("1", "2");
Assert.assertEquals(CHECK_NUMBER_ONE, table.commit());
Assert.assertEquals("2", get("1"));
}
@Test
public void testPutCommitRemoveRollbackGet() throws Exception {
put("key", "value");
table.commit();
table.remove("key");
table.rollback();
Assert.assertEquals("value", get("key"));
}
@Test
public void testPutRemoveSize() throws Exception {
put("1", "2");
put("2", "3");
remove("3");
Assert.assertEquals(CHECK_NUMBER_TWO, table.size());
remove("2");
Assert.assertEquals(CHECK_NUMBER_ONE, table.size());
}
@Test
public void testPutCommitRollbackSize() throws Exception {
put("1", "2");
put("2", "3");
put("2", "3");
Assert.assertEquals(CHECK_NUMBER_TWO, table.commit());
Assert.assertEquals(CHECK_NUMBER_TWO, table.size());
remove("2");
remove("1");
Assert.assertEquals(CHECK_NUMBER_ZERO, table.size());
Assert.assertEquals(CHECK_NUMBER_TWO, table.rollback());
Assert.assertEquals(CHECK_NUMBER_TWO, table.size());
}
@Test(expected = ParseException.class)
public void testPutValuesNotMatchingTypes() throws Exception {
ArrayList<Class<?>> newTypeList = new ArrayList<Class<?>>();
newTypeList.add(Integer.class);
table = provider.createTable("test2", newTypeList);
put("key", "value");
}
@Test(expected = IllegalArgumentException.class)
public void testPutWrongStyleIntoSignature() throws Exception {
Path newTablePath = testDir.resolve("test");
Path signature = newTablePath.resolve("signature.tsv");
FileOutputStream fileOutputStream = new FileOutputStream(
signature.toFile());
String wrongStyle = "Wrong Style Signature";
fileOutputStream.write(wrongStyle.getBytes());
fileOutputStream.close();
table = provider.getTable("test");
}
@Test
public void testNumberOfUncommittedChanges() throws Exception {
put("key", "value");
put("key2", "value2");
Assert.assertEquals(CHECK_NUMBER_TWO,
table.getNumberOfUncommittedChanges());
}
@Test
public void testNumberOfUncommittedChanges1() throws ParseException {
put("key", "value");
put("key", "value2");
Assert.assertEquals(CHECK_NUMBER_ONE,
table.getNumberOfUncommittedChanges());
}
@Test
public void testNumberOfUncommittedChanges2() throws ParseException {
put("key", "value");
remove("key");
Assert.assertEquals(CHECK_NUMBER_ZERO,
table.getNumberOfUncommittedChanges());
}
@Test
public void testNumberOfUncommittedChanges3() throws ParseException,
IOException {
put("key", "value");
table.commit();
remove("key");
Assert.assertEquals(CHECK_NUMBER_ONE,
table.getNumberOfUncommittedChanges());
}
@Test
public void testNumberOfUncommittedChanges4() throws ParseException,
IOException {
put("key", "value");
table.commit();
remove("key");
put("key", "value");
Assert.assertEquals(CHECK_NUMBER_ZERO,
table.getNumberOfUncommittedChanges());
}
@Test
public void testNumberOfUncommittedChanges5() throws ParseException,
IOException {
put("key", "value");
table.commit();
remove("key");
put("key", "value2");
Assert.assertEquals(CHECK_NUMBER_ONE,
table.getNumberOfUncommittedChanges());
}
@Test(expected = ColumnFormatException.class)
public void testPutOneStoreableToAnotherTable() throws IOException {
Table table2 = provider.createTable("table2", typeList);
Storeable storeableValue = provider.createFor(table);
table2.put("key", storeableValue);
}
@Test(expected = IndexOutOfBoundsException.class)
public void testGetColumnTypeAtBadIndex() {
table.getColumnType(table.getColumnsCount());
}
@Test(expected = IndexOutOfBoundsException.class)
public void testGetColumnTypeAtBadIndex1() {
table.getColumnType(-1);
}
}
| UTF-8 | Java | 11,662 | java | TabledbTest.java | Java | [
{
"context": "mit();\n remove(\"key\");\n put(\"key\", \"value2\");\n\n Assert.assertEquals(CHECK_NUMBER_ONE,",
"end": 10914,
"score": 0.7549397945404053,
"start": 10908,
"tag": "KEY",
"value": "value2"
}
] | null | [] | package ru.fizteh.fivt.students.Bulat_Galiev.storeable.test;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.List;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import ru.fizteh.fivt.storage.structured.ColumnFormatException;
import ru.fizteh.fivt.storage.structured.Storeable;
import ru.fizteh.fivt.storage.structured.Table;
import ru.fizteh.fivt.storage.structured.TableProvider;
import ru.fizteh.fivt.students.Bulat_Galiev.storeable.TabledbProvider;
public class TabledbTest {
private static final int CHECK_NUMBER_ZERO = 0;
private static final int CHECK_NUMBER_ONE = 1;
private static final int CHECK_NUMBER_TWO = 2;
private static final int CHECK_NUMBER_THREE = 3;
private static List<Class<?>> typeList;
private static List<Class<?>> typeList1;
private TableProvider provider;
Table table;
Table table1;
Path testDir;
private String get(String key) {
Storeable storeableValue = table.get(key);
if (storeableValue == null) {
return null;
}
String stringValue = provider.serialize(table, storeableValue);
return stringValue.substring(2, stringValue.length() - 2);
}
private String put(String key, String value) throws ColumnFormatException,
ParseException {
Storeable storeableValue = table.put(key,
provider.deserialize(table, "[\"" + value + "\"]"));
if (storeableValue == null) {
return null;
}
String stringValue = provider.serialize(table, storeableValue);
return stringValue.substring(2, stringValue.length() - 2);
}
private String remove(String key) {
Storeable storeableValue = table.remove(key);
if (storeableValue == null) {
return null;
}
String stringValue = provider.serialize(table, storeableValue);
return stringValue.substring(2, stringValue.length() - 2);
}
private String get1(String key) {
Storeable storeableValue = table1.get(key);
if (storeableValue == null) {
return null;
}
String stringValue = provider.serialize(table1, storeableValue);
return stringValue.substring(1, stringValue.length() - 1);
}
private String put1(String key, String value, Integer intvalue)
throws ColumnFormatException, ParseException {
Storeable storeableValue = table1.put(
key,
provider.deserialize(table1, "[\"" + value + "\"" + ","
+ Integer.toString(intvalue) + "]"));
if (storeableValue == null) {
return null;
}
String stringValue = provider.serialize(table1, storeableValue);
return stringValue.substring(1, stringValue.length() - 1);
}
private String remove1(String key) {
Storeable storeableValue = table1.remove(key);
if (storeableValue == null) {
return null;
}
String stringValue = provider.serialize(table1, storeableValue);
return stringValue.substring(1, stringValue.length() - 1);
}
@Before
public void setUp() throws Exception {
String tmpDirPrefix = "Swing_";
testDir = Files.createTempDirectory(tmpDirPrefix);
provider = new TabledbProvider(testDir.toString());
typeList = new ArrayList<Class<?>>();
typeList1 = new ArrayList<Class<?>>();
typeList.add(String.class);
typeList1.add(String.class);
typeList1.add(Integer.class);
table = provider.createTable("test", typeList);
table1 = provider.createTable("test1", typeList1);
}
@After
public void tearDown() throws Exception {
Cleaner.clean(testDir.toFile());
}
@Test(expected = IllegalArgumentException.class)
public void testPutNullKey() throws Exception {
put(null, "value");
}
@Test
public void testPutNullValue() throws Exception {
put("key", null);
}
@Test(expected = IllegalArgumentException.class)
public void testGetNull() throws Exception {
get(null);
}
@Test(expected = IllegalArgumentException.class)
public void testRemoveNull() throws Exception {
remove(null);
}
@Test(expected = IllegalArgumentException.class)
public void testPutIncorrectKey() throws Exception {
put(" ", "value");
}
@Test(expected = IllegalArgumentException.class)
public void testGetIncorrectKey() throws Exception {
get(" ");
}
@Test(expected = IllegalArgumentException.class)
public void testRemoveIncorrectKey() throws Exception {
remove(" ");
}
@Test
public void testPutNormal() throws Exception {
Assert.assertNull(put("1", "2"));
}
@Test
public void testPutNormalTwoValues() throws Exception {
Assert.assertNull(put1("1", "2", CHECK_NUMBER_THREE));
}
@Test
public void testPutOverwrite() throws Exception {
put("1", "2");
Assert.assertEquals("2", put("1", "3"));
}
@Test
public void testRemoveNotExistingKey() throws Exception {
Assert.assertNull(remove("NotExistisngKey"));
}
@Test
public void testRemoveNormal() throws Exception {
put("1", "2");
Assert.assertEquals("2", remove("1"));
}
@Test
public void testRemoveNormalTwoValues() throws Exception {
put1("1", "2", CHECK_NUMBER_THREE);
Assert.assertEquals("\"2\", 3", remove1("1"));
}
@Test
public void testGetNotExistingKey() throws Exception {
Assert.assertNull(get("NotExistingKey"));
}
@Test
public void testGetNormal() throws Exception {
put("1", "2");
Assert.assertEquals("2", get("1"));
}
@Test
public void testGetNormalTwoValues() throws Exception {
put1("1", "2", CHECK_NUMBER_THREE);
Assert.assertEquals("\"2\", 3", get1("1"));
}
@Test
public void testRussian() throws Exception {
put("Ключ", "Значение");
Assert.assertEquals("Значение", get("Ключ"));
}
@Test
public void testGetOverwritten() throws Exception {
put("1", "2");
put("1", "3");
Assert.assertEquals("3", get("1"));
}
@Test
public void testGetRemoved() throws Exception {
put("1", "2");
put("3", "d");
Assert.assertEquals("d", get("3"));
remove("3");
Assert.assertNull(get("3"));
}
@Test
public void testCommit() throws Exception {
Assert.assertEquals(CHECK_NUMBER_ZERO, table.commit());
}
@Test
public void testRollback() throws Exception {
Assert.assertEquals(CHECK_NUMBER_ZERO, table.rollback());
}
@Test
public void testSize() throws Exception {
Assert.assertEquals(CHECK_NUMBER_ZERO, table.size());
}
@Test
public void testPutRollbackGet() throws Exception {
put("useless", "void");
table.rollback();
Assert.assertNull(get("useless"));
}
@Test
public void testPutCommitGet() throws Exception {
put("1", "2");
Assert.assertEquals(CHECK_NUMBER_ONE, table.commit());
Assert.assertEquals("2", get("1"));
}
@Test
public void testPutCommitRemoveRollbackGet() throws Exception {
put("key", "value");
table.commit();
table.remove("key");
table.rollback();
Assert.assertEquals("value", get("key"));
}
@Test
public void testPutRemoveSize() throws Exception {
put("1", "2");
put("2", "3");
remove("3");
Assert.assertEquals(CHECK_NUMBER_TWO, table.size());
remove("2");
Assert.assertEquals(CHECK_NUMBER_ONE, table.size());
}
@Test
public void testPutCommitRollbackSize() throws Exception {
put("1", "2");
put("2", "3");
put("2", "3");
Assert.assertEquals(CHECK_NUMBER_TWO, table.commit());
Assert.assertEquals(CHECK_NUMBER_TWO, table.size());
remove("2");
remove("1");
Assert.assertEquals(CHECK_NUMBER_ZERO, table.size());
Assert.assertEquals(CHECK_NUMBER_TWO, table.rollback());
Assert.assertEquals(CHECK_NUMBER_TWO, table.size());
}
@Test(expected = ParseException.class)
public void testPutValuesNotMatchingTypes() throws Exception {
ArrayList<Class<?>> newTypeList = new ArrayList<Class<?>>();
newTypeList.add(Integer.class);
table = provider.createTable("test2", newTypeList);
put("key", "value");
}
@Test(expected = IllegalArgumentException.class)
public void testPutWrongStyleIntoSignature() throws Exception {
Path newTablePath = testDir.resolve("test");
Path signature = newTablePath.resolve("signature.tsv");
FileOutputStream fileOutputStream = new FileOutputStream(
signature.toFile());
String wrongStyle = "Wrong Style Signature";
fileOutputStream.write(wrongStyle.getBytes());
fileOutputStream.close();
table = provider.getTable("test");
}
@Test
public void testNumberOfUncommittedChanges() throws Exception {
put("key", "value");
put("key2", "value2");
Assert.assertEquals(CHECK_NUMBER_TWO,
table.getNumberOfUncommittedChanges());
}
@Test
public void testNumberOfUncommittedChanges1() throws ParseException {
put("key", "value");
put("key", "value2");
Assert.assertEquals(CHECK_NUMBER_ONE,
table.getNumberOfUncommittedChanges());
}
@Test
public void testNumberOfUncommittedChanges2() throws ParseException {
put("key", "value");
remove("key");
Assert.assertEquals(CHECK_NUMBER_ZERO,
table.getNumberOfUncommittedChanges());
}
@Test
public void testNumberOfUncommittedChanges3() throws ParseException,
IOException {
put("key", "value");
table.commit();
remove("key");
Assert.assertEquals(CHECK_NUMBER_ONE,
table.getNumberOfUncommittedChanges());
}
@Test
public void testNumberOfUncommittedChanges4() throws ParseException,
IOException {
put("key", "value");
table.commit();
remove("key");
put("key", "value");
Assert.assertEquals(CHECK_NUMBER_ZERO,
table.getNumberOfUncommittedChanges());
}
@Test
public void testNumberOfUncommittedChanges5() throws ParseException,
IOException {
put("key", "value");
table.commit();
remove("key");
put("key", "value2");
Assert.assertEquals(CHECK_NUMBER_ONE,
table.getNumberOfUncommittedChanges());
}
@Test(expected = ColumnFormatException.class)
public void testPutOneStoreableToAnotherTable() throws IOException {
Table table2 = provider.createTable("table2", typeList);
Storeable storeableValue = provider.createFor(table);
table2.put("key", storeableValue);
}
@Test(expected = IndexOutOfBoundsException.class)
public void testGetColumnTypeAtBadIndex() {
table.getColumnType(table.getColumnsCount());
}
@Test(expected = IndexOutOfBoundsException.class)
public void testGetColumnTypeAtBadIndex1() {
table.getColumnType(-1);
}
}
| 11,662 | 0.621155 | 0.611617 | 383 | 29.386423 | 23.441769 | 78 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.67624 | false | false | 13 |
ab496f1b46223eebf4045a901c31a4de03585613 | 18,391,049,984,331 | 6a26218338e60a3aca45b33a79bd5059a8b05274 | /src/spaceinvaders/graphics/GameFrame.java | f75a2caeb9616a620109501a6c94912d52e3c056 | [] | no_license | tectronics/poo-project-spaceinvaders | https://github.com/tectronics/poo-project-spaceinvaders | 2926c2d9ce8df1e91e816bf868de5bbf90129c9a | 08e358c8705b8cd229090335325d4bbffa4b8f71 | refs/heads/master | 2018-01-11T14:45:46.284000 | 2010-11-22T04:54:34 | 2010-11-22T04:54:34 | 45,488,930 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* GameFrame.java
*
* Created on 30/08/2010, 14:25:19
*/
package spaceinvaders.graphics;
import java.awt.Color;
import java.awt.Container;
import java.awt.Toolkit;
import spaceinvaders.engine.controls.KeyControl;
import spaceinvaders.engine.controls.MouseControl;
import spaceinvaders.util.ElementsFactory;
import spaceinvaders.util.ElementsFactory.ElementType;
import spaceinvaders.engine.elements.player.Tank;
/**
*
* @author Yole
*/
public class GameFrame extends javax.swing.JFrame {
Environment environment;
/** Creates new form GameFrame */
public GameFrame() {
initComponents();
this.setDefaultCloseOperation(GameFrame.EXIT_ON_CLOSE);
this.setBounds(0,0,(int)(0.70*Toolkit.getDefaultToolkit().getScreenSize().getWidth()),
(int)(0.95*Toolkit.getDefaultToolkit().getScreenSize().getHeight()));
environment = new Environment();
MouseControl mouseControl = new MouseControl(environment.getTank());
this.addMouseListener(mouseControl);
this.addMouseMotionListener(mouseControl);
KeyControl keyControl = new KeyControl(environment);
this.addKeyListener(keyControl);
//System.out.println( container.getBounds().toString() + this.getBounds().toString() );
this.getContentPane().add( environment );
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 400, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 300, Short.MAX_VALUE)
);
pack();
}// </editor-fold>//GEN-END:initComponents
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new GameFrame().setVisible(true);
}
});
}
// Variables declaration - do not modify//GEN-BEGIN:variables
// End of variables declaration//GEN-END:variables
}
| UTF-8 | Java | 2,836 | java | GameFrame.java | Java | [
{
"context": "rs.engine.elements.player.Tank;\n\n/**\n *\n * @author Yole\n */\npublic class GameFrame extends javax.swing.JF",
"end": 544,
"score": 0.9994056224822998,
"start": 540,
"tag": "NAME",
"value": "Yole"
}
] | null | [] | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* GameFrame.java
*
* Created on 30/08/2010, 14:25:19
*/
package spaceinvaders.graphics;
import java.awt.Color;
import java.awt.Container;
import java.awt.Toolkit;
import spaceinvaders.engine.controls.KeyControl;
import spaceinvaders.engine.controls.MouseControl;
import spaceinvaders.util.ElementsFactory;
import spaceinvaders.util.ElementsFactory.ElementType;
import spaceinvaders.engine.elements.player.Tank;
/**
*
* @author Yole
*/
public class GameFrame extends javax.swing.JFrame {
Environment environment;
/** Creates new form GameFrame */
public GameFrame() {
initComponents();
this.setDefaultCloseOperation(GameFrame.EXIT_ON_CLOSE);
this.setBounds(0,0,(int)(0.70*Toolkit.getDefaultToolkit().getScreenSize().getWidth()),
(int)(0.95*Toolkit.getDefaultToolkit().getScreenSize().getHeight()));
environment = new Environment();
MouseControl mouseControl = new MouseControl(environment.getTank());
this.addMouseListener(mouseControl);
this.addMouseMotionListener(mouseControl);
KeyControl keyControl = new KeyControl(environment);
this.addKeyListener(keyControl);
//System.out.println( container.getBounds().toString() + this.getBounds().toString() );
this.getContentPane().add( environment );
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 400, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 300, Short.MAX_VALUE)
);
pack();
}// </editor-fold>//GEN-END:initComponents
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new GameFrame().setVisible(true);
}
});
}
// Variables declaration - do not modify//GEN-BEGIN:variables
// End of variables declaration//GEN-END:variables
}
| 2,836 | 0.676305 | 0.665726 | 87 | 31.597702 | 27.390099 | 95 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.448276 | false | false | 13 |
714814b0d15b7bcd0161a6317bfe3416cda008f7 | 11,055,245,827,259 | 731b4950e08758dc5ddfc78579bb9b794837e94c | /src/az/com/course/utility/Query.java | aa2a347f5f2c9c5112bc92061def7cc27fc878a3 | [] | no_license | IsmayilMohsumov/JavaFXOrientITMCourse | https://github.com/IsmayilMohsumov/JavaFXOrientITMCourse | e2462bb56bcf90149a8b2ceef5ff9893c2cc426c | b094ee072e42fcaed487cb28f5a11a32a9fb2245 | refs/heads/main | 2023-04-01T01:50:17.040000 | 2021-04-14T17:15:16 | 2021-04-14T17:15:16 | 357,966,129 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package az.com.course.utility;
public enum Query {
//elave edende
PERSON_ADD("insert into users(id,name,surname,pin,email,password,person_type) values(?,?,?,?,?,?,?)"),
//sequnce miz herdefe yeni adam elave edende id ni ozu artirir
USER_ID("select user_seq.nextval from dual"),
//table nin icine deyer ceken
USER_LIST_TO_TABLE("select U.ID, U.NAME,U.SURNAME,U.EMAIL,U.PIN,D.DIC_VAL from users u join dictionary d on U.PERSON_TYPE=D.ID order by id"),
//comboBoxun icine deyerleri getiren
COMBO_DATAS("select* from dictionary where dic_key=?"),
//update ucun
UPDATE_USER("update users set name =? , surname = ? , pin=?,email=?,person_type=? where id=?"),
//KeyReleased ucun LIKE vermek lazimdir ki gedib axtarsin like in icini ise dao dadolduracagiq
USER_BY_PIN_TABLE("select U.ID, U.NAME,U.SURNAME,U.EMAIL,U.PIN,D.DIC_VAL from users u join dictionary d on U.PERSON_TYPE=D.ID ");
//
// USER1_BY_PIN_LIST("select * from users where pin like'?%'");
private String query ;
Query(String query) {
this.query=query;
}
public String getQuery() {
return query;
}
}
| UTF-8 | Java | 1,153 | java | Query.java | Java | [] | null | [] | package az.com.course.utility;
public enum Query {
//elave edende
PERSON_ADD("insert into users(id,name,surname,pin,email,password,person_type) values(?,?,?,?,?,?,?)"),
//sequnce miz herdefe yeni adam elave edende id ni ozu artirir
USER_ID("select user_seq.nextval from dual"),
//table nin icine deyer ceken
USER_LIST_TO_TABLE("select U.ID, U.NAME,U.SURNAME,U.EMAIL,U.PIN,D.DIC_VAL from users u join dictionary d on U.PERSON_TYPE=D.ID order by id"),
//comboBoxun icine deyerleri getiren
COMBO_DATAS("select* from dictionary where dic_key=?"),
//update ucun
UPDATE_USER("update users set name =? , surname = ? , pin=?,email=?,person_type=? where id=?"),
//KeyReleased ucun LIKE vermek lazimdir ki gedib axtarsin like in icini ise dao dadolduracagiq
USER_BY_PIN_TABLE("select U.ID, U.NAME,U.SURNAME,U.EMAIL,U.PIN,D.DIC_VAL from users u join dictionary d on U.PERSON_TYPE=D.ID ");
//
// USER1_BY_PIN_LIST("select * from users where pin like'?%'");
private String query ;
Query(String query) {
this.query=query;
}
public String getQuery() {
return query;
}
}
| 1,153 | 0.664354 | 0.663487 | 27 | 41.703705 | 41.288342 | 147 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1.37037 | false | false | 13 |
721998234e657dfa76efb377f1fa14b3dd391ffa | 22,454,089,034,655 | b28e2ceadfccbb1d4da46409563cf578652bcd28 | /as_api/src/main/java/com/example/as/api/MySpringBootServletInitializer.java | 9e1145b62837d2e1445e2cdb0a9d2a5ca1f54dca | [] | no_license | Fimics/FimicsArchAndroid | https://github.com/Fimics/FimicsArchAndroid | 7a9ccecb16718fcda6de3eb386630ec1fa500a11 | 4dd6395bcb665fb97bbbb77f0e22631fc30b9192 | refs/heads/master | 2023-06-16T01:34:23.303000 | 2021-07-15T11:05:07 | 2021-07-15T11:05:07 | 343,059,987 | 4 | 2 | null | null | null | null | null | null | null | null | null | null | null | null | null | package com.example.as.api;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
public class MySpringBootServletInitializer extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return builder.sources(AsApiApplication.class);
}
}
| UTF-8 | Java | 424 | java | MySpringBootServletInitializer.java | Java | [] | null | [] | package com.example.as.api;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
public class MySpringBootServletInitializer extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return builder.sources(AsApiApplication.class);
}
}
| 424 | 0.830189 | 0.830189 | 11 | 37.545456 | 34.389118 | 84 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.363636 | false | false | 13 |
8c33b49cf9115e61e7e694d1c957919de61387bc | 23,845,658,430,679 | 81c4f46e1082b22436d4ca9e1afad0d1adae5b2b | /app/src/main/java/ru/echodc/singlegroupe/mvp/view/OpenedPostView.java | b67a9ab01dbf265334f72bbb8a010c40a3c2dc1d | [] | no_license | ipvoodoo/SIngleGroupe | https://github.com/ipvoodoo/SIngleGroupe | 02eeef4bde54422ec7abcd79ac4b2a8be30acca7 | 21be8f3428c337681a1fca4be48d54772474ddd6 | refs/heads/master | 2021-08-22T04:01:37.599000 | 2017-11-29T07:13:16 | 2017-11-29T07:13:16 | 109,259,796 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package ru.echodc.singlegroupe.mvp.view;
import ru.echodc.singlegroupe.model.view.NewsItemFooterViewModel;
public interface OpenedPostView extends BaseFeedView {
void setFooter(NewsItemFooterViewModel viewModel);
}
| UTF-8 | Java | 221 | java | OpenedPostView.java | Java | [] | null | [] | package ru.echodc.singlegroupe.mvp.view;
import ru.echodc.singlegroupe.model.view.NewsItemFooterViewModel;
public interface OpenedPostView extends BaseFeedView {
void setFooter(NewsItemFooterViewModel viewModel);
}
| 221 | 0.837104 | 0.837104 | 9 | 23.555555 | 26.775242 | 65 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.333333 | false | false | 13 |
b5b7c1e59236f07d8fdfb63290b176681829402b | 23,845,658,431,437 | bcfb804638f006480c5d1fde0875f973c0bf8e2c | /src/main/java/pl/com/app/aspect/BasketData.java | 6b20153a4bca8200417f59b2ff52de421ce7f1d2 | [] | no_license | kubsonen/shop-online | https://github.com/kubsonen/shop-online | d9ce5ee161b3eb294a4fe349d7aa1b3a683fcbb7 | c97b2fac5089e161882c0963848f58e09ef1abce | refs/heads/master | 2020-04-27T09:01:59.411000 | 2019-03-29T17:48:08 | 2019-03-29T17:48:08 | 174,197,384 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package pl.com.app.aspect;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.ui.Model;
import pl.com.app.component.ShopBasket;
@Aspect
@Component
public class BasketData {
private static final Logger logger = LoggerFactory.getLogger(BasketData.class);
private static final String BASKET_SHOP_ATTRIBUTE = "basketShopAttribute";
@Autowired
private ShopBasket shopBasket;
@Before("execution(* pl.com.app.controller.*.*(..))")
public void before(JoinPoint joinPoint){
// logger.info("Getting shop basket.");
try {
//Get application user
Object[] controllerArgs = joinPoint.getArgs();
for (Object arg : controllerArgs) {
if (arg instanceof Model) {
shopBasket.getOrderSum();
Model model = (Model) arg;
model.addAttribute(BASKET_SHOP_ATTRIBUTE, shopBasket);
}
}
} catch (ClassCastException e){
// logger.info("Not found user in context.");
} catch (Throwable t){
logger.info("Problem with adding params to model.");
t.printStackTrace();
}
}
}
| UTF-8 | Java | 1,456 | java | BasketData.java | Java | [] | null | [] | package pl.com.app.aspect;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.ui.Model;
import pl.com.app.component.ShopBasket;
@Aspect
@Component
public class BasketData {
private static final Logger logger = LoggerFactory.getLogger(BasketData.class);
private static final String BASKET_SHOP_ATTRIBUTE = "basketShopAttribute";
@Autowired
private ShopBasket shopBasket;
@Before("execution(* pl.com.app.controller.*.*(..))")
public void before(JoinPoint joinPoint){
// logger.info("Getting shop basket.");
try {
//Get application user
Object[] controllerArgs = joinPoint.getArgs();
for (Object arg : controllerArgs) {
if (arg instanceof Model) {
shopBasket.getOrderSum();
Model model = (Model) arg;
model.addAttribute(BASKET_SHOP_ATTRIBUTE, shopBasket);
}
}
} catch (ClassCastException e){
// logger.info("Not found user in context.");
} catch (Throwable t){
logger.info("Problem with adding params to model.");
t.printStackTrace();
}
}
}
| 1,456 | 0.645604 | 0.644231 | 48 | 29.333334 | 23.52599 | 83 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.458333 | false | false | 13 |
b2e2a308738dfb33be70a21d6bfecaf35dd093a1 | 15,607,911,182,908 | a26851c46e8467cc518dd5ee37dfb4c92e0d50f9 | /OOPS/Stock Report/src/com/bridgelabz/stock/main/StockMain.java | 00eac9c0b872f007e607db17df6b0ee44d6e888c | [] | no_license | Aastha30/Programming | https://github.com/Aastha30/Programming | 78546fa4ba69b08b16b186c7caaf069317602a6b | f5efae915c25b692db56527dfc6f57960e856d84 | refs/heads/master | 2020-06-09T15:22:17.970000 | 2019-08-08T12:49:43 | 2019-08-08T12:49:43 | 193,459,041 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package com.bridgelabz.stock.main;
import com.bridgelabz.stockserviceimpl.StockServiceImpl;
public class StockMain {
public static void main(String[] args) {
StockServiceImpl impl=new StockServiceImpl();
impl.readFile();
}
}
| UTF-8 | Java | 239 | java | StockMain.java | Java | [] | null | [] | package com.bridgelabz.stock.main;
import com.bridgelabz.stockserviceimpl.StockServiceImpl;
public class StockMain {
public static void main(String[] args) {
StockServiceImpl impl=new StockServiceImpl();
impl.readFile();
}
}
| 239 | 0.757322 | 0.757322 | 14 | 16.071428 | 19.775396 | 56 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.857143 | false | false | 13 |
1b6cb20633bc421cba401e9ee3307e159152d1c7 | 18,605,798,350,754 | ebe1dced7ae3560e75fef1594e1186f61c6729c1 | /src/main/java/com/bteplus/draftbus/repository/ItemInfoRepository.java | 8f5641023c8fd655c73e8d8af3b97e43476a1e07 | [] | no_license | nessonma/draftbus | https://github.com/nessonma/draftbus | c051025758ddb6d2fcbaba92033daef98dfed155 | c3e9b28292a205940192b17e9630eccf74370d71 | refs/heads/master | 2022-06-21T02:43:49.198000 | 2020-11-27T02:20:46 | 2020-11-27T02:20:46 | 246,217,679 | 0 | 0 | null | false | 2022-06-17T02:56:01 | 2020-03-10T05:41:42 | 2020-11-27T02:21:21 | 2022-06-17T02:56:00 | 1,376 | 0 | 0 | 1 | FreeMarker | false | false | package com.bteplus.draftbus.repository;
import com.bteplus.draftbus.entity.ItemInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import java.io.Serializable;
import java.util.List;
@Repository
public interface ItemInfoRepository extends JpaRepository<ItemInfo,Integer>,Serializable {
@Query(value = "select * from item_info where is_delete=0 and item_type=?1 order by item_name ",nativeQuery = true)
List<ItemInfo> getItemsByItemType(Integer itemType);
@Query(value = "select * from item_info where is_delete=0 and item_unit=?1 and item_type=?2 order by item_name ",nativeQuery = true)
List<ItemInfo> getItemsByUnitAndItemType(String unit,Integer itemType);
@Query(value = "select * from item_info where is_delete=0 and parent_id=?1 and item_type=?2 order by item_name ",nativeQuery = true)
List<ItemInfo> getItemsByParentIdAndItemType(Integer parentId,Integer itemType);
@Query(value = "select item.* from item_info item where item_id in (select country_id from fe_data fe group by country_id)",nativeQuery = true)
List<ItemInfo> getCountryList();
@Query(value = "select * from item_info item where item_id in (select city_id from fe_data fe where country_id=?1 group by city_id )",nativeQuery = true)
List<ItemInfo> getCityList(Integer countryId);
@Query(value = "select * from item_info item where item_id in (select vehicle_type from fe_data fe where country_id=?1 and (?2 is null or city_id=?2) group by vehicle_type )",nativeQuery = true)
List<ItemInfo> getVehicleTypeList(Integer countryId,Integer cityId);
@Query(value = "select * from item_info item where item_id in (select fuel_type from fe_data fe where country_id=?1 and (?2 is null or city_id=?2) and (?3 is null or vehicle_type=?3) group by fuel_type )",nativeQuery = true)
List<ItemInfo> getFuelTypeList(Integer countryId,Integer cityId,Integer vehicleType);
@Query(value = "select * from item_info item where item_id in (select op_speed from fe_data fe where country_id=?1 and (?2 is null or city_id=?2) and (?3 is null or vehicle_type=?3) and fuel_type=?4 group by op_speed )",nativeQuery = true)
List<ItemInfo> getSpeedList(Integer countryId,Integer cityId,Integer vehicleType,Integer fuelType);
@Query(value = "select * from item_info item where item_id in (select fe_load from fe_data fe where country_id=?1 and (?2 is null or city_id=?2) and (?3 is null or vehicle_type=?3) and fuel_type=?4 and (?5 is null or op_speed=?5) group by fe_load )",nativeQuery = true)
List<ItemInfo> getLoadList(Integer countryId,Integer cityId,Integer vehicleType,Integer fuelType,Integer opSpeed);
@Query(value = "select * from item_info item where item_id in (select ac from fe_data fe where country_id=?1 and (?2 is null or city_id=?2) and (?3 is null or vehicle_type=?3) and fuel_type=?4 and (?5 is null or op_speed=?5) and (?6 is null or fe_load=?6) group by ac )",nativeQuery = true)
List<ItemInfo> getAcList(Integer countryId,Integer cityId,Integer vehicleType,Integer fuelType,Integer opSpeed,Integer load);
}
| UTF-8 | Java | 3,191 | java | ItemInfoRepository.java | Java | [] | null | [] | package com.bteplus.draftbus.repository;
import com.bteplus.draftbus.entity.ItemInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import java.io.Serializable;
import java.util.List;
@Repository
public interface ItemInfoRepository extends JpaRepository<ItemInfo,Integer>,Serializable {
@Query(value = "select * from item_info where is_delete=0 and item_type=?1 order by item_name ",nativeQuery = true)
List<ItemInfo> getItemsByItemType(Integer itemType);
@Query(value = "select * from item_info where is_delete=0 and item_unit=?1 and item_type=?2 order by item_name ",nativeQuery = true)
List<ItemInfo> getItemsByUnitAndItemType(String unit,Integer itemType);
@Query(value = "select * from item_info where is_delete=0 and parent_id=?1 and item_type=?2 order by item_name ",nativeQuery = true)
List<ItemInfo> getItemsByParentIdAndItemType(Integer parentId,Integer itemType);
@Query(value = "select item.* from item_info item where item_id in (select country_id from fe_data fe group by country_id)",nativeQuery = true)
List<ItemInfo> getCountryList();
@Query(value = "select * from item_info item where item_id in (select city_id from fe_data fe where country_id=?1 group by city_id )",nativeQuery = true)
List<ItemInfo> getCityList(Integer countryId);
@Query(value = "select * from item_info item where item_id in (select vehicle_type from fe_data fe where country_id=?1 and (?2 is null or city_id=?2) group by vehicle_type )",nativeQuery = true)
List<ItemInfo> getVehicleTypeList(Integer countryId,Integer cityId);
@Query(value = "select * from item_info item where item_id in (select fuel_type from fe_data fe where country_id=?1 and (?2 is null or city_id=?2) and (?3 is null or vehicle_type=?3) group by fuel_type )",nativeQuery = true)
List<ItemInfo> getFuelTypeList(Integer countryId,Integer cityId,Integer vehicleType);
@Query(value = "select * from item_info item where item_id in (select op_speed from fe_data fe where country_id=?1 and (?2 is null or city_id=?2) and (?3 is null or vehicle_type=?3) and fuel_type=?4 group by op_speed )",nativeQuery = true)
List<ItemInfo> getSpeedList(Integer countryId,Integer cityId,Integer vehicleType,Integer fuelType);
@Query(value = "select * from item_info item where item_id in (select fe_load from fe_data fe where country_id=?1 and (?2 is null or city_id=?2) and (?3 is null or vehicle_type=?3) and fuel_type=?4 and (?5 is null or op_speed=?5) group by fe_load )",nativeQuery = true)
List<ItemInfo> getLoadList(Integer countryId,Integer cityId,Integer vehicleType,Integer fuelType,Integer opSpeed);
@Query(value = "select * from item_info item where item_id in (select ac from fe_data fe where country_id=?1 and (?2 is null or city_id=?2) and (?3 is null or vehicle_type=?3) and fuel_type=?4 and (?5 is null or op_speed=?5) and (?6 is null or fe_load=?6) group by ac )",nativeQuery = true)
List<ItemInfo> getAcList(Integer countryId,Integer cityId,Integer vehicleType,Integer fuelType,Integer opSpeed,Integer load);
}
| 3,191 | 0.741774 | 0.728925 | 46 | 68.369568 | 79.559479 | 296 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1 | false | false | 13 |
b32aaea9b3ae450da5a54af0eea020ba2a15711b | 3,152,506,059,650 | a754793300cefa36704932b18f420a117d216573 | /afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDslParser.java | 4dc6f5c88461166ce98abe5dcf401066e54b28d2 | [] | no_license | hishidama/asakusafw-dsl-editor | https://github.com/hishidama/asakusafw-dsl-editor | f7a98849c0786014cbf1473a200938cd3ac2b3bb | 45a2586644966037f6cd9f9e55bc635d4e31f93a | refs/heads/master | 2021-01-01T20:23:12.994000 | 2013-09-14T22:53:00 | 2013-09-14T22:53:00 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package jp.hishidama.xtext.afw.flow_dsl.parser.antlr.internal;
import org.eclipse.xtext.*;
import org.eclipse.xtext.parser.*;
import org.eclipse.xtext.parser.impl.*;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken;
import jp.hishidama.xtext.afw.flow_dsl.services.FlowDslGrammarAccess;
import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;
@SuppressWarnings("all")
public class InternalFlowDslParser extends AbstractInternalAntlrParser {
public static final String[] tokenNames = new String[] {
"<invalid>", "<EOR>", "<DOWN>", "<UP>", "RULE_STRING", "RULE_ID", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "'package'", "';'", "'import'", "'.'", "'*'", "'operator'", "'as'", "'jobflow'", "'('", "')'", "'{'", "'}'", "'in'", "','", "'importer'", "'out'", "'exporter'", "'='", "'+='"
};
public static final int RULE_ID=5;
public static final int T__27=27;
public static final int T__26=26;
public static final int T__25=25;
public static final int T__24=24;
public static final int T__23=23;
public static final int T__22=22;
public static final int T__21=21;
public static final int T__20=20;
public static final int RULE_SL_COMMENT=7;
public static final int EOF=-1;
public static final int T__9=9;
public static final int RULE_ML_COMMENT=6;
public static final int T__19=19;
public static final int RULE_STRING=4;
public static final int T__16=16;
public static final int T__15=15;
public static final int T__18=18;
public static final int T__17=17;
public static final int T__12=12;
public static final int T__11=11;
public static final int T__14=14;
public static final int T__13=13;
public static final int T__10=10;
public static final int RULE_WS=8;
// delegates
// delegators
public InternalFlowDslParser(TokenStream input) {
this(input, new RecognizerSharedState());
}
public InternalFlowDslParser(TokenStream input, RecognizerSharedState state) {
super(input, state);
}
public String[] getTokenNames() { return InternalFlowDslParser.tokenNames; }
public String getGrammarFileName() { return "../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g"; }
private FlowDslGrammarAccess grammarAccess;
public InternalFlowDslParser(TokenStream input, FlowDslGrammarAccess grammarAccess) {
this(input);
this.grammarAccess = grammarAccess;
registerRules(grammarAccess.getGrammar());
}
@Override
protected String getFirstRuleName() {
return "Script";
}
@Override
protected FlowDslGrammarAccess getGrammarAccess() {
return grammarAccess;
}
// $ANTLR start "entryRuleScript"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:67:1: entryRuleScript returns [EObject current=null] : iv_ruleScript= ruleScript EOF ;
public final EObject entryRuleScript() throws RecognitionException {
EObject current = null;
EObject iv_ruleScript = null;
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:68:2: (iv_ruleScript= ruleScript EOF )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:69:2: iv_ruleScript= ruleScript EOF
{
newCompositeNode(grammarAccess.getScriptRule());
pushFollow(FOLLOW_ruleScript_in_entryRuleScript75);
iv_ruleScript=ruleScript();
state._fsp--;
current =iv_ruleScript;
match(input,EOF,FOLLOW_EOF_in_entryRuleScript85);
}
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "entryRuleScript"
// $ANTLR start "ruleScript"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:76:1: ruleScript returns [EObject current=null] : ( ( (lv_package_0_0= rulePackageDeclare ) ) ( (lv_imports_1_0= ruleImportDeclare ) )* ( (lv_operators_2_0= ruleOperatorDeclare ) )* ( (lv_list_3_0= ruleFlowDsl ) )* ) ;
public final EObject ruleScript() throws RecognitionException {
EObject current = null;
EObject lv_package_0_0 = null;
EObject lv_imports_1_0 = null;
EObject lv_operators_2_0 = null;
EObject lv_list_3_0 = null;
enterRule();
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:79:28: ( ( ( (lv_package_0_0= rulePackageDeclare ) ) ( (lv_imports_1_0= ruleImportDeclare ) )* ( (lv_operators_2_0= ruleOperatorDeclare ) )* ( (lv_list_3_0= ruleFlowDsl ) )* ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:80:1: ( ( (lv_package_0_0= rulePackageDeclare ) ) ( (lv_imports_1_0= ruleImportDeclare ) )* ( (lv_operators_2_0= ruleOperatorDeclare ) )* ( (lv_list_3_0= ruleFlowDsl ) )* )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:80:1: ( ( (lv_package_0_0= rulePackageDeclare ) ) ( (lv_imports_1_0= ruleImportDeclare ) )* ( (lv_operators_2_0= ruleOperatorDeclare ) )* ( (lv_list_3_0= ruleFlowDsl ) )* )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:80:2: ( (lv_package_0_0= rulePackageDeclare ) ) ( (lv_imports_1_0= ruleImportDeclare ) )* ( (lv_operators_2_0= ruleOperatorDeclare ) )* ( (lv_list_3_0= ruleFlowDsl ) )*
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:80:2: ( (lv_package_0_0= rulePackageDeclare ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:81:1: (lv_package_0_0= rulePackageDeclare )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:81:1: (lv_package_0_0= rulePackageDeclare )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:82:3: lv_package_0_0= rulePackageDeclare
{
newCompositeNode(grammarAccess.getScriptAccess().getPackagePackageDeclareParserRuleCall_0_0());
pushFollow(FOLLOW_rulePackageDeclare_in_ruleScript131);
lv_package_0_0=rulePackageDeclare();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getScriptRule());
}
set(
current,
"package",
lv_package_0_0,
"PackageDeclare");
afterParserOrEnumRuleCall();
}
}
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:98:2: ( (lv_imports_1_0= ruleImportDeclare ) )*
loop1:
do {
int alt1=2;
int LA1_0 = input.LA(1);
if ( (LA1_0==11) ) {
alt1=1;
}
switch (alt1) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:99:1: (lv_imports_1_0= ruleImportDeclare )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:99:1: (lv_imports_1_0= ruleImportDeclare )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:100:3: lv_imports_1_0= ruleImportDeclare
{
newCompositeNode(grammarAccess.getScriptAccess().getImportsImportDeclareParserRuleCall_1_0());
pushFollow(FOLLOW_ruleImportDeclare_in_ruleScript152);
lv_imports_1_0=ruleImportDeclare();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getScriptRule());
}
add(
current,
"imports",
lv_imports_1_0,
"ImportDeclare");
afterParserOrEnumRuleCall();
}
}
break;
default :
break loop1;
}
} while (true);
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:116:3: ( (lv_operators_2_0= ruleOperatorDeclare ) )*
loop2:
do {
int alt2=2;
int LA2_0 = input.LA(1);
if ( (LA2_0==14) ) {
alt2=1;
}
switch (alt2) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:117:1: (lv_operators_2_0= ruleOperatorDeclare )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:117:1: (lv_operators_2_0= ruleOperatorDeclare )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:118:3: lv_operators_2_0= ruleOperatorDeclare
{
newCompositeNode(grammarAccess.getScriptAccess().getOperatorsOperatorDeclareParserRuleCall_2_0());
pushFollow(FOLLOW_ruleOperatorDeclare_in_ruleScript174);
lv_operators_2_0=ruleOperatorDeclare();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getScriptRule());
}
add(
current,
"operators",
lv_operators_2_0,
"OperatorDeclare");
afterParserOrEnumRuleCall();
}
}
break;
default :
break loop2;
}
} while (true);
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:134:3: ( (lv_list_3_0= ruleFlowDsl ) )*
loop3:
do {
int alt3=2;
int LA3_0 = input.LA(1);
if ( (LA3_0==RULE_STRING||LA3_0==16) ) {
alt3=1;
}
switch (alt3) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:135:1: (lv_list_3_0= ruleFlowDsl )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:135:1: (lv_list_3_0= ruleFlowDsl )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:136:3: lv_list_3_0= ruleFlowDsl
{
newCompositeNode(grammarAccess.getScriptAccess().getListFlowDslParserRuleCall_3_0());
pushFollow(FOLLOW_ruleFlowDsl_in_ruleScript196);
lv_list_3_0=ruleFlowDsl();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getScriptRule());
}
add(
current,
"list",
lv_list_3_0,
"FlowDsl");
afterParserOrEnumRuleCall();
}
}
break;
default :
break loop3;
}
} while (true);
}
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "ruleScript"
// $ANTLR start "entryRulePackageDeclare"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:160:1: entryRulePackageDeclare returns [EObject current=null] : iv_rulePackageDeclare= rulePackageDeclare EOF ;
public final EObject entryRulePackageDeclare() throws RecognitionException {
EObject current = null;
EObject iv_rulePackageDeclare = null;
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:161:2: (iv_rulePackageDeclare= rulePackageDeclare EOF )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:162:2: iv_rulePackageDeclare= rulePackageDeclare EOF
{
newCompositeNode(grammarAccess.getPackageDeclareRule());
pushFollow(FOLLOW_rulePackageDeclare_in_entryRulePackageDeclare233);
iv_rulePackageDeclare=rulePackageDeclare();
state._fsp--;
current =iv_rulePackageDeclare;
match(input,EOF,FOLLOW_EOF_in_entryRulePackageDeclare243);
}
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "entryRulePackageDeclare"
// $ANTLR start "rulePackageDeclare"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:169:1: rulePackageDeclare returns [EObject current=null] : (otherlv_0= 'package' ( (lv_name_1_0= ruleFQN ) ) (otherlv_2= ';' )? ) ;
public final EObject rulePackageDeclare() throws RecognitionException {
EObject current = null;
Token otherlv_0=null;
Token otherlv_2=null;
AntlrDatatypeRuleToken lv_name_1_0 = null;
enterRule();
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:172:28: ( (otherlv_0= 'package' ( (lv_name_1_0= ruleFQN ) ) (otherlv_2= ';' )? ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:173:1: (otherlv_0= 'package' ( (lv_name_1_0= ruleFQN ) ) (otherlv_2= ';' )? )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:173:1: (otherlv_0= 'package' ( (lv_name_1_0= ruleFQN ) ) (otherlv_2= ';' )? )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:173:3: otherlv_0= 'package' ( (lv_name_1_0= ruleFQN ) ) (otherlv_2= ';' )?
{
otherlv_0=(Token)match(input,9,FOLLOW_9_in_rulePackageDeclare280);
newLeafNode(otherlv_0, grammarAccess.getPackageDeclareAccess().getPackageKeyword_0());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:177:1: ( (lv_name_1_0= ruleFQN ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:178:1: (lv_name_1_0= ruleFQN )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:178:1: (lv_name_1_0= ruleFQN )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:179:3: lv_name_1_0= ruleFQN
{
newCompositeNode(grammarAccess.getPackageDeclareAccess().getNameFQNParserRuleCall_1_0());
pushFollow(FOLLOW_ruleFQN_in_rulePackageDeclare301);
lv_name_1_0=ruleFQN();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getPackageDeclareRule());
}
set(
current,
"name",
lv_name_1_0,
"FQN");
afterParserOrEnumRuleCall();
}
}
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:195:2: (otherlv_2= ';' )?
int alt4=2;
int LA4_0 = input.LA(1);
if ( (LA4_0==10) ) {
alt4=1;
}
switch (alt4) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:195:4: otherlv_2= ';'
{
otherlv_2=(Token)match(input,10,FOLLOW_10_in_rulePackageDeclare314);
newLeafNode(otherlv_2, grammarAccess.getPackageDeclareAccess().getSemicolonKeyword_2());
}
break;
}
}
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "rulePackageDeclare"
// $ANTLR start "entryRuleImportDeclare"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:207:1: entryRuleImportDeclare returns [EObject current=null] : iv_ruleImportDeclare= ruleImportDeclare EOF ;
public final EObject entryRuleImportDeclare() throws RecognitionException {
EObject current = null;
EObject iv_ruleImportDeclare = null;
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:208:2: (iv_ruleImportDeclare= ruleImportDeclare EOF )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:209:2: iv_ruleImportDeclare= ruleImportDeclare EOF
{
newCompositeNode(grammarAccess.getImportDeclareRule());
pushFollow(FOLLOW_ruleImportDeclare_in_entryRuleImportDeclare352);
iv_ruleImportDeclare=ruleImportDeclare();
state._fsp--;
current =iv_ruleImportDeclare;
match(input,EOF,FOLLOW_EOF_in_entryRuleImportDeclare362);
}
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "entryRuleImportDeclare"
// $ANTLR start "ruleImportDeclare"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:216:1: ruleImportDeclare returns [EObject current=null] : (otherlv_0= 'import' ( (lv_name_1_0= ruleFQN ) ) (otherlv_2= '.' ( (lv_wildcard_3_0= '*' ) ) )? (otherlv_4= ';' )? ) ;
public final EObject ruleImportDeclare() throws RecognitionException {
EObject current = null;
Token otherlv_0=null;
Token otherlv_2=null;
Token lv_wildcard_3_0=null;
Token otherlv_4=null;
AntlrDatatypeRuleToken lv_name_1_0 = null;
enterRule();
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:219:28: ( (otherlv_0= 'import' ( (lv_name_1_0= ruleFQN ) ) (otherlv_2= '.' ( (lv_wildcard_3_0= '*' ) ) )? (otherlv_4= ';' )? ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:220:1: (otherlv_0= 'import' ( (lv_name_1_0= ruleFQN ) ) (otherlv_2= '.' ( (lv_wildcard_3_0= '*' ) ) )? (otherlv_4= ';' )? )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:220:1: (otherlv_0= 'import' ( (lv_name_1_0= ruleFQN ) ) (otherlv_2= '.' ( (lv_wildcard_3_0= '*' ) ) )? (otherlv_4= ';' )? )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:220:3: otherlv_0= 'import' ( (lv_name_1_0= ruleFQN ) ) (otherlv_2= '.' ( (lv_wildcard_3_0= '*' ) ) )? (otherlv_4= ';' )?
{
otherlv_0=(Token)match(input,11,FOLLOW_11_in_ruleImportDeclare399);
newLeafNode(otherlv_0, grammarAccess.getImportDeclareAccess().getImportKeyword_0());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:224:1: ( (lv_name_1_0= ruleFQN ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:225:1: (lv_name_1_0= ruleFQN )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:225:1: (lv_name_1_0= ruleFQN )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:226:3: lv_name_1_0= ruleFQN
{
newCompositeNode(grammarAccess.getImportDeclareAccess().getNameFQNParserRuleCall_1_0());
pushFollow(FOLLOW_ruleFQN_in_ruleImportDeclare420);
lv_name_1_0=ruleFQN();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getImportDeclareRule());
}
set(
current,
"name",
lv_name_1_0,
"FQN");
afterParserOrEnumRuleCall();
}
}
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:242:2: (otherlv_2= '.' ( (lv_wildcard_3_0= '*' ) ) )?
int alt5=2;
int LA5_0 = input.LA(1);
if ( (LA5_0==12) ) {
alt5=1;
}
switch (alt5) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:242:4: otherlv_2= '.' ( (lv_wildcard_3_0= '*' ) )
{
otherlv_2=(Token)match(input,12,FOLLOW_12_in_ruleImportDeclare433);
newLeafNode(otherlv_2, grammarAccess.getImportDeclareAccess().getFullStopKeyword_2_0());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:246:1: ( (lv_wildcard_3_0= '*' ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:247:1: (lv_wildcard_3_0= '*' )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:247:1: (lv_wildcard_3_0= '*' )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:248:3: lv_wildcard_3_0= '*'
{
lv_wildcard_3_0=(Token)match(input,13,FOLLOW_13_in_ruleImportDeclare451);
newLeafNode(lv_wildcard_3_0, grammarAccess.getImportDeclareAccess().getWildcardAsteriskKeyword_2_1_0());
if (current==null) {
current = createModelElement(grammarAccess.getImportDeclareRule());
}
setWithLastConsumed(current, "wildcard", true, "*");
}
}
}
break;
}
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:261:4: (otherlv_4= ';' )?
int alt6=2;
int LA6_0 = input.LA(1);
if ( (LA6_0==10) ) {
alt6=1;
}
switch (alt6) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:261:6: otherlv_4= ';'
{
otherlv_4=(Token)match(input,10,FOLLOW_10_in_ruleImportDeclare479);
newLeafNode(otherlv_4, grammarAccess.getImportDeclareAccess().getSemicolonKeyword_3());
}
break;
}
}
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "ruleImportDeclare"
// $ANTLR start "entryRuleOperatorDeclare"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:273:1: entryRuleOperatorDeclare returns [EObject current=null] : iv_ruleOperatorDeclare= ruleOperatorDeclare EOF ;
public final EObject entryRuleOperatorDeclare() throws RecognitionException {
EObject current = null;
EObject iv_ruleOperatorDeclare = null;
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:274:2: (iv_ruleOperatorDeclare= ruleOperatorDeclare EOF )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:275:2: iv_ruleOperatorDeclare= ruleOperatorDeclare EOF
{
newCompositeNode(grammarAccess.getOperatorDeclareRule());
pushFollow(FOLLOW_ruleOperatorDeclare_in_entryRuleOperatorDeclare517);
iv_ruleOperatorDeclare=ruleOperatorDeclare();
state._fsp--;
current =iv_ruleOperatorDeclare;
match(input,EOF,FOLLOW_EOF_in_entryRuleOperatorDeclare527);
}
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "entryRuleOperatorDeclare"
// $ANTLR start "ruleOperatorDeclare"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:282:1: ruleOperatorDeclare returns [EObject current=null] : (otherlv_0= 'operator' ( (lv_operator_1_0= ruleFQN ) ) otherlv_2= 'as' ( (lv_name_3_0= ruleName ) ) (otherlv_4= ';' )? ) ;
public final EObject ruleOperatorDeclare() throws RecognitionException {
EObject current = null;
Token otherlv_0=null;
Token otherlv_2=null;
Token otherlv_4=null;
AntlrDatatypeRuleToken lv_operator_1_0 = null;
AntlrDatatypeRuleToken lv_name_3_0 = null;
enterRule();
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:285:28: ( (otherlv_0= 'operator' ( (lv_operator_1_0= ruleFQN ) ) otherlv_2= 'as' ( (lv_name_3_0= ruleName ) ) (otherlv_4= ';' )? ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:286:1: (otherlv_0= 'operator' ( (lv_operator_1_0= ruleFQN ) ) otherlv_2= 'as' ( (lv_name_3_0= ruleName ) ) (otherlv_4= ';' )? )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:286:1: (otherlv_0= 'operator' ( (lv_operator_1_0= ruleFQN ) ) otherlv_2= 'as' ( (lv_name_3_0= ruleName ) ) (otherlv_4= ';' )? )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:286:3: otherlv_0= 'operator' ( (lv_operator_1_0= ruleFQN ) ) otherlv_2= 'as' ( (lv_name_3_0= ruleName ) ) (otherlv_4= ';' )?
{
otherlv_0=(Token)match(input,14,FOLLOW_14_in_ruleOperatorDeclare564);
newLeafNode(otherlv_0, grammarAccess.getOperatorDeclareAccess().getOperatorKeyword_0());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:290:1: ( (lv_operator_1_0= ruleFQN ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:291:1: (lv_operator_1_0= ruleFQN )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:291:1: (lv_operator_1_0= ruleFQN )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:292:3: lv_operator_1_0= ruleFQN
{
newCompositeNode(grammarAccess.getOperatorDeclareAccess().getOperatorFQNParserRuleCall_1_0());
pushFollow(FOLLOW_ruleFQN_in_ruleOperatorDeclare585);
lv_operator_1_0=ruleFQN();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getOperatorDeclareRule());
}
set(
current,
"operator",
lv_operator_1_0,
"FQN");
afterParserOrEnumRuleCall();
}
}
otherlv_2=(Token)match(input,15,FOLLOW_15_in_ruleOperatorDeclare597);
newLeafNode(otherlv_2, grammarAccess.getOperatorDeclareAccess().getAsKeyword_2());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:312:1: ( (lv_name_3_0= ruleName ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:313:1: (lv_name_3_0= ruleName )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:313:1: (lv_name_3_0= ruleName )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:314:3: lv_name_3_0= ruleName
{
newCompositeNode(grammarAccess.getOperatorDeclareAccess().getNameNameParserRuleCall_3_0());
pushFollow(FOLLOW_ruleName_in_ruleOperatorDeclare618);
lv_name_3_0=ruleName();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getOperatorDeclareRule());
}
set(
current,
"name",
lv_name_3_0,
"Name");
afterParserOrEnumRuleCall();
}
}
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:330:2: (otherlv_4= ';' )?
int alt7=2;
int LA7_0 = input.LA(1);
if ( (LA7_0==10) ) {
alt7=1;
}
switch (alt7) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:330:4: otherlv_4= ';'
{
otherlv_4=(Token)match(input,10,FOLLOW_10_in_ruleOperatorDeclare631);
newLeafNode(otherlv_4, grammarAccess.getOperatorDeclareAccess().getSemicolonKeyword_4());
}
break;
}
}
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "ruleOperatorDeclare"
// $ANTLR start "entryRuleFlowDsl"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:342:1: entryRuleFlowDsl returns [EObject current=null] : iv_ruleFlowDsl= ruleFlowDsl EOF ;
public final EObject entryRuleFlowDsl() throws RecognitionException {
EObject current = null;
EObject iv_ruleFlowDsl = null;
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:343:2: (iv_ruleFlowDsl= ruleFlowDsl EOF )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:344:2: iv_ruleFlowDsl= ruleFlowDsl EOF
{
newCompositeNode(grammarAccess.getFlowDslRule());
pushFollow(FOLLOW_ruleFlowDsl_in_entryRuleFlowDsl669);
iv_ruleFlowDsl=ruleFlowDsl();
state._fsp--;
current =iv_ruleFlowDsl;
match(input,EOF,FOLLOW_EOF_in_entryRuleFlowDsl679);
}
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "entryRuleFlowDsl"
// $ANTLR start "ruleFlowDsl"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:351:1: ruleFlowDsl returns [EObject current=null] : ( ( (lv_comment_0_0= RULE_STRING ) )? otherlv_1= 'jobflow' ( (lv_name_2_0= ruleName ) ) otherlv_3= '(' ( (lv_params_4_0= ruleFlowParameter ) )+ otherlv_5= ')' otherlv_6= '{' ( (lv_statements_7_0= ruleFlowStatement ) )* otherlv_8= '}' (otherlv_9= ';' )? ) ;
public final EObject ruleFlowDsl() throws RecognitionException {
EObject current = null;
Token lv_comment_0_0=null;
Token otherlv_1=null;
Token otherlv_3=null;
Token otherlv_5=null;
Token otherlv_6=null;
Token otherlv_8=null;
Token otherlv_9=null;
AntlrDatatypeRuleToken lv_name_2_0 = null;
EObject lv_params_4_0 = null;
EObject lv_statements_7_0 = null;
enterRule();
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:354:28: ( ( ( (lv_comment_0_0= RULE_STRING ) )? otherlv_1= 'jobflow' ( (lv_name_2_0= ruleName ) ) otherlv_3= '(' ( (lv_params_4_0= ruleFlowParameter ) )+ otherlv_5= ')' otherlv_6= '{' ( (lv_statements_7_0= ruleFlowStatement ) )* otherlv_8= '}' (otherlv_9= ';' )? ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:355:1: ( ( (lv_comment_0_0= RULE_STRING ) )? otherlv_1= 'jobflow' ( (lv_name_2_0= ruleName ) ) otherlv_3= '(' ( (lv_params_4_0= ruleFlowParameter ) )+ otherlv_5= ')' otherlv_6= '{' ( (lv_statements_7_0= ruleFlowStatement ) )* otherlv_8= '}' (otherlv_9= ';' )? )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:355:1: ( ( (lv_comment_0_0= RULE_STRING ) )? otherlv_1= 'jobflow' ( (lv_name_2_0= ruleName ) ) otherlv_3= '(' ( (lv_params_4_0= ruleFlowParameter ) )+ otherlv_5= ')' otherlv_6= '{' ( (lv_statements_7_0= ruleFlowStatement ) )* otherlv_8= '}' (otherlv_9= ';' )? )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:355:2: ( (lv_comment_0_0= RULE_STRING ) )? otherlv_1= 'jobflow' ( (lv_name_2_0= ruleName ) ) otherlv_3= '(' ( (lv_params_4_0= ruleFlowParameter ) )+ otherlv_5= ')' otherlv_6= '{' ( (lv_statements_7_0= ruleFlowStatement ) )* otherlv_8= '}' (otherlv_9= ';' )?
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:355:2: ( (lv_comment_0_0= RULE_STRING ) )?
int alt8=2;
int LA8_0 = input.LA(1);
if ( (LA8_0==RULE_STRING) ) {
alt8=1;
}
switch (alt8) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:356:1: (lv_comment_0_0= RULE_STRING )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:356:1: (lv_comment_0_0= RULE_STRING )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:357:3: lv_comment_0_0= RULE_STRING
{
lv_comment_0_0=(Token)match(input,RULE_STRING,FOLLOW_RULE_STRING_in_ruleFlowDsl721);
newLeafNode(lv_comment_0_0, grammarAccess.getFlowDslAccess().getCommentSTRINGTerminalRuleCall_0_0());
if (current==null) {
current = createModelElement(grammarAccess.getFlowDslRule());
}
setWithLastConsumed(
current,
"comment",
lv_comment_0_0,
"STRING");
}
}
break;
}
otherlv_1=(Token)match(input,16,FOLLOW_16_in_ruleFlowDsl739);
newLeafNode(otherlv_1, grammarAccess.getFlowDslAccess().getJobflowKeyword_1());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:377:1: ( (lv_name_2_0= ruleName ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:378:1: (lv_name_2_0= ruleName )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:378:1: (lv_name_2_0= ruleName )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:379:3: lv_name_2_0= ruleName
{
newCompositeNode(grammarAccess.getFlowDslAccess().getNameNameParserRuleCall_2_0());
pushFollow(FOLLOW_ruleName_in_ruleFlowDsl760);
lv_name_2_0=ruleName();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getFlowDslRule());
}
set(
current,
"name",
lv_name_2_0,
"Name");
afterParserOrEnumRuleCall();
}
}
otherlv_3=(Token)match(input,17,FOLLOW_17_in_ruleFlowDsl772);
newLeafNode(otherlv_3, grammarAccess.getFlowDslAccess().getLeftParenthesisKeyword_3());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:399:1: ( (lv_params_4_0= ruleFlowParameter ) )+
int cnt9=0;
loop9:
do {
int alt9=2;
int LA9_0 = input.LA(1);
if ( (LA9_0==21||LA9_0==24) ) {
alt9=1;
}
switch (alt9) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:400:1: (lv_params_4_0= ruleFlowParameter )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:400:1: (lv_params_4_0= ruleFlowParameter )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:401:3: lv_params_4_0= ruleFlowParameter
{
newCompositeNode(grammarAccess.getFlowDslAccess().getParamsFlowParameterParserRuleCall_4_0());
pushFollow(FOLLOW_ruleFlowParameter_in_ruleFlowDsl793);
lv_params_4_0=ruleFlowParameter();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getFlowDslRule());
}
add(
current,
"params",
lv_params_4_0,
"FlowParameter");
afterParserOrEnumRuleCall();
}
}
break;
default :
if ( cnt9 >= 1 ) break loop9;
EarlyExitException eee =
new EarlyExitException(9, input);
throw eee;
}
cnt9++;
} while (true);
otherlv_5=(Token)match(input,18,FOLLOW_18_in_ruleFlowDsl806);
newLeafNode(otherlv_5, grammarAccess.getFlowDslAccess().getRightParenthesisKeyword_5());
otherlv_6=(Token)match(input,19,FOLLOW_19_in_ruleFlowDsl818);
newLeafNode(otherlv_6, grammarAccess.getFlowDslAccess().getLeftCurlyBracketKeyword_6());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:425:1: ( (lv_statements_7_0= ruleFlowStatement ) )*
loop10:
do {
int alt10=2;
int LA10_0 = input.LA(1);
if ( (LA10_0==RULE_ID||(LA10_0>=14 && LA10_0<=16)||LA10_0==21||(LA10_0>=23 && LA10_0<=25)) ) {
alt10=1;
}
switch (alt10) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:426:1: (lv_statements_7_0= ruleFlowStatement )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:426:1: (lv_statements_7_0= ruleFlowStatement )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:427:3: lv_statements_7_0= ruleFlowStatement
{
newCompositeNode(grammarAccess.getFlowDslAccess().getStatementsFlowStatementParserRuleCall_7_0());
pushFollow(FOLLOW_ruleFlowStatement_in_ruleFlowDsl839);
lv_statements_7_0=ruleFlowStatement();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getFlowDslRule());
}
add(
current,
"statements",
lv_statements_7_0,
"FlowStatement");
afterParserOrEnumRuleCall();
}
}
break;
default :
break loop10;
}
} while (true);
otherlv_8=(Token)match(input,20,FOLLOW_20_in_ruleFlowDsl852);
newLeafNode(otherlv_8, grammarAccess.getFlowDslAccess().getRightCurlyBracketKeyword_8());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:447:1: (otherlv_9= ';' )?
int alt11=2;
int LA11_0 = input.LA(1);
if ( (LA11_0==10) ) {
alt11=1;
}
switch (alt11) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:447:3: otherlv_9= ';'
{
otherlv_9=(Token)match(input,10,FOLLOW_10_in_ruleFlowDsl865);
newLeafNode(otherlv_9, grammarAccess.getFlowDslAccess().getSemicolonKeyword_9());
}
break;
}
}
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "ruleFlowDsl"
// $ANTLR start "entryRuleFlowParameter"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:459:1: entryRuleFlowParameter returns [EObject current=null] : iv_ruleFlowParameter= ruleFlowParameter EOF ;
public final EObject entryRuleFlowParameter() throws RecognitionException {
EObject current = null;
EObject iv_ruleFlowParameter = null;
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:460:2: (iv_ruleFlowParameter= ruleFlowParameter EOF )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:461:2: iv_ruleFlowParameter= ruleFlowParameter EOF
{
newCompositeNode(grammarAccess.getFlowParameterRule());
pushFollow(FOLLOW_ruleFlowParameter_in_entryRuleFlowParameter903);
iv_ruleFlowParameter=ruleFlowParameter();
state._fsp--;
current =iv_ruleFlowParameter;
match(input,EOF,FOLLOW_EOF_in_entryRuleFlowParameter913);
}
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "entryRuleFlowParameter"
// $ANTLR start "ruleFlowParameter"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:468:1: ruleFlowParameter returns [EObject current=null] : ( ( (lv_in_0_0= ruleFlowIn ) ) | ( (lv_out_1_0= ruleFlowOut ) ) ) ;
public final EObject ruleFlowParameter() throws RecognitionException {
EObject current = null;
EObject lv_in_0_0 = null;
EObject lv_out_1_0 = null;
enterRule();
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:471:28: ( ( ( (lv_in_0_0= ruleFlowIn ) ) | ( (lv_out_1_0= ruleFlowOut ) ) ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:472:1: ( ( (lv_in_0_0= ruleFlowIn ) ) | ( (lv_out_1_0= ruleFlowOut ) ) )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:472:1: ( ( (lv_in_0_0= ruleFlowIn ) ) | ( (lv_out_1_0= ruleFlowOut ) ) )
int alt12=2;
int LA12_0 = input.LA(1);
if ( (LA12_0==21) ) {
alt12=1;
}
else if ( (LA12_0==24) ) {
alt12=2;
}
else {
NoViableAltException nvae =
new NoViableAltException("", 12, 0, input);
throw nvae;
}
switch (alt12) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:472:2: ( (lv_in_0_0= ruleFlowIn ) )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:472:2: ( (lv_in_0_0= ruleFlowIn ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:473:1: (lv_in_0_0= ruleFlowIn )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:473:1: (lv_in_0_0= ruleFlowIn )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:474:3: lv_in_0_0= ruleFlowIn
{
newCompositeNode(grammarAccess.getFlowParameterAccess().getInFlowInParserRuleCall_0_0());
pushFollow(FOLLOW_ruleFlowIn_in_ruleFlowParameter959);
lv_in_0_0=ruleFlowIn();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getFlowParameterRule());
}
set(
current,
"in",
lv_in_0_0,
"FlowIn");
afterParserOrEnumRuleCall();
}
}
}
break;
case 2 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:491:6: ( (lv_out_1_0= ruleFlowOut ) )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:491:6: ( (lv_out_1_0= ruleFlowOut ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:492:1: (lv_out_1_0= ruleFlowOut )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:492:1: (lv_out_1_0= ruleFlowOut )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:493:3: lv_out_1_0= ruleFlowOut
{
newCompositeNode(grammarAccess.getFlowParameterAccess().getOutFlowOutParserRuleCall_1_0());
pushFollow(FOLLOW_ruleFlowOut_in_ruleFlowParameter986);
lv_out_1_0=ruleFlowOut();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getFlowParameterRule());
}
set(
current,
"out",
lv_out_1_0,
"FlowOut");
afterParserOrEnumRuleCall();
}
}
}
break;
}
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "ruleFlowParameter"
// $ANTLR start "entryRuleFlowIn"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:517:1: entryRuleFlowIn returns [EObject current=null] : iv_ruleFlowIn= ruleFlowIn EOF ;
public final EObject entryRuleFlowIn() throws RecognitionException {
EObject current = null;
EObject iv_ruleFlowIn = null;
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:518:2: (iv_ruleFlowIn= ruleFlowIn EOF )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:519:2: iv_ruleFlowIn= ruleFlowIn EOF
{
newCompositeNode(grammarAccess.getFlowInRule());
pushFollow(FOLLOW_ruleFlowIn_in_entryRuleFlowIn1022);
iv_ruleFlowIn=ruleFlowIn();
state._fsp--;
current =iv_ruleFlowIn;
match(input,EOF,FOLLOW_EOF_in_entryRuleFlowIn1032);
}
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "entryRuleFlowIn"
// $ANTLR start "ruleFlowIn"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:526:1: ruleFlowIn returns [EObject current=null] : ( ( (lv_inout_0_0= 'in' ) ) ( (lv_model_1_0= ruleName ) ) otherlv_2= 'as' ( (lv_name_3_0= ruleName ) ) ( (otherlv_4= ',' )? otherlv_5= 'importer' ( (lv_importerDescription_6_0= ruleFQN ) ) (otherlv_7= 'as' ( (lv_importerName_8_0= ruleName ) ) )? )? (otherlv_9= ';' | otherlv_10= '.' )? ) ;
public final EObject ruleFlowIn() throws RecognitionException {
EObject current = null;
Token lv_inout_0_0=null;
Token otherlv_2=null;
Token otherlv_4=null;
Token otherlv_5=null;
Token otherlv_7=null;
Token otherlv_9=null;
Token otherlv_10=null;
AntlrDatatypeRuleToken lv_model_1_0 = null;
AntlrDatatypeRuleToken lv_name_3_0 = null;
AntlrDatatypeRuleToken lv_importerDescription_6_0 = null;
AntlrDatatypeRuleToken lv_importerName_8_0 = null;
enterRule();
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:529:28: ( ( ( (lv_inout_0_0= 'in' ) ) ( (lv_model_1_0= ruleName ) ) otherlv_2= 'as' ( (lv_name_3_0= ruleName ) ) ( (otherlv_4= ',' )? otherlv_5= 'importer' ( (lv_importerDescription_6_0= ruleFQN ) ) (otherlv_7= 'as' ( (lv_importerName_8_0= ruleName ) ) )? )? (otherlv_9= ';' | otherlv_10= '.' )? ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:530:1: ( ( (lv_inout_0_0= 'in' ) ) ( (lv_model_1_0= ruleName ) ) otherlv_2= 'as' ( (lv_name_3_0= ruleName ) ) ( (otherlv_4= ',' )? otherlv_5= 'importer' ( (lv_importerDescription_6_0= ruleFQN ) ) (otherlv_7= 'as' ( (lv_importerName_8_0= ruleName ) ) )? )? (otherlv_9= ';' | otherlv_10= '.' )? )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:530:1: ( ( (lv_inout_0_0= 'in' ) ) ( (lv_model_1_0= ruleName ) ) otherlv_2= 'as' ( (lv_name_3_0= ruleName ) ) ( (otherlv_4= ',' )? otherlv_5= 'importer' ( (lv_importerDescription_6_0= ruleFQN ) ) (otherlv_7= 'as' ( (lv_importerName_8_0= ruleName ) ) )? )? (otherlv_9= ';' | otherlv_10= '.' )? )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:530:2: ( (lv_inout_0_0= 'in' ) ) ( (lv_model_1_0= ruleName ) ) otherlv_2= 'as' ( (lv_name_3_0= ruleName ) ) ( (otherlv_4= ',' )? otherlv_5= 'importer' ( (lv_importerDescription_6_0= ruleFQN ) ) (otherlv_7= 'as' ( (lv_importerName_8_0= ruleName ) ) )? )? (otherlv_9= ';' | otherlv_10= '.' )?
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:530:2: ( (lv_inout_0_0= 'in' ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:531:1: (lv_inout_0_0= 'in' )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:531:1: (lv_inout_0_0= 'in' )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:532:3: lv_inout_0_0= 'in'
{
lv_inout_0_0=(Token)match(input,21,FOLLOW_21_in_ruleFlowIn1075);
newLeafNode(lv_inout_0_0, grammarAccess.getFlowInAccess().getInoutInKeyword_0_0());
if (current==null) {
current = createModelElement(grammarAccess.getFlowInRule());
}
setWithLastConsumed(current, "inout", lv_inout_0_0, "in");
}
}
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:545:2: ( (lv_model_1_0= ruleName ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:546:1: (lv_model_1_0= ruleName )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:546:1: (lv_model_1_0= ruleName )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:547:3: lv_model_1_0= ruleName
{
newCompositeNode(grammarAccess.getFlowInAccess().getModelNameParserRuleCall_1_0());
pushFollow(FOLLOW_ruleName_in_ruleFlowIn1109);
lv_model_1_0=ruleName();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getFlowInRule());
}
set(
current,
"model",
lv_model_1_0,
"Name");
afterParserOrEnumRuleCall();
}
}
otherlv_2=(Token)match(input,15,FOLLOW_15_in_ruleFlowIn1121);
newLeafNode(otherlv_2, grammarAccess.getFlowInAccess().getAsKeyword_2());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:567:1: ( (lv_name_3_0= ruleName ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:568:1: (lv_name_3_0= ruleName )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:568:1: (lv_name_3_0= ruleName )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:569:3: lv_name_3_0= ruleName
{
newCompositeNode(grammarAccess.getFlowInAccess().getNameNameParserRuleCall_3_0());
pushFollow(FOLLOW_ruleName_in_ruleFlowIn1142);
lv_name_3_0=ruleName();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getFlowInRule());
}
set(
current,
"name",
lv_name_3_0,
"Name");
afterParserOrEnumRuleCall();
}
}
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:585:2: ( (otherlv_4= ',' )? otherlv_5= 'importer' ( (lv_importerDescription_6_0= ruleFQN ) ) (otherlv_7= 'as' ( (lv_importerName_8_0= ruleName ) ) )? )?
int alt15=2;
int LA15_0 = input.LA(1);
if ( ((LA15_0>=22 && LA15_0<=23)) ) {
alt15=1;
}
switch (alt15) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:585:3: (otherlv_4= ',' )? otherlv_5= 'importer' ( (lv_importerDescription_6_0= ruleFQN ) ) (otherlv_7= 'as' ( (lv_importerName_8_0= ruleName ) ) )?
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:585:3: (otherlv_4= ',' )?
int alt13=2;
int LA13_0 = input.LA(1);
if ( (LA13_0==22) ) {
alt13=1;
}
switch (alt13) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:585:5: otherlv_4= ','
{
otherlv_4=(Token)match(input,22,FOLLOW_22_in_ruleFlowIn1156);
newLeafNode(otherlv_4, grammarAccess.getFlowInAccess().getCommaKeyword_4_0());
}
break;
}
otherlv_5=(Token)match(input,23,FOLLOW_23_in_ruleFlowIn1170);
newLeafNode(otherlv_5, grammarAccess.getFlowInAccess().getImporterKeyword_4_1());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:593:1: ( (lv_importerDescription_6_0= ruleFQN ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:594:1: (lv_importerDescription_6_0= ruleFQN )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:594:1: (lv_importerDescription_6_0= ruleFQN )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:595:3: lv_importerDescription_6_0= ruleFQN
{
newCompositeNode(grammarAccess.getFlowInAccess().getImporterDescriptionFQNParserRuleCall_4_2_0());
pushFollow(FOLLOW_ruleFQN_in_ruleFlowIn1191);
lv_importerDescription_6_0=ruleFQN();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getFlowInRule());
}
set(
current,
"importerDescription",
lv_importerDescription_6_0,
"FQN");
afterParserOrEnumRuleCall();
}
}
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:611:2: (otherlv_7= 'as' ( (lv_importerName_8_0= ruleName ) ) )?
int alt14=2;
int LA14_0 = input.LA(1);
if ( (LA14_0==15) ) {
alt14=1;
}
switch (alt14) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:611:4: otherlv_7= 'as' ( (lv_importerName_8_0= ruleName ) )
{
otherlv_7=(Token)match(input,15,FOLLOW_15_in_ruleFlowIn1204);
newLeafNode(otherlv_7, grammarAccess.getFlowInAccess().getAsKeyword_4_3_0());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:615:1: ( (lv_importerName_8_0= ruleName ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:616:1: (lv_importerName_8_0= ruleName )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:616:1: (lv_importerName_8_0= ruleName )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:617:3: lv_importerName_8_0= ruleName
{
newCompositeNode(grammarAccess.getFlowInAccess().getImporterNameNameParserRuleCall_4_3_1_0());
pushFollow(FOLLOW_ruleName_in_ruleFlowIn1225);
lv_importerName_8_0=ruleName();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getFlowInRule());
}
set(
current,
"importerName",
lv_importerName_8_0,
"Name");
afterParserOrEnumRuleCall();
}
}
}
break;
}
}
break;
}
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:633:6: (otherlv_9= ';' | otherlv_10= '.' )?
int alt16=3;
int LA16_0 = input.LA(1);
if ( (LA16_0==10) ) {
alt16=1;
}
else if ( (LA16_0==12) ) {
alt16=2;
}
switch (alt16) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:633:8: otherlv_9= ';'
{
otherlv_9=(Token)match(input,10,FOLLOW_10_in_ruleFlowIn1242);
newLeafNode(otherlv_9, grammarAccess.getFlowInAccess().getSemicolonKeyword_5_0());
}
break;
case 2 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:638:7: otherlv_10= '.'
{
otherlv_10=(Token)match(input,12,FOLLOW_12_in_ruleFlowIn1260);
newLeafNode(otherlv_10, grammarAccess.getFlowInAccess().getFullStopKeyword_5_1());
}
break;
}
}
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "ruleFlowIn"
// $ANTLR start "entryRuleFlowOut"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:650:1: entryRuleFlowOut returns [EObject current=null] : iv_ruleFlowOut= ruleFlowOut EOF ;
public final EObject entryRuleFlowOut() throws RecognitionException {
EObject current = null;
EObject iv_ruleFlowOut = null;
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:651:2: (iv_ruleFlowOut= ruleFlowOut EOF )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:652:2: iv_ruleFlowOut= ruleFlowOut EOF
{
newCompositeNode(grammarAccess.getFlowOutRule());
pushFollow(FOLLOW_ruleFlowOut_in_entryRuleFlowOut1298);
iv_ruleFlowOut=ruleFlowOut();
state._fsp--;
current =iv_ruleFlowOut;
match(input,EOF,FOLLOW_EOF_in_entryRuleFlowOut1308);
}
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "entryRuleFlowOut"
// $ANTLR start "ruleFlowOut"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:659:1: ruleFlowOut returns [EObject current=null] : ( ( (lv_inout_0_0= 'out' ) ) ( (lv_model_1_0= ruleName ) ) otherlv_2= 'as' ( (lv_name_3_0= ruleName ) ) ( (otherlv_4= ',' )? otherlv_5= 'exporter' ( (lv_exporterDescription_6_0= ruleFQN ) ) (otherlv_7= 'as' ( (lv_exporterName_8_0= ruleName ) ) )? )? (otherlv_9= ';' | otherlv_10= '.' )? ) ;
public final EObject ruleFlowOut() throws RecognitionException {
EObject current = null;
Token lv_inout_0_0=null;
Token otherlv_2=null;
Token otherlv_4=null;
Token otherlv_5=null;
Token otherlv_7=null;
Token otherlv_9=null;
Token otherlv_10=null;
AntlrDatatypeRuleToken lv_model_1_0 = null;
AntlrDatatypeRuleToken lv_name_3_0 = null;
AntlrDatatypeRuleToken lv_exporterDescription_6_0 = null;
AntlrDatatypeRuleToken lv_exporterName_8_0 = null;
enterRule();
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:662:28: ( ( ( (lv_inout_0_0= 'out' ) ) ( (lv_model_1_0= ruleName ) ) otherlv_2= 'as' ( (lv_name_3_0= ruleName ) ) ( (otherlv_4= ',' )? otherlv_5= 'exporter' ( (lv_exporterDescription_6_0= ruleFQN ) ) (otherlv_7= 'as' ( (lv_exporterName_8_0= ruleName ) ) )? )? (otherlv_9= ';' | otherlv_10= '.' )? ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:663:1: ( ( (lv_inout_0_0= 'out' ) ) ( (lv_model_1_0= ruleName ) ) otherlv_2= 'as' ( (lv_name_3_0= ruleName ) ) ( (otherlv_4= ',' )? otherlv_5= 'exporter' ( (lv_exporterDescription_6_0= ruleFQN ) ) (otherlv_7= 'as' ( (lv_exporterName_8_0= ruleName ) ) )? )? (otherlv_9= ';' | otherlv_10= '.' )? )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:663:1: ( ( (lv_inout_0_0= 'out' ) ) ( (lv_model_1_0= ruleName ) ) otherlv_2= 'as' ( (lv_name_3_0= ruleName ) ) ( (otherlv_4= ',' )? otherlv_5= 'exporter' ( (lv_exporterDescription_6_0= ruleFQN ) ) (otherlv_7= 'as' ( (lv_exporterName_8_0= ruleName ) ) )? )? (otherlv_9= ';' | otherlv_10= '.' )? )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:663:2: ( (lv_inout_0_0= 'out' ) ) ( (lv_model_1_0= ruleName ) ) otherlv_2= 'as' ( (lv_name_3_0= ruleName ) ) ( (otherlv_4= ',' )? otherlv_5= 'exporter' ( (lv_exporterDescription_6_0= ruleFQN ) ) (otherlv_7= 'as' ( (lv_exporterName_8_0= ruleName ) ) )? )? (otherlv_9= ';' | otherlv_10= '.' )?
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:663:2: ( (lv_inout_0_0= 'out' ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:664:1: (lv_inout_0_0= 'out' )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:664:1: (lv_inout_0_0= 'out' )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:665:3: lv_inout_0_0= 'out'
{
lv_inout_0_0=(Token)match(input,24,FOLLOW_24_in_ruleFlowOut1351);
newLeafNode(lv_inout_0_0, grammarAccess.getFlowOutAccess().getInoutOutKeyword_0_0());
if (current==null) {
current = createModelElement(grammarAccess.getFlowOutRule());
}
setWithLastConsumed(current, "inout", lv_inout_0_0, "out");
}
}
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:678:2: ( (lv_model_1_0= ruleName ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:679:1: (lv_model_1_0= ruleName )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:679:1: (lv_model_1_0= ruleName )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:680:3: lv_model_1_0= ruleName
{
newCompositeNode(grammarAccess.getFlowOutAccess().getModelNameParserRuleCall_1_0());
pushFollow(FOLLOW_ruleName_in_ruleFlowOut1385);
lv_model_1_0=ruleName();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getFlowOutRule());
}
set(
current,
"model",
lv_model_1_0,
"Name");
afterParserOrEnumRuleCall();
}
}
otherlv_2=(Token)match(input,15,FOLLOW_15_in_ruleFlowOut1397);
newLeafNode(otherlv_2, grammarAccess.getFlowOutAccess().getAsKeyword_2());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:700:1: ( (lv_name_3_0= ruleName ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:701:1: (lv_name_3_0= ruleName )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:701:1: (lv_name_3_0= ruleName )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:702:3: lv_name_3_0= ruleName
{
newCompositeNode(grammarAccess.getFlowOutAccess().getNameNameParserRuleCall_3_0());
pushFollow(FOLLOW_ruleName_in_ruleFlowOut1418);
lv_name_3_0=ruleName();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getFlowOutRule());
}
set(
current,
"name",
lv_name_3_0,
"Name");
afterParserOrEnumRuleCall();
}
}
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:718:2: ( (otherlv_4= ',' )? otherlv_5= 'exporter' ( (lv_exporterDescription_6_0= ruleFQN ) ) (otherlv_7= 'as' ( (lv_exporterName_8_0= ruleName ) ) )? )?
int alt19=2;
int LA19_0 = input.LA(1);
if ( (LA19_0==22||LA19_0==25) ) {
alt19=1;
}
switch (alt19) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:718:3: (otherlv_4= ',' )? otherlv_5= 'exporter' ( (lv_exporterDescription_6_0= ruleFQN ) ) (otherlv_7= 'as' ( (lv_exporterName_8_0= ruleName ) ) )?
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:718:3: (otherlv_4= ',' )?
int alt17=2;
int LA17_0 = input.LA(1);
if ( (LA17_0==22) ) {
alt17=1;
}
switch (alt17) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:718:5: otherlv_4= ','
{
otherlv_4=(Token)match(input,22,FOLLOW_22_in_ruleFlowOut1432);
newLeafNode(otherlv_4, grammarAccess.getFlowOutAccess().getCommaKeyword_4_0());
}
break;
}
otherlv_5=(Token)match(input,25,FOLLOW_25_in_ruleFlowOut1446);
newLeafNode(otherlv_5, grammarAccess.getFlowOutAccess().getExporterKeyword_4_1());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:726:1: ( (lv_exporterDescription_6_0= ruleFQN ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:727:1: (lv_exporterDescription_6_0= ruleFQN )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:727:1: (lv_exporterDescription_6_0= ruleFQN )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:728:3: lv_exporterDescription_6_0= ruleFQN
{
newCompositeNode(grammarAccess.getFlowOutAccess().getExporterDescriptionFQNParserRuleCall_4_2_0());
pushFollow(FOLLOW_ruleFQN_in_ruleFlowOut1467);
lv_exporterDescription_6_0=ruleFQN();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getFlowOutRule());
}
set(
current,
"exporterDescription",
lv_exporterDescription_6_0,
"FQN");
afterParserOrEnumRuleCall();
}
}
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:744:2: (otherlv_7= 'as' ( (lv_exporterName_8_0= ruleName ) ) )?
int alt18=2;
int LA18_0 = input.LA(1);
if ( (LA18_0==15) ) {
alt18=1;
}
switch (alt18) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:744:4: otherlv_7= 'as' ( (lv_exporterName_8_0= ruleName ) )
{
otherlv_7=(Token)match(input,15,FOLLOW_15_in_ruleFlowOut1480);
newLeafNode(otherlv_7, grammarAccess.getFlowOutAccess().getAsKeyword_4_3_0());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:748:1: ( (lv_exporterName_8_0= ruleName ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:749:1: (lv_exporterName_8_0= ruleName )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:749:1: (lv_exporterName_8_0= ruleName )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:750:3: lv_exporterName_8_0= ruleName
{
newCompositeNode(grammarAccess.getFlowOutAccess().getExporterNameNameParserRuleCall_4_3_1_0());
pushFollow(FOLLOW_ruleName_in_ruleFlowOut1501);
lv_exporterName_8_0=ruleName();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getFlowOutRule());
}
set(
current,
"exporterName",
lv_exporterName_8_0,
"Name");
afterParserOrEnumRuleCall();
}
}
}
break;
}
}
break;
}
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:766:6: (otherlv_9= ';' | otherlv_10= '.' )?
int alt20=3;
int LA20_0 = input.LA(1);
if ( (LA20_0==10) ) {
alt20=1;
}
else if ( (LA20_0==12) ) {
alt20=2;
}
switch (alt20) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:766:8: otherlv_9= ';'
{
otherlv_9=(Token)match(input,10,FOLLOW_10_in_ruleFlowOut1518);
newLeafNode(otherlv_9, grammarAccess.getFlowOutAccess().getSemicolonKeyword_5_0());
}
break;
case 2 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:771:7: otherlv_10= '.'
{
otherlv_10=(Token)match(input,12,FOLLOW_12_in_ruleFlowOut1536);
newLeafNode(otherlv_10, grammarAccess.getFlowOutAccess().getFullStopKeyword_5_1());
}
break;
}
}
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "ruleFlowOut"
// $ANTLR start "entryRuleFlowStatement"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:783:1: entryRuleFlowStatement returns [EObject current=null] : iv_ruleFlowStatement= ruleFlowStatement EOF ;
public final EObject entryRuleFlowStatement() throws RecognitionException {
EObject current = null;
EObject iv_ruleFlowStatement = null;
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:784:2: (iv_ruleFlowStatement= ruleFlowStatement EOF )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:785:2: iv_ruleFlowStatement= ruleFlowStatement EOF
{
newCompositeNode(grammarAccess.getFlowStatementRule());
pushFollow(FOLLOW_ruleFlowStatement_in_entryRuleFlowStatement1574);
iv_ruleFlowStatement=ruleFlowStatement();
state._fsp--;
current =iv_ruleFlowStatement;
match(input,EOF,FOLLOW_EOF_in_entryRuleFlowStatement1584);
}
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "entryRuleFlowStatement"
// $ANTLR start "ruleFlowStatement"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:792:1: ruleFlowStatement returns [EObject current=null] : (this_FlowStatement1_0= ruleFlowStatement1 | this_FlowStatement2_1= ruleFlowStatement2 ) ;
public final EObject ruleFlowStatement() throws RecognitionException {
EObject current = null;
EObject this_FlowStatement1_0 = null;
EObject this_FlowStatement2_1 = null;
enterRule();
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:795:28: ( (this_FlowStatement1_0= ruleFlowStatement1 | this_FlowStatement2_1= ruleFlowStatement2 ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:796:1: (this_FlowStatement1_0= ruleFlowStatement1 | this_FlowStatement2_1= ruleFlowStatement2 )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:796:1: (this_FlowStatement1_0= ruleFlowStatement1 | this_FlowStatement2_1= ruleFlowStatement2 )
int alt21=2;
int LA21_0 = input.LA(1);
if ( (LA21_0==RULE_ID) ) {
int LA21_1 = input.LA(2);
if ( (LA21_1==12||LA21_1==26) ) {
alt21=1;
}
else if ( (LA21_1==27) ) {
alt21=2;
}
else {
NoViableAltException nvae =
new NoViableAltException("", 21, 1, input);
throw nvae;
}
}
else if ( ((LA21_0>=14 && LA21_0<=16)||LA21_0==21||(LA21_0>=23 && LA21_0<=25)) ) {
alt21=1;
}
else {
NoViableAltException nvae =
new NoViableAltException("", 21, 0, input);
throw nvae;
}
switch (alt21) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:797:5: this_FlowStatement1_0= ruleFlowStatement1
{
newCompositeNode(grammarAccess.getFlowStatementAccess().getFlowStatement1ParserRuleCall_0());
pushFollow(FOLLOW_ruleFlowStatement1_in_ruleFlowStatement1631);
this_FlowStatement1_0=ruleFlowStatement1();
state._fsp--;
current = this_FlowStatement1_0;
afterParserOrEnumRuleCall();
}
break;
case 2 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:807:5: this_FlowStatement2_1= ruleFlowStatement2
{
newCompositeNode(grammarAccess.getFlowStatementAccess().getFlowStatement2ParserRuleCall_1());
pushFollow(FOLLOW_ruleFlowStatement2_in_ruleFlowStatement1658);
this_FlowStatement2_1=ruleFlowStatement2();
state._fsp--;
current = this_FlowStatement2_1;
afterParserOrEnumRuleCall();
}
break;
}
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "ruleFlowStatement"
// $ANTLR start "entryRuleFlowStatement1"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:823:1: entryRuleFlowStatement1 returns [EObject current=null] : iv_ruleFlowStatement1= ruleFlowStatement1 EOF ;
public final EObject entryRuleFlowStatement1() throws RecognitionException {
EObject current = null;
EObject iv_ruleFlowStatement1 = null;
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:824:2: (iv_ruleFlowStatement1= ruleFlowStatement1 EOF )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:825:2: iv_ruleFlowStatement1= ruleFlowStatement1 EOF
{
newCompositeNode(grammarAccess.getFlowStatement1Rule());
pushFollow(FOLLOW_ruleFlowStatement1_in_entryRuleFlowStatement11693);
iv_ruleFlowStatement1=ruleFlowStatement1();
state._fsp--;
current =iv_ruleFlowStatement1;
match(input,EOF,FOLLOW_EOF_in_entryRuleFlowStatement11703);
}
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "entryRuleFlowStatement1"
// $ANTLR start "ruleFlowStatement1"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:832:1: ruleFlowStatement1 returns [EObject current=null] : ( ( ( (lv_name_0_0= ruleName ) ) otherlv_1= '=' )? ( (otherlv_2= RULE_ID ) ) otherlv_3= '.' ( (lv_method_4_0= ruleName ) ) otherlv_5= '(' ( ( (lv_arguments_6_0= ruleOperatorArgument ) ) (otherlv_7= ',' ( (lv_arguments_8_0= ruleOperatorArgument ) ) )* )? otherlv_9= ')' (otherlv_10= ';' | otherlv_11= '.' )? ) ;
public final EObject ruleFlowStatement1() throws RecognitionException {
EObject current = null;
Token otherlv_1=null;
Token otherlv_2=null;
Token otherlv_3=null;
Token otherlv_5=null;
Token otherlv_7=null;
Token otherlv_9=null;
Token otherlv_10=null;
Token otherlv_11=null;
AntlrDatatypeRuleToken lv_name_0_0 = null;
AntlrDatatypeRuleToken lv_method_4_0 = null;
EObject lv_arguments_6_0 = null;
EObject lv_arguments_8_0 = null;
enterRule();
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:835:28: ( ( ( ( (lv_name_0_0= ruleName ) ) otherlv_1= '=' )? ( (otherlv_2= RULE_ID ) ) otherlv_3= '.' ( (lv_method_4_0= ruleName ) ) otherlv_5= '(' ( ( (lv_arguments_6_0= ruleOperatorArgument ) ) (otherlv_7= ',' ( (lv_arguments_8_0= ruleOperatorArgument ) ) )* )? otherlv_9= ')' (otherlv_10= ';' | otherlv_11= '.' )? ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:836:1: ( ( ( (lv_name_0_0= ruleName ) ) otherlv_1= '=' )? ( (otherlv_2= RULE_ID ) ) otherlv_3= '.' ( (lv_method_4_0= ruleName ) ) otherlv_5= '(' ( ( (lv_arguments_6_0= ruleOperatorArgument ) ) (otherlv_7= ',' ( (lv_arguments_8_0= ruleOperatorArgument ) ) )* )? otherlv_9= ')' (otherlv_10= ';' | otherlv_11= '.' )? )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:836:1: ( ( ( (lv_name_0_0= ruleName ) ) otherlv_1= '=' )? ( (otherlv_2= RULE_ID ) ) otherlv_3= '.' ( (lv_method_4_0= ruleName ) ) otherlv_5= '(' ( ( (lv_arguments_6_0= ruleOperatorArgument ) ) (otherlv_7= ',' ( (lv_arguments_8_0= ruleOperatorArgument ) ) )* )? otherlv_9= ')' (otherlv_10= ';' | otherlv_11= '.' )? )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:836:2: ( ( (lv_name_0_0= ruleName ) ) otherlv_1= '=' )? ( (otherlv_2= RULE_ID ) ) otherlv_3= '.' ( (lv_method_4_0= ruleName ) ) otherlv_5= '(' ( ( (lv_arguments_6_0= ruleOperatorArgument ) ) (otherlv_7= ',' ( (lv_arguments_8_0= ruleOperatorArgument ) ) )* )? otherlv_9= ')' (otherlv_10= ';' | otherlv_11= '.' )?
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:836:2: ( ( (lv_name_0_0= ruleName ) ) otherlv_1= '=' )?
int alt22=2;
int LA22_0 = input.LA(1);
if ( (LA22_0==RULE_ID) ) {
int LA22_1 = input.LA(2);
if ( (LA22_1==26) ) {
alt22=1;
}
}
else if ( ((LA22_0>=14 && LA22_0<=16)||LA22_0==21||(LA22_0>=23 && LA22_0<=25)) ) {
alt22=1;
}
switch (alt22) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:836:3: ( (lv_name_0_0= ruleName ) ) otherlv_1= '='
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:836:3: ( (lv_name_0_0= ruleName ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:837:1: (lv_name_0_0= ruleName )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:837:1: (lv_name_0_0= ruleName )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:838:3: lv_name_0_0= ruleName
{
newCompositeNode(grammarAccess.getFlowStatement1Access().getNameNameParserRuleCall_0_0_0());
pushFollow(FOLLOW_ruleName_in_ruleFlowStatement11750);
lv_name_0_0=ruleName();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getFlowStatement1Rule());
}
set(
current,
"name",
lv_name_0_0,
"Name");
afterParserOrEnumRuleCall();
}
}
otherlv_1=(Token)match(input,26,FOLLOW_26_in_ruleFlowStatement11762);
newLeafNode(otherlv_1, grammarAccess.getFlowStatement1Access().getEqualsSignKeyword_0_1());
}
break;
}
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:858:3: ( (otherlv_2= RULE_ID ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:859:1: (otherlv_2= RULE_ID )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:859:1: (otherlv_2= RULE_ID )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:860:3: otherlv_2= RULE_ID
{
if (current==null) {
current = createModelElement(grammarAccess.getFlowStatement1Rule());
}
otherlv_2=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleFlowStatement11784);
newLeafNode(otherlv_2, grammarAccess.getFlowStatement1Access().getOperatorOperatorDeclareCrossReference_1_0());
}
}
otherlv_3=(Token)match(input,12,FOLLOW_12_in_ruleFlowStatement11796);
newLeafNode(otherlv_3, grammarAccess.getFlowStatement1Access().getFullStopKeyword_2());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:875:1: ( (lv_method_4_0= ruleName ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:876:1: (lv_method_4_0= ruleName )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:876:1: (lv_method_4_0= ruleName )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:877:3: lv_method_4_0= ruleName
{
newCompositeNode(grammarAccess.getFlowStatement1Access().getMethodNameParserRuleCall_3_0());
pushFollow(FOLLOW_ruleName_in_ruleFlowStatement11817);
lv_method_4_0=ruleName();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getFlowStatement1Rule());
}
set(
current,
"method",
lv_method_4_0,
"Name");
afterParserOrEnumRuleCall();
}
}
otherlv_5=(Token)match(input,17,FOLLOW_17_in_ruleFlowStatement11829);
newLeafNode(otherlv_5, grammarAccess.getFlowStatement1Access().getLeftParenthesisKeyword_4());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:897:1: ( ( (lv_arguments_6_0= ruleOperatorArgument ) ) (otherlv_7= ',' ( (lv_arguments_8_0= ruleOperatorArgument ) ) )* )?
int alt24=2;
int LA24_0 = input.LA(1);
if ( (LA24_0==RULE_ID) ) {
alt24=1;
}
switch (alt24) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:897:2: ( (lv_arguments_6_0= ruleOperatorArgument ) ) (otherlv_7= ',' ( (lv_arguments_8_0= ruleOperatorArgument ) ) )*
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:897:2: ( (lv_arguments_6_0= ruleOperatorArgument ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:898:1: (lv_arguments_6_0= ruleOperatorArgument )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:898:1: (lv_arguments_6_0= ruleOperatorArgument )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:899:3: lv_arguments_6_0= ruleOperatorArgument
{
newCompositeNode(grammarAccess.getFlowStatement1Access().getArgumentsOperatorArgumentParserRuleCall_5_0_0());
pushFollow(FOLLOW_ruleOperatorArgument_in_ruleFlowStatement11851);
lv_arguments_6_0=ruleOperatorArgument();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getFlowStatement1Rule());
}
add(
current,
"arguments",
lv_arguments_6_0,
"OperatorArgument");
afterParserOrEnumRuleCall();
}
}
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:915:2: (otherlv_7= ',' ( (lv_arguments_8_0= ruleOperatorArgument ) ) )*
loop23:
do {
int alt23=2;
int LA23_0 = input.LA(1);
if ( (LA23_0==22) ) {
alt23=1;
}
switch (alt23) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:915:4: otherlv_7= ',' ( (lv_arguments_8_0= ruleOperatorArgument ) )
{
otherlv_7=(Token)match(input,22,FOLLOW_22_in_ruleFlowStatement11864);
newLeafNode(otherlv_7, grammarAccess.getFlowStatement1Access().getCommaKeyword_5_1_0());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:919:1: ( (lv_arguments_8_0= ruleOperatorArgument ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:920:1: (lv_arguments_8_0= ruleOperatorArgument )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:920:1: (lv_arguments_8_0= ruleOperatorArgument )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:921:3: lv_arguments_8_0= ruleOperatorArgument
{
newCompositeNode(grammarAccess.getFlowStatement1Access().getArgumentsOperatorArgumentParserRuleCall_5_1_1_0());
pushFollow(FOLLOW_ruleOperatorArgument_in_ruleFlowStatement11885);
lv_arguments_8_0=ruleOperatorArgument();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getFlowStatement1Rule());
}
add(
current,
"arguments",
lv_arguments_8_0,
"OperatorArgument");
afterParserOrEnumRuleCall();
}
}
}
break;
default :
break loop23;
}
} while (true);
}
break;
}
otherlv_9=(Token)match(input,18,FOLLOW_18_in_ruleFlowStatement11901);
newLeafNode(otherlv_9, grammarAccess.getFlowStatement1Access().getRightParenthesisKeyword_6());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:941:1: (otherlv_10= ';' | otherlv_11= '.' )?
int alt25=3;
int LA25_0 = input.LA(1);
if ( (LA25_0==10) ) {
alt25=1;
}
else if ( (LA25_0==12) ) {
alt25=2;
}
switch (alt25) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:941:3: otherlv_10= ';'
{
otherlv_10=(Token)match(input,10,FOLLOW_10_in_ruleFlowStatement11914);
newLeafNode(otherlv_10, grammarAccess.getFlowStatement1Access().getSemicolonKeyword_7_0());
}
break;
case 2 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:946:7: otherlv_11= '.'
{
otherlv_11=(Token)match(input,12,FOLLOW_12_in_ruleFlowStatement11932);
newLeafNode(otherlv_11, grammarAccess.getFlowStatement1Access().getFullStopKeyword_7_1());
}
break;
}
}
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "ruleFlowStatement1"
// $ANTLR start "entryRuleFlowStatement2"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:958:1: entryRuleFlowStatement2 returns [EObject current=null] : iv_ruleFlowStatement2= ruleFlowStatement2 EOF ;
public final EObject entryRuleFlowStatement2() throws RecognitionException {
EObject current = null;
EObject iv_ruleFlowStatement2 = null;
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:959:2: (iv_ruleFlowStatement2= ruleFlowStatement2 EOF )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:960:2: iv_ruleFlowStatement2= ruleFlowStatement2 EOF
{
newCompositeNode(grammarAccess.getFlowStatement2Rule());
pushFollow(FOLLOW_ruleFlowStatement2_in_entryRuleFlowStatement21970);
iv_ruleFlowStatement2=ruleFlowStatement2();
state._fsp--;
current =iv_ruleFlowStatement2;
match(input,EOF,FOLLOW_EOF_in_entryRuleFlowStatement21980);
}
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "entryRuleFlowStatement2"
// $ANTLR start "ruleFlowStatement2"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:967:1: ruleFlowStatement2 returns [EObject current=null] : ( ( (otherlv_0= RULE_ID ) ) otherlv_1= '+=' otherlv_2= '(' ( ( (lv_arguments_3_0= ruleOperatorArgument ) ) (otherlv_4= ',' ( (lv_arguments_5_0= ruleOperatorArgument ) ) )* )? otherlv_6= ')' (otherlv_7= ';' | otherlv_8= '.' )? ) ;
public final EObject ruleFlowStatement2() throws RecognitionException {
EObject current = null;
Token otherlv_0=null;
Token otherlv_1=null;
Token otherlv_2=null;
Token otherlv_4=null;
Token otherlv_6=null;
Token otherlv_7=null;
Token otherlv_8=null;
EObject lv_arguments_3_0 = null;
EObject lv_arguments_5_0 = null;
enterRule();
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:970:28: ( ( ( (otherlv_0= RULE_ID ) ) otherlv_1= '+=' otherlv_2= '(' ( ( (lv_arguments_3_0= ruleOperatorArgument ) ) (otherlv_4= ',' ( (lv_arguments_5_0= ruleOperatorArgument ) ) )* )? otherlv_6= ')' (otherlv_7= ';' | otherlv_8= '.' )? ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:971:1: ( ( (otherlv_0= RULE_ID ) ) otherlv_1= '+=' otherlv_2= '(' ( ( (lv_arguments_3_0= ruleOperatorArgument ) ) (otherlv_4= ',' ( (lv_arguments_5_0= ruleOperatorArgument ) ) )* )? otherlv_6= ')' (otherlv_7= ';' | otherlv_8= '.' )? )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:971:1: ( ( (otherlv_0= RULE_ID ) ) otherlv_1= '+=' otherlv_2= '(' ( ( (lv_arguments_3_0= ruleOperatorArgument ) ) (otherlv_4= ',' ( (lv_arguments_5_0= ruleOperatorArgument ) ) )* )? otherlv_6= ')' (otherlv_7= ';' | otherlv_8= '.' )? )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:971:2: ( (otherlv_0= RULE_ID ) ) otherlv_1= '+=' otherlv_2= '(' ( ( (lv_arguments_3_0= ruleOperatorArgument ) ) (otherlv_4= ',' ( (lv_arguments_5_0= ruleOperatorArgument ) ) )* )? otherlv_6= ')' (otherlv_7= ';' | otherlv_8= '.' )?
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:971:2: ( (otherlv_0= RULE_ID ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:972:1: (otherlv_0= RULE_ID )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:972:1: (otherlv_0= RULE_ID )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:973:3: otherlv_0= RULE_ID
{
if (current==null) {
current = createModelElement(grammarAccess.getFlowStatement2Rule());
}
otherlv_0=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleFlowStatement22025);
newLeafNode(otherlv_0, grammarAccess.getFlowStatement2Access().getNameFlowOutCrossReference_0_0());
}
}
otherlv_1=(Token)match(input,27,FOLLOW_27_in_ruleFlowStatement22037);
newLeafNode(otherlv_1, grammarAccess.getFlowStatement2Access().getPlusSignEqualsSignKeyword_1());
otherlv_2=(Token)match(input,17,FOLLOW_17_in_ruleFlowStatement22049);
newLeafNode(otherlv_2, grammarAccess.getFlowStatement2Access().getLeftParenthesisKeyword_2());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:992:1: ( ( (lv_arguments_3_0= ruleOperatorArgument ) ) (otherlv_4= ',' ( (lv_arguments_5_0= ruleOperatorArgument ) ) )* )?
int alt27=2;
int LA27_0 = input.LA(1);
if ( (LA27_0==RULE_ID) ) {
alt27=1;
}
switch (alt27) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:992:2: ( (lv_arguments_3_0= ruleOperatorArgument ) ) (otherlv_4= ',' ( (lv_arguments_5_0= ruleOperatorArgument ) ) )*
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:992:2: ( (lv_arguments_3_0= ruleOperatorArgument ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:993:1: (lv_arguments_3_0= ruleOperatorArgument )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:993:1: (lv_arguments_3_0= ruleOperatorArgument )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:994:3: lv_arguments_3_0= ruleOperatorArgument
{
newCompositeNode(grammarAccess.getFlowStatement2Access().getArgumentsOperatorArgumentParserRuleCall_3_0_0());
pushFollow(FOLLOW_ruleOperatorArgument_in_ruleFlowStatement22071);
lv_arguments_3_0=ruleOperatorArgument();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getFlowStatement2Rule());
}
add(
current,
"arguments",
lv_arguments_3_0,
"OperatorArgument");
afterParserOrEnumRuleCall();
}
}
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1010:2: (otherlv_4= ',' ( (lv_arguments_5_0= ruleOperatorArgument ) ) )*
loop26:
do {
int alt26=2;
int LA26_0 = input.LA(1);
if ( (LA26_0==22) ) {
alt26=1;
}
switch (alt26) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1010:4: otherlv_4= ',' ( (lv_arguments_5_0= ruleOperatorArgument ) )
{
otherlv_4=(Token)match(input,22,FOLLOW_22_in_ruleFlowStatement22084);
newLeafNode(otherlv_4, grammarAccess.getFlowStatement2Access().getCommaKeyword_3_1_0());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1014:1: ( (lv_arguments_5_0= ruleOperatorArgument ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1015:1: (lv_arguments_5_0= ruleOperatorArgument )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1015:1: (lv_arguments_5_0= ruleOperatorArgument )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1016:3: lv_arguments_5_0= ruleOperatorArgument
{
newCompositeNode(grammarAccess.getFlowStatement2Access().getArgumentsOperatorArgumentParserRuleCall_3_1_1_0());
pushFollow(FOLLOW_ruleOperatorArgument_in_ruleFlowStatement22105);
lv_arguments_5_0=ruleOperatorArgument();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getFlowStatement2Rule());
}
add(
current,
"arguments",
lv_arguments_5_0,
"OperatorArgument");
afterParserOrEnumRuleCall();
}
}
}
break;
default :
break loop26;
}
} while (true);
}
break;
}
otherlv_6=(Token)match(input,18,FOLLOW_18_in_ruleFlowStatement22121);
newLeafNode(otherlv_6, grammarAccess.getFlowStatement2Access().getRightParenthesisKeyword_4());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1036:1: (otherlv_7= ';' | otherlv_8= '.' )?
int alt28=3;
int LA28_0 = input.LA(1);
if ( (LA28_0==10) ) {
alt28=1;
}
else if ( (LA28_0==12) ) {
alt28=2;
}
switch (alt28) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1036:3: otherlv_7= ';'
{
otherlv_7=(Token)match(input,10,FOLLOW_10_in_ruleFlowStatement22134);
newLeafNode(otherlv_7, grammarAccess.getFlowStatement2Access().getSemicolonKeyword_5_0());
}
break;
case 2 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1041:7: otherlv_8= '.'
{
otherlv_8=(Token)match(input,12,FOLLOW_12_in_ruleFlowStatement22152);
newLeafNode(otherlv_8, grammarAccess.getFlowStatement2Access().getFullStopKeyword_5_1());
}
break;
}
}
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "ruleFlowStatement2"
// $ANTLR start "entryRuleOperatorArgument"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1053:1: entryRuleOperatorArgument returns [EObject current=null] : iv_ruleOperatorArgument= ruleOperatorArgument EOF ;
public final EObject entryRuleOperatorArgument() throws RecognitionException {
EObject current = null;
EObject iv_ruleOperatorArgument = null;
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1054:2: (iv_ruleOperatorArgument= ruleOperatorArgument EOF )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1055:2: iv_ruleOperatorArgument= ruleOperatorArgument EOF
{
newCompositeNode(grammarAccess.getOperatorArgumentRule());
pushFollow(FOLLOW_ruleOperatorArgument_in_entryRuleOperatorArgument2190);
iv_ruleOperatorArgument=ruleOperatorArgument();
state._fsp--;
current =iv_ruleOperatorArgument;
match(input,EOF,FOLLOW_EOF_in_entryRuleOperatorArgument2200);
}
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "entryRuleOperatorArgument"
// $ANTLR start "ruleOperatorArgument"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1062:1: ruleOperatorArgument returns [EObject current=null] : ( ( ( (otherlv_0= RULE_ID ) ) otherlv_1= '.' ( (lv_name_2_0= ruleName ) ) ) | ( (otherlv_3= RULE_ID ) ) ) ;
public final EObject ruleOperatorArgument() throws RecognitionException {
EObject current = null;
Token otherlv_0=null;
Token otherlv_1=null;
Token otherlv_3=null;
AntlrDatatypeRuleToken lv_name_2_0 = null;
enterRule();
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1065:28: ( ( ( ( (otherlv_0= RULE_ID ) ) otherlv_1= '.' ( (lv_name_2_0= ruleName ) ) ) | ( (otherlv_3= RULE_ID ) ) ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1066:1: ( ( ( (otherlv_0= RULE_ID ) ) otherlv_1= '.' ( (lv_name_2_0= ruleName ) ) ) | ( (otherlv_3= RULE_ID ) ) )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1066:1: ( ( ( (otherlv_0= RULE_ID ) ) otherlv_1= '.' ( (lv_name_2_0= ruleName ) ) ) | ( (otherlv_3= RULE_ID ) ) )
int alt29=2;
int LA29_0 = input.LA(1);
if ( (LA29_0==RULE_ID) ) {
int LA29_1 = input.LA(2);
if ( (LA29_1==12) ) {
alt29=1;
}
else if ( (LA29_1==EOF||LA29_1==18||LA29_1==22) ) {
alt29=2;
}
else {
NoViableAltException nvae =
new NoViableAltException("", 29, 1, input);
throw nvae;
}
}
else {
NoViableAltException nvae =
new NoViableAltException("", 29, 0, input);
throw nvae;
}
switch (alt29) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1066:2: ( ( (otherlv_0= RULE_ID ) ) otherlv_1= '.' ( (lv_name_2_0= ruleName ) ) )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1066:2: ( ( (otherlv_0= RULE_ID ) ) otherlv_1= '.' ( (lv_name_2_0= ruleName ) ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1066:3: ( (otherlv_0= RULE_ID ) ) otherlv_1= '.' ( (lv_name_2_0= ruleName ) )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1066:3: ( (otherlv_0= RULE_ID ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1067:1: (otherlv_0= RULE_ID )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1067:1: (otherlv_0= RULE_ID )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1068:3: otherlv_0= RULE_ID
{
if (current==null) {
current = createModelElement(grammarAccess.getOperatorArgumentRule());
}
otherlv_0=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleOperatorArgument2246);
newLeafNode(otherlv_0, grammarAccess.getOperatorArgumentAccess().getInFlowInCrossReference_0_0_0());
}
}
otherlv_1=(Token)match(input,12,FOLLOW_12_in_ruleOperatorArgument2258);
newLeafNode(otherlv_1, grammarAccess.getOperatorArgumentAccess().getFullStopKeyword_0_1());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1083:1: ( (lv_name_2_0= ruleName ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1084:1: (lv_name_2_0= ruleName )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1084:1: (lv_name_2_0= ruleName )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1085:3: lv_name_2_0= ruleName
{
newCompositeNode(grammarAccess.getOperatorArgumentAccess().getNameNameParserRuleCall_0_2_0());
pushFollow(FOLLOW_ruleName_in_ruleOperatorArgument2279);
lv_name_2_0=ruleName();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getOperatorArgumentRule());
}
set(
current,
"name",
lv_name_2_0,
"Name");
afterParserOrEnumRuleCall();
}
}
}
}
break;
case 2 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1102:6: ( (otherlv_3= RULE_ID ) )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1102:6: ( (otherlv_3= RULE_ID ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1103:1: (otherlv_3= RULE_ID )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1103:1: (otherlv_3= RULE_ID )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1104:3: otherlv_3= RULE_ID
{
if (current==null) {
current = createModelElement(grammarAccess.getOperatorArgumentRule());
}
otherlv_3=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleOperatorArgument2306);
newLeafNode(otherlv_3, grammarAccess.getOperatorArgumentAccess().getInFlowStatementCrossReference_1_0());
}
}
}
break;
}
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "ruleOperatorArgument"
// $ANTLR start "entryRuleFQN"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1123:1: entryRuleFQN returns [String current=null] : iv_ruleFQN= ruleFQN EOF ;
public final String entryRuleFQN() throws RecognitionException {
String current = null;
AntlrDatatypeRuleToken iv_ruleFQN = null;
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1124:2: (iv_ruleFQN= ruleFQN EOF )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1125:2: iv_ruleFQN= ruleFQN EOF
{
newCompositeNode(grammarAccess.getFQNRule());
pushFollow(FOLLOW_ruleFQN_in_entryRuleFQN2343);
iv_ruleFQN=ruleFQN();
state._fsp--;
current =iv_ruleFQN.getText();
match(input,EOF,FOLLOW_EOF_in_entryRuleFQN2354);
}
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "entryRuleFQN"
// $ANTLR start "ruleFQN"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1132:1: ruleFQN returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_Name_0= ruleName (kw= '.' this_Name_2= ruleName )* ) ;
public final AntlrDatatypeRuleToken ruleFQN() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
Token kw=null;
AntlrDatatypeRuleToken this_Name_0 = null;
AntlrDatatypeRuleToken this_Name_2 = null;
enterRule();
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1135:28: ( (this_Name_0= ruleName (kw= '.' this_Name_2= ruleName )* ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1136:1: (this_Name_0= ruleName (kw= '.' this_Name_2= ruleName )* )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1136:1: (this_Name_0= ruleName (kw= '.' this_Name_2= ruleName )* )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1137:5: this_Name_0= ruleName (kw= '.' this_Name_2= ruleName )*
{
newCompositeNode(grammarAccess.getFQNAccess().getNameParserRuleCall_0());
pushFollow(FOLLOW_ruleName_in_ruleFQN2401);
this_Name_0=ruleName();
state._fsp--;
current.merge(this_Name_0);
afterParserOrEnumRuleCall();
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1147:1: (kw= '.' this_Name_2= ruleName )*
loop30:
do {
int alt30=2;
alt30 = dfa30.predict(input);
switch (alt30) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1148:2: kw= '.' this_Name_2= ruleName
{
kw=(Token)match(input,12,FOLLOW_12_in_ruleFQN2420);
current.merge(kw);
newLeafNode(kw, grammarAccess.getFQNAccess().getFullStopKeyword_1_0());
newCompositeNode(grammarAccess.getFQNAccess().getNameParserRuleCall_1_1());
pushFollow(FOLLOW_ruleName_in_ruleFQN2442);
this_Name_2=ruleName();
state._fsp--;
current.merge(this_Name_2);
afterParserOrEnumRuleCall();
}
break;
default :
break loop30;
}
} while (true);
}
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "ruleFQN"
// $ANTLR start "entryRuleName"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1172:1: entryRuleName returns [String current=null] : iv_ruleName= ruleName EOF ;
public final String entryRuleName() throws RecognitionException {
String current = null;
AntlrDatatypeRuleToken iv_ruleName = null;
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1173:2: (iv_ruleName= ruleName EOF )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1174:2: iv_ruleName= ruleName EOF
{
newCompositeNode(grammarAccess.getNameRule());
pushFollow(FOLLOW_ruleName_in_entryRuleName2490);
iv_ruleName=ruleName();
state._fsp--;
current =iv_ruleName.getText();
match(input,EOF,FOLLOW_EOF_in_entryRuleName2501);
}
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "entryRuleName"
// $ANTLR start "ruleName"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1181:1: ruleName returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_ID_0= RULE_ID | kw= 'operator' | kw= 'jobflow' | kw= 'in' | kw= 'out' | kw= 'as' | kw= 'importer' | kw= 'exporter' ) ;
public final AntlrDatatypeRuleToken ruleName() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
Token this_ID_0=null;
Token kw=null;
enterRule();
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1184:28: ( (this_ID_0= RULE_ID | kw= 'operator' | kw= 'jobflow' | kw= 'in' | kw= 'out' | kw= 'as' | kw= 'importer' | kw= 'exporter' ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1185:1: (this_ID_0= RULE_ID | kw= 'operator' | kw= 'jobflow' | kw= 'in' | kw= 'out' | kw= 'as' | kw= 'importer' | kw= 'exporter' )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1185:1: (this_ID_0= RULE_ID | kw= 'operator' | kw= 'jobflow' | kw= 'in' | kw= 'out' | kw= 'as' | kw= 'importer' | kw= 'exporter' )
int alt31=8;
switch ( input.LA(1) ) {
case RULE_ID:
{
alt31=1;
}
break;
case 14:
{
alt31=2;
}
break;
case 16:
{
alt31=3;
}
break;
case 21:
{
alt31=4;
}
break;
case 24:
{
alt31=5;
}
break;
case 15:
{
alt31=6;
}
break;
case 23:
{
alt31=7;
}
break;
case 25:
{
alt31=8;
}
break;
default:
NoViableAltException nvae =
new NoViableAltException("", 31, 0, input);
throw nvae;
}
switch (alt31) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1185:6: this_ID_0= RULE_ID
{
this_ID_0=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleName2541);
current.merge(this_ID_0);
newLeafNode(this_ID_0, grammarAccess.getNameAccess().getIDTerminalRuleCall_0());
}
break;
case 2 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1194:2: kw= 'operator'
{
kw=(Token)match(input,14,FOLLOW_14_in_ruleName2565);
current.merge(kw);
newLeafNode(kw, grammarAccess.getNameAccess().getOperatorKeyword_1());
}
break;
case 3 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1201:2: kw= 'jobflow'
{
kw=(Token)match(input,16,FOLLOW_16_in_ruleName2584);
current.merge(kw);
newLeafNode(kw, grammarAccess.getNameAccess().getJobflowKeyword_2());
}
break;
case 4 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1208:2: kw= 'in'
{
kw=(Token)match(input,21,FOLLOW_21_in_ruleName2603);
current.merge(kw);
newLeafNode(kw, grammarAccess.getNameAccess().getInKeyword_3());
}
break;
case 5 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1215:2: kw= 'out'
{
kw=(Token)match(input,24,FOLLOW_24_in_ruleName2622);
current.merge(kw);
newLeafNode(kw, grammarAccess.getNameAccess().getOutKeyword_4());
}
break;
case 6 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1222:2: kw= 'as'
{
kw=(Token)match(input,15,FOLLOW_15_in_ruleName2641);
current.merge(kw);
newLeafNode(kw, grammarAccess.getNameAccess().getAsKeyword_5());
}
break;
case 7 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1229:2: kw= 'importer'
{
kw=(Token)match(input,23,FOLLOW_23_in_ruleName2660);
current.merge(kw);
newLeafNode(kw, grammarAccess.getNameAccess().getImporterKeyword_6());
}
break;
case 8 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1236:2: kw= 'exporter'
{
kw=(Token)match(input,25,FOLLOW_25_in_ruleName2679);
current.merge(kw);
newLeafNode(kw, grammarAccess.getNameAccess().getExporterKeyword_7());
}
break;
}
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "ruleName"
// Delegated rules
protected DFA30 dfa30 = new DFA30(this);
static final String DFA30_eotS =
"\u00ba\uffff";
static final String DFA30_eofS =
"\1\1\1\uffff\1\1\2\5\17\uffff\1\5\4\uffff\1\5\16\uffff\3\5\22\uffff"+
"\1\5\60\uffff\3\5\14\uffff\1\5\74\uffff";
static final String DFA30_minS =
"\1\4\1\uffff\1\5\2\4\1\uffff\16\5\1\4\4\5\1\4\16\5\3\4\22\5\1\4"+
"\60\5\3\4\14\5\1\4\74\5";
static final String DFA30_maxS =
"\1\30\1\uffff\3\31\1\uffff\u00b4\31";
static final String DFA30_acceptS =
"\1\uffff\1\2\3\uffff\1\1\u00b4\uffff";
static final String DFA30_specialS =
"\u00ba\uffff}>";
static final String[] DFA30_transitionS = {
"\1\1\5\uffff\2\1\1\2\1\uffff\3\1\1\uffff\1\1\2\uffff\1\1\2"+
"\uffff\1\1",
"",
"\1\5\7\uffff\1\1\3\5\1\uffff\1\1\2\uffff\1\3\1\uffff\1\5\1"+
"\4\1\5",
"\1\5\1\1\4\uffff\3\5\1\uffff\1\6\1\12\1\7\1\uffff\1\5\2\uffff"+
"\1\10\1\uffff\1\1\1\11\1\1",
"\1\5\1\1\4\uffff\3\5\1\uffff\1\13\1\17\1\14\1\uffff\1\5\2"+
"\uffff\1\15\1\uffff\1\1\1\16\1\1",
"",
"\1\5\10\uffff\1\5\1\20\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\10\uffff\1\5\1\21\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\10\uffff\1\5\1\22\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\10\uffff\1\5\1\23\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\10\uffff\1\5\1\24\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\10\uffff\1\5\1\25\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\10\uffff\1\5\1\26\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\10\uffff\1\5\1\27\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\10\uffff\1\5\1\30\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\10\uffff\1\5\1\31\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\1\6\uffff\1\5\1\uffff\1\1\1\32\1\1\4\uffff\1\1\1\uffff"+
"\3\1",
"\1\1\10\uffff\3\1\1\5\3\uffff\1\1\1\uffff\3\1",
"\1\1\10\uffff\1\1\1\33\1\1\4\uffff\1\1\1\uffff\3\1",
"\1\1\10\uffff\1\1\1\34\1\1\4\uffff\1\1\1\uffff\3\1",
"\1\5\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\1\35\1\1\1\36\1\uffff"+
"\1\5\2\uffff\1\37\1\uffff\1\1\1\40\1\1",
"\1\1\6\uffff\1\5\1\uffff\1\1\1\41\1\1\4\uffff\1\1\1\uffff"+
"\3\1",
"\1\1\10\uffff\3\1\1\5\3\uffff\1\1\1\uffff\3\1",
"\1\1\10\uffff\1\1\1\42\1\1\4\uffff\1\1\1\uffff\3\1",
"\1\1\10\uffff\1\1\1\43\1\1\4\uffff\1\1\1\uffff\3\1",
"\1\5\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\1\45\1\1\1\44\1\uffff"+
"\1\5\2\uffff\1\46\1\uffff\1\1\1\47\1\1",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\50\1\1\1\52\1\51\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\53\1\1\1\55\1\54\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\56\1\1\1\60\1\57\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\62\1\1\1\61\1\63\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\64\1\1\1\66\1\65\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\67\1\1\1\71\1\70\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\72\1\1\1\74\1\73\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\50\1\1\1\5\1\51\1\75",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\53\1\1\1\5\1\54\1\76",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\56\1\1\1\5\1\57\1\77",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\64\1\1\1\5\1\65\1\100",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\62\1\1\1\5\1\63\1\101",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\67\1\1\1\5\1\70\1\102",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\72\1\1\1\5\1\73\1\103",
"\1\5\1\1\4\uffff\1\5\3\uffff\1\6\1\1\1\7\4\uffff\1\1\1\uffff"+
"\3\1",
"\1\5\1\1\4\uffff\1\5\3\uffff\1\13\1\1\1\14\4\uffff\1\1\1\uffff"+
"\3\1",
"\1\5\1\1\4\uffff\1\5\3\uffff\1\104\1\1\1\105\4\uffff\1\1\1"+
"\uffff\3\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\10\1\5\1\106\1\11\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\15\1\5\1\107\1\16\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\111\1\5\1\110\1\112\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\10\1\5\1\1\1\11\1\113",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\15\1\5\1\1\1\16\1\114",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\111\1\5\1\1\1\112\1\115",
"\1\1\6\uffff\1\5\1\uffff\1\1\1\116\1\1\4\uffff\1\1\1\uffff"+
"\3\1",
"\1\1\6\uffff\1\5\1\uffff\1\1\1\117\1\1\4\uffff\1\1\1\uffff"+
"\3\1",
"\1\1\6\uffff\1\5\1\uffff\1\1\1\120\1\1\4\uffff\1\1\1\uffff"+
"\3\1",
"\1\1\10\uffff\3\1\1\5\3\uffff\1\1\1\uffff\3\1",
"\1\1\10\uffff\3\1\1\5\3\uffff\1\1\1\uffff\3\1",
"\1\1\10\uffff\3\1\1\5\3\uffff\1\1\1\uffff\3\1",
"\1\1\10\uffff\1\1\1\121\1\1\4\uffff\1\1\1\uffff\3\1",
"\1\1\10\uffff\1\1\1\122\1\1\4\uffff\1\1\1\uffff\3\1",
"\1\1\10\uffff\1\1\1\123\1\1\4\uffff\1\1\1\uffff\3\1",
"\1\1\10\uffff\1\1\1\124\1\1\4\uffff\1\1\1\uffff\3\1",
"\1\1\10\uffff\1\1\1\125\1\1\4\uffff\1\1\1\uffff\3\1",
"\1\1\10\uffff\1\1\1\126\1\1\4\uffff\1\1\1\uffff\3\1",
"\1\5\1\1\4\uffff\1\5\3\uffff\1\130\1\1\1\127\4\uffff\1\1\1"+
"\uffff\3\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\132\1\5\1\131\1\133\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\132\1\5\1\1\1\133\1\134",
"\1\1\10\uffff\3\1\1\5\3\uffff\1\1\1\uffff\3\1",
"\1\1\6\uffff\1\5\1\uffff\1\1\1\135\1\1\4\uffff\1\1\1\uffff"+
"\3\1",
"\1\1\10\uffff\1\1\1\136\1\1\4\uffff\1\1\1\uffff\3\1",
"\1\1\10\uffff\1\1\1\137\1\1\4\uffff\1\1\1\uffff\3\1",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\140\1\5\1\uffff"+
"\1\1\2\uffff\1\62\1\uffff\1\5\1\63\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\141\1\5\1\uffff"+
"\1\1\2\uffff\1\64\1\uffff\1\5\1\65\1\5",
"\1\5\10\uffff\1\5\1\142\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\10\uffff\1\5\1\143\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\144\1\5\1\uffff"+
"\1\1\2\uffff\1\145\1\uffff\1\5\1\146\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\147\1\5\1\uffff"+
"\1\1\2\uffff\1\67\1\uffff\1\5\1\70\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\150\1\5\1\uffff"+
"\1\1\2\uffff\1\72\1\uffff\1\5\1\73\1\5",
"\1\5\10\uffff\1\5\1\151\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\10\uffff\1\5\1\152\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\155\1\5\1\uffff"+
"\1\1\2\uffff\1\153\1\uffff\1\5\1\154\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\156\1\5\1\uffff"+
"\1\1\2\uffff\1\50\1\uffff\1\5\1\51\1\5",
"\1\5\10\uffff\1\5\1\157\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\10\uffff\1\5\1\160\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\10\uffff\1\5\1\161\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\10\uffff\1\5\1\162\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\163\1\5\1\uffff"+
"\1\1\2\uffff\1\53\1\uffff\1\5\1\54\1\5",
"\1\5\10\uffff\1\5\1\164\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\10\uffff\1\5\1\165\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\166\1\5\1\uffff"+
"\1\1\2\uffff\1\56\1\uffff\1\5\1\57\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\167\1\5\1\uffff"+
"\1\1\2\uffff\1\64\1\uffff\1\5\1\65\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\170\1\5\1\uffff"+
"\1\1\2\uffff\1\62\1\uffff\1\5\1\63\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\171\1\5\1\uffff"+
"\1\1\2\uffff\1\145\1\uffff\1\5\1\146\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\172\1\5\1\uffff"+
"\1\1\2\uffff\1\67\1\uffff\1\5\1\70\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\173\1\5\1\uffff"+
"\1\1\2\uffff\1\72\1\uffff\1\5\1\73\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\174\1\5\1\uffff"+
"\1\1\2\uffff\1\153\1\uffff\1\5\1\154\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\175\1\5\1\uffff"+
"\1\1\2\uffff\1\50\1\uffff\1\5\1\51\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\176\1\5\1\uffff"+
"\1\1\2\uffff\1\53\1\uffff\1\5\1\54\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\177\1\5\1\uffff"+
"\1\1\2\uffff\1\56\1\uffff\1\5\1\57\1\5",
"\1\1\6\uffff\1\5\1\uffff\1\1\1\u0080\1\1\4\uffff\1\1\1\uffff"+
"\3\1",
"\1\1\10\uffff\3\1\1\5\3\uffff\1\1\1\uffff\3\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\1\1\1\u0081\1\1\1\uffff"+
"\1\5\2\uffff\1\37\1\uffff\1\1\1\40\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\1\1\1\u0082\1\1\1\uffff"+
"\1\5\2\uffff\1\46\1\uffff\1\1\1\47\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\1\1\1\u0085\1\1\1\uffff"+
"\1\5\2\uffff\1\u0083\1\uffff\1\1\1\u0084\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\1\1\1\u0086\1\1\1\uffff"+
"\1\5\2\uffff\1\10\1\uffff\1\1\1\11\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\1\1\1\u0087\1\1\1\uffff"+
"\1\5\2\uffff\1\15\1\uffff\1\1\1\16\1\1",
"\1\1\10\uffff\1\1\1\u0088\1\1\4\uffff\1\1\1\uffff\3\1",
"\1\1\10\uffff\1\1\1\u0089\1\1\4\uffff\1\1\1\uffff\3\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\1\1\1\u008a\1\1\1\uffff"+
"\1\5\2\uffff\1\37\1\uffff\1\1\1\40\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\1\1\1\u008b\1\1\1\uffff"+
"\1\5\2\uffff\1\46\1\uffff\1\1\1\47\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\1\1\1\u008c\1\1\1\uffff"+
"\1\5\2\uffff\1\10\1\uffff\1\1\1\11\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\1\1\1\u008d\1\1\1\uffff"+
"\1\5\2\uffff\1\15\1\uffff\1\1\1\16\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\1\1\1\u008e\1\1\1\uffff"+
"\1\5\2\uffff\1\u0083\1\uffff\1\1\1\u0084\1\1",
"\1\5\1\1\4\uffff\1\5\3\uffff\1\u008f\1\1\1\u0090\4\uffff\1"+
"\1\1\uffff\3\1",
"\1\5\1\1\4\uffff\1\5\3\uffff\1\35\1\1\1\36\4\uffff\1\1\1\uffff"+
"\3\1",
"\1\5\1\1\4\uffff\1\5\3\uffff\1\45\1\1\1\44\4\uffff\1\1\1\uffff"+
"\3\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\37\1\5\1\u0091\1\40\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\46\1\5\1\u0092\1\47\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\u0083\1\5\1\u0093\1\u0084\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\37\1\5\1\1\1\40\1\u0094",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\46\1\5\1\1\1\47\1\u0095",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\u0083\1\5\1\1\1\u0084\1\u0096",
"\1\1\10\uffff\3\1\1\5\3\uffff\1\1\1\uffff\3\1",
"\1\1\6\uffff\1\5\1\uffff\1\1\1\u0097\1\1\4\uffff\1\1\1\uffff"+
"\3\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\1\1\1\u0098\1\1\1\uffff"+
"\1\5\2\uffff\1\u0099\1\uffff\1\1\1\u009a\1\1",
"\1\1\10\uffff\1\1\1\u009b\1\1\4\uffff\1\1\1\uffff\3\1",
"\1\1\10\uffff\1\1\1\u009c\1\1\4\uffff\1\1\1\uffff\3\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\1\1\1\u009d\1\1\1\uffff"+
"\1\5\2\uffff\1\u0099\1\uffff\1\1\1\u009a\1\1",
"\1\5\1\1\4\uffff\1\5\3\uffff\1\u009e\1\1\1\u009f\4\uffff\1"+
"\1\1\uffff\3\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\u0099\1\5\1\u00a0\1\u009a\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\u0099\1\5\1\1\1\u009a\1\u00a1",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\50\1\uffff\1\5\1\51\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\u00a2\1\1\1\u00a4\1\u00a3\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\u00a2\1\1\1\5\1\u00a3\1\u00a5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\67\1\uffff\1\5\1\70\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\72\1\uffff\1\5\1\73\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\u00a2\1\uffff\1\5\1\u00a3\1\5",
"\1\5\10\uffff\1\5\1\u00a6\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\10\uffff\1\5\1\u00a7\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\53\1\uffff\1\5\1\54\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\56\1\uffff\1\5\1\57\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\u00a9\1\1\1\u00a8\1\u00aa\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\u00a9\1\1\1\5\1\u00aa\1\u00ab",
"\1\5\10\uffff\1\5\1\u00ac\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\10\uffff\1\5\1\u00ad\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\u00a9\1\uffff\1\5\1\u00aa\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\62\1\uffff\1\5\1\63\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\64\1\uffff\1\5\1\65\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\145\1\1\1\u00ae\1\146\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\145\1\1\1\5\1\146\1\u00af",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\145\1\uffff\1\5\1\146\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\153\1\1\1\u00b0\1\154\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\153\1\1\1\5\1\154\1\u00b1",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\153\1\uffff\1\5\1\154\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\50\1\uffff\1\5\1\51\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\u00a2\1\uffff\1\5\1\u00a3\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\67\1\uffff\1\5\1\70\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\72\1\uffff\1\5\1\73\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\53\1\uffff\1\5\1\54\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\56\1\uffff\1\5\1\57\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\u00a9\1\uffff\1\5\1\u00aa\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\62\1\uffff\1\5\1\63\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\64\1\uffff\1\5\1\65\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\145\1\uffff\1\5\1\146\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\153\1\uffff\1\5\1\154\1\5",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\10\1\uffff\1\1\1\11\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\15\1\uffff\1\1\1\16\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\111\1\uffff\1\1\1\112\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\132\1\uffff\1\1\1\133\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\37\1\uffff\1\1\1\40\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\46\1\uffff\1\1\1\47\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\111\1\uffff\1\1\1\112\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\10\1\uffff\1\1\1\11\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\15\1\uffff\1\1\1\16\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\132\1\uffff\1\1\1\133\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\37\1\uffff\1\1\1\40\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\46\1\uffff\1\1\1\47\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\1\1\1\u00b2\1\1\1\uffff"+
"\1\5\2\uffff\1\111\1\uffff\1\1\1\112\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\1\1\1\u00b3\1\1\1\uffff"+
"\1\5\2\uffff\1\132\1\uffff\1\1\1\133\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\1\1\1\u00b4\1\1\1\uffff"+
"\1\5\2\uffff\1\111\1\uffff\1\1\1\112\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\1\1\1\u00b5\1\1\1\uffff"+
"\1\5\2\uffff\1\132\1\uffff\1\1\1\133\1\1",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\u00b6\1\5\1\uffff"+
"\1\1\2\uffff\1\u00a2\1\uffff\1\5\1\u00a3\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\u00b7\1\5\1\uffff"+
"\1\1\2\uffff\1\u00a2\1\uffff\1\5\1\u00a3\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\u00b8\1\5\1\uffff"+
"\1\1\2\uffff\1\u00a9\1\uffff\1\5\1\u00aa\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\u00b9\1\5\1\uffff"+
"\1\1\2\uffff\1\u00a9\1\uffff\1\5\1\u00aa\1\5",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\u0083\1\uffff\1\1\1\u0084\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\u0099\1\uffff\1\1\1\u009a\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\u0083\1\uffff\1\1\1\u0084\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\u0099\1\uffff\1\1\1\u009a\1\1"
};
static final short[] DFA30_eot = DFA.unpackEncodedString(DFA30_eotS);
static final short[] DFA30_eof = DFA.unpackEncodedString(DFA30_eofS);
static final char[] DFA30_min = DFA.unpackEncodedStringToUnsignedChars(DFA30_minS);
static final char[] DFA30_max = DFA.unpackEncodedStringToUnsignedChars(DFA30_maxS);
static final short[] DFA30_accept = DFA.unpackEncodedString(DFA30_acceptS);
static final short[] DFA30_special = DFA.unpackEncodedString(DFA30_specialS);
static final short[][] DFA30_transition;
static {
int numStates = DFA30_transitionS.length;
DFA30_transition = new short[numStates][];
for (int i=0; i<numStates; i++) {
DFA30_transition[i] = DFA.unpackEncodedString(DFA30_transitionS[i]);
}
}
class DFA30 extends DFA {
public DFA30(BaseRecognizer recognizer) {
this.recognizer = recognizer;
this.decisionNumber = 30;
this.eot = DFA30_eot;
this.eof = DFA30_eof;
this.min = DFA30_min;
this.max = DFA30_max;
this.accept = DFA30_accept;
this.special = DFA30_special;
this.transition = DFA30_transition;
}
public String getDescription() {
return "()* loopback of 1147:1: (kw= '.' this_Name_2= ruleName )*";
}
}
public static final BitSet FOLLOW_ruleScript_in_entryRuleScript75 = new BitSet(new long[]{0x0000000000000000L});
public static final BitSet FOLLOW_EOF_in_entryRuleScript85 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_rulePackageDeclare_in_ruleScript131 = new BitSet(new long[]{0x0000000000014812L});
public static final BitSet FOLLOW_ruleImportDeclare_in_ruleScript152 = new BitSet(new long[]{0x0000000000014812L});
public static final BitSet FOLLOW_ruleOperatorDeclare_in_ruleScript174 = new BitSet(new long[]{0x0000000000014012L});
public static final BitSet FOLLOW_ruleFlowDsl_in_ruleScript196 = new BitSet(new long[]{0x0000000000010012L});
public static final BitSet FOLLOW_rulePackageDeclare_in_entryRulePackageDeclare233 = new BitSet(new long[]{0x0000000000000000L});
public static final BitSet FOLLOW_EOF_in_entryRulePackageDeclare243 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_9_in_rulePackageDeclare280 = new BitSet(new long[]{0x0000000003A1C020L});
public static final BitSet FOLLOW_ruleFQN_in_rulePackageDeclare301 = new BitSet(new long[]{0x0000000000000402L});
public static final BitSet FOLLOW_10_in_rulePackageDeclare314 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleImportDeclare_in_entryRuleImportDeclare352 = new BitSet(new long[]{0x0000000000000000L});
public static final BitSet FOLLOW_EOF_in_entryRuleImportDeclare362 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_11_in_ruleImportDeclare399 = new BitSet(new long[]{0x0000000003A1C020L});
public static final BitSet FOLLOW_ruleFQN_in_ruleImportDeclare420 = new BitSet(new long[]{0x0000000000001402L});
public static final BitSet FOLLOW_12_in_ruleImportDeclare433 = new BitSet(new long[]{0x0000000000002000L});
public static final BitSet FOLLOW_13_in_ruleImportDeclare451 = new BitSet(new long[]{0x0000000000000402L});
public static final BitSet FOLLOW_10_in_ruleImportDeclare479 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleOperatorDeclare_in_entryRuleOperatorDeclare517 = new BitSet(new long[]{0x0000000000000000L});
public static final BitSet FOLLOW_EOF_in_entryRuleOperatorDeclare527 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_14_in_ruleOperatorDeclare564 = new BitSet(new long[]{0x0000000003A1C020L});
public static final BitSet FOLLOW_ruleFQN_in_ruleOperatorDeclare585 = new BitSet(new long[]{0x0000000000008000L});
public static final BitSet FOLLOW_15_in_ruleOperatorDeclare597 = new BitSet(new long[]{0x0000000003A1C020L});
public static final BitSet FOLLOW_ruleName_in_ruleOperatorDeclare618 = new BitSet(new long[]{0x0000000000000402L});
public static final BitSet FOLLOW_10_in_ruleOperatorDeclare631 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleFlowDsl_in_entryRuleFlowDsl669 = new BitSet(new long[]{0x0000000000000000L});
public static final BitSet FOLLOW_EOF_in_entryRuleFlowDsl679 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_RULE_STRING_in_ruleFlowDsl721 = new BitSet(new long[]{0x0000000000010000L});
public static final BitSet FOLLOW_16_in_ruleFlowDsl739 = new BitSet(new long[]{0x0000000003A1C020L});
public static final BitSet FOLLOW_ruleName_in_ruleFlowDsl760 = new BitSet(new long[]{0x0000000000020000L});
public static final BitSet FOLLOW_17_in_ruleFlowDsl772 = new BitSet(new long[]{0x0000000001200000L});
public static final BitSet FOLLOW_ruleFlowParameter_in_ruleFlowDsl793 = new BitSet(new long[]{0x0000000001240000L});
public static final BitSet FOLLOW_18_in_ruleFlowDsl806 = new BitSet(new long[]{0x0000000000080000L});
public static final BitSet FOLLOW_19_in_ruleFlowDsl818 = new BitSet(new long[]{0x0000000003B1C020L});
public static final BitSet FOLLOW_ruleFlowStatement_in_ruleFlowDsl839 = new BitSet(new long[]{0x0000000003B1C020L});
public static final BitSet FOLLOW_20_in_ruleFlowDsl852 = new BitSet(new long[]{0x0000000000000402L});
public static final BitSet FOLLOW_10_in_ruleFlowDsl865 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleFlowParameter_in_entryRuleFlowParameter903 = new BitSet(new long[]{0x0000000000000000L});
public static final BitSet FOLLOW_EOF_in_entryRuleFlowParameter913 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleFlowIn_in_ruleFlowParameter959 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleFlowOut_in_ruleFlowParameter986 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleFlowIn_in_entryRuleFlowIn1022 = new BitSet(new long[]{0x0000000000000000L});
public static final BitSet FOLLOW_EOF_in_entryRuleFlowIn1032 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_21_in_ruleFlowIn1075 = new BitSet(new long[]{0x0000000003A1C020L});
public static final BitSet FOLLOW_ruleName_in_ruleFlowIn1109 = new BitSet(new long[]{0x0000000000008000L});
public static final BitSet FOLLOW_15_in_ruleFlowIn1121 = new BitSet(new long[]{0x0000000003A1C020L});
public static final BitSet FOLLOW_ruleName_in_ruleFlowIn1142 = new BitSet(new long[]{0x0000000000C01402L});
public static final BitSet FOLLOW_22_in_ruleFlowIn1156 = new BitSet(new long[]{0x0000000000800000L});
public static final BitSet FOLLOW_23_in_ruleFlowIn1170 = new BitSet(new long[]{0x0000000003A1C020L});
public static final BitSet FOLLOW_ruleFQN_in_ruleFlowIn1191 = new BitSet(new long[]{0x0000000000009402L});
public static final BitSet FOLLOW_15_in_ruleFlowIn1204 = new BitSet(new long[]{0x0000000003A1C020L});
public static final BitSet FOLLOW_ruleName_in_ruleFlowIn1225 = new BitSet(new long[]{0x0000000000001402L});
public static final BitSet FOLLOW_10_in_ruleFlowIn1242 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_12_in_ruleFlowIn1260 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleFlowOut_in_entryRuleFlowOut1298 = new BitSet(new long[]{0x0000000000000000L});
public static final BitSet FOLLOW_EOF_in_entryRuleFlowOut1308 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_24_in_ruleFlowOut1351 = new BitSet(new long[]{0x0000000003A1C020L});
public static final BitSet FOLLOW_ruleName_in_ruleFlowOut1385 = new BitSet(new long[]{0x0000000000008000L});
public static final BitSet FOLLOW_15_in_ruleFlowOut1397 = new BitSet(new long[]{0x0000000003A1C020L});
public static final BitSet FOLLOW_ruleName_in_ruleFlowOut1418 = new BitSet(new long[]{0x0000000002401402L});
public static final BitSet FOLLOW_22_in_ruleFlowOut1432 = new BitSet(new long[]{0x0000000002000000L});
public static final BitSet FOLLOW_25_in_ruleFlowOut1446 = new BitSet(new long[]{0x0000000003A1C020L});
public static final BitSet FOLLOW_ruleFQN_in_ruleFlowOut1467 = new BitSet(new long[]{0x0000000000009402L});
public static final BitSet FOLLOW_15_in_ruleFlowOut1480 = new BitSet(new long[]{0x0000000003A1C020L});
public static final BitSet FOLLOW_ruleName_in_ruleFlowOut1501 = new BitSet(new long[]{0x0000000000001402L});
public static final BitSet FOLLOW_10_in_ruleFlowOut1518 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_12_in_ruleFlowOut1536 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleFlowStatement_in_entryRuleFlowStatement1574 = new BitSet(new long[]{0x0000000000000000L});
public static final BitSet FOLLOW_EOF_in_entryRuleFlowStatement1584 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleFlowStatement1_in_ruleFlowStatement1631 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleFlowStatement2_in_ruleFlowStatement1658 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleFlowStatement1_in_entryRuleFlowStatement11693 = new BitSet(new long[]{0x0000000000000000L});
public static final BitSet FOLLOW_EOF_in_entryRuleFlowStatement11703 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleName_in_ruleFlowStatement11750 = new BitSet(new long[]{0x0000000004000000L});
public static final BitSet FOLLOW_26_in_ruleFlowStatement11762 = new BitSet(new long[]{0x0000000000000020L});
public static final BitSet FOLLOW_RULE_ID_in_ruleFlowStatement11784 = new BitSet(new long[]{0x0000000000001000L});
public static final BitSet FOLLOW_12_in_ruleFlowStatement11796 = new BitSet(new long[]{0x0000000003A1C020L});
public static final BitSet FOLLOW_ruleName_in_ruleFlowStatement11817 = new BitSet(new long[]{0x0000000000020000L});
public static final BitSet FOLLOW_17_in_ruleFlowStatement11829 = new BitSet(new long[]{0x0000000000040020L});
public static final BitSet FOLLOW_ruleOperatorArgument_in_ruleFlowStatement11851 = new BitSet(new long[]{0x0000000000440000L});
public static final BitSet FOLLOW_22_in_ruleFlowStatement11864 = new BitSet(new long[]{0x0000000000000020L});
public static final BitSet FOLLOW_ruleOperatorArgument_in_ruleFlowStatement11885 = new BitSet(new long[]{0x0000000000440000L});
public static final BitSet FOLLOW_18_in_ruleFlowStatement11901 = new BitSet(new long[]{0x0000000000001402L});
public static final BitSet FOLLOW_10_in_ruleFlowStatement11914 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_12_in_ruleFlowStatement11932 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleFlowStatement2_in_entryRuleFlowStatement21970 = new BitSet(new long[]{0x0000000000000000L});
public static final BitSet FOLLOW_EOF_in_entryRuleFlowStatement21980 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_RULE_ID_in_ruleFlowStatement22025 = new BitSet(new long[]{0x0000000008000000L});
public static final BitSet FOLLOW_27_in_ruleFlowStatement22037 = new BitSet(new long[]{0x0000000000020000L});
public static final BitSet FOLLOW_17_in_ruleFlowStatement22049 = new BitSet(new long[]{0x0000000000040020L});
public static final BitSet FOLLOW_ruleOperatorArgument_in_ruleFlowStatement22071 = new BitSet(new long[]{0x0000000000440000L});
public static final BitSet FOLLOW_22_in_ruleFlowStatement22084 = new BitSet(new long[]{0x0000000000000020L});
public static final BitSet FOLLOW_ruleOperatorArgument_in_ruleFlowStatement22105 = new BitSet(new long[]{0x0000000000440000L});
public static final BitSet FOLLOW_18_in_ruleFlowStatement22121 = new BitSet(new long[]{0x0000000000001402L});
public static final BitSet FOLLOW_10_in_ruleFlowStatement22134 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_12_in_ruleFlowStatement22152 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleOperatorArgument_in_entryRuleOperatorArgument2190 = new BitSet(new long[]{0x0000000000000000L});
public static final BitSet FOLLOW_EOF_in_entryRuleOperatorArgument2200 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_RULE_ID_in_ruleOperatorArgument2246 = new BitSet(new long[]{0x0000000000001000L});
public static final BitSet FOLLOW_12_in_ruleOperatorArgument2258 = new BitSet(new long[]{0x0000000003A1C020L});
public static final BitSet FOLLOW_ruleName_in_ruleOperatorArgument2279 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_RULE_ID_in_ruleOperatorArgument2306 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleFQN_in_entryRuleFQN2343 = new BitSet(new long[]{0x0000000000000000L});
public static final BitSet FOLLOW_EOF_in_entryRuleFQN2354 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleName_in_ruleFQN2401 = new BitSet(new long[]{0x0000000000001002L});
public static final BitSet FOLLOW_12_in_ruleFQN2420 = new BitSet(new long[]{0x0000000003A1C020L});
public static final BitSet FOLLOW_ruleName_in_ruleFQN2442 = new BitSet(new long[]{0x0000000000001002L});
public static final BitSet FOLLOW_ruleName_in_entryRuleName2490 = new BitSet(new long[]{0x0000000000000000L});
public static final BitSet FOLLOW_EOF_in_entryRuleName2501 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_RULE_ID_in_ruleName2541 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_14_in_ruleName2565 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_16_in_ruleName2584 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_21_in_ruleName2603 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_24_in_ruleName2622 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_15_in_ruleName2641 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_23_in_ruleName2660 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_25_in_ruleName2679 = new BitSet(new long[]{0x0000000000000002L});
} | UTF-8 | Java | 179,365 | java | InternalFlowDslParser.java | Java | [] | null | [] | package jp.hishidama.xtext.afw.flow_dsl.parser.antlr.internal;
import org.eclipse.xtext.*;
import org.eclipse.xtext.parser.*;
import org.eclipse.xtext.parser.impl.*;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken;
import jp.hishidama.xtext.afw.flow_dsl.services.FlowDslGrammarAccess;
import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;
@SuppressWarnings("all")
public class InternalFlowDslParser extends AbstractInternalAntlrParser {
public static final String[] tokenNames = new String[] {
"<invalid>", "<EOR>", "<DOWN>", "<UP>", "RULE_STRING", "RULE_ID", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "'package'", "';'", "'import'", "'.'", "'*'", "'operator'", "'as'", "'jobflow'", "'('", "')'", "'{'", "'}'", "'in'", "','", "'importer'", "'out'", "'exporter'", "'='", "'+='"
};
public static final int RULE_ID=5;
public static final int T__27=27;
public static final int T__26=26;
public static final int T__25=25;
public static final int T__24=24;
public static final int T__23=23;
public static final int T__22=22;
public static final int T__21=21;
public static final int T__20=20;
public static final int RULE_SL_COMMENT=7;
public static final int EOF=-1;
public static final int T__9=9;
public static final int RULE_ML_COMMENT=6;
public static final int T__19=19;
public static final int RULE_STRING=4;
public static final int T__16=16;
public static final int T__15=15;
public static final int T__18=18;
public static final int T__17=17;
public static final int T__12=12;
public static final int T__11=11;
public static final int T__14=14;
public static final int T__13=13;
public static final int T__10=10;
public static final int RULE_WS=8;
// delegates
// delegators
public InternalFlowDslParser(TokenStream input) {
this(input, new RecognizerSharedState());
}
public InternalFlowDslParser(TokenStream input, RecognizerSharedState state) {
super(input, state);
}
public String[] getTokenNames() { return InternalFlowDslParser.tokenNames; }
public String getGrammarFileName() { return "../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g"; }
private FlowDslGrammarAccess grammarAccess;
public InternalFlowDslParser(TokenStream input, FlowDslGrammarAccess grammarAccess) {
this(input);
this.grammarAccess = grammarAccess;
registerRules(grammarAccess.getGrammar());
}
@Override
protected String getFirstRuleName() {
return "Script";
}
@Override
protected FlowDslGrammarAccess getGrammarAccess() {
return grammarAccess;
}
// $ANTLR start "entryRuleScript"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:67:1: entryRuleScript returns [EObject current=null] : iv_ruleScript= ruleScript EOF ;
public final EObject entryRuleScript() throws RecognitionException {
EObject current = null;
EObject iv_ruleScript = null;
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:68:2: (iv_ruleScript= ruleScript EOF )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:69:2: iv_ruleScript= ruleScript EOF
{
newCompositeNode(grammarAccess.getScriptRule());
pushFollow(FOLLOW_ruleScript_in_entryRuleScript75);
iv_ruleScript=ruleScript();
state._fsp--;
current =iv_ruleScript;
match(input,EOF,FOLLOW_EOF_in_entryRuleScript85);
}
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "entryRuleScript"
// $ANTLR start "ruleScript"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:76:1: ruleScript returns [EObject current=null] : ( ( (lv_package_0_0= rulePackageDeclare ) ) ( (lv_imports_1_0= ruleImportDeclare ) )* ( (lv_operators_2_0= ruleOperatorDeclare ) )* ( (lv_list_3_0= ruleFlowDsl ) )* ) ;
public final EObject ruleScript() throws RecognitionException {
EObject current = null;
EObject lv_package_0_0 = null;
EObject lv_imports_1_0 = null;
EObject lv_operators_2_0 = null;
EObject lv_list_3_0 = null;
enterRule();
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:79:28: ( ( ( (lv_package_0_0= rulePackageDeclare ) ) ( (lv_imports_1_0= ruleImportDeclare ) )* ( (lv_operators_2_0= ruleOperatorDeclare ) )* ( (lv_list_3_0= ruleFlowDsl ) )* ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:80:1: ( ( (lv_package_0_0= rulePackageDeclare ) ) ( (lv_imports_1_0= ruleImportDeclare ) )* ( (lv_operators_2_0= ruleOperatorDeclare ) )* ( (lv_list_3_0= ruleFlowDsl ) )* )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:80:1: ( ( (lv_package_0_0= rulePackageDeclare ) ) ( (lv_imports_1_0= ruleImportDeclare ) )* ( (lv_operators_2_0= ruleOperatorDeclare ) )* ( (lv_list_3_0= ruleFlowDsl ) )* )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:80:2: ( (lv_package_0_0= rulePackageDeclare ) ) ( (lv_imports_1_0= ruleImportDeclare ) )* ( (lv_operators_2_0= ruleOperatorDeclare ) )* ( (lv_list_3_0= ruleFlowDsl ) )*
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:80:2: ( (lv_package_0_0= rulePackageDeclare ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:81:1: (lv_package_0_0= rulePackageDeclare )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:81:1: (lv_package_0_0= rulePackageDeclare )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:82:3: lv_package_0_0= rulePackageDeclare
{
newCompositeNode(grammarAccess.getScriptAccess().getPackagePackageDeclareParserRuleCall_0_0());
pushFollow(FOLLOW_rulePackageDeclare_in_ruleScript131);
lv_package_0_0=rulePackageDeclare();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getScriptRule());
}
set(
current,
"package",
lv_package_0_0,
"PackageDeclare");
afterParserOrEnumRuleCall();
}
}
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:98:2: ( (lv_imports_1_0= ruleImportDeclare ) )*
loop1:
do {
int alt1=2;
int LA1_0 = input.LA(1);
if ( (LA1_0==11) ) {
alt1=1;
}
switch (alt1) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:99:1: (lv_imports_1_0= ruleImportDeclare )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:99:1: (lv_imports_1_0= ruleImportDeclare )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:100:3: lv_imports_1_0= ruleImportDeclare
{
newCompositeNode(grammarAccess.getScriptAccess().getImportsImportDeclareParserRuleCall_1_0());
pushFollow(FOLLOW_ruleImportDeclare_in_ruleScript152);
lv_imports_1_0=ruleImportDeclare();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getScriptRule());
}
add(
current,
"imports",
lv_imports_1_0,
"ImportDeclare");
afterParserOrEnumRuleCall();
}
}
break;
default :
break loop1;
}
} while (true);
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:116:3: ( (lv_operators_2_0= ruleOperatorDeclare ) )*
loop2:
do {
int alt2=2;
int LA2_0 = input.LA(1);
if ( (LA2_0==14) ) {
alt2=1;
}
switch (alt2) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:117:1: (lv_operators_2_0= ruleOperatorDeclare )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:117:1: (lv_operators_2_0= ruleOperatorDeclare )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:118:3: lv_operators_2_0= ruleOperatorDeclare
{
newCompositeNode(grammarAccess.getScriptAccess().getOperatorsOperatorDeclareParserRuleCall_2_0());
pushFollow(FOLLOW_ruleOperatorDeclare_in_ruleScript174);
lv_operators_2_0=ruleOperatorDeclare();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getScriptRule());
}
add(
current,
"operators",
lv_operators_2_0,
"OperatorDeclare");
afterParserOrEnumRuleCall();
}
}
break;
default :
break loop2;
}
} while (true);
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:134:3: ( (lv_list_3_0= ruleFlowDsl ) )*
loop3:
do {
int alt3=2;
int LA3_0 = input.LA(1);
if ( (LA3_0==RULE_STRING||LA3_0==16) ) {
alt3=1;
}
switch (alt3) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:135:1: (lv_list_3_0= ruleFlowDsl )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:135:1: (lv_list_3_0= ruleFlowDsl )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:136:3: lv_list_3_0= ruleFlowDsl
{
newCompositeNode(grammarAccess.getScriptAccess().getListFlowDslParserRuleCall_3_0());
pushFollow(FOLLOW_ruleFlowDsl_in_ruleScript196);
lv_list_3_0=ruleFlowDsl();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getScriptRule());
}
add(
current,
"list",
lv_list_3_0,
"FlowDsl");
afterParserOrEnumRuleCall();
}
}
break;
default :
break loop3;
}
} while (true);
}
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "ruleScript"
// $ANTLR start "entryRulePackageDeclare"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:160:1: entryRulePackageDeclare returns [EObject current=null] : iv_rulePackageDeclare= rulePackageDeclare EOF ;
public final EObject entryRulePackageDeclare() throws RecognitionException {
EObject current = null;
EObject iv_rulePackageDeclare = null;
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:161:2: (iv_rulePackageDeclare= rulePackageDeclare EOF )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:162:2: iv_rulePackageDeclare= rulePackageDeclare EOF
{
newCompositeNode(grammarAccess.getPackageDeclareRule());
pushFollow(FOLLOW_rulePackageDeclare_in_entryRulePackageDeclare233);
iv_rulePackageDeclare=rulePackageDeclare();
state._fsp--;
current =iv_rulePackageDeclare;
match(input,EOF,FOLLOW_EOF_in_entryRulePackageDeclare243);
}
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "entryRulePackageDeclare"
// $ANTLR start "rulePackageDeclare"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:169:1: rulePackageDeclare returns [EObject current=null] : (otherlv_0= 'package' ( (lv_name_1_0= ruleFQN ) ) (otherlv_2= ';' )? ) ;
public final EObject rulePackageDeclare() throws RecognitionException {
EObject current = null;
Token otherlv_0=null;
Token otherlv_2=null;
AntlrDatatypeRuleToken lv_name_1_0 = null;
enterRule();
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:172:28: ( (otherlv_0= 'package' ( (lv_name_1_0= ruleFQN ) ) (otherlv_2= ';' )? ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:173:1: (otherlv_0= 'package' ( (lv_name_1_0= ruleFQN ) ) (otherlv_2= ';' )? )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:173:1: (otherlv_0= 'package' ( (lv_name_1_0= ruleFQN ) ) (otherlv_2= ';' )? )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:173:3: otherlv_0= 'package' ( (lv_name_1_0= ruleFQN ) ) (otherlv_2= ';' )?
{
otherlv_0=(Token)match(input,9,FOLLOW_9_in_rulePackageDeclare280);
newLeafNode(otherlv_0, grammarAccess.getPackageDeclareAccess().getPackageKeyword_0());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:177:1: ( (lv_name_1_0= ruleFQN ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:178:1: (lv_name_1_0= ruleFQN )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:178:1: (lv_name_1_0= ruleFQN )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:179:3: lv_name_1_0= ruleFQN
{
newCompositeNode(grammarAccess.getPackageDeclareAccess().getNameFQNParserRuleCall_1_0());
pushFollow(FOLLOW_ruleFQN_in_rulePackageDeclare301);
lv_name_1_0=ruleFQN();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getPackageDeclareRule());
}
set(
current,
"name",
lv_name_1_0,
"FQN");
afterParserOrEnumRuleCall();
}
}
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:195:2: (otherlv_2= ';' )?
int alt4=2;
int LA4_0 = input.LA(1);
if ( (LA4_0==10) ) {
alt4=1;
}
switch (alt4) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:195:4: otherlv_2= ';'
{
otherlv_2=(Token)match(input,10,FOLLOW_10_in_rulePackageDeclare314);
newLeafNode(otherlv_2, grammarAccess.getPackageDeclareAccess().getSemicolonKeyword_2());
}
break;
}
}
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "rulePackageDeclare"
// $ANTLR start "entryRuleImportDeclare"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:207:1: entryRuleImportDeclare returns [EObject current=null] : iv_ruleImportDeclare= ruleImportDeclare EOF ;
public final EObject entryRuleImportDeclare() throws RecognitionException {
EObject current = null;
EObject iv_ruleImportDeclare = null;
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:208:2: (iv_ruleImportDeclare= ruleImportDeclare EOF )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:209:2: iv_ruleImportDeclare= ruleImportDeclare EOF
{
newCompositeNode(grammarAccess.getImportDeclareRule());
pushFollow(FOLLOW_ruleImportDeclare_in_entryRuleImportDeclare352);
iv_ruleImportDeclare=ruleImportDeclare();
state._fsp--;
current =iv_ruleImportDeclare;
match(input,EOF,FOLLOW_EOF_in_entryRuleImportDeclare362);
}
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "entryRuleImportDeclare"
// $ANTLR start "ruleImportDeclare"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:216:1: ruleImportDeclare returns [EObject current=null] : (otherlv_0= 'import' ( (lv_name_1_0= ruleFQN ) ) (otherlv_2= '.' ( (lv_wildcard_3_0= '*' ) ) )? (otherlv_4= ';' )? ) ;
public final EObject ruleImportDeclare() throws RecognitionException {
EObject current = null;
Token otherlv_0=null;
Token otherlv_2=null;
Token lv_wildcard_3_0=null;
Token otherlv_4=null;
AntlrDatatypeRuleToken lv_name_1_0 = null;
enterRule();
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:219:28: ( (otherlv_0= 'import' ( (lv_name_1_0= ruleFQN ) ) (otherlv_2= '.' ( (lv_wildcard_3_0= '*' ) ) )? (otherlv_4= ';' )? ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:220:1: (otherlv_0= 'import' ( (lv_name_1_0= ruleFQN ) ) (otherlv_2= '.' ( (lv_wildcard_3_0= '*' ) ) )? (otherlv_4= ';' )? )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:220:1: (otherlv_0= 'import' ( (lv_name_1_0= ruleFQN ) ) (otherlv_2= '.' ( (lv_wildcard_3_0= '*' ) ) )? (otherlv_4= ';' )? )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:220:3: otherlv_0= 'import' ( (lv_name_1_0= ruleFQN ) ) (otherlv_2= '.' ( (lv_wildcard_3_0= '*' ) ) )? (otherlv_4= ';' )?
{
otherlv_0=(Token)match(input,11,FOLLOW_11_in_ruleImportDeclare399);
newLeafNode(otherlv_0, grammarAccess.getImportDeclareAccess().getImportKeyword_0());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:224:1: ( (lv_name_1_0= ruleFQN ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:225:1: (lv_name_1_0= ruleFQN )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:225:1: (lv_name_1_0= ruleFQN )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:226:3: lv_name_1_0= ruleFQN
{
newCompositeNode(grammarAccess.getImportDeclareAccess().getNameFQNParserRuleCall_1_0());
pushFollow(FOLLOW_ruleFQN_in_ruleImportDeclare420);
lv_name_1_0=ruleFQN();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getImportDeclareRule());
}
set(
current,
"name",
lv_name_1_0,
"FQN");
afterParserOrEnumRuleCall();
}
}
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:242:2: (otherlv_2= '.' ( (lv_wildcard_3_0= '*' ) ) )?
int alt5=2;
int LA5_0 = input.LA(1);
if ( (LA5_0==12) ) {
alt5=1;
}
switch (alt5) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:242:4: otherlv_2= '.' ( (lv_wildcard_3_0= '*' ) )
{
otherlv_2=(Token)match(input,12,FOLLOW_12_in_ruleImportDeclare433);
newLeafNode(otherlv_2, grammarAccess.getImportDeclareAccess().getFullStopKeyword_2_0());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:246:1: ( (lv_wildcard_3_0= '*' ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:247:1: (lv_wildcard_3_0= '*' )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:247:1: (lv_wildcard_3_0= '*' )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:248:3: lv_wildcard_3_0= '*'
{
lv_wildcard_3_0=(Token)match(input,13,FOLLOW_13_in_ruleImportDeclare451);
newLeafNode(lv_wildcard_3_0, grammarAccess.getImportDeclareAccess().getWildcardAsteriskKeyword_2_1_0());
if (current==null) {
current = createModelElement(grammarAccess.getImportDeclareRule());
}
setWithLastConsumed(current, "wildcard", true, "*");
}
}
}
break;
}
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:261:4: (otherlv_4= ';' )?
int alt6=2;
int LA6_0 = input.LA(1);
if ( (LA6_0==10) ) {
alt6=1;
}
switch (alt6) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:261:6: otherlv_4= ';'
{
otherlv_4=(Token)match(input,10,FOLLOW_10_in_ruleImportDeclare479);
newLeafNode(otherlv_4, grammarAccess.getImportDeclareAccess().getSemicolonKeyword_3());
}
break;
}
}
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "ruleImportDeclare"
// $ANTLR start "entryRuleOperatorDeclare"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:273:1: entryRuleOperatorDeclare returns [EObject current=null] : iv_ruleOperatorDeclare= ruleOperatorDeclare EOF ;
public final EObject entryRuleOperatorDeclare() throws RecognitionException {
EObject current = null;
EObject iv_ruleOperatorDeclare = null;
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:274:2: (iv_ruleOperatorDeclare= ruleOperatorDeclare EOF )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:275:2: iv_ruleOperatorDeclare= ruleOperatorDeclare EOF
{
newCompositeNode(grammarAccess.getOperatorDeclareRule());
pushFollow(FOLLOW_ruleOperatorDeclare_in_entryRuleOperatorDeclare517);
iv_ruleOperatorDeclare=ruleOperatorDeclare();
state._fsp--;
current =iv_ruleOperatorDeclare;
match(input,EOF,FOLLOW_EOF_in_entryRuleOperatorDeclare527);
}
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "entryRuleOperatorDeclare"
// $ANTLR start "ruleOperatorDeclare"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:282:1: ruleOperatorDeclare returns [EObject current=null] : (otherlv_0= 'operator' ( (lv_operator_1_0= ruleFQN ) ) otherlv_2= 'as' ( (lv_name_3_0= ruleName ) ) (otherlv_4= ';' )? ) ;
public final EObject ruleOperatorDeclare() throws RecognitionException {
EObject current = null;
Token otherlv_0=null;
Token otherlv_2=null;
Token otherlv_4=null;
AntlrDatatypeRuleToken lv_operator_1_0 = null;
AntlrDatatypeRuleToken lv_name_3_0 = null;
enterRule();
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:285:28: ( (otherlv_0= 'operator' ( (lv_operator_1_0= ruleFQN ) ) otherlv_2= 'as' ( (lv_name_3_0= ruleName ) ) (otherlv_4= ';' )? ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:286:1: (otherlv_0= 'operator' ( (lv_operator_1_0= ruleFQN ) ) otherlv_2= 'as' ( (lv_name_3_0= ruleName ) ) (otherlv_4= ';' )? )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:286:1: (otherlv_0= 'operator' ( (lv_operator_1_0= ruleFQN ) ) otherlv_2= 'as' ( (lv_name_3_0= ruleName ) ) (otherlv_4= ';' )? )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:286:3: otherlv_0= 'operator' ( (lv_operator_1_0= ruleFQN ) ) otherlv_2= 'as' ( (lv_name_3_0= ruleName ) ) (otherlv_4= ';' )?
{
otherlv_0=(Token)match(input,14,FOLLOW_14_in_ruleOperatorDeclare564);
newLeafNode(otherlv_0, grammarAccess.getOperatorDeclareAccess().getOperatorKeyword_0());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:290:1: ( (lv_operator_1_0= ruleFQN ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:291:1: (lv_operator_1_0= ruleFQN )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:291:1: (lv_operator_1_0= ruleFQN )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:292:3: lv_operator_1_0= ruleFQN
{
newCompositeNode(grammarAccess.getOperatorDeclareAccess().getOperatorFQNParserRuleCall_1_0());
pushFollow(FOLLOW_ruleFQN_in_ruleOperatorDeclare585);
lv_operator_1_0=ruleFQN();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getOperatorDeclareRule());
}
set(
current,
"operator",
lv_operator_1_0,
"FQN");
afterParserOrEnumRuleCall();
}
}
otherlv_2=(Token)match(input,15,FOLLOW_15_in_ruleOperatorDeclare597);
newLeafNode(otherlv_2, grammarAccess.getOperatorDeclareAccess().getAsKeyword_2());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:312:1: ( (lv_name_3_0= ruleName ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:313:1: (lv_name_3_0= ruleName )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:313:1: (lv_name_3_0= ruleName )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:314:3: lv_name_3_0= ruleName
{
newCompositeNode(grammarAccess.getOperatorDeclareAccess().getNameNameParserRuleCall_3_0());
pushFollow(FOLLOW_ruleName_in_ruleOperatorDeclare618);
lv_name_3_0=ruleName();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getOperatorDeclareRule());
}
set(
current,
"name",
lv_name_3_0,
"Name");
afterParserOrEnumRuleCall();
}
}
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:330:2: (otherlv_4= ';' )?
int alt7=2;
int LA7_0 = input.LA(1);
if ( (LA7_0==10) ) {
alt7=1;
}
switch (alt7) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:330:4: otherlv_4= ';'
{
otherlv_4=(Token)match(input,10,FOLLOW_10_in_ruleOperatorDeclare631);
newLeafNode(otherlv_4, grammarAccess.getOperatorDeclareAccess().getSemicolonKeyword_4());
}
break;
}
}
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "ruleOperatorDeclare"
// $ANTLR start "entryRuleFlowDsl"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:342:1: entryRuleFlowDsl returns [EObject current=null] : iv_ruleFlowDsl= ruleFlowDsl EOF ;
public final EObject entryRuleFlowDsl() throws RecognitionException {
EObject current = null;
EObject iv_ruleFlowDsl = null;
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:343:2: (iv_ruleFlowDsl= ruleFlowDsl EOF )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:344:2: iv_ruleFlowDsl= ruleFlowDsl EOF
{
newCompositeNode(grammarAccess.getFlowDslRule());
pushFollow(FOLLOW_ruleFlowDsl_in_entryRuleFlowDsl669);
iv_ruleFlowDsl=ruleFlowDsl();
state._fsp--;
current =iv_ruleFlowDsl;
match(input,EOF,FOLLOW_EOF_in_entryRuleFlowDsl679);
}
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "entryRuleFlowDsl"
// $ANTLR start "ruleFlowDsl"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:351:1: ruleFlowDsl returns [EObject current=null] : ( ( (lv_comment_0_0= RULE_STRING ) )? otherlv_1= 'jobflow' ( (lv_name_2_0= ruleName ) ) otherlv_3= '(' ( (lv_params_4_0= ruleFlowParameter ) )+ otherlv_5= ')' otherlv_6= '{' ( (lv_statements_7_0= ruleFlowStatement ) )* otherlv_8= '}' (otherlv_9= ';' )? ) ;
public final EObject ruleFlowDsl() throws RecognitionException {
EObject current = null;
Token lv_comment_0_0=null;
Token otherlv_1=null;
Token otherlv_3=null;
Token otherlv_5=null;
Token otherlv_6=null;
Token otherlv_8=null;
Token otherlv_9=null;
AntlrDatatypeRuleToken lv_name_2_0 = null;
EObject lv_params_4_0 = null;
EObject lv_statements_7_0 = null;
enterRule();
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:354:28: ( ( ( (lv_comment_0_0= RULE_STRING ) )? otherlv_1= 'jobflow' ( (lv_name_2_0= ruleName ) ) otherlv_3= '(' ( (lv_params_4_0= ruleFlowParameter ) )+ otherlv_5= ')' otherlv_6= '{' ( (lv_statements_7_0= ruleFlowStatement ) )* otherlv_8= '}' (otherlv_9= ';' )? ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:355:1: ( ( (lv_comment_0_0= RULE_STRING ) )? otherlv_1= 'jobflow' ( (lv_name_2_0= ruleName ) ) otherlv_3= '(' ( (lv_params_4_0= ruleFlowParameter ) )+ otherlv_5= ')' otherlv_6= '{' ( (lv_statements_7_0= ruleFlowStatement ) )* otherlv_8= '}' (otherlv_9= ';' )? )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:355:1: ( ( (lv_comment_0_0= RULE_STRING ) )? otherlv_1= 'jobflow' ( (lv_name_2_0= ruleName ) ) otherlv_3= '(' ( (lv_params_4_0= ruleFlowParameter ) )+ otherlv_5= ')' otherlv_6= '{' ( (lv_statements_7_0= ruleFlowStatement ) )* otherlv_8= '}' (otherlv_9= ';' )? )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:355:2: ( (lv_comment_0_0= RULE_STRING ) )? otherlv_1= 'jobflow' ( (lv_name_2_0= ruleName ) ) otherlv_3= '(' ( (lv_params_4_0= ruleFlowParameter ) )+ otherlv_5= ')' otherlv_6= '{' ( (lv_statements_7_0= ruleFlowStatement ) )* otherlv_8= '}' (otherlv_9= ';' )?
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:355:2: ( (lv_comment_0_0= RULE_STRING ) )?
int alt8=2;
int LA8_0 = input.LA(1);
if ( (LA8_0==RULE_STRING) ) {
alt8=1;
}
switch (alt8) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:356:1: (lv_comment_0_0= RULE_STRING )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:356:1: (lv_comment_0_0= RULE_STRING )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:357:3: lv_comment_0_0= RULE_STRING
{
lv_comment_0_0=(Token)match(input,RULE_STRING,FOLLOW_RULE_STRING_in_ruleFlowDsl721);
newLeafNode(lv_comment_0_0, grammarAccess.getFlowDslAccess().getCommentSTRINGTerminalRuleCall_0_0());
if (current==null) {
current = createModelElement(grammarAccess.getFlowDslRule());
}
setWithLastConsumed(
current,
"comment",
lv_comment_0_0,
"STRING");
}
}
break;
}
otherlv_1=(Token)match(input,16,FOLLOW_16_in_ruleFlowDsl739);
newLeafNode(otherlv_1, grammarAccess.getFlowDslAccess().getJobflowKeyword_1());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:377:1: ( (lv_name_2_0= ruleName ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:378:1: (lv_name_2_0= ruleName )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:378:1: (lv_name_2_0= ruleName )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:379:3: lv_name_2_0= ruleName
{
newCompositeNode(grammarAccess.getFlowDslAccess().getNameNameParserRuleCall_2_0());
pushFollow(FOLLOW_ruleName_in_ruleFlowDsl760);
lv_name_2_0=ruleName();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getFlowDslRule());
}
set(
current,
"name",
lv_name_2_0,
"Name");
afterParserOrEnumRuleCall();
}
}
otherlv_3=(Token)match(input,17,FOLLOW_17_in_ruleFlowDsl772);
newLeafNode(otherlv_3, grammarAccess.getFlowDslAccess().getLeftParenthesisKeyword_3());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:399:1: ( (lv_params_4_0= ruleFlowParameter ) )+
int cnt9=0;
loop9:
do {
int alt9=2;
int LA9_0 = input.LA(1);
if ( (LA9_0==21||LA9_0==24) ) {
alt9=1;
}
switch (alt9) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:400:1: (lv_params_4_0= ruleFlowParameter )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:400:1: (lv_params_4_0= ruleFlowParameter )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:401:3: lv_params_4_0= ruleFlowParameter
{
newCompositeNode(grammarAccess.getFlowDslAccess().getParamsFlowParameterParserRuleCall_4_0());
pushFollow(FOLLOW_ruleFlowParameter_in_ruleFlowDsl793);
lv_params_4_0=ruleFlowParameter();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getFlowDslRule());
}
add(
current,
"params",
lv_params_4_0,
"FlowParameter");
afterParserOrEnumRuleCall();
}
}
break;
default :
if ( cnt9 >= 1 ) break loop9;
EarlyExitException eee =
new EarlyExitException(9, input);
throw eee;
}
cnt9++;
} while (true);
otherlv_5=(Token)match(input,18,FOLLOW_18_in_ruleFlowDsl806);
newLeafNode(otherlv_5, grammarAccess.getFlowDslAccess().getRightParenthesisKeyword_5());
otherlv_6=(Token)match(input,19,FOLLOW_19_in_ruleFlowDsl818);
newLeafNode(otherlv_6, grammarAccess.getFlowDslAccess().getLeftCurlyBracketKeyword_6());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:425:1: ( (lv_statements_7_0= ruleFlowStatement ) )*
loop10:
do {
int alt10=2;
int LA10_0 = input.LA(1);
if ( (LA10_0==RULE_ID||(LA10_0>=14 && LA10_0<=16)||LA10_0==21||(LA10_0>=23 && LA10_0<=25)) ) {
alt10=1;
}
switch (alt10) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:426:1: (lv_statements_7_0= ruleFlowStatement )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:426:1: (lv_statements_7_0= ruleFlowStatement )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:427:3: lv_statements_7_0= ruleFlowStatement
{
newCompositeNode(grammarAccess.getFlowDslAccess().getStatementsFlowStatementParserRuleCall_7_0());
pushFollow(FOLLOW_ruleFlowStatement_in_ruleFlowDsl839);
lv_statements_7_0=ruleFlowStatement();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getFlowDslRule());
}
add(
current,
"statements",
lv_statements_7_0,
"FlowStatement");
afterParserOrEnumRuleCall();
}
}
break;
default :
break loop10;
}
} while (true);
otherlv_8=(Token)match(input,20,FOLLOW_20_in_ruleFlowDsl852);
newLeafNode(otherlv_8, grammarAccess.getFlowDslAccess().getRightCurlyBracketKeyword_8());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:447:1: (otherlv_9= ';' )?
int alt11=2;
int LA11_0 = input.LA(1);
if ( (LA11_0==10) ) {
alt11=1;
}
switch (alt11) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:447:3: otherlv_9= ';'
{
otherlv_9=(Token)match(input,10,FOLLOW_10_in_ruleFlowDsl865);
newLeafNode(otherlv_9, grammarAccess.getFlowDslAccess().getSemicolonKeyword_9());
}
break;
}
}
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "ruleFlowDsl"
// $ANTLR start "entryRuleFlowParameter"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:459:1: entryRuleFlowParameter returns [EObject current=null] : iv_ruleFlowParameter= ruleFlowParameter EOF ;
public final EObject entryRuleFlowParameter() throws RecognitionException {
EObject current = null;
EObject iv_ruleFlowParameter = null;
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:460:2: (iv_ruleFlowParameter= ruleFlowParameter EOF )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:461:2: iv_ruleFlowParameter= ruleFlowParameter EOF
{
newCompositeNode(grammarAccess.getFlowParameterRule());
pushFollow(FOLLOW_ruleFlowParameter_in_entryRuleFlowParameter903);
iv_ruleFlowParameter=ruleFlowParameter();
state._fsp--;
current =iv_ruleFlowParameter;
match(input,EOF,FOLLOW_EOF_in_entryRuleFlowParameter913);
}
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "entryRuleFlowParameter"
// $ANTLR start "ruleFlowParameter"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:468:1: ruleFlowParameter returns [EObject current=null] : ( ( (lv_in_0_0= ruleFlowIn ) ) | ( (lv_out_1_0= ruleFlowOut ) ) ) ;
public final EObject ruleFlowParameter() throws RecognitionException {
EObject current = null;
EObject lv_in_0_0 = null;
EObject lv_out_1_0 = null;
enterRule();
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:471:28: ( ( ( (lv_in_0_0= ruleFlowIn ) ) | ( (lv_out_1_0= ruleFlowOut ) ) ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:472:1: ( ( (lv_in_0_0= ruleFlowIn ) ) | ( (lv_out_1_0= ruleFlowOut ) ) )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:472:1: ( ( (lv_in_0_0= ruleFlowIn ) ) | ( (lv_out_1_0= ruleFlowOut ) ) )
int alt12=2;
int LA12_0 = input.LA(1);
if ( (LA12_0==21) ) {
alt12=1;
}
else if ( (LA12_0==24) ) {
alt12=2;
}
else {
NoViableAltException nvae =
new NoViableAltException("", 12, 0, input);
throw nvae;
}
switch (alt12) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:472:2: ( (lv_in_0_0= ruleFlowIn ) )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:472:2: ( (lv_in_0_0= ruleFlowIn ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:473:1: (lv_in_0_0= ruleFlowIn )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:473:1: (lv_in_0_0= ruleFlowIn )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:474:3: lv_in_0_0= ruleFlowIn
{
newCompositeNode(grammarAccess.getFlowParameterAccess().getInFlowInParserRuleCall_0_0());
pushFollow(FOLLOW_ruleFlowIn_in_ruleFlowParameter959);
lv_in_0_0=ruleFlowIn();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getFlowParameterRule());
}
set(
current,
"in",
lv_in_0_0,
"FlowIn");
afterParserOrEnumRuleCall();
}
}
}
break;
case 2 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:491:6: ( (lv_out_1_0= ruleFlowOut ) )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:491:6: ( (lv_out_1_0= ruleFlowOut ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:492:1: (lv_out_1_0= ruleFlowOut )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:492:1: (lv_out_1_0= ruleFlowOut )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:493:3: lv_out_1_0= ruleFlowOut
{
newCompositeNode(grammarAccess.getFlowParameterAccess().getOutFlowOutParserRuleCall_1_0());
pushFollow(FOLLOW_ruleFlowOut_in_ruleFlowParameter986);
lv_out_1_0=ruleFlowOut();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getFlowParameterRule());
}
set(
current,
"out",
lv_out_1_0,
"FlowOut");
afterParserOrEnumRuleCall();
}
}
}
break;
}
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "ruleFlowParameter"
// $ANTLR start "entryRuleFlowIn"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:517:1: entryRuleFlowIn returns [EObject current=null] : iv_ruleFlowIn= ruleFlowIn EOF ;
public final EObject entryRuleFlowIn() throws RecognitionException {
EObject current = null;
EObject iv_ruleFlowIn = null;
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:518:2: (iv_ruleFlowIn= ruleFlowIn EOF )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:519:2: iv_ruleFlowIn= ruleFlowIn EOF
{
newCompositeNode(grammarAccess.getFlowInRule());
pushFollow(FOLLOW_ruleFlowIn_in_entryRuleFlowIn1022);
iv_ruleFlowIn=ruleFlowIn();
state._fsp--;
current =iv_ruleFlowIn;
match(input,EOF,FOLLOW_EOF_in_entryRuleFlowIn1032);
}
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "entryRuleFlowIn"
// $ANTLR start "ruleFlowIn"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:526:1: ruleFlowIn returns [EObject current=null] : ( ( (lv_inout_0_0= 'in' ) ) ( (lv_model_1_0= ruleName ) ) otherlv_2= 'as' ( (lv_name_3_0= ruleName ) ) ( (otherlv_4= ',' )? otherlv_5= 'importer' ( (lv_importerDescription_6_0= ruleFQN ) ) (otherlv_7= 'as' ( (lv_importerName_8_0= ruleName ) ) )? )? (otherlv_9= ';' | otherlv_10= '.' )? ) ;
public final EObject ruleFlowIn() throws RecognitionException {
EObject current = null;
Token lv_inout_0_0=null;
Token otherlv_2=null;
Token otherlv_4=null;
Token otherlv_5=null;
Token otherlv_7=null;
Token otherlv_9=null;
Token otherlv_10=null;
AntlrDatatypeRuleToken lv_model_1_0 = null;
AntlrDatatypeRuleToken lv_name_3_0 = null;
AntlrDatatypeRuleToken lv_importerDescription_6_0 = null;
AntlrDatatypeRuleToken lv_importerName_8_0 = null;
enterRule();
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:529:28: ( ( ( (lv_inout_0_0= 'in' ) ) ( (lv_model_1_0= ruleName ) ) otherlv_2= 'as' ( (lv_name_3_0= ruleName ) ) ( (otherlv_4= ',' )? otherlv_5= 'importer' ( (lv_importerDescription_6_0= ruleFQN ) ) (otherlv_7= 'as' ( (lv_importerName_8_0= ruleName ) ) )? )? (otherlv_9= ';' | otherlv_10= '.' )? ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:530:1: ( ( (lv_inout_0_0= 'in' ) ) ( (lv_model_1_0= ruleName ) ) otherlv_2= 'as' ( (lv_name_3_0= ruleName ) ) ( (otherlv_4= ',' )? otherlv_5= 'importer' ( (lv_importerDescription_6_0= ruleFQN ) ) (otherlv_7= 'as' ( (lv_importerName_8_0= ruleName ) ) )? )? (otherlv_9= ';' | otherlv_10= '.' )? )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:530:1: ( ( (lv_inout_0_0= 'in' ) ) ( (lv_model_1_0= ruleName ) ) otherlv_2= 'as' ( (lv_name_3_0= ruleName ) ) ( (otherlv_4= ',' )? otherlv_5= 'importer' ( (lv_importerDescription_6_0= ruleFQN ) ) (otherlv_7= 'as' ( (lv_importerName_8_0= ruleName ) ) )? )? (otherlv_9= ';' | otherlv_10= '.' )? )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:530:2: ( (lv_inout_0_0= 'in' ) ) ( (lv_model_1_0= ruleName ) ) otherlv_2= 'as' ( (lv_name_3_0= ruleName ) ) ( (otherlv_4= ',' )? otherlv_5= 'importer' ( (lv_importerDescription_6_0= ruleFQN ) ) (otherlv_7= 'as' ( (lv_importerName_8_0= ruleName ) ) )? )? (otherlv_9= ';' | otherlv_10= '.' )?
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:530:2: ( (lv_inout_0_0= 'in' ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:531:1: (lv_inout_0_0= 'in' )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:531:1: (lv_inout_0_0= 'in' )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:532:3: lv_inout_0_0= 'in'
{
lv_inout_0_0=(Token)match(input,21,FOLLOW_21_in_ruleFlowIn1075);
newLeafNode(lv_inout_0_0, grammarAccess.getFlowInAccess().getInoutInKeyword_0_0());
if (current==null) {
current = createModelElement(grammarAccess.getFlowInRule());
}
setWithLastConsumed(current, "inout", lv_inout_0_0, "in");
}
}
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:545:2: ( (lv_model_1_0= ruleName ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:546:1: (lv_model_1_0= ruleName )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:546:1: (lv_model_1_0= ruleName )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:547:3: lv_model_1_0= ruleName
{
newCompositeNode(grammarAccess.getFlowInAccess().getModelNameParserRuleCall_1_0());
pushFollow(FOLLOW_ruleName_in_ruleFlowIn1109);
lv_model_1_0=ruleName();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getFlowInRule());
}
set(
current,
"model",
lv_model_1_0,
"Name");
afterParserOrEnumRuleCall();
}
}
otherlv_2=(Token)match(input,15,FOLLOW_15_in_ruleFlowIn1121);
newLeafNode(otherlv_2, grammarAccess.getFlowInAccess().getAsKeyword_2());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:567:1: ( (lv_name_3_0= ruleName ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:568:1: (lv_name_3_0= ruleName )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:568:1: (lv_name_3_0= ruleName )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:569:3: lv_name_3_0= ruleName
{
newCompositeNode(grammarAccess.getFlowInAccess().getNameNameParserRuleCall_3_0());
pushFollow(FOLLOW_ruleName_in_ruleFlowIn1142);
lv_name_3_0=ruleName();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getFlowInRule());
}
set(
current,
"name",
lv_name_3_0,
"Name");
afterParserOrEnumRuleCall();
}
}
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:585:2: ( (otherlv_4= ',' )? otherlv_5= 'importer' ( (lv_importerDescription_6_0= ruleFQN ) ) (otherlv_7= 'as' ( (lv_importerName_8_0= ruleName ) ) )? )?
int alt15=2;
int LA15_0 = input.LA(1);
if ( ((LA15_0>=22 && LA15_0<=23)) ) {
alt15=1;
}
switch (alt15) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:585:3: (otherlv_4= ',' )? otherlv_5= 'importer' ( (lv_importerDescription_6_0= ruleFQN ) ) (otherlv_7= 'as' ( (lv_importerName_8_0= ruleName ) ) )?
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:585:3: (otherlv_4= ',' )?
int alt13=2;
int LA13_0 = input.LA(1);
if ( (LA13_0==22) ) {
alt13=1;
}
switch (alt13) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:585:5: otherlv_4= ','
{
otherlv_4=(Token)match(input,22,FOLLOW_22_in_ruleFlowIn1156);
newLeafNode(otherlv_4, grammarAccess.getFlowInAccess().getCommaKeyword_4_0());
}
break;
}
otherlv_5=(Token)match(input,23,FOLLOW_23_in_ruleFlowIn1170);
newLeafNode(otherlv_5, grammarAccess.getFlowInAccess().getImporterKeyword_4_1());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:593:1: ( (lv_importerDescription_6_0= ruleFQN ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:594:1: (lv_importerDescription_6_0= ruleFQN )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:594:1: (lv_importerDescription_6_0= ruleFQN )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:595:3: lv_importerDescription_6_0= ruleFQN
{
newCompositeNode(grammarAccess.getFlowInAccess().getImporterDescriptionFQNParserRuleCall_4_2_0());
pushFollow(FOLLOW_ruleFQN_in_ruleFlowIn1191);
lv_importerDescription_6_0=ruleFQN();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getFlowInRule());
}
set(
current,
"importerDescription",
lv_importerDescription_6_0,
"FQN");
afterParserOrEnumRuleCall();
}
}
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:611:2: (otherlv_7= 'as' ( (lv_importerName_8_0= ruleName ) ) )?
int alt14=2;
int LA14_0 = input.LA(1);
if ( (LA14_0==15) ) {
alt14=1;
}
switch (alt14) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:611:4: otherlv_7= 'as' ( (lv_importerName_8_0= ruleName ) )
{
otherlv_7=(Token)match(input,15,FOLLOW_15_in_ruleFlowIn1204);
newLeafNode(otherlv_7, grammarAccess.getFlowInAccess().getAsKeyword_4_3_0());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:615:1: ( (lv_importerName_8_0= ruleName ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:616:1: (lv_importerName_8_0= ruleName )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:616:1: (lv_importerName_8_0= ruleName )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:617:3: lv_importerName_8_0= ruleName
{
newCompositeNode(grammarAccess.getFlowInAccess().getImporterNameNameParserRuleCall_4_3_1_0());
pushFollow(FOLLOW_ruleName_in_ruleFlowIn1225);
lv_importerName_8_0=ruleName();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getFlowInRule());
}
set(
current,
"importerName",
lv_importerName_8_0,
"Name");
afterParserOrEnumRuleCall();
}
}
}
break;
}
}
break;
}
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:633:6: (otherlv_9= ';' | otherlv_10= '.' )?
int alt16=3;
int LA16_0 = input.LA(1);
if ( (LA16_0==10) ) {
alt16=1;
}
else if ( (LA16_0==12) ) {
alt16=2;
}
switch (alt16) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:633:8: otherlv_9= ';'
{
otherlv_9=(Token)match(input,10,FOLLOW_10_in_ruleFlowIn1242);
newLeafNode(otherlv_9, grammarAccess.getFlowInAccess().getSemicolonKeyword_5_0());
}
break;
case 2 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:638:7: otherlv_10= '.'
{
otherlv_10=(Token)match(input,12,FOLLOW_12_in_ruleFlowIn1260);
newLeafNode(otherlv_10, grammarAccess.getFlowInAccess().getFullStopKeyword_5_1());
}
break;
}
}
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "ruleFlowIn"
// $ANTLR start "entryRuleFlowOut"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:650:1: entryRuleFlowOut returns [EObject current=null] : iv_ruleFlowOut= ruleFlowOut EOF ;
public final EObject entryRuleFlowOut() throws RecognitionException {
EObject current = null;
EObject iv_ruleFlowOut = null;
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:651:2: (iv_ruleFlowOut= ruleFlowOut EOF )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:652:2: iv_ruleFlowOut= ruleFlowOut EOF
{
newCompositeNode(grammarAccess.getFlowOutRule());
pushFollow(FOLLOW_ruleFlowOut_in_entryRuleFlowOut1298);
iv_ruleFlowOut=ruleFlowOut();
state._fsp--;
current =iv_ruleFlowOut;
match(input,EOF,FOLLOW_EOF_in_entryRuleFlowOut1308);
}
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "entryRuleFlowOut"
// $ANTLR start "ruleFlowOut"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:659:1: ruleFlowOut returns [EObject current=null] : ( ( (lv_inout_0_0= 'out' ) ) ( (lv_model_1_0= ruleName ) ) otherlv_2= 'as' ( (lv_name_3_0= ruleName ) ) ( (otherlv_4= ',' )? otherlv_5= 'exporter' ( (lv_exporterDescription_6_0= ruleFQN ) ) (otherlv_7= 'as' ( (lv_exporterName_8_0= ruleName ) ) )? )? (otherlv_9= ';' | otherlv_10= '.' )? ) ;
public final EObject ruleFlowOut() throws RecognitionException {
EObject current = null;
Token lv_inout_0_0=null;
Token otherlv_2=null;
Token otherlv_4=null;
Token otherlv_5=null;
Token otherlv_7=null;
Token otherlv_9=null;
Token otherlv_10=null;
AntlrDatatypeRuleToken lv_model_1_0 = null;
AntlrDatatypeRuleToken lv_name_3_0 = null;
AntlrDatatypeRuleToken lv_exporterDescription_6_0 = null;
AntlrDatatypeRuleToken lv_exporterName_8_0 = null;
enterRule();
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:662:28: ( ( ( (lv_inout_0_0= 'out' ) ) ( (lv_model_1_0= ruleName ) ) otherlv_2= 'as' ( (lv_name_3_0= ruleName ) ) ( (otherlv_4= ',' )? otherlv_5= 'exporter' ( (lv_exporterDescription_6_0= ruleFQN ) ) (otherlv_7= 'as' ( (lv_exporterName_8_0= ruleName ) ) )? )? (otherlv_9= ';' | otherlv_10= '.' )? ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:663:1: ( ( (lv_inout_0_0= 'out' ) ) ( (lv_model_1_0= ruleName ) ) otherlv_2= 'as' ( (lv_name_3_0= ruleName ) ) ( (otherlv_4= ',' )? otherlv_5= 'exporter' ( (lv_exporterDescription_6_0= ruleFQN ) ) (otherlv_7= 'as' ( (lv_exporterName_8_0= ruleName ) ) )? )? (otherlv_9= ';' | otherlv_10= '.' )? )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:663:1: ( ( (lv_inout_0_0= 'out' ) ) ( (lv_model_1_0= ruleName ) ) otherlv_2= 'as' ( (lv_name_3_0= ruleName ) ) ( (otherlv_4= ',' )? otherlv_5= 'exporter' ( (lv_exporterDescription_6_0= ruleFQN ) ) (otherlv_7= 'as' ( (lv_exporterName_8_0= ruleName ) ) )? )? (otherlv_9= ';' | otherlv_10= '.' )? )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:663:2: ( (lv_inout_0_0= 'out' ) ) ( (lv_model_1_0= ruleName ) ) otherlv_2= 'as' ( (lv_name_3_0= ruleName ) ) ( (otherlv_4= ',' )? otherlv_5= 'exporter' ( (lv_exporterDescription_6_0= ruleFQN ) ) (otherlv_7= 'as' ( (lv_exporterName_8_0= ruleName ) ) )? )? (otherlv_9= ';' | otherlv_10= '.' )?
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:663:2: ( (lv_inout_0_0= 'out' ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:664:1: (lv_inout_0_0= 'out' )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:664:1: (lv_inout_0_0= 'out' )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:665:3: lv_inout_0_0= 'out'
{
lv_inout_0_0=(Token)match(input,24,FOLLOW_24_in_ruleFlowOut1351);
newLeafNode(lv_inout_0_0, grammarAccess.getFlowOutAccess().getInoutOutKeyword_0_0());
if (current==null) {
current = createModelElement(grammarAccess.getFlowOutRule());
}
setWithLastConsumed(current, "inout", lv_inout_0_0, "out");
}
}
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:678:2: ( (lv_model_1_0= ruleName ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:679:1: (lv_model_1_0= ruleName )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:679:1: (lv_model_1_0= ruleName )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:680:3: lv_model_1_0= ruleName
{
newCompositeNode(grammarAccess.getFlowOutAccess().getModelNameParserRuleCall_1_0());
pushFollow(FOLLOW_ruleName_in_ruleFlowOut1385);
lv_model_1_0=ruleName();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getFlowOutRule());
}
set(
current,
"model",
lv_model_1_0,
"Name");
afterParserOrEnumRuleCall();
}
}
otherlv_2=(Token)match(input,15,FOLLOW_15_in_ruleFlowOut1397);
newLeafNode(otherlv_2, grammarAccess.getFlowOutAccess().getAsKeyword_2());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:700:1: ( (lv_name_3_0= ruleName ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:701:1: (lv_name_3_0= ruleName )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:701:1: (lv_name_3_0= ruleName )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:702:3: lv_name_3_0= ruleName
{
newCompositeNode(grammarAccess.getFlowOutAccess().getNameNameParserRuleCall_3_0());
pushFollow(FOLLOW_ruleName_in_ruleFlowOut1418);
lv_name_3_0=ruleName();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getFlowOutRule());
}
set(
current,
"name",
lv_name_3_0,
"Name");
afterParserOrEnumRuleCall();
}
}
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:718:2: ( (otherlv_4= ',' )? otherlv_5= 'exporter' ( (lv_exporterDescription_6_0= ruleFQN ) ) (otherlv_7= 'as' ( (lv_exporterName_8_0= ruleName ) ) )? )?
int alt19=2;
int LA19_0 = input.LA(1);
if ( (LA19_0==22||LA19_0==25) ) {
alt19=1;
}
switch (alt19) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:718:3: (otherlv_4= ',' )? otherlv_5= 'exporter' ( (lv_exporterDescription_6_0= ruleFQN ) ) (otherlv_7= 'as' ( (lv_exporterName_8_0= ruleName ) ) )?
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:718:3: (otherlv_4= ',' )?
int alt17=2;
int LA17_0 = input.LA(1);
if ( (LA17_0==22) ) {
alt17=1;
}
switch (alt17) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:718:5: otherlv_4= ','
{
otherlv_4=(Token)match(input,22,FOLLOW_22_in_ruleFlowOut1432);
newLeafNode(otherlv_4, grammarAccess.getFlowOutAccess().getCommaKeyword_4_0());
}
break;
}
otherlv_5=(Token)match(input,25,FOLLOW_25_in_ruleFlowOut1446);
newLeafNode(otherlv_5, grammarAccess.getFlowOutAccess().getExporterKeyword_4_1());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:726:1: ( (lv_exporterDescription_6_0= ruleFQN ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:727:1: (lv_exporterDescription_6_0= ruleFQN )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:727:1: (lv_exporterDescription_6_0= ruleFQN )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:728:3: lv_exporterDescription_6_0= ruleFQN
{
newCompositeNode(grammarAccess.getFlowOutAccess().getExporterDescriptionFQNParserRuleCall_4_2_0());
pushFollow(FOLLOW_ruleFQN_in_ruleFlowOut1467);
lv_exporterDescription_6_0=ruleFQN();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getFlowOutRule());
}
set(
current,
"exporterDescription",
lv_exporterDescription_6_0,
"FQN");
afterParserOrEnumRuleCall();
}
}
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:744:2: (otherlv_7= 'as' ( (lv_exporterName_8_0= ruleName ) ) )?
int alt18=2;
int LA18_0 = input.LA(1);
if ( (LA18_0==15) ) {
alt18=1;
}
switch (alt18) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:744:4: otherlv_7= 'as' ( (lv_exporterName_8_0= ruleName ) )
{
otherlv_7=(Token)match(input,15,FOLLOW_15_in_ruleFlowOut1480);
newLeafNode(otherlv_7, grammarAccess.getFlowOutAccess().getAsKeyword_4_3_0());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:748:1: ( (lv_exporterName_8_0= ruleName ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:749:1: (lv_exporterName_8_0= ruleName )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:749:1: (lv_exporterName_8_0= ruleName )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:750:3: lv_exporterName_8_0= ruleName
{
newCompositeNode(grammarAccess.getFlowOutAccess().getExporterNameNameParserRuleCall_4_3_1_0());
pushFollow(FOLLOW_ruleName_in_ruleFlowOut1501);
lv_exporterName_8_0=ruleName();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getFlowOutRule());
}
set(
current,
"exporterName",
lv_exporterName_8_0,
"Name");
afterParserOrEnumRuleCall();
}
}
}
break;
}
}
break;
}
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:766:6: (otherlv_9= ';' | otherlv_10= '.' )?
int alt20=3;
int LA20_0 = input.LA(1);
if ( (LA20_0==10) ) {
alt20=1;
}
else if ( (LA20_0==12) ) {
alt20=2;
}
switch (alt20) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:766:8: otherlv_9= ';'
{
otherlv_9=(Token)match(input,10,FOLLOW_10_in_ruleFlowOut1518);
newLeafNode(otherlv_9, grammarAccess.getFlowOutAccess().getSemicolonKeyword_5_0());
}
break;
case 2 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:771:7: otherlv_10= '.'
{
otherlv_10=(Token)match(input,12,FOLLOW_12_in_ruleFlowOut1536);
newLeafNode(otherlv_10, grammarAccess.getFlowOutAccess().getFullStopKeyword_5_1());
}
break;
}
}
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "ruleFlowOut"
// $ANTLR start "entryRuleFlowStatement"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:783:1: entryRuleFlowStatement returns [EObject current=null] : iv_ruleFlowStatement= ruleFlowStatement EOF ;
public final EObject entryRuleFlowStatement() throws RecognitionException {
EObject current = null;
EObject iv_ruleFlowStatement = null;
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:784:2: (iv_ruleFlowStatement= ruleFlowStatement EOF )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:785:2: iv_ruleFlowStatement= ruleFlowStatement EOF
{
newCompositeNode(grammarAccess.getFlowStatementRule());
pushFollow(FOLLOW_ruleFlowStatement_in_entryRuleFlowStatement1574);
iv_ruleFlowStatement=ruleFlowStatement();
state._fsp--;
current =iv_ruleFlowStatement;
match(input,EOF,FOLLOW_EOF_in_entryRuleFlowStatement1584);
}
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "entryRuleFlowStatement"
// $ANTLR start "ruleFlowStatement"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:792:1: ruleFlowStatement returns [EObject current=null] : (this_FlowStatement1_0= ruleFlowStatement1 | this_FlowStatement2_1= ruleFlowStatement2 ) ;
public final EObject ruleFlowStatement() throws RecognitionException {
EObject current = null;
EObject this_FlowStatement1_0 = null;
EObject this_FlowStatement2_1 = null;
enterRule();
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:795:28: ( (this_FlowStatement1_0= ruleFlowStatement1 | this_FlowStatement2_1= ruleFlowStatement2 ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:796:1: (this_FlowStatement1_0= ruleFlowStatement1 | this_FlowStatement2_1= ruleFlowStatement2 )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:796:1: (this_FlowStatement1_0= ruleFlowStatement1 | this_FlowStatement2_1= ruleFlowStatement2 )
int alt21=2;
int LA21_0 = input.LA(1);
if ( (LA21_0==RULE_ID) ) {
int LA21_1 = input.LA(2);
if ( (LA21_1==12||LA21_1==26) ) {
alt21=1;
}
else if ( (LA21_1==27) ) {
alt21=2;
}
else {
NoViableAltException nvae =
new NoViableAltException("", 21, 1, input);
throw nvae;
}
}
else if ( ((LA21_0>=14 && LA21_0<=16)||LA21_0==21||(LA21_0>=23 && LA21_0<=25)) ) {
alt21=1;
}
else {
NoViableAltException nvae =
new NoViableAltException("", 21, 0, input);
throw nvae;
}
switch (alt21) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:797:5: this_FlowStatement1_0= ruleFlowStatement1
{
newCompositeNode(grammarAccess.getFlowStatementAccess().getFlowStatement1ParserRuleCall_0());
pushFollow(FOLLOW_ruleFlowStatement1_in_ruleFlowStatement1631);
this_FlowStatement1_0=ruleFlowStatement1();
state._fsp--;
current = this_FlowStatement1_0;
afterParserOrEnumRuleCall();
}
break;
case 2 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:807:5: this_FlowStatement2_1= ruleFlowStatement2
{
newCompositeNode(grammarAccess.getFlowStatementAccess().getFlowStatement2ParserRuleCall_1());
pushFollow(FOLLOW_ruleFlowStatement2_in_ruleFlowStatement1658);
this_FlowStatement2_1=ruleFlowStatement2();
state._fsp--;
current = this_FlowStatement2_1;
afterParserOrEnumRuleCall();
}
break;
}
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "ruleFlowStatement"
// $ANTLR start "entryRuleFlowStatement1"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:823:1: entryRuleFlowStatement1 returns [EObject current=null] : iv_ruleFlowStatement1= ruleFlowStatement1 EOF ;
public final EObject entryRuleFlowStatement1() throws RecognitionException {
EObject current = null;
EObject iv_ruleFlowStatement1 = null;
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:824:2: (iv_ruleFlowStatement1= ruleFlowStatement1 EOF )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:825:2: iv_ruleFlowStatement1= ruleFlowStatement1 EOF
{
newCompositeNode(grammarAccess.getFlowStatement1Rule());
pushFollow(FOLLOW_ruleFlowStatement1_in_entryRuleFlowStatement11693);
iv_ruleFlowStatement1=ruleFlowStatement1();
state._fsp--;
current =iv_ruleFlowStatement1;
match(input,EOF,FOLLOW_EOF_in_entryRuleFlowStatement11703);
}
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "entryRuleFlowStatement1"
// $ANTLR start "ruleFlowStatement1"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:832:1: ruleFlowStatement1 returns [EObject current=null] : ( ( ( (lv_name_0_0= ruleName ) ) otherlv_1= '=' )? ( (otherlv_2= RULE_ID ) ) otherlv_3= '.' ( (lv_method_4_0= ruleName ) ) otherlv_5= '(' ( ( (lv_arguments_6_0= ruleOperatorArgument ) ) (otherlv_7= ',' ( (lv_arguments_8_0= ruleOperatorArgument ) ) )* )? otherlv_9= ')' (otherlv_10= ';' | otherlv_11= '.' )? ) ;
public final EObject ruleFlowStatement1() throws RecognitionException {
EObject current = null;
Token otherlv_1=null;
Token otherlv_2=null;
Token otherlv_3=null;
Token otherlv_5=null;
Token otherlv_7=null;
Token otherlv_9=null;
Token otherlv_10=null;
Token otherlv_11=null;
AntlrDatatypeRuleToken lv_name_0_0 = null;
AntlrDatatypeRuleToken lv_method_4_0 = null;
EObject lv_arguments_6_0 = null;
EObject lv_arguments_8_0 = null;
enterRule();
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:835:28: ( ( ( ( (lv_name_0_0= ruleName ) ) otherlv_1= '=' )? ( (otherlv_2= RULE_ID ) ) otherlv_3= '.' ( (lv_method_4_0= ruleName ) ) otherlv_5= '(' ( ( (lv_arguments_6_0= ruleOperatorArgument ) ) (otherlv_7= ',' ( (lv_arguments_8_0= ruleOperatorArgument ) ) )* )? otherlv_9= ')' (otherlv_10= ';' | otherlv_11= '.' )? ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:836:1: ( ( ( (lv_name_0_0= ruleName ) ) otherlv_1= '=' )? ( (otherlv_2= RULE_ID ) ) otherlv_3= '.' ( (lv_method_4_0= ruleName ) ) otherlv_5= '(' ( ( (lv_arguments_6_0= ruleOperatorArgument ) ) (otherlv_7= ',' ( (lv_arguments_8_0= ruleOperatorArgument ) ) )* )? otherlv_9= ')' (otherlv_10= ';' | otherlv_11= '.' )? )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:836:1: ( ( ( (lv_name_0_0= ruleName ) ) otherlv_1= '=' )? ( (otherlv_2= RULE_ID ) ) otherlv_3= '.' ( (lv_method_4_0= ruleName ) ) otherlv_5= '(' ( ( (lv_arguments_6_0= ruleOperatorArgument ) ) (otherlv_7= ',' ( (lv_arguments_8_0= ruleOperatorArgument ) ) )* )? otherlv_9= ')' (otherlv_10= ';' | otherlv_11= '.' )? )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:836:2: ( ( (lv_name_0_0= ruleName ) ) otherlv_1= '=' )? ( (otherlv_2= RULE_ID ) ) otherlv_3= '.' ( (lv_method_4_0= ruleName ) ) otherlv_5= '(' ( ( (lv_arguments_6_0= ruleOperatorArgument ) ) (otherlv_7= ',' ( (lv_arguments_8_0= ruleOperatorArgument ) ) )* )? otherlv_9= ')' (otherlv_10= ';' | otherlv_11= '.' )?
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:836:2: ( ( (lv_name_0_0= ruleName ) ) otherlv_1= '=' )?
int alt22=2;
int LA22_0 = input.LA(1);
if ( (LA22_0==RULE_ID) ) {
int LA22_1 = input.LA(2);
if ( (LA22_1==26) ) {
alt22=1;
}
}
else if ( ((LA22_0>=14 && LA22_0<=16)||LA22_0==21||(LA22_0>=23 && LA22_0<=25)) ) {
alt22=1;
}
switch (alt22) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:836:3: ( (lv_name_0_0= ruleName ) ) otherlv_1= '='
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:836:3: ( (lv_name_0_0= ruleName ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:837:1: (lv_name_0_0= ruleName )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:837:1: (lv_name_0_0= ruleName )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:838:3: lv_name_0_0= ruleName
{
newCompositeNode(grammarAccess.getFlowStatement1Access().getNameNameParserRuleCall_0_0_0());
pushFollow(FOLLOW_ruleName_in_ruleFlowStatement11750);
lv_name_0_0=ruleName();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getFlowStatement1Rule());
}
set(
current,
"name",
lv_name_0_0,
"Name");
afterParserOrEnumRuleCall();
}
}
otherlv_1=(Token)match(input,26,FOLLOW_26_in_ruleFlowStatement11762);
newLeafNode(otherlv_1, grammarAccess.getFlowStatement1Access().getEqualsSignKeyword_0_1());
}
break;
}
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:858:3: ( (otherlv_2= RULE_ID ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:859:1: (otherlv_2= RULE_ID )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:859:1: (otherlv_2= RULE_ID )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:860:3: otherlv_2= RULE_ID
{
if (current==null) {
current = createModelElement(grammarAccess.getFlowStatement1Rule());
}
otherlv_2=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleFlowStatement11784);
newLeafNode(otherlv_2, grammarAccess.getFlowStatement1Access().getOperatorOperatorDeclareCrossReference_1_0());
}
}
otherlv_3=(Token)match(input,12,FOLLOW_12_in_ruleFlowStatement11796);
newLeafNode(otherlv_3, grammarAccess.getFlowStatement1Access().getFullStopKeyword_2());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:875:1: ( (lv_method_4_0= ruleName ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:876:1: (lv_method_4_0= ruleName )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:876:1: (lv_method_4_0= ruleName )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:877:3: lv_method_4_0= ruleName
{
newCompositeNode(grammarAccess.getFlowStatement1Access().getMethodNameParserRuleCall_3_0());
pushFollow(FOLLOW_ruleName_in_ruleFlowStatement11817);
lv_method_4_0=ruleName();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getFlowStatement1Rule());
}
set(
current,
"method",
lv_method_4_0,
"Name");
afterParserOrEnumRuleCall();
}
}
otherlv_5=(Token)match(input,17,FOLLOW_17_in_ruleFlowStatement11829);
newLeafNode(otherlv_5, grammarAccess.getFlowStatement1Access().getLeftParenthesisKeyword_4());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:897:1: ( ( (lv_arguments_6_0= ruleOperatorArgument ) ) (otherlv_7= ',' ( (lv_arguments_8_0= ruleOperatorArgument ) ) )* )?
int alt24=2;
int LA24_0 = input.LA(1);
if ( (LA24_0==RULE_ID) ) {
alt24=1;
}
switch (alt24) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:897:2: ( (lv_arguments_6_0= ruleOperatorArgument ) ) (otherlv_7= ',' ( (lv_arguments_8_0= ruleOperatorArgument ) ) )*
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:897:2: ( (lv_arguments_6_0= ruleOperatorArgument ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:898:1: (lv_arguments_6_0= ruleOperatorArgument )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:898:1: (lv_arguments_6_0= ruleOperatorArgument )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:899:3: lv_arguments_6_0= ruleOperatorArgument
{
newCompositeNode(grammarAccess.getFlowStatement1Access().getArgumentsOperatorArgumentParserRuleCall_5_0_0());
pushFollow(FOLLOW_ruleOperatorArgument_in_ruleFlowStatement11851);
lv_arguments_6_0=ruleOperatorArgument();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getFlowStatement1Rule());
}
add(
current,
"arguments",
lv_arguments_6_0,
"OperatorArgument");
afterParserOrEnumRuleCall();
}
}
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:915:2: (otherlv_7= ',' ( (lv_arguments_8_0= ruleOperatorArgument ) ) )*
loop23:
do {
int alt23=2;
int LA23_0 = input.LA(1);
if ( (LA23_0==22) ) {
alt23=1;
}
switch (alt23) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:915:4: otherlv_7= ',' ( (lv_arguments_8_0= ruleOperatorArgument ) )
{
otherlv_7=(Token)match(input,22,FOLLOW_22_in_ruleFlowStatement11864);
newLeafNode(otherlv_7, grammarAccess.getFlowStatement1Access().getCommaKeyword_5_1_0());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:919:1: ( (lv_arguments_8_0= ruleOperatorArgument ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:920:1: (lv_arguments_8_0= ruleOperatorArgument )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:920:1: (lv_arguments_8_0= ruleOperatorArgument )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:921:3: lv_arguments_8_0= ruleOperatorArgument
{
newCompositeNode(grammarAccess.getFlowStatement1Access().getArgumentsOperatorArgumentParserRuleCall_5_1_1_0());
pushFollow(FOLLOW_ruleOperatorArgument_in_ruleFlowStatement11885);
lv_arguments_8_0=ruleOperatorArgument();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getFlowStatement1Rule());
}
add(
current,
"arguments",
lv_arguments_8_0,
"OperatorArgument");
afterParserOrEnumRuleCall();
}
}
}
break;
default :
break loop23;
}
} while (true);
}
break;
}
otherlv_9=(Token)match(input,18,FOLLOW_18_in_ruleFlowStatement11901);
newLeafNode(otherlv_9, grammarAccess.getFlowStatement1Access().getRightParenthesisKeyword_6());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:941:1: (otherlv_10= ';' | otherlv_11= '.' )?
int alt25=3;
int LA25_0 = input.LA(1);
if ( (LA25_0==10) ) {
alt25=1;
}
else if ( (LA25_0==12) ) {
alt25=2;
}
switch (alt25) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:941:3: otherlv_10= ';'
{
otherlv_10=(Token)match(input,10,FOLLOW_10_in_ruleFlowStatement11914);
newLeafNode(otherlv_10, grammarAccess.getFlowStatement1Access().getSemicolonKeyword_7_0());
}
break;
case 2 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:946:7: otherlv_11= '.'
{
otherlv_11=(Token)match(input,12,FOLLOW_12_in_ruleFlowStatement11932);
newLeafNode(otherlv_11, grammarAccess.getFlowStatement1Access().getFullStopKeyword_7_1());
}
break;
}
}
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "ruleFlowStatement1"
// $ANTLR start "entryRuleFlowStatement2"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:958:1: entryRuleFlowStatement2 returns [EObject current=null] : iv_ruleFlowStatement2= ruleFlowStatement2 EOF ;
public final EObject entryRuleFlowStatement2() throws RecognitionException {
EObject current = null;
EObject iv_ruleFlowStatement2 = null;
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:959:2: (iv_ruleFlowStatement2= ruleFlowStatement2 EOF )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:960:2: iv_ruleFlowStatement2= ruleFlowStatement2 EOF
{
newCompositeNode(grammarAccess.getFlowStatement2Rule());
pushFollow(FOLLOW_ruleFlowStatement2_in_entryRuleFlowStatement21970);
iv_ruleFlowStatement2=ruleFlowStatement2();
state._fsp--;
current =iv_ruleFlowStatement2;
match(input,EOF,FOLLOW_EOF_in_entryRuleFlowStatement21980);
}
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "entryRuleFlowStatement2"
// $ANTLR start "ruleFlowStatement2"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:967:1: ruleFlowStatement2 returns [EObject current=null] : ( ( (otherlv_0= RULE_ID ) ) otherlv_1= '+=' otherlv_2= '(' ( ( (lv_arguments_3_0= ruleOperatorArgument ) ) (otherlv_4= ',' ( (lv_arguments_5_0= ruleOperatorArgument ) ) )* )? otherlv_6= ')' (otherlv_7= ';' | otherlv_8= '.' )? ) ;
public final EObject ruleFlowStatement2() throws RecognitionException {
EObject current = null;
Token otherlv_0=null;
Token otherlv_1=null;
Token otherlv_2=null;
Token otherlv_4=null;
Token otherlv_6=null;
Token otherlv_7=null;
Token otherlv_8=null;
EObject lv_arguments_3_0 = null;
EObject lv_arguments_5_0 = null;
enterRule();
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:970:28: ( ( ( (otherlv_0= RULE_ID ) ) otherlv_1= '+=' otherlv_2= '(' ( ( (lv_arguments_3_0= ruleOperatorArgument ) ) (otherlv_4= ',' ( (lv_arguments_5_0= ruleOperatorArgument ) ) )* )? otherlv_6= ')' (otherlv_7= ';' | otherlv_8= '.' )? ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:971:1: ( ( (otherlv_0= RULE_ID ) ) otherlv_1= '+=' otherlv_2= '(' ( ( (lv_arguments_3_0= ruleOperatorArgument ) ) (otherlv_4= ',' ( (lv_arguments_5_0= ruleOperatorArgument ) ) )* )? otherlv_6= ')' (otherlv_7= ';' | otherlv_8= '.' )? )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:971:1: ( ( (otherlv_0= RULE_ID ) ) otherlv_1= '+=' otherlv_2= '(' ( ( (lv_arguments_3_0= ruleOperatorArgument ) ) (otherlv_4= ',' ( (lv_arguments_5_0= ruleOperatorArgument ) ) )* )? otherlv_6= ')' (otherlv_7= ';' | otherlv_8= '.' )? )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:971:2: ( (otherlv_0= RULE_ID ) ) otherlv_1= '+=' otherlv_2= '(' ( ( (lv_arguments_3_0= ruleOperatorArgument ) ) (otherlv_4= ',' ( (lv_arguments_5_0= ruleOperatorArgument ) ) )* )? otherlv_6= ')' (otherlv_7= ';' | otherlv_8= '.' )?
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:971:2: ( (otherlv_0= RULE_ID ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:972:1: (otherlv_0= RULE_ID )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:972:1: (otherlv_0= RULE_ID )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:973:3: otherlv_0= RULE_ID
{
if (current==null) {
current = createModelElement(grammarAccess.getFlowStatement2Rule());
}
otherlv_0=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleFlowStatement22025);
newLeafNode(otherlv_0, grammarAccess.getFlowStatement2Access().getNameFlowOutCrossReference_0_0());
}
}
otherlv_1=(Token)match(input,27,FOLLOW_27_in_ruleFlowStatement22037);
newLeafNode(otherlv_1, grammarAccess.getFlowStatement2Access().getPlusSignEqualsSignKeyword_1());
otherlv_2=(Token)match(input,17,FOLLOW_17_in_ruleFlowStatement22049);
newLeafNode(otherlv_2, grammarAccess.getFlowStatement2Access().getLeftParenthesisKeyword_2());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:992:1: ( ( (lv_arguments_3_0= ruleOperatorArgument ) ) (otherlv_4= ',' ( (lv_arguments_5_0= ruleOperatorArgument ) ) )* )?
int alt27=2;
int LA27_0 = input.LA(1);
if ( (LA27_0==RULE_ID) ) {
alt27=1;
}
switch (alt27) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:992:2: ( (lv_arguments_3_0= ruleOperatorArgument ) ) (otherlv_4= ',' ( (lv_arguments_5_0= ruleOperatorArgument ) ) )*
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:992:2: ( (lv_arguments_3_0= ruleOperatorArgument ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:993:1: (lv_arguments_3_0= ruleOperatorArgument )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:993:1: (lv_arguments_3_0= ruleOperatorArgument )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:994:3: lv_arguments_3_0= ruleOperatorArgument
{
newCompositeNode(grammarAccess.getFlowStatement2Access().getArgumentsOperatorArgumentParserRuleCall_3_0_0());
pushFollow(FOLLOW_ruleOperatorArgument_in_ruleFlowStatement22071);
lv_arguments_3_0=ruleOperatorArgument();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getFlowStatement2Rule());
}
add(
current,
"arguments",
lv_arguments_3_0,
"OperatorArgument");
afterParserOrEnumRuleCall();
}
}
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1010:2: (otherlv_4= ',' ( (lv_arguments_5_0= ruleOperatorArgument ) ) )*
loop26:
do {
int alt26=2;
int LA26_0 = input.LA(1);
if ( (LA26_0==22) ) {
alt26=1;
}
switch (alt26) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1010:4: otherlv_4= ',' ( (lv_arguments_5_0= ruleOperatorArgument ) )
{
otherlv_4=(Token)match(input,22,FOLLOW_22_in_ruleFlowStatement22084);
newLeafNode(otherlv_4, grammarAccess.getFlowStatement2Access().getCommaKeyword_3_1_0());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1014:1: ( (lv_arguments_5_0= ruleOperatorArgument ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1015:1: (lv_arguments_5_0= ruleOperatorArgument )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1015:1: (lv_arguments_5_0= ruleOperatorArgument )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1016:3: lv_arguments_5_0= ruleOperatorArgument
{
newCompositeNode(grammarAccess.getFlowStatement2Access().getArgumentsOperatorArgumentParserRuleCall_3_1_1_0());
pushFollow(FOLLOW_ruleOperatorArgument_in_ruleFlowStatement22105);
lv_arguments_5_0=ruleOperatorArgument();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getFlowStatement2Rule());
}
add(
current,
"arguments",
lv_arguments_5_0,
"OperatorArgument");
afterParserOrEnumRuleCall();
}
}
}
break;
default :
break loop26;
}
} while (true);
}
break;
}
otherlv_6=(Token)match(input,18,FOLLOW_18_in_ruleFlowStatement22121);
newLeafNode(otherlv_6, grammarAccess.getFlowStatement2Access().getRightParenthesisKeyword_4());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1036:1: (otherlv_7= ';' | otherlv_8= '.' )?
int alt28=3;
int LA28_0 = input.LA(1);
if ( (LA28_0==10) ) {
alt28=1;
}
else if ( (LA28_0==12) ) {
alt28=2;
}
switch (alt28) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1036:3: otherlv_7= ';'
{
otherlv_7=(Token)match(input,10,FOLLOW_10_in_ruleFlowStatement22134);
newLeafNode(otherlv_7, grammarAccess.getFlowStatement2Access().getSemicolonKeyword_5_0());
}
break;
case 2 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1041:7: otherlv_8= '.'
{
otherlv_8=(Token)match(input,12,FOLLOW_12_in_ruleFlowStatement22152);
newLeafNode(otherlv_8, grammarAccess.getFlowStatement2Access().getFullStopKeyword_5_1());
}
break;
}
}
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "ruleFlowStatement2"
// $ANTLR start "entryRuleOperatorArgument"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1053:1: entryRuleOperatorArgument returns [EObject current=null] : iv_ruleOperatorArgument= ruleOperatorArgument EOF ;
public final EObject entryRuleOperatorArgument() throws RecognitionException {
EObject current = null;
EObject iv_ruleOperatorArgument = null;
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1054:2: (iv_ruleOperatorArgument= ruleOperatorArgument EOF )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1055:2: iv_ruleOperatorArgument= ruleOperatorArgument EOF
{
newCompositeNode(grammarAccess.getOperatorArgumentRule());
pushFollow(FOLLOW_ruleOperatorArgument_in_entryRuleOperatorArgument2190);
iv_ruleOperatorArgument=ruleOperatorArgument();
state._fsp--;
current =iv_ruleOperatorArgument;
match(input,EOF,FOLLOW_EOF_in_entryRuleOperatorArgument2200);
}
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "entryRuleOperatorArgument"
// $ANTLR start "ruleOperatorArgument"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1062:1: ruleOperatorArgument returns [EObject current=null] : ( ( ( (otherlv_0= RULE_ID ) ) otherlv_1= '.' ( (lv_name_2_0= ruleName ) ) ) | ( (otherlv_3= RULE_ID ) ) ) ;
public final EObject ruleOperatorArgument() throws RecognitionException {
EObject current = null;
Token otherlv_0=null;
Token otherlv_1=null;
Token otherlv_3=null;
AntlrDatatypeRuleToken lv_name_2_0 = null;
enterRule();
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1065:28: ( ( ( ( (otherlv_0= RULE_ID ) ) otherlv_1= '.' ( (lv_name_2_0= ruleName ) ) ) | ( (otherlv_3= RULE_ID ) ) ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1066:1: ( ( ( (otherlv_0= RULE_ID ) ) otherlv_1= '.' ( (lv_name_2_0= ruleName ) ) ) | ( (otherlv_3= RULE_ID ) ) )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1066:1: ( ( ( (otherlv_0= RULE_ID ) ) otherlv_1= '.' ( (lv_name_2_0= ruleName ) ) ) | ( (otherlv_3= RULE_ID ) ) )
int alt29=2;
int LA29_0 = input.LA(1);
if ( (LA29_0==RULE_ID) ) {
int LA29_1 = input.LA(2);
if ( (LA29_1==12) ) {
alt29=1;
}
else if ( (LA29_1==EOF||LA29_1==18||LA29_1==22) ) {
alt29=2;
}
else {
NoViableAltException nvae =
new NoViableAltException("", 29, 1, input);
throw nvae;
}
}
else {
NoViableAltException nvae =
new NoViableAltException("", 29, 0, input);
throw nvae;
}
switch (alt29) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1066:2: ( ( (otherlv_0= RULE_ID ) ) otherlv_1= '.' ( (lv_name_2_0= ruleName ) ) )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1066:2: ( ( (otherlv_0= RULE_ID ) ) otherlv_1= '.' ( (lv_name_2_0= ruleName ) ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1066:3: ( (otherlv_0= RULE_ID ) ) otherlv_1= '.' ( (lv_name_2_0= ruleName ) )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1066:3: ( (otherlv_0= RULE_ID ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1067:1: (otherlv_0= RULE_ID )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1067:1: (otherlv_0= RULE_ID )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1068:3: otherlv_0= RULE_ID
{
if (current==null) {
current = createModelElement(grammarAccess.getOperatorArgumentRule());
}
otherlv_0=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleOperatorArgument2246);
newLeafNode(otherlv_0, grammarAccess.getOperatorArgumentAccess().getInFlowInCrossReference_0_0_0());
}
}
otherlv_1=(Token)match(input,12,FOLLOW_12_in_ruleOperatorArgument2258);
newLeafNode(otherlv_1, grammarAccess.getOperatorArgumentAccess().getFullStopKeyword_0_1());
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1083:1: ( (lv_name_2_0= ruleName ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1084:1: (lv_name_2_0= ruleName )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1084:1: (lv_name_2_0= ruleName )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1085:3: lv_name_2_0= ruleName
{
newCompositeNode(grammarAccess.getOperatorArgumentAccess().getNameNameParserRuleCall_0_2_0());
pushFollow(FOLLOW_ruleName_in_ruleOperatorArgument2279);
lv_name_2_0=ruleName();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getOperatorArgumentRule());
}
set(
current,
"name",
lv_name_2_0,
"Name");
afterParserOrEnumRuleCall();
}
}
}
}
break;
case 2 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1102:6: ( (otherlv_3= RULE_ID ) )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1102:6: ( (otherlv_3= RULE_ID ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1103:1: (otherlv_3= RULE_ID )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1103:1: (otherlv_3= RULE_ID )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1104:3: otherlv_3= RULE_ID
{
if (current==null) {
current = createModelElement(grammarAccess.getOperatorArgumentRule());
}
otherlv_3=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleOperatorArgument2306);
newLeafNode(otherlv_3, grammarAccess.getOperatorArgumentAccess().getInFlowStatementCrossReference_1_0());
}
}
}
break;
}
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "ruleOperatorArgument"
// $ANTLR start "entryRuleFQN"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1123:1: entryRuleFQN returns [String current=null] : iv_ruleFQN= ruleFQN EOF ;
public final String entryRuleFQN() throws RecognitionException {
String current = null;
AntlrDatatypeRuleToken iv_ruleFQN = null;
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1124:2: (iv_ruleFQN= ruleFQN EOF )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1125:2: iv_ruleFQN= ruleFQN EOF
{
newCompositeNode(grammarAccess.getFQNRule());
pushFollow(FOLLOW_ruleFQN_in_entryRuleFQN2343);
iv_ruleFQN=ruleFQN();
state._fsp--;
current =iv_ruleFQN.getText();
match(input,EOF,FOLLOW_EOF_in_entryRuleFQN2354);
}
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "entryRuleFQN"
// $ANTLR start "ruleFQN"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1132:1: ruleFQN returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_Name_0= ruleName (kw= '.' this_Name_2= ruleName )* ) ;
public final AntlrDatatypeRuleToken ruleFQN() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
Token kw=null;
AntlrDatatypeRuleToken this_Name_0 = null;
AntlrDatatypeRuleToken this_Name_2 = null;
enterRule();
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1135:28: ( (this_Name_0= ruleName (kw= '.' this_Name_2= ruleName )* ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1136:1: (this_Name_0= ruleName (kw= '.' this_Name_2= ruleName )* )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1136:1: (this_Name_0= ruleName (kw= '.' this_Name_2= ruleName )* )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1137:5: this_Name_0= ruleName (kw= '.' this_Name_2= ruleName )*
{
newCompositeNode(grammarAccess.getFQNAccess().getNameParserRuleCall_0());
pushFollow(FOLLOW_ruleName_in_ruleFQN2401);
this_Name_0=ruleName();
state._fsp--;
current.merge(this_Name_0);
afterParserOrEnumRuleCall();
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1147:1: (kw= '.' this_Name_2= ruleName )*
loop30:
do {
int alt30=2;
alt30 = dfa30.predict(input);
switch (alt30) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1148:2: kw= '.' this_Name_2= ruleName
{
kw=(Token)match(input,12,FOLLOW_12_in_ruleFQN2420);
current.merge(kw);
newLeafNode(kw, grammarAccess.getFQNAccess().getFullStopKeyword_1_0());
newCompositeNode(grammarAccess.getFQNAccess().getNameParserRuleCall_1_1());
pushFollow(FOLLOW_ruleName_in_ruleFQN2442);
this_Name_2=ruleName();
state._fsp--;
current.merge(this_Name_2);
afterParserOrEnumRuleCall();
}
break;
default :
break loop30;
}
} while (true);
}
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "ruleFQN"
// $ANTLR start "entryRuleName"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1172:1: entryRuleName returns [String current=null] : iv_ruleName= ruleName EOF ;
public final String entryRuleName() throws RecognitionException {
String current = null;
AntlrDatatypeRuleToken iv_ruleName = null;
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1173:2: (iv_ruleName= ruleName EOF )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1174:2: iv_ruleName= ruleName EOF
{
newCompositeNode(grammarAccess.getNameRule());
pushFollow(FOLLOW_ruleName_in_entryRuleName2490);
iv_ruleName=ruleName();
state._fsp--;
current =iv_ruleName.getText();
match(input,EOF,FOLLOW_EOF_in_entryRuleName2501);
}
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "entryRuleName"
// $ANTLR start "ruleName"
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1181:1: ruleName returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_ID_0= RULE_ID | kw= 'operator' | kw= 'jobflow' | kw= 'in' | kw= 'out' | kw= 'as' | kw= 'importer' | kw= 'exporter' ) ;
public final AntlrDatatypeRuleToken ruleName() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
Token this_ID_0=null;
Token kw=null;
enterRule();
try {
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1184:28: ( (this_ID_0= RULE_ID | kw= 'operator' | kw= 'jobflow' | kw= 'in' | kw= 'out' | kw= 'as' | kw= 'importer' | kw= 'exporter' ) )
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1185:1: (this_ID_0= RULE_ID | kw= 'operator' | kw= 'jobflow' | kw= 'in' | kw= 'out' | kw= 'as' | kw= 'importer' | kw= 'exporter' )
{
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1185:1: (this_ID_0= RULE_ID | kw= 'operator' | kw= 'jobflow' | kw= 'in' | kw= 'out' | kw= 'as' | kw= 'importer' | kw= 'exporter' )
int alt31=8;
switch ( input.LA(1) ) {
case RULE_ID:
{
alt31=1;
}
break;
case 14:
{
alt31=2;
}
break;
case 16:
{
alt31=3;
}
break;
case 21:
{
alt31=4;
}
break;
case 24:
{
alt31=5;
}
break;
case 15:
{
alt31=6;
}
break;
case 23:
{
alt31=7;
}
break;
case 25:
{
alt31=8;
}
break;
default:
NoViableAltException nvae =
new NoViableAltException("", 31, 0, input);
throw nvae;
}
switch (alt31) {
case 1 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1185:6: this_ID_0= RULE_ID
{
this_ID_0=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleName2541);
current.merge(this_ID_0);
newLeafNode(this_ID_0, grammarAccess.getNameAccess().getIDTerminalRuleCall_0());
}
break;
case 2 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1194:2: kw= 'operator'
{
kw=(Token)match(input,14,FOLLOW_14_in_ruleName2565);
current.merge(kw);
newLeafNode(kw, grammarAccess.getNameAccess().getOperatorKeyword_1());
}
break;
case 3 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1201:2: kw= 'jobflow'
{
kw=(Token)match(input,16,FOLLOW_16_in_ruleName2584);
current.merge(kw);
newLeafNode(kw, grammarAccess.getNameAccess().getJobflowKeyword_2());
}
break;
case 4 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1208:2: kw= 'in'
{
kw=(Token)match(input,21,FOLLOW_21_in_ruleName2603);
current.merge(kw);
newLeafNode(kw, grammarAccess.getNameAccess().getInKeyword_3());
}
break;
case 5 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1215:2: kw= 'out'
{
kw=(Token)match(input,24,FOLLOW_24_in_ruleName2622);
current.merge(kw);
newLeafNode(kw, grammarAccess.getNameAccess().getOutKeyword_4());
}
break;
case 6 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1222:2: kw= 'as'
{
kw=(Token)match(input,15,FOLLOW_15_in_ruleName2641);
current.merge(kw);
newLeafNode(kw, grammarAccess.getNameAccess().getAsKeyword_5());
}
break;
case 7 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1229:2: kw= 'importer'
{
kw=(Token)match(input,23,FOLLOW_23_in_ruleName2660);
current.merge(kw);
newLeafNode(kw, grammarAccess.getNameAccess().getImporterKeyword_6());
}
break;
case 8 :
// ../afw_flow_dsl/src-gen/jp/hishidama/xtext/afw/flow_dsl/parser/antlr/internal/InternalFlowDsl.g:1236:2: kw= 'exporter'
{
kw=(Token)match(input,25,FOLLOW_25_in_ruleName2679);
current.merge(kw);
newLeafNode(kw, grammarAccess.getNameAccess().getExporterKeyword_7());
}
break;
}
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
}
// $ANTLR end "ruleName"
// Delegated rules
protected DFA30 dfa30 = new DFA30(this);
static final String DFA30_eotS =
"\u00ba\uffff";
static final String DFA30_eofS =
"\1\1\1\uffff\1\1\2\5\17\uffff\1\5\4\uffff\1\5\16\uffff\3\5\22\uffff"+
"\1\5\60\uffff\3\5\14\uffff\1\5\74\uffff";
static final String DFA30_minS =
"\1\4\1\uffff\1\5\2\4\1\uffff\16\5\1\4\4\5\1\4\16\5\3\4\22\5\1\4"+
"\60\5\3\4\14\5\1\4\74\5";
static final String DFA30_maxS =
"\1\30\1\uffff\3\31\1\uffff\u00b4\31";
static final String DFA30_acceptS =
"\1\uffff\1\2\3\uffff\1\1\u00b4\uffff";
static final String DFA30_specialS =
"\u00ba\uffff}>";
static final String[] DFA30_transitionS = {
"\1\1\5\uffff\2\1\1\2\1\uffff\3\1\1\uffff\1\1\2\uffff\1\1\2"+
"\uffff\1\1",
"",
"\1\5\7\uffff\1\1\3\5\1\uffff\1\1\2\uffff\1\3\1\uffff\1\5\1"+
"\4\1\5",
"\1\5\1\1\4\uffff\3\5\1\uffff\1\6\1\12\1\7\1\uffff\1\5\2\uffff"+
"\1\10\1\uffff\1\1\1\11\1\1",
"\1\5\1\1\4\uffff\3\5\1\uffff\1\13\1\17\1\14\1\uffff\1\5\2"+
"\uffff\1\15\1\uffff\1\1\1\16\1\1",
"",
"\1\5\10\uffff\1\5\1\20\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\10\uffff\1\5\1\21\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\10\uffff\1\5\1\22\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\10\uffff\1\5\1\23\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\10\uffff\1\5\1\24\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\10\uffff\1\5\1\25\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\10\uffff\1\5\1\26\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\10\uffff\1\5\1\27\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\10\uffff\1\5\1\30\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\10\uffff\1\5\1\31\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\1\6\uffff\1\5\1\uffff\1\1\1\32\1\1\4\uffff\1\1\1\uffff"+
"\3\1",
"\1\1\10\uffff\3\1\1\5\3\uffff\1\1\1\uffff\3\1",
"\1\1\10\uffff\1\1\1\33\1\1\4\uffff\1\1\1\uffff\3\1",
"\1\1\10\uffff\1\1\1\34\1\1\4\uffff\1\1\1\uffff\3\1",
"\1\5\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\1\35\1\1\1\36\1\uffff"+
"\1\5\2\uffff\1\37\1\uffff\1\1\1\40\1\1",
"\1\1\6\uffff\1\5\1\uffff\1\1\1\41\1\1\4\uffff\1\1\1\uffff"+
"\3\1",
"\1\1\10\uffff\3\1\1\5\3\uffff\1\1\1\uffff\3\1",
"\1\1\10\uffff\1\1\1\42\1\1\4\uffff\1\1\1\uffff\3\1",
"\1\1\10\uffff\1\1\1\43\1\1\4\uffff\1\1\1\uffff\3\1",
"\1\5\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\1\45\1\1\1\44\1\uffff"+
"\1\5\2\uffff\1\46\1\uffff\1\1\1\47\1\1",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\50\1\1\1\52\1\51\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\53\1\1\1\55\1\54\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\56\1\1\1\60\1\57\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\62\1\1\1\61\1\63\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\64\1\1\1\66\1\65\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\67\1\1\1\71\1\70\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\72\1\1\1\74\1\73\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\50\1\1\1\5\1\51\1\75",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\53\1\1\1\5\1\54\1\76",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\56\1\1\1\5\1\57\1\77",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\64\1\1\1\5\1\65\1\100",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\62\1\1\1\5\1\63\1\101",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\67\1\1\1\5\1\70\1\102",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\72\1\1\1\5\1\73\1\103",
"\1\5\1\1\4\uffff\1\5\3\uffff\1\6\1\1\1\7\4\uffff\1\1\1\uffff"+
"\3\1",
"\1\5\1\1\4\uffff\1\5\3\uffff\1\13\1\1\1\14\4\uffff\1\1\1\uffff"+
"\3\1",
"\1\5\1\1\4\uffff\1\5\3\uffff\1\104\1\1\1\105\4\uffff\1\1\1"+
"\uffff\3\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\10\1\5\1\106\1\11\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\15\1\5\1\107\1\16\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\111\1\5\1\110\1\112\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\10\1\5\1\1\1\11\1\113",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\15\1\5\1\1\1\16\1\114",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\111\1\5\1\1\1\112\1\115",
"\1\1\6\uffff\1\5\1\uffff\1\1\1\116\1\1\4\uffff\1\1\1\uffff"+
"\3\1",
"\1\1\6\uffff\1\5\1\uffff\1\1\1\117\1\1\4\uffff\1\1\1\uffff"+
"\3\1",
"\1\1\6\uffff\1\5\1\uffff\1\1\1\120\1\1\4\uffff\1\1\1\uffff"+
"\3\1",
"\1\1\10\uffff\3\1\1\5\3\uffff\1\1\1\uffff\3\1",
"\1\1\10\uffff\3\1\1\5\3\uffff\1\1\1\uffff\3\1",
"\1\1\10\uffff\3\1\1\5\3\uffff\1\1\1\uffff\3\1",
"\1\1\10\uffff\1\1\1\121\1\1\4\uffff\1\1\1\uffff\3\1",
"\1\1\10\uffff\1\1\1\122\1\1\4\uffff\1\1\1\uffff\3\1",
"\1\1\10\uffff\1\1\1\123\1\1\4\uffff\1\1\1\uffff\3\1",
"\1\1\10\uffff\1\1\1\124\1\1\4\uffff\1\1\1\uffff\3\1",
"\1\1\10\uffff\1\1\1\125\1\1\4\uffff\1\1\1\uffff\3\1",
"\1\1\10\uffff\1\1\1\126\1\1\4\uffff\1\1\1\uffff\3\1",
"\1\5\1\1\4\uffff\1\5\3\uffff\1\130\1\1\1\127\4\uffff\1\1\1"+
"\uffff\3\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\132\1\5\1\131\1\133\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\132\1\5\1\1\1\133\1\134",
"\1\1\10\uffff\3\1\1\5\3\uffff\1\1\1\uffff\3\1",
"\1\1\6\uffff\1\5\1\uffff\1\1\1\135\1\1\4\uffff\1\1\1\uffff"+
"\3\1",
"\1\1\10\uffff\1\1\1\136\1\1\4\uffff\1\1\1\uffff\3\1",
"\1\1\10\uffff\1\1\1\137\1\1\4\uffff\1\1\1\uffff\3\1",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\140\1\5\1\uffff"+
"\1\1\2\uffff\1\62\1\uffff\1\5\1\63\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\141\1\5\1\uffff"+
"\1\1\2\uffff\1\64\1\uffff\1\5\1\65\1\5",
"\1\5\10\uffff\1\5\1\142\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\10\uffff\1\5\1\143\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\144\1\5\1\uffff"+
"\1\1\2\uffff\1\145\1\uffff\1\5\1\146\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\147\1\5\1\uffff"+
"\1\1\2\uffff\1\67\1\uffff\1\5\1\70\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\150\1\5\1\uffff"+
"\1\1\2\uffff\1\72\1\uffff\1\5\1\73\1\5",
"\1\5\10\uffff\1\5\1\151\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\10\uffff\1\5\1\152\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\155\1\5\1\uffff"+
"\1\1\2\uffff\1\153\1\uffff\1\5\1\154\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\156\1\5\1\uffff"+
"\1\1\2\uffff\1\50\1\uffff\1\5\1\51\1\5",
"\1\5\10\uffff\1\5\1\157\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\10\uffff\1\5\1\160\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\10\uffff\1\5\1\161\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\10\uffff\1\5\1\162\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\163\1\5\1\uffff"+
"\1\1\2\uffff\1\53\1\uffff\1\5\1\54\1\5",
"\1\5\10\uffff\1\5\1\164\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\10\uffff\1\5\1\165\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\166\1\5\1\uffff"+
"\1\1\2\uffff\1\56\1\uffff\1\5\1\57\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\167\1\5\1\uffff"+
"\1\1\2\uffff\1\64\1\uffff\1\5\1\65\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\170\1\5\1\uffff"+
"\1\1\2\uffff\1\62\1\uffff\1\5\1\63\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\171\1\5\1\uffff"+
"\1\1\2\uffff\1\145\1\uffff\1\5\1\146\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\172\1\5\1\uffff"+
"\1\1\2\uffff\1\67\1\uffff\1\5\1\70\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\173\1\5\1\uffff"+
"\1\1\2\uffff\1\72\1\uffff\1\5\1\73\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\174\1\5\1\uffff"+
"\1\1\2\uffff\1\153\1\uffff\1\5\1\154\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\175\1\5\1\uffff"+
"\1\1\2\uffff\1\50\1\uffff\1\5\1\51\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\176\1\5\1\uffff"+
"\1\1\2\uffff\1\53\1\uffff\1\5\1\54\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\177\1\5\1\uffff"+
"\1\1\2\uffff\1\56\1\uffff\1\5\1\57\1\5",
"\1\1\6\uffff\1\5\1\uffff\1\1\1\u0080\1\1\4\uffff\1\1\1\uffff"+
"\3\1",
"\1\1\10\uffff\3\1\1\5\3\uffff\1\1\1\uffff\3\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\1\1\1\u0081\1\1\1\uffff"+
"\1\5\2\uffff\1\37\1\uffff\1\1\1\40\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\1\1\1\u0082\1\1\1\uffff"+
"\1\5\2\uffff\1\46\1\uffff\1\1\1\47\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\1\1\1\u0085\1\1\1\uffff"+
"\1\5\2\uffff\1\u0083\1\uffff\1\1\1\u0084\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\1\1\1\u0086\1\1\1\uffff"+
"\1\5\2\uffff\1\10\1\uffff\1\1\1\11\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\1\1\1\u0087\1\1\1\uffff"+
"\1\5\2\uffff\1\15\1\uffff\1\1\1\16\1\1",
"\1\1\10\uffff\1\1\1\u0088\1\1\4\uffff\1\1\1\uffff\3\1",
"\1\1\10\uffff\1\1\1\u0089\1\1\4\uffff\1\1\1\uffff\3\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\1\1\1\u008a\1\1\1\uffff"+
"\1\5\2\uffff\1\37\1\uffff\1\1\1\40\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\1\1\1\u008b\1\1\1\uffff"+
"\1\5\2\uffff\1\46\1\uffff\1\1\1\47\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\1\1\1\u008c\1\1\1\uffff"+
"\1\5\2\uffff\1\10\1\uffff\1\1\1\11\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\1\1\1\u008d\1\1\1\uffff"+
"\1\5\2\uffff\1\15\1\uffff\1\1\1\16\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\1\1\1\u008e\1\1\1\uffff"+
"\1\5\2\uffff\1\u0083\1\uffff\1\1\1\u0084\1\1",
"\1\5\1\1\4\uffff\1\5\3\uffff\1\u008f\1\1\1\u0090\4\uffff\1"+
"\1\1\uffff\3\1",
"\1\5\1\1\4\uffff\1\5\3\uffff\1\35\1\1\1\36\4\uffff\1\1\1\uffff"+
"\3\1",
"\1\5\1\1\4\uffff\1\5\3\uffff\1\45\1\1\1\44\4\uffff\1\1\1\uffff"+
"\3\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\37\1\5\1\u0091\1\40\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\46\1\5\1\u0092\1\47\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\u0083\1\5\1\u0093\1\u0084\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\37\1\5\1\1\1\40\1\u0094",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\46\1\5\1\1\1\47\1\u0095",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\u0083\1\5\1\1\1\u0084\1\u0096",
"\1\1\10\uffff\3\1\1\5\3\uffff\1\1\1\uffff\3\1",
"\1\1\6\uffff\1\5\1\uffff\1\1\1\u0097\1\1\4\uffff\1\1\1\uffff"+
"\3\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\1\1\1\u0098\1\1\1\uffff"+
"\1\5\2\uffff\1\u0099\1\uffff\1\1\1\u009a\1\1",
"\1\1\10\uffff\1\1\1\u009b\1\1\4\uffff\1\1\1\uffff\3\1",
"\1\1\10\uffff\1\1\1\u009c\1\1\4\uffff\1\1\1\uffff\3\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\1\1\1\u009d\1\1\1\uffff"+
"\1\5\2\uffff\1\u0099\1\uffff\1\1\1\u009a\1\1",
"\1\5\1\1\4\uffff\1\5\3\uffff\1\u009e\1\1\1\u009f\4\uffff\1"+
"\1\1\uffff\3\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\u0099\1\5\1\u00a0\1\u009a\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\u0099\1\5\1\1\1\u009a\1\u00a1",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\50\1\uffff\1\5\1\51\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\u00a2\1\1\1\u00a4\1\u00a3\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\u00a2\1\1\1\5\1\u00a3\1\u00a5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\67\1\uffff\1\5\1\70\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\72\1\uffff\1\5\1\73\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\u00a2\1\uffff\1\5\1\u00a3\1\5",
"\1\5\10\uffff\1\5\1\u00a6\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\10\uffff\1\5\1\u00a7\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\53\1\uffff\1\5\1\54\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\56\1\uffff\1\5\1\57\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\u00a9\1\1\1\u00a8\1\u00aa\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\u00a9\1\1\1\5\1\u00aa\1\u00ab",
"\1\5\10\uffff\1\5\1\u00ac\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\10\uffff\1\5\1\u00ad\1\5\4\uffff\1\5\1\uffff\3\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\u00a9\1\uffff\1\5\1\u00aa\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\62\1\uffff\1\5\1\63\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\64\1\uffff\1\5\1\65\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\145\1\1\1\u00ae\1\146\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\145\1\1\1\5\1\146\1\u00af",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\145\1\uffff\1\5\1\146\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\153\1\1\1\u00b0\1\154\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\153\1\1\1\5\1\154\1\u00b1",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\153\1\uffff\1\5\1\154\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\50\1\uffff\1\5\1\51\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\u00a2\1\uffff\1\5\1\u00a3\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\67\1\uffff\1\5\1\70\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\72\1\uffff\1\5\1\73\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\53\1\uffff\1\5\1\54\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\56\1\uffff\1\5\1\57\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\u00a9\1\uffff\1\5\1\u00aa\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\62\1\uffff\1\5\1\63\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\64\1\uffff\1\5\1\65\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\145\1\uffff\1\5\1\146\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\3\5\1\uffff\1\1\2\uffff"+
"\1\153\1\uffff\1\5\1\154\1\5",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\10\1\uffff\1\1\1\11\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\15\1\uffff\1\1\1\16\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\111\1\uffff\1\1\1\112\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\132\1\uffff\1\1\1\133\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\37\1\uffff\1\1\1\40\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\46\1\uffff\1\1\1\47\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\111\1\uffff\1\1\1\112\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\10\1\uffff\1\1\1\11\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\15\1\uffff\1\1\1\16\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\132\1\uffff\1\1\1\133\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\37\1\uffff\1\1\1\40\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\46\1\uffff\1\1\1\47\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\1\1\1\u00b2\1\1\1\uffff"+
"\1\5\2\uffff\1\111\1\uffff\1\1\1\112\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\1\1\1\u00b3\1\1\1\uffff"+
"\1\5\2\uffff\1\132\1\uffff\1\1\1\133\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\1\1\1\u00b4\1\1\1\uffff"+
"\1\5\2\uffff\1\111\1\uffff\1\1\1\112\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\1\1\1\u00b5\1\1\1\uffff"+
"\1\5\2\uffff\1\132\1\uffff\1\1\1\133\1\1",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\u00b6\1\5\1\uffff"+
"\1\1\2\uffff\1\u00a2\1\uffff\1\5\1\u00a3\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\u00b7\1\5\1\uffff"+
"\1\1\2\uffff\1\u00a2\1\uffff\1\5\1\u00a3\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\u00b8\1\5\1\uffff"+
"\1\1\2\uffff\1\u00a9\1\uffff\1\5\1\u00aa\1\5",
"\1\5\4\uffff\1\1\1\uffff\1\1\1\uffff\1\5\1\u00b9\1\5\1\uffff"+
"\1\1\2\uffff\1\u00a9\1\uffff\1\5\1\u00aa\1\5",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\u0083\1\uffff\1\1\1\u0084\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\u0099\1\uffff\1\1\1\u009a\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\u0083\1\uffff\1\1\1\u0084\1\1",
"\1\1\4\uffff\1\5\1\uffff\1\5\1\uffff\3\1\1\uffff\1\5\2\uffff"+
"\1\u0099\1\uffff\1\1\1\u009a\1\1"
};
static final short[] DFA30_eot = DFA.unpackEncodedString(DFA30_eotS);
static final short[] DFA30_eof = DFA.unpackEncodedString(DFA30_eofS);
static final char[] DFA30_min = DFA.unpackEncodedStringToUnsignedChars(DFA30_minS);
static final char[] DFA30_max = DFA.unpackEncodedStringToUnsignedChars(DFA30_maxS);
static final short[] DFA30_accept = DFA.unpackEncodedString(DFA30_acceptS);
static final short[] DFA30_special = DFA.unpackEncodedString(DFA30_specialS);
static final short[][] DFA30_transition;
static {
int numStates = DFA30_transitionS.length;
DFA30_transition = new short[numStates][];
for (int i=0; i<numStates; i++) {
DFA30_transition[i] = DFA.unpackEncodedString(DFA30_transitionS[i]);
}
}
class DFA30 extends DFA {
public DFA30(BaseRecognizer recognizer) {
this.recognizer = recognizer;
this.decisionNumber = 30;
this.eot = DFA30_eot;
this.eof = DFA30_eof;
this.min = DFA30_min;
this.max = DFA30_max;
this.accept = DFA30_accept;
this.special = DFA30_special;
this.transition = DFA30_transition;
}
public String getDescription() {
return "()* loopback of 1147:1: (kw= '.' this_Name_2= ruleName )*";
}
}
public static final BitSet FOLLOW_ruleScript_in_entryRuleScript75 = new BitSet(new long[]{0x0000000000000000L});
public static final BitSet FOLLOW_EOF_in_entryRuleScript85 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_rulePackageDeclare_in_ruleScript131 = new BitSet(new long[]{0x0000000000014812L});
public static final BitSet FOLLOW_ruleImportDeclare_in_ruleScript152 = new BitSet(new long[]{0x0000000000014812L});
public static final BitSet FOLLOW_ruleOperatorDeclare_in_ruleScript174 = new BitSet(new long[]{0x0000000000014012L});
public static final BitSet FOLLOW_ruleFlowDsl_in_ruleScript196 = new BitSet(new long[]{0x0000000000010012L});
public static final BitSet FOLLOW_rulePackageDeclare_in_entryRulePackageDeclare233 = new BitSet(new long[]{0x0000000000000000L});
public static final BitSet FOLLOW_EOF_in_entryRulePackageDeclare243 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_9_in_rulePackageDeclare280 = new BitSet(new long[]{0x0000000003A1C020L});
public static final BitSet FOLLOW_ruleFQN_in_rulePackageDeclare301 = new BitSet(new long[]{0x0000000000000402L});
public static final BitSet FOLLOW_10_in_rulePackageDeclare314 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleImportDeclare_in_entryRuleImportDeclare352 = new BitSet(new long[]{0x0000000000000000L});
public static final BitSet FOLLOW_EOF_in_entryRuleImportDeclare362 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_11_in_ruleImportDeclare399 = new BitSet(new long[]{0x0000000003A1C020L});
public static final BitSet FOLLOW_ruleFQN_in_ruleImportDeclare420 = new BitSet(new long[]{0x0000000000001402L});
public static final BitSet FOLLOW_12_in_ruleImportDeclare433 = new BitSet(new long[]{0x0000000000002000L});
public static final BitSet FOLLOW_13_in_ruleImportDeclare451 = new BitSet(new long[]{0x0000000000000402L});
public static final BitSet FOLLOW_10_in_ruleImportDeclare479 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleOperatorDeclare_in_entryRuleOperatorDeclare517 = new BitSet(new long[]{0x0000000000000000L});
public static final BitSet FOLLOW_EOF_in_entryRuleOperatorDeclare527 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_14_in_ruleOperatorDeclare564 = new BitSet(new long[]{0x0000000003A1C020L});
public static final BitSet FOLLOW_ruleFQN_in_ruleOperatorDeclare585 = new BitSet(new long[]{0x0000000000008000L});
public static final BitSet FOLLOW_15_in_ruleOperatorDeclare597 = new BitSet(new long[]{0x0000000003A1C020L});
public static final BitSet FOLLOW_ruleName_in_ruleOperatorDeclare618 = new BitSet(new long[]{0x0000000000000402L});
public static final BitSet FOLLOW_10_in_ruleOperatorDeclare631 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleFlowDsl_in_entryRuleFlowDsl669 = new BitSet(new long[]{0x0000000000000000L});
public static final BitSet FOLLOW_EOF_in_entryRuleFlowDsl679 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_RULE_STRING_in_ruleFlowDsl721 = new BitSet(new long[]{0x0000000000010000L});
public static final BitSet FOLLOW_16_in_ruleFlowDsl739 = new BitSet(new long[]{0x0000000003A1C020L});
public static final BitSet FOLLOW_ruleName_in_ruleFlowDsl760 = new BitSet(new long[]{0x0000000000020000L});
public static final BitSet FOLLOW_17_in_ruleFlowDsl772 = new BitSet(new long[]{0x0000000001200000L});
public static final BitSet FOLLOW_ruleFlowParameter_in_ruleFlowDsl793 = new BitSet(new long[]{0x0000000001240000L});
public static final BitSet FOLLOW_18_in_ruleFlowDsl806 = new BitSet(new long[]{0x0000000000080000L});
public static final BitSet FOLLOW_19_in_ruleFlowDsl818 = new BitSet(new long[]{0x0000000003B1C020L});
public static final BitSet FOLLOW_ruleFlowStatement_in_ruleFlowDsl839 = new BitSet(new long[]{0x0000000003B1C020L});
public static final BitSet FOLLOW_20_in_ruleFlowDsl852 = new BitSet(new long[]{0x0000000000000402L});
public static final BitSet FOLLOW_10_in_ruleFlowDsl865 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleFlowParameter_in_entryRuleFlowParameter903 = new BitSet(new long[]{0x0000000000000000L});
public static final BitSet FOLLOW_EOF_in_entryRuleFlowParameter913 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleFlowIn_in_ruleFlowParameter959 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleFlowOut_in_ruleFlowParameter986 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleFlowIn_in_entryRuleFlowIn1022 = new BitSet(new long[]{0x0000000000000000L});
public static final BitSet FOLLOW_EOF_in_entryRuleFlowIn1032 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_21_in_ruleFlowIn1075 = new BitSet(new long[]{0x0000000003A1C020L});
public static final BitSet FOLLOW_ruleName_in_ruleFlowIn1109 = new BitSet(new long[]{0x0000000000008000L});
public static final BitSet FOLLOW_15_in_ruleFlowIn1121 = new BitSet(new long[]{0x0000000003A1C020L});
public static final BitSet FOLLOW_ruleName_in_ruleFlowIn1142 = new BitSet(new long[]{0x0000000000C01402L});
public static final BitSet FOLLOW_22_in_ruleFlowIn1156 = new BitSet(new long[]{0x0000000000800000L});
public static final BitSet FOLLOW_23_in_ruleFlowIn1170 = new BitSet(new long[]{0x0000000003A1C020L});
public static final BitSet FOLLOW_ruleFQN_in_ruleFlowIn1191 = new BitSet(new long[]{0x0000000000009402L});
public static final BitSet FOLLOW_15_in_ruleFlowIn1204 = new BitSet(new long[]{0x0000000003A1C020L});
public static final BitSet FOLLOW_ruleName_in_ruleFlowIn1225 = new BitSet(new long[]{0x0000000000001402L});
public static final BitSet FOLLOW_10_in_ruleFlowIn1242 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_12_in_ruleFlowIn1260 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleFlowOut_in_entryRuleFlowOut1298 = new BitSet(new long[]{0x0000000000000000L});
public static final BitSet FOLLOW_EOF_in_entryRuleFlowOut1308 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_24_in_ruleFlowOut1351 = new BitSet(new long[]{0x0000000003A1C020L});
public static final BitSet FOLLOW_ruleName_in_ruleFlowOut1385 = new BitSet(new long[]{0x0000000000008000L});
public static final BitSet FOLLOW_15_in_ruleFlowOut1397 = new BitSet(new long[]{0x0000000003A1C020L});
public static final BitSet FOLLOW_ruleName_in_ruleFlowOut1418 = new BitSet(new long[]{0x0000000002401402L});
public static final BitSet FOLLOW_22_in_ruleFlowOut1432 = new BitSet(new long[]{0x0000000002000000L});
public static final BitSet FOLLOW_25_in_ruleFlowOut1446 = new BitSet(new long[]{0x0000000003A1C020L});
public static final BitSet FOLLOW_ruleFQN_in_ruleFlowOut1467 = new BitSet(new long[]{0x0000000000009402L});
public static final BitSet FOLLOW_15_in_ruleFlowOut1480 = new BitSet(new long[]{0x0000000003A1C020L});
public static final BitSet FOLLOW_ruleName_in_ruleFlowOut1501 = new BitSet(new long[]{0x0000000000001402L});
public static final BitSet FOLLOW_10_in_ruleFlowOut1518 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_12_in_ruleFlowOut1536 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleFlowStatement_in_entryRuleFlowStatement1574 = new BitSet(new long[]{0x0000000000000000L});
public static final BitSet FOLLOW_EOF_in_entryRuleFlowStatement1584 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleFlowStatement1_in_ruleFlowStatement1631 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleFlowStatement2_in_ruleFlowStatement1658 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleFlowStatement1_in_entryRuleFlowStatement11693 = new BitSet(new long[]{0x0000000000000000L});
public static final BitSet FOLLOW_EOF_in_entryRuleFlowStatement11703 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleName_in_ruleFlowStatement11750 = new BitSet(new long[]{0x0000000004000000L});
public static final BitSet FOLLOW_26_in_ruleFlowStatement11762 = new BitSet(new long[]{0x0000000000000020L});
public static final BitSet FOLLOW_RULE_ID_in_ruleFlowStatement11784 = new BitSet(new long[]{0x0000000000001000L});
public static final BitSet FOLLOW_12_in_ruleFlowStatement11796 = new BitSet(new long[]{0x0000000003A1C020L});
public static final BitSet FOLLOW_ruleName_in_ruleFlowStatement11817 = new BitSet(new long[]{0x0000000000020000L});
public static final BitSet FOLLOW_17_in_ruleFlowStatement11829 = new BitSet(new long[]{0x0000000000040020L});
public static final BitSet FOLLOW_ruleOperatorArgument_in_ruleFlowStatement11851 = new BitSet(new long[]{0x0000000000440000L});
public static final BitSet FOLLOW_22_in_ruleFlowStatement11864 = new BitSet(new long[]{0x0000000000000020L});
public static final BitSet FOLLOW_ruleOperatorArgument_in_ruleFlowStatement11885 = new BitSet(new long[]{0x0000000000440000L});
public static final BitSet FOLLOW_18_in_ruleFlowStatement11901 = new BitSet(new long[]{0x0000000000001402L});
public static final BitSet FOLLOW_10_in_ruleFlowStatement11914 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_12_in_ruleFlowStatement11932 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleFlowStatement2_in_entryRuleFlowStatement21970 = new BitSet(new long[]{0x0000000000000000L});
public static final BitSet FOLLOW_EOF_in_entryRuleFlowStatement21980 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_RULE_ID_in_ruleFlowStatement22025 = new BitSet(new long[]{0x0000000008000000L});
public static final BitSet FOLLOW_27_in_ruleFlowStatement22037 = new BitSet(new long[]{0x0000000000020000L});
public static final BitSet FOLLOW_17_in_ruleFlowStatement22049 = new BitSet(new long[]{0x0000000000040020L});
public static final BitSet FOLLOW_ruleOperatorArgument_in_ruleFlowStatement22071 = new BitSet(new long[]{0x0000000000440000L});
public static final BitSet FOLLOW_22_in_ruleFlowStatement22084 = new BitSet(new long[]{0x0000000000000020L});
public static final BitSet FOLLOW_ruleOperatorArgument_in_ruleFlowStatement22105 = new BitSet(new long[]{0x0000000000440000L});
public static final BitSet FOLLOW_18_in_ruleFlowStatement22121 = new BitSet(new long[]{0x0000000000001402L});
public static final BitSet FOLLOW_10_in_ruleFlowStatement22134 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_12_in_ruleFlowStatement22152 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleOperatorArgument_in_entryRuleOperatorArgument2190 = new BitSet(new long[]{0x0000000000000000L});
public static final BitSet FOLLOW_EOF_in_entryRuleOperatorArgument2200 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_RULE_ID_in_ruleOperatorArgument2246 = new BitSet(new long[]{0x0000000000001000L});
public static final BitSet FOLLOW_12_in_ruleOperatorArgument2258 = new BitSet(new long[]{0x0000000003A1C020L});
public static final BitSet FOLLOW_ruleName_in_ruleOperatorArgument2279 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_RULE_ID_in_ruleOperatorArgument2306 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleFQN_in_entryRuleFQN2343 = new BitSet(new long[]{0x0000000000000000L});
public static final BitSet FOLLOW_EOF_in_entryRuleFQN2354 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ruleName_in_ruleFQN2401 = new BitSet(new long[]{0x0000000000001002L});
public static final BitSet FOLLOW_12_in_ruleFQN2420 = new BitSet(new long[]{0x0000000003A1C020L});
public static final BitSet FOLLOW_ruleName_in_ruleFQN2442 = new BitSet(new long[]{0x0000000000001002L});
public static final BitSet FOLLOW_ruleName_in_entryRuleName2490 = new BitSet(new long[]{0x0000000000000000L});
public static final BitSet FOLLOW_EOF_in_entryRuleName2501 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_RULE_ID_in_ruleName2541 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_14_in_ruleName2565 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_16_in_ruleName2584 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_21_in_ruleName2603 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_24_in_ruleName2622 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_15_in_ruleName2641 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_23_in_ruleName2660 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_25_in_ruleName2679 = new BitSet(new long[]{0x0000000000000002L});
} | 179,365 | 0.526307 | 0.460196 | 3,721 | 46.204247 | 56.77195 | 472 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.732061 | false | false | 13 |
7bbba9a38ba46ce156f5c6126e756a36293903d7 | 3,152,506,058,598 | 0552aa4a4b510fb1bdd74ad723595f0e370c1fe4 | /src/main/java/com/stackroute/Car.java | 94b240200e85fe42bcbd0318bcf636ae448adeaf | [] | no_license | naveenpra17/Solid-principles-task | https://github.com/naveenpra17/Solid-principles-task | 64256a193ec010abe73175b816548deb7cb69e2d | b270e9d96006adce31946bb3637bce55cb953424 | refs/heads/master | 2020-06-23T21:36:17.175000 | 2019-07-25T04:54:46 | 2019-07-25T04:54:46 | 198,759,829 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | package com.stackroute;
public class Car extends ToyBuilder{
private int price=100;
public int getPrice() {
return price;
}
public void move(){ //additional functionality
System.out.println(super.getColor()+ "car is created and moving functionality is added." +
"the price of car is" +getPrice());
}
}
| UTF-8 | Java | 358 | java | Car.java | Java | [] | null | [] | package com.stackroute;
public class Car extends ToyBuilder{
private int price=100;
public int getPrice() {
return price;
}
public void move(){ //additional functionality
System.out.println(super.getColor()+ "car is created and moving functionality is added." +
"the price of car is" +getPrice());
}
}
| 358 | 0.634078 | 0.625698 | 14 | 24.571428 | 26.826731 | 98 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.285714 | false | false | 13 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.