Unnamed: 0 int64 0 9.45k | cwe_id stringclasses 1
value | source stringlengths 37 2.53k | target stringlengths 19 2.4k |
|---|---|---|---|
900 | public void sandstormClick(View view){
Intent intent = new Intent(this, Sandstorm.class);
intent.putExtra("setupHashMap", setupHashMap);
for (int i = 0; i < constraintLayout.getChildCount(); i++) {
if (constraintLayout.getChildAt(i) instanceof TextView) {
TextView textView = (TextVi... | public void sandstormClick(View view){
Intent intent = new Intent(this, Sandstorm.class);
intent.putExtra("setupHashMap", setupHashMap);
for (int i = 0; i < constraintLayout.getChildCount(); i++) {
if (constraintLayout.getChildAt(i) instanceof TextView) {
TextView textView = (TextVi... | |
901 | public Result<ProcessDefinition> queryProcessDefinitionByName(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser, @ApiParam(name = "projectName", value = "PROJECT_NAME", required = true) @PathVariable String projectName, @RequestParam("processDefinitionName") String processDefinitionName){
... | public Result<ProcessDefinition> queryProcessDefinitionByName(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser, @ApiParam(name = "projectName", value = "PROJECT_NAME", required = true) @PathVariable String projectName, @RequestParam("processDefinitionName") String processDefinitionName){
... | |
902 | public synchronized Future<Void> upgradeMetadata(ServerContext context, EventCoordinator eventCoordinator){
if (status == UpgradeStatus.COMPLETE)
return CompletableFuture.completedFuture(null);
Preconditions.checkState(status == UpgradeStatus.UPGRADED_ZOOKEEPER, "Not currently in a suitable state to ... | public synchronized Future<Void> upgradeMetadata(ServerContext context, EventCoordinator eventCoordinator){
if (status == UpgradeStatus.COMPLETE)
return CompletableFuture.completedFuture(null);
Preconditions.checkState(status == UpgradeStatus.UPGRADED_ZOOKEEPER, "Not currently in a suitable state to ... | |
903 | private boolean parseDate(String date, Calendar outDate){
try {
SimpleDateFormat mDateFormat = new SimpleDateFormat("MM/dd/yyyy", Locale.getDefault());
outDate.setTime(Objects.requireNonNull(mDateFormat.parse(date)));
return true;
} catch (ParseException e) {
Log.w(TAG, "Da... | private boolean parseDate(String date, Calendar outDate){
try {
SimpleDateFormat mDateFormat = new SimpleDateFormat("MM/dd/yyyy", Locale.getDefault());
outDate.setTime(Objects.requireNonNull(mDateFormat.parse(date)));
return true;
} catch (ParseException e) {
return false;
... | |
904 | protected Map<Class<?>, List<SymbolTypeConfig>> getFieldMap(){
if (fieldEnableMap == null) {
fieldEnableMap = new HashMap<Class<?>, List<SymbolTypeConfig>>();
SymbolTypeConfigReader.readConfig(getClass(), resourceFile, fieldEnableMap);
populateVendorOptionFieldMap(fieldEnableMap);
}... | protected Map<Class<?>, List<SymbolTypeConfig>> getFieldMap(){
if (fieldEnableMap == null) {
fieldEnableMap = new HashMap<Class<?>, List<SymbolTypeConfig>>();
SymbolTypeConfigReader.readConfig(getClass(), resourceFile, fieldEnableMap);
}
return fieldEnableMap;
} | |
905 | public Map<String, Object> queryScheduleList(User loginUser, String projectName){
Map<String, Object> result = new HashMap<>();
Project project = projectMapper.queryByName(projectName);
boolean hasProjectAndPerm = projectService.hasProjectAndPerm(loginUser, project, result);
if (!hasProjectAndPerm) ... | public Result<List<Schedule>> queryScheduleList(User loginUser, String projectName){
Map<String, Object> result = new HashMap<>();
Project project = projectMapper.queryByName(projectName);
CheckParamResult checkResult = projectService.hasProjectAndPerm(loginUser, project);
if (!Status.SUCCESS.equals... | |
906 | public Set<OWLDataRange> visit(@Nonnull OWLDatatype dr){
Set<OWLDataRange> dataRanges = new HashSet<>();
dataRanges.add(dr);
return dataRanges;
} | public Set<OWLDataRange> visit(@Nonnull OWLDatatype dr){
return Collections.singleton(dr);
} | |
907 | public void render(Window window){
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
if (window.isResized()) {
glViewport(0, 0, window.getWidth(), window.getHeight());
window.setResized(false);
}
shaderProgram.bind();
projectionMatrix.setPerspective(FOV, (float) window.getWi... | public void render(Window window){
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
if (window.isResized()) {
glViewport(0, 0, window.getWidth(), window.getHeight());
window.setResized(false);
}
shaderProgram.bind();
projectionMatrix.setPerspective(FOV, (float) window.getWi... | |
908 | public FetchConnection openFetch() throws TransportException, NotSupportedException{
final String service = SVC_UPLOAD_PACK;
try {
final HttpConnection c = connect(service);
try (InputStream in = openInputStream(c)) {
return getConnection(c, in, service);
}
} catch... | public FetchConnection openFetch() throws TransportException, NotSupportedException{
final String service = SVC_UPLOAD_PACK;
try {
final HttpConnection c = connect(service);
try (InputStream in = openInputStream(c)) {
return getConnection(c, in, service);
}
} catch... | |
909 | private void displayView(int position){
final BusRoute blueRoute = new BusRoute("blueRoute");
blueRoute.loadRoute();
final BusRoute greenRoute = new BusRoute("greenRoute");
greenRoute.loadRoute();
Fragment fragment = null;
switch(position) {
case 0:
changeRoute(mMap, ... | private void displayView(int position){
final BusRoute blueRoute = new BusRoute("blueRoute");
blueRoute.loadRoute();
final BusRoute greenRoute = new BusRoute("greenRoute");
greenRoute.loadRoute();
final Vehicle blueRouteVehicle = new Vehicle("blueRoute");
Fragment fragment = null;
swi... | |
910 | private List<PartitionDto> getPartitions(final String catalogName, final String databaseName, final String tableName, final String filter, final List<String> partitionNames, final String sortBy, final SortOrder sortOrder, final Integer offset, final Integer limit, final Boolean includeUserMetadata, final Boolean includ... | private List<PartitionDto> getPartitions(final String catalogName, final String databaseName, final String tableName, final String filter, final List<String> partitionNames, final String sortBy, final SortOrder sortOrder, final Integer offset, final Integer limit, final Boolean includeUserMetadata, final Boolean includ... | |
911 | private boolean isOp(char a){
boolean flag = true;
switch(a) {
case '+':
break;
case '-':
break;
case '*':
break;
case '/':
break;
case '(':
break;
case ')':
break;
case... | private boolean isOp(char a){
boolean flag = false;
for (int i = 0; i < operator.length; i++) {
if (a == operator[i]) {
flag = true;
break;
}
}
return flag;
} | |
912 | private void saveClassesDefects(final String codesmellName, final Occurrence[] allOccurrences){
final FilePredicates f = this.fs.predicates();
final FilePredicate fp = f.hasExtension("java");
final Iterable<InputFile> files = fs.inputFiles(fp);
for (final Occurrence occ : allOccurrences) {
... | private void saveClassesDefects(final String codesmellName, final Occurrence[] allOccurrences){
final FilePredicates f = context.fileSystem().predicates();
final FilePredicate fp = f.hasExtension("java");
final Iterable<InputFile> files = context.fileSystem().inputFiles(fp);
for (final Occurrence oc... | |
913 | public Integer receive(){
String tryCountString = null;
boolean errorSwitch = true;
while (errorSwitch) {
System.out.println(INPUT_TRY_COUNT_MESSAGE);
tryCountString = Console.readLine();
TryCountValidator tryCountValidator = new TryCountValidator();
errorSwitch = tryC... | public Integer receive(){
String tryCountString = null;
boolean errorSwitch = true;
while (errorSwitch) {
System.out.println(INPUT_TRY_COUNT_MESSAGE);
tryCountString = Console.readLine();
errorSwitch = new TryCountValidator().validate(tryCountString);
}
return Integer... | |
914 | public Object invoke(Object proxy, Method method, Object[] args) throws Throwable{
if ("toString".equals(method.getName()) && args == null) {
return handleToString(_apiClass);
}
if (_interfaceValueSuppliers.containsKey(method.getDeclaringClass())) {
System.err.println("interface: " + me... | public Object invoke(Object proxy, Method method, Object[] args) throws Throwable{
if ("toString".equals(method.getName()) && args == null) {
return handleToString(_apiClass);
}
if (_interfaceValueSuppliers.containsKey(method.getDeclaringClass())) {
return _interfaceValueSuppliers.get(m... | |
915 | public void close(){
if (!scanMetricsPublished)
writeScanMetrics();
if (callable != null) {
callable.setClose();
try {
call(callable, caller, scannerTimeout, false);
} catch (UnknownScannerException e) {
if (LOG.isDebugEnabled()) {
... | public void close(){
if (!scanMetricsPublished)
writeScanMetrics();
if (callable != null) {
callable.setClose();
try {
call(callable, caller, scannerTimeout, false);
} catch (UnknownScannerException e) {
LOG.debug("scanner failed to close", e);
... | |
916 | void assertOutputContains(String... expectedRegExes){
List<String> notFound = new ArrayList<>();
boolean modified = notFound.addAll(Arrays.asList(expectedRegExes));
assertTrue("Missing regular expressions in assertion", modified);
for (String line : output) {
for (Iterator<String> iterator... | void assertOutputContains(String... expectedRegExes){
List<String> notFound = new ArrayList<>();
boolean modified = notFound.addAll(Arrays.asList(expectedRegExes));
assertTrue("Missing regular expressions in assertion", modified);
for (String line : output) {
notFound.removeIf(line::matche... | |
917 | private static void cloneAndAnalyzeRepos(List<RepoConfiguration> configs, String outputPath){
Map<RepoLocation, List<RepoConfiguration>> repoLocationMap = groupConfigsByRepoLocation(configs);
RepoCloner repoCloner = new RepoCloner();
RepoLocation clonedRepoLocation = null;
failedRepoConfigsList = ne... | private static void cloneAndAnalyzeRepos(List<RepoConfiguration> configs, String outputPath){
Map<RepoLocation, List<RepoConfiguration>> repoLocationMap = groupConfigsByRepoLocation(configs);
RepoCloner repoCloner = new RepoCloner();
RepoLocation clonedRepoLocation;
failedRepoConfigsList = new Array... | |
918 | public void call(Integer numTimes, QuaternionFloat16MatrixMember a, QuaternionFloat16MatrixMember b){
QuaternionFloat16Member factor = new QuaternionFloat16Member(0.5f, 0, 0, 0);
QuaternionFloat16MatrixMember prod = G.QHLF_MAT.construct(a);
for (int i = 0; i < numTimes; i++) {
scale().call(facto... | public void call(Integer numTimes, QuaternionFloat16MatrixMember a, QuaternionFloat16MatrixMember b){
ScaleHelper.compute(G.QHLF_MAT, G.QHLF, new QuaternionFloat16Member(0.5f, 0, 0, 0), numTimes, a, b);
} | |
919 | private boolean canTeleport(World world, int x, int y, int z){
if (!world.isAirBlock(new BlockPos(x, y + 1, z)) || !world.isAirBlock(new BlockPos(x, y + 2, z)))
return false;
return true;
} | private boolean canTeleport(World world, int x, int y, int z){
return !(!world.isAirBlock(new BlockPos(x, y + 1, z)) || !world.isAirBlock(new BlockPos(x, y + 2, z)));
} | |
920 | private Argument processCalling(ExecutableCode _conf, Argument _right){
CustList<RendDynOperationNode> chidren_ = getChildrenNodes();
CustList<Argument> arguments_ = new CustList<Argument>();
for (RendDynOperationNode o : chidren_) {
arguments_.add(o.getArgument());
}
Argument previous... | private Argument processCalling(ExecutableCode _conf, Argument _right){
CustList<RendDynOperationNode> chidren_ = getChildrenNodes();
CustList<Argument> arguments_ = new CustList<Argument>();
for (RendDynOperationNode o : chidren_) {
arguments_.add(o.getArgument());
}
Argument previous... | |
921 | private void applySettings(){
currentWidth = settings.getWidth();
currentHeight = settings.getHeight();
Rectangle2D bounds = settings.isFullScreen() ? Screen.getPrimary().getBounds() : Screen.getPrimary().getVisualBounds();
if (settings.getWidth() <= bounds.getWidth() && settings.getHeight() <= boun... | private void applySettings(){
Rectangle2D bounds = settings.isFullScreen() ? Screen.getPrimary().getBounds() : Screen.getPrimary().getVisualBounds();
if (settings.getWidth() <= bounds.getWidth() && settings.getHeight() <= bounds.getHeight()) {
root.setPrefSize(settings.getWidth(), settings.getHeight(... | |
922 | private void generateItemList(){
itemBox = new VBox();
itemBox.setSpacing(5);
root.setCenter(itemBox);
items = ezParser.getItems();
if (items.size() == 0) {
return;
}
for (Map.Entry<Integer, List<String>> entry : items.entrySet()) {
Integer key = entry.getKey();
... | private void generateItemList(){
itemBox = new VBox();
itemBox.getChildren().add(new Separator());
itemBox.getStyleClass().add("itemBox");
itemBox.setSpacing(5);
root.setCenter(itemBox);
items = ezParser.getItems();
if (items.size() == 0) {
return;
}
for (Map.Entry<... | |
923 | public Optional<UserInfo> authenticate(String username, String password){
Optional<UserInfo> userInfo = Optional.empty();
try {
userInfo = userInfoRepository.findByUsernameAndPassword(username, password);
if (!userInfo.isPresent()) {
throw new UserDoesNotExistException(exception... | public Optional<UserInfo> authenticate(String username, String password) throws UserDoesNotExistException{
Optional<UserInfo> userInfo;
userInfo = userInfoRepository.findByUsernameAndPassword(username, password);
if (!userInfo.isPresent()) {
throw new UserDoesNotExistException(exceptionError);
... | |
924 | public void train(TimeSeries.DataSequence data){
this.data = data;
int n = data.size();
DataPoint dp = null;
DataSet observedData = new DataSet();
for (int i = 0; i < n; i++) {
dp = new Observation(data.get(i).value);
dp.setIndependentValue("x", i);
observedData.add(d... | public void train(TimeSeries.DataSequence data){
this.data = data;
int n = data.size();
DataSet observedData = new DataSet();
for (int i = 0; i < n; i++) {
DataPoint dp = new Observation(data.get(i).value);
dp.setIndependentValue("x", i);
observedData.add(dp);
}
... | |
925 | public Long getDuration(){
try {
String url = String.format("https://api.vk.com/method/video.get?owner_Id=%s&videos=%s_%s&access_token=%s&v=5.126", ownerId, ownerId, id, ApiKey);
JSONObject json = Helper.parseURL(url);
JSONObject response = (JSONObject) json.get("response");
JSO... | public Long getDuration(){
try {
JSONObject jTemp = parse();
return Helper.objectToLong(jTemp.get("date"));
} catch (Exception e) {
Helper.debug(e);
return null;
}
} | |
926 | public void setupFollowupVisitEditViews(boolean isWithin24Hours){
if (isWithin24Hours) {
recordFollowUpVisitLayout.setVisibility(View.GONE);
recordVisitStatusBarLayout.setVisibility(View.VISIBLE);
tvEditVisit.setVisibility(View.VISIBLE);
} else {
tvEditVisit.setVisibility(V... | public void setupFollowupVisitEditViews(boolean isWithin24Hours){
if (isWithin24Hours) {
recordFollowUpVisitLayout.setVisibility(View.GONE);
} else {
tvEditVisit.setVisibility(View.GONE);
recordFollowUpVisitLayout.setVisibility(View.VISIBLE);
recordVisitStatusBarLayout.setV... | |
927 | private void fillStack(){
int[] tileAmount = { 1, 3, 4, 5, 5, 3, 2, 3, 5, 3, 3, 3, 4, 4, 2, 0, 7, 8, 2, 4, 1, 2, 2, 1 };
for (TileType tileType : TileType.values()) {
for (int i = 0; i < tileAmount[tileType.ordinal()] * multiplicator; i++) {
tiles.add(TileFactory.create(tileType));
... | private void fillStack(){
for (TileType tileType : TileType.values()) {
for (int i = 0; i < tileType.getAmount() * multiplicator; i++) {
tiles.add(TileFactory.create(tileType));
}
}
} | |
928 | public Page<Trunk> getPage(final String targetUrl, final TwilioRestClient client){
String resourceUrl = "https://" + Joiner.on(".").skipNulls().join(Domains.TRUNKING.toString(), client.getRegion(), "twilio", "com") + "/v1/Trunks";
if (!targetUrl.startsWith(resourceUrl)) {
throw new InvalidRequestExce... | public Page<Trunk> getPage(final String targetUrl, final TwilioRestClient client){
Request request = new Request(HttpMethod.GET, targetUrl);
return pageForRequest(client, request);
} | |
929 | public void testExecute() throws Exception{
ServerIdentificationInputs intputs = getInputsForAmazon();
doNothing().when(toTest).processInputs(intputs);
toTest.region = REGION;
toTest.serverId = SERVER_ID;
PowerMockito.mockStatic(ComputeFactory.class);
PowerMockito.doReturn(computeServiceMo... | public void testExecute() throws Exception{
ServerIdentificationInputs intputs = Inputs.getServerIdentificationInputsForAmazon();
PowerMockito.mockStatic(ComputeFactory.class);
PowerMockito.doReturn(computeServiceMock).when(ComputeFactory.class, "getComputeService", intputs);
Mockito.doReturn("").wh... | |
930 | public void testQueryProcessDefinitionById() throws Exception{
String json = "{\"globalParams\":[],\"tasks\":[{\"type\":\"SHELL\",\"id\":\"tasks-36196\",\"name\":\"ssh_test1" + "\",\"params\":{\"resourceList\":[],\"localParams\":[],\"rawScript\":\"aa=\\\"1234\\\"\\necho ${aa}" + "\"},\"desc\":\"\",\"runFlag\":\"NO... | public void testQueryProcessDefinitionById() throws Exception{
String json = "{\"globalParams\":[],\"tasks\":[{\"type\":\"SHELL\",\"id\":\"tasks-36196\",\"name\":\"ssh_test1" + "\",\"params\":{\"resourceList\":[],\"localParams\":[],\"rawScript\":\"aa=\\\"1234\\\"\\necho ${aa}" + "\"},\"desc\":\"\",\"runFlag\":\"NO... | |
931 | public void writingTrimmedEntries() throws Exception{
ServerContext sc = getContext();
StreamLog log = new StreamLogFiles(sc, false);
final long trimMark = 400;
final long numEntries = trimMark + 200;
log.prefixTrim(trimMark);
List<LogData> entries = new ArrayList<>();
for (int x = 0;... | public void writingTrimmedEntries() throws Exception{
StreamLogFiles log = new StreamLogFiles(sc.getStreamLogParams(), sc.getStreamLogDataStore());
final long trimMark = 400;
final long numEntries = trimMark + 200;
log.prefixTrim(trimMark);
List<LogData> entries = new ArrayList<>();
for (i... | |
932 | public void testRangeWriteAfterPrefixTrim() throws Exception{
ServerContext sc = getContext();
StreamLog log = new StreamLogFiles(sc, false);
final long trimMark = 1000;
final long trimOverlap = 100;
final long numEntries = 200;
log.prefixTrim(trimMark);
List<LogData> entries = new Ar... | public void testRangeWriteAfterPrefixTrim() throws Exception{
StreamLogFiles log = new StreamLogFiles(sc.getStreamLogParams(), sc.getStreamLogDataStore());
final long trimMark = 1000;
final long trimOverlap = 100;
final long numEntries = 200;
log.prefixTrim(trimMark);
List<LogData> entries... | |
933 | private void buildButtonPanel(){
ListFacade<InfoFacade> availableList = chooser.getAvailableList();
int row = 0;
avaRadioButton = new JRadioButton[availableList.getSize()];
avaGroup = new ButtonGroup();
for (InfoFacade infoFacade : availableList) {
avaRadioButton[row] = new JRadioButto... | private void buildButtonPanel(){
ListFacade<InfoFacade> availableList = chooser.getAvailableList();
int row = 0;
avaRadioButton = new JRadioButton[availableList.getSize()];
avaGroup = new ButtonGroup();
for (InfoFacade infoFacade : availableList) {
avaRadioButton[row] = new JRadioButto... | |
934 | private void incrOrFinish(ContextEl _cont, boolean _finished){
AbstractPageEl ip_ = _cont.getLastPage();
LoopBlockStack l_ = (LoopBlockStack) ip_.getLastStack();
if (_finished) {
ip_.clearCurrentEls();
_cont.getCoverage().passLoop(_cont, new Argument(BooleanStruct.of(false)));
... | private void incrOrFinish(ContextEl _cont, boolean _finished, LoopBlockStack _l){
AbstractPageEl ip_ = _cont.getLastPage();
if (_finished) {
ip_.clearCurrentEls();
_cont.getCoverage().passLoop(_cont, new Argument(BooleanStruct.of(false)));
_l.setEvaluatingKeepLoop(false);
_... | |
935 | private void updateSellIn(){
if (name.equals(SULFURAS)) {
return;
}
sellIn = sellIn - 1;
} | protected void updateSellIn(){
sellIn = sellIn - 1;
} | |
936 | public Boolean call(Float64TensorProductMember a){
Float64Member value = G.DBL.construct();
long numElems = a.numElems();
for (long i = 0; i < numElems; i++) {
a.v(i, value);
if (!G.DBL.isZero().call(value))
return false;
}
return true;
} | public Boolean call(Float64TensorProductMember a){
return SequenceIsZero.compute(G.DBL, a.rawData());
} | |
937 | public void onReceive(Context context, Intent intent){
String token = intent.getStringExtra(TOKEN_NAME);
if (token == null || !token.equals(getGeneratedToken(context))) {
Log.w("termux", "Strange token: " + token);
Toast.makeText(context, R.string.bad_token_message, Toast.LENGTH_LONG).show()... | public void onReceive(Context context, Intent intent){
String token = intent.getStringExtra(TOKEN_NAME);
if (token == null || !token.equals(getGeneratedToken(context))) {
Log.w("termux", "Strange token: " + token);
Toast.makeText(context, R.string.bad_token_message, Toast.LENGTH_LONG).show()... | |
938 | public void rollbackTransaction() throws DaoException{
try {
connection.rollback();
System.out.println("this is roolBack");
} catch (SQLException e) {
throw new DaoException("Cannot rollback date transaction", e);
}
} | public void rollbackTransaction() throws DaoException{
try {
connection.rollback();
} catch (SQLException e) {
throw new DaoException("Cannot rollback date transaction", e);
}
} | |
939 | public String[] getPossibleValuesForAttribute(String att, IvyFile ivyfile){
String[] r = super.getPossibleValuesForAttribute(att, ivyfile);
if (r == null) {
List<String> ret = listDependencyTokenValues(att, ivyfile);
return ret.toArray(new String[ret.size()]);
} else {
return r... | public String[] getPossibleValuesForAttribute(String att, IvyFile ivyfile){
String[] r = super.getPossibleValuesForAttribute(att, ivyfile);
if (r == null) {
List<String> ret = listDependencyTokenValues(att, ivyfile);
return ret.toArray(new String[ret.size()]);
}
return r;
} | |
940 | public static void setIDEntered(Integer id){
SingletonFilmID singletonID = SingletonFilmID.INSTANCE;
singletonID.setID(id);
} | public static void setIDEntered(Integer id){
SingletonFilmID.INSTANCE.setID(id);
} | |
941 | public void analyze(AstNode parentNode){
super.analyze(parentNode);
if (params != null) {
params.analyze(this);
}
if (optTypeRelation != null) {
optTypeRelation.analyze(this);
}
if (optTypeRelation != null) {
setType(scope.getExpressionType(AS3Type.FUNCTION, scop... | public void analyze(AstNode parentNode){
super.analyze(parentNode);
if (params != null) {
params.analyze(this);
}
if (optTypeRelation != null) {
optTypeRelation.analyze(this);
setType(scope.getFunctionExpressionType(optTypeRelation));
}
if (optBody != null) {
... | |
942 | boolean mayBeProcessDecryptCallbackAndCompleteOperation(){
if (onDecryptMode() && decryptCallBackResultReady) {
if (blobType == BlobType.MetadataBlob) {
if (decryptCallbackException == null) {
logger.trace("Processing stored decryption callback result for Metadata blob {}", ... | boolean mayBeProcessDecryptCallbackAndCompleteOperation(){
if (onDecryptMode() && decryptCallbackResultAvailable) {
if (blobType == BlobType.MetadataBlob) {
if (decryptCallbackException == null) {
logger.trace("Processing stored decryption callback result for Metadata blob {... | |
943 | protected void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
bootCommonRnBundle();
} | protected void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
} | |
944 | public CodeableConcept getMedicationStatementDosageRoute(){
ParsedCode parsedCode = ParsedCode.fromString(this.getDosierung_art_der_anwendung());
if (parsedCode.hasEmptyCode()) {
return Constants.getEmptyValue();
}
Coding coding = FhirGenerator.coding(parsedCode);
return FhirGenerator.... | public CodeableConcept getMedicationStatementDosageRoute(){
ParsedCode parsedCode = ParsedCode.fromString(this.getDosierung_art_der_anwendung());
return parsedCode.hasEmptyCode() ? Constants.getEmptyValue() : FhirGenerator.codeableConcept(parsedCode);
} | |
945 | public ResponseEntity<?> getAllClientSettings(@RequestParam(defaultValue = "") String name, @RequestParam(defaultValue = "0") Integer page, @RequestParam(defaultValue = "10") Integer size, @RequestParam(defaultValue = "") String sort){
PageRequest pageable = PageRequest.of(page, size, Sort.by(Utils.getOrderFieldsO... | public ResponseEntity<?> getAllClientSettings(@RequestParam(defaultValue = "") String name, @RequestParam(defaultValue = "0") Integer page, @RequestParam(defaultValue = "10") Integer size, @RequestParam(defaultValue = "") String sort){
PageRequest pageable = PageRequest.of(page, size, Sort.by(Utils.getOrderFieldsO... | |
946 | public void selectRelatedErrors(final Collection<OsmPrimitive> primitives){
final List<TreePath> paths = new ArrayList<>();
walkAndSelectRelatedErrors(new TreePath(getRoot()), new HashSet<>(primitives)::contains, paths);
getSelectionModel().clearSelection();
for (TreePath path : paths) {
ex... | public void selectRelatedErrors(final Collection<OsmPrimitive> primitives){
final List<TreePath> paths = new ArrayList<>();
walkAndSelectRelatedErrors(new TreePath(getRoot()), new HashSet<>(primitives)::contains, paths);
getSelectionModel().clearSelection();
getSelectionModel().setSelectionPaths(pat... | |
947 | public void readFromFile() throws IOException{
Scanner in = new Scanner(new BufferedReader(new FileReader(file)));
try {
in.useDelimiter(",");
headerLine = in.nextLine();
while (in.hasNextLine()) {
String srgName = in.next();
String mcpName = in.next();
... | public void readFromFile() throws IOException{
Scanner in = new Scanner(new BufferedReader(new FileReader(file)));
try {
in.useDelimiter(",");
headerLine = in.nextLine();
while (in.hasNextLine()) {
String srgName = in.next();
String mcpName = in.next();
... | |
948 | public void onViewCreated(View view, Bundle savedInstanceState){
super.onViewCreated(view, savedInstanceState);
boolean dozeEnabled = Utils.isDozeEnabled(getActivity());
mTextView = (TextView) view.findViewById(R.id.switch_text);
mTextView.setText(getString(dozeEnabled ? R.string.switch_bar_on : R.s... | public void onViewCreated(View view, Bundle savedInstanceState){
super.onViewCreated(view, savedInstanceState);
boolean dozeEnabled = Utils.isDozeEnabled(getActivity());
mTextView = view.findViewById(R.id.switch_text);
mTextView.setText(getString(dozeEnabled ? R.string.switch_bar_on : R.string.switc... | |
949 | public void onPlayerDropItem(PlayerDropItemEvent event){
final Player player = event.getPlayer();
ItemStack itemStack = event.getItemDrop().getItemStack();
if (ItemUtil.isItem(itemStack, CustomItems.MAGIC_BUCKET)) {
server.getScheduler().runTaskLater(inst, () -> {
if (!ItemUtil.hasI... | public void onPlayerDropItem(PlayerDropItemEvent event){
final Player player = event.getPlayer();
ItemStack itemStack = event.getItemDrop().getItemStack();
if (ItemUtil.isItem(itemStack, CustomItems.MAGIC_BUCKET)) {
server.getScheduler().runTaskLater(inst, () -> {
if (!ItemUtil.hasI... | |
950 | public void testSetOverallPositionAndWaitTimePhysical(){
int position = 2;
physicalQueueStatus.setPosition(position);
int numStudents = 1;
long timeSpent = 5L;
employee.setTotalTimeSpent(timeSpent);
employee.setNumRegisteredStudents(numStudents);
int expectedWaitTime = (int) ((positio... | public void testSetOverallPositionAndWaitTimePhysical(){
int position = 2;
physicalQueueStatus.setPosition(position);
int numStudents = 1;
long timeSpent = 5L;
employee.setTotalTimeSpent(timeSpent);
employee.setNumRegisteredStudents(numStudents);
int expectedWaitTime = (int) ((positio... | |
951 | private NetworkEventResult broadcastToANode(BaseMessage message, Node node, boolean asyn){
if (!isHandShakeMessage(message)) {
NodeGroupConnector nodeGroupConnector = node.getNodeGroupConnector(message.getHeader().getMagicNumber());
if (NodeGroupConnector.HANDSHAKE != nodeGroupConnector.getStatus... | private NetworkEventResult broadcastToANode(BaseMessage message, Node node, boolean asyn){
if (!isHandShakeMessage(message)) {
if (NodeConnectStatusEnum.AVAILABLE != node.getConnectStatus()) {
Log.error("============={} status is not handshake(AVAILABLE)", node.getId());
return n... | |
952 | public static void setBitGridTargeted(EntityPlayer player, ItemStack stack, boolean targetBitGridVertexes){
World world = player.worldObj;
if (Configs.sculptTargetBitGridVertexes.isPerTool()) {
if (!world.isRemote) {
setBoolean(player, stack, targetBitGridVertexes, NBTKeys.TARGET_BIT_GRI... | public static void setBitGridTargeted(EntityPlayer player, ItemStack stack, boolean targetBitGridVertexes){
World world = player.worldObj;
if (Configs.sculptTargetBitGridVertexes.isPerTool()) {
if (!world.isRemote)
setBoolean(player, stack, targetBitGridVertexes, NBTKeys.TARGET_BIT_GRID_... | |
953 | public void fixUpLoadOrderDependencies(TreeLogger logger, JProgram jprogram, Set<JMethod> methodsInJavaScript){
fixUpLoadOrderDependenciesForMethods(logger, jprogram, methodsInJavaScript);
fixUpLoadOrderDependenciesForTypes(logger, jprogram);
fixUpLoadOrderDependenciesForClassLiterals(logger, jprogram);
... | public void fixUpLoadOrderDependencies(TreeLogger logger, JProgram jprogram, Set<JMethod> methodsInJavaScript){
fixUpLoadOrderDependenciesForMethods(logger, jprogram, methodsInJavaScript);
fixUpLoadOrderDependenciesForTypes(logger, jprogram);
fixUpLoadOrderDependenciesForClassLiterals(logger, jprogram);
... | |
954 | private void generateChatBubble(final Message message){
try {
var currentUser = UserService.getUserByToken(LocalDataManager.getToken());
BubbleSpec direction;
Color color;
Pos position;
if (currentUser.getId().equals(message.getAuthor())) {
direction = Bubb... | private void generateChatBubble(final Message message){
var currentUser = UserService.getUserByToken(LocalDataManager.getToken());
BubbleSpec direction;
Color color;
Pos position;
if (currentUser.getId().equals(message.getAuthor())) {
direction = BubbleSpec.FACE_RIGHT_CENTER;
... | |
955 | public void checkoutRevision(AbstractRevision revision) throws CheckoutException{
try {
for (final Path path : listFiles()) {
removeIfExist(path);
}
index.clear();
for (final Path path : revision.listFiles()) {
final Path dir = Utils.getStageFiles(root)... | public void checkoutRevision(AbstractRevision revision) throws CheckoutException{
try {
for (final Path path : listFiles()) {
removeIfExist(path);
}
index.clear();
for (final Path path : revision.listFiles()) {
copyFileFromRevision(revision, path);
... | |
956 | public List<GridFSDBFile> findDigitalBooksByTitleAuthorPublisher(String type, ArrayList<String> param, Integer wordCount){
GridFS gf = new GridFS(gfsDb, "objekti");
String attribute = "";
if (type.equals("title")) {
attribute = "metadata.title";
} else if (type.equals("author")) {
... | public List<GridFSDBFile> findDigitalBooksByTitleAuthorPublisher(String type, ArrayList<String> param, Integer wordCount){
GridFS gf = new GridFS(gfsDb, "objekti");
String attribute = "";
switch(type) {
case "title":
attribute = "metadata.title";
break;
case "a... | |
957 | public void testSomeLibraryMethod(){
final PipelineProcessor.Builder<String, String> builder2 = PipelineProcessor.builder();
final Optional<String> fish = Optional.<String>empty();
System.out.println(TypeToken.of(fish.getClass().getGenericSuperclass()));
final PipelineProcessor<String, String> proce... | public void testSomeLibraryMethod(){
final PipelineProcessor.Builder<String, String> builder2 = PipelineProcessor.builder();
final PipelineProcessor<String, String> processor = builder2.handler(Handler1.class).handler(Handler2.class).handler(Handler3.class).build();
final Optional<String> obj = processor... | |
958 | public void itemStateChanged(ItemEvent _e){
if (_e.getStateChange() != ItemEvent.SELECTED) {
return;
}
listener.valueChanged(new SelectionInfo(combo.getSelectedIndex(), combo.getSelectedIndex(), false));
} | public void itemStateChanged(ItemEvent _e){
ValueChangingSecondUtil.act(new ValueChangingSecondImpl(combo, listener, _e), ItemEvent.SELECTED);
} | |
959 | public String execute(List<String> commands){
if (commands.isEmpty()) {
return "Unsuppport opreation";
}
String serviceName = commands.get(0);
if (serviceName.isEmpty()) {
return "Unsuppport opreation";
}
Operation operation = (Operation) applicationContext.getBean(servic... | public void execute(List<String> commands) throws UnsupportCommandException{
if (commands.isEmpty()) {
throw new UnsupportCommandException("");
}
String serviceName = commands.get(0);
if (serviceName.isEmpty()) {
throw new UnsupportCommandException("");
}
Command cmd = (C... | |
960 | public static void assertNotificationAction(Context context, Notification notification, int index, String title, String actionString, Class expectedIntentClass){
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
Notification.Action actionButton = notification.actions[index];
assertThat("... | public static void assertNotificationAction(Context context, Notification notification, int index, String title, String actionString, Class expectedIntentClass){
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
Notification.Action actionButton = notification.actions[index];
assertThat("... | |
961 | public Result createSchedule(@ApiIgnore @RequestAttribute(value = SESSION_USER) User loginUser, @ApiParam(name = "projectName", value = "PROJECT_NAME", required = true) @PathVariable String projectName, @RequestParam(value = "processDefinitionId") Integer processDefinitionId, @RequestParam(value = "schedule") String sc... | public Result<Schedule> createSchedule(@ApiIgnore @RequestAttribute(value = SESSION_USER) User loginUser, @ApiParam(name = "projectName", value = "PROJECT_NAME", required = true) @PathVariable String projectName, @RequestParam(value = "processDefinitionId") Integer processDefinitionId, @RequestParam(value = "schedule")... | |
962 | protected FinderPatternInfo findPossibleCenters(byte[] data, final Camera.Size size){
myYUV = new PlanarYUVLuminanceSource(data, size.width, size.height, 0, 0, (int) Math.round(size.height * Constant.CROP_FINDER_PATTERN_FACTOR), size.height, false);
binaryBitmap = new BinaryBitmap(new HybridBinarizer(myYUV));... | FinderPatternInfo findPossibleCenters(byte[] data, final Camera.Size size){
PlanarYUVLuminanceSource myYUV = new PlanarYUVLuminanceSource(data, size.width, size.height, 0, 0, (int) Math.round(size.height * Constant.CROP_FINDER_PATTERN_FACTOR), size.height, false);
BinaryBitmap binaryBitmap = new BinaryBitmap... | |
963 | public void loadAndShowData(int id){
Observable<DatumPojo> datumPojoObservable = mDataManager.getRouteFullInfo(id).subscribeOn(Schedulers.newThread()).observeOn(AndroidSchedulers.mainThread());
getRouteFullInfoSubscription = datumPojoObservable.subscribe(datumPojo -> {
mView.setFromCityField(datumPoj... | public void loadAndShowData(int id){
Observable<DatumPojo> datumPojoObservable = mDataManager.getRouteFullInfo(id).subscribeOn(Schedulers.newThread()).observeOn(AndroidSchedulers.mainThread());
getRouteFullInfoSubscription = datumPojoObservable.subscribe(datumPojo -> {
mView.setFromCityField(datumPoj... | |
964 | public Boolean getisRemappedStandardType(){
StructureType type = ((org.verapdf.pd.structure.PDStructElem) simplePDObject).getStructureType();
if (type != null) {
if (TaggedPDFHelper.isStandardType(type)) {
if (type.getType().getValue().equals(getStructureElementStandardType((org.verapdf.... | public Boolean getisRemappedStandardType(){
StructureType type = ((org.verapdf.pd.structure.PDStructElem) simplePDObject).getStructureType();
if (type != null && TaggedPDFHelper.isStandardType(type)) {
String actualType = type.getType().getValue();
return !actualType.equals(getStructureEleme... | |
965 | public Object addEntity(User user){
DatabaseReference userRef = FirebaseUtil.getUserRef();
FirebaseUser mCurrentUser = FirebaseUtil.getCurrentUser();
if (userRef != null) {
userRef.updateChildren(user.toMap(), new DatabaseReference.CompletionListener() {
@Override
pub... | public Object addEntity(User user){
DatabaseReference userRef = FirebaseUtil.getUserRef();
if (userRef != null) {
userRef.updateChildren(user.toMap(), new DatabaseReference.CompletionListener() {
@Override
public void onComplete(DatabaseError databaseError, DatabaseReferen... | |
966 | public void printAllUniqueContacts(){
Collection<AddressBook> values = addressBooks.values();
Set<Contact> allContacts = new HashSet<>();
for (AddressBook addressBook : values) {
allContacts.addAll(addressBook.getContacts());
}
allContacts.forEach(System.out::println);
} | public void printAllUniqueContacts(){
addressBooks.values().stream().map(addressBook -> addressBook.getContacts()).flatMap(contacts -> contacts.stream()).collect(Collectors.toSet()).forEach(System.out::println);
} | |
967 | public GroovyExpression getLoopExpressionParent(GroovyExpression inputQry){
GroovyExpression curTraversal = new IdentifierExpression("__");
return curTraversal;
} | public GroovyExpression getLoopExpressionParent(GroovyExpression inputQry){
return new IdentifierExpression("__");
} | |
968 | protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException{
String username = req.getParameter("username");
String name = req.getParameter("name");
String email = req.getParameter("email");
String qualification = req.getParameter("qualification");
... | protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException{
String username = req.getParameter("username");
String name = req.getParameter("name");
String email = req.getParameter("email");
String qualification = req.getParameter("qualification");
... | |
969 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException{
String maxNumOfCommentStr = getParameter(request, COMMENT_MAXNUMBER, "10");
try {
this.maxNumberOfComments = Integer.parseInt(maxNumOfCommentStr);
} catch (NumberFormatException e) {
Syst... | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException{
String maxNumOfCommentStr = getParameter(request, COMMENT_MAXNUMBER, "10");
try {
this.maxNumberOfComments = Integer.parseInt(maxNumOfCommentStr);
} catch (NumberFormatException e) {
Syst... | |
970 | public Result countDefinitionByUser(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser, @RequestParam(value = "projectId", required = false, defaultValue = "0") int projectId){
logger.info("count process definition , user:{}, project id:{}", loginUser.getUserName(), projectId);
Map<St... | public Result<DefineUserDto> countDefinitionByUser(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser, @RequestParam(value = "projectId", required = false, defaultValue = "0") int projectId){
logger.info("count process definition , user:{}, project id:{}", loginUser.getUserName(), projectI... | |
971 | public String statement(){
double totalAmount = 0;
int frequentRenterPoints = 0;
String result = "Rental Record for " + getName() + "\n";
for (Rental each : rentals) {
double thisAmount = 0;
switch(each.getMovie().getPriceCode()) {
case Movie.REGULAR:
... | public String statement(){
double totalAmount = 0;
int frequentRenterPoints = 0;
String result = "Rental Record for " + getName() + "\n";
for (Rental each : rentals) {
double thisAmount = each.getAmount();
frequentRenterPoints++;
if ((each.getMovie().getPriceCode() == Movi... | |
972 | protected boolean loadProgramInto(ByteProvider provider, LoadSpec loadSpec, List<Option> options, MessageLog messageLog, Program program, TaskMonitor monitor, MemoryConflictHandler memoryConflictHandler) throws IOException{
boolean autoLoadMaps = false;
for (var option : options) {
if (option.getArg(... | protected boolean loadProgramInto(ByteProvider provider, LoadSpec loadSpec, List<Option> options, MessageLog messageLog, Program program, TaskMonitor monitor, MemoryConflictHandler memoryConflictHandler) throws IOException{
boolean autoLoadMaps = OptionUtils.getBooleanOptionValue(AUTOLOAD_MAPS_OPTION_NAME, options... | |
973 | public void testNullBitsForInvalidKey(){
assertNull(instruction.getBits(0));
assertNull(instruction.getBits(0, true));
assertNull(instruction.getBits(0, false));
} | public void testNullBitsForInvalidKey(){
assertNull(instruction.getBits(0));
} | |
974 | public static Provider createDefaultDbBackend(Configuration config){
String name = config.getDbBackendProvider_default();
ArrayList<Provider> mbp = config.getDbBackendProvider();
Provider p = ProviderExtended.findAndCreateProvider(mbp, name);
if (p != null) {
return p;
}
Logger.er... | public static Provider createDefaultDbBackend(Configuration config){
String name = config.getDefaultDbBackendProvider();
List<Provider> mbp = config.getDbBackendProvider();
Provider p = ProviderExtended.findAndCreateProvider(mbp, name);
if (p == null) {
Logger.error("Couldn't find the given... | |
975 | public void removeLayerFromMap(){
if (mIsLayerOnMap) {
mRenderer.removeLayerFromMap();
mIsLayerOnMap = false;
}
} | public void removeLayerFromMap(){
mRenderer.removeLayerFromMap();
} | |
976 | public void onResponse(JSONArray response){
ArrayList<Mapa> sapDataList = (new Gson()).fromJson(response.toString(), new TypeToken<ArrayList<Mapa>>() {
}.getType());
for (int i = 0; i < sapDataList.size(); i++) {
intentConnection.putExtra(sapDataList.get(i).getName(), sapDataList.get(i).getValue... | public void onResponse(JSONArray response){
ArrayList<Mapa> sapDataList = (new Gson()).fromJson(response.toString(), new TypeToken<ArrayList<Mapa>>() {
}.getType());
for (int i = 0; i < sapDataList.size(); i++) {
systemsList.put(sapDataList.get(i).getName(), sapDataList.get(i).getValues());
... | |
977 | public void browseAction(ActionEvent actionEvent){
DirectoryChooser directoryChooser = new DirectoryChooser();
this.projectDirectory = directoryChooser.showDialog(null);
if (this.projectDirectory == null) {
this.selectedFile.setText("[No project selected]");
} else {
if (this.proje... | public void browseAction(){
DirectoryChooser directoryChooser = new DirectoryChooser();
this.projectDirectory = directoryChooser.showDialog(null);
if (this.projectDirectory == null) {
this.selectedFile.setText("[No project selected]");
} else {
if (this.projectDirectory.isDirectory... | |
978 | public void onLoadFinished(Loader<Cursor> loader, Cursor data){
onDraw(graph, series);
Log.d(LOG_TAG, "onLoadFinished Graphics");
} | public void onLoadFinished(Loader<Cursor> loader, Cursor data){
graphs.onDraw(dbLoader.loadInBackground(), appPref.loadPreferences(SPrefManager.MEASUREMENT));
} | |
979 | private void init_(){
jCheckBoxAbo.setSelected(Boolean.parseBoolean(MVConfig.get(MVConfig.Configs.SYSTEM_BLACKLIST_AUCH_ABO)));
jCheckBoxStart.setSelected(Boolean.parseBoolean(MVConfig.get(MVConfig.Configs.SYSTEM_BLACKLIST_START_ON)));
jCheckBoxBlacklistEingeschaltet.setSelected(Boolean.parseBoolean(MVCo... | private void init_(){
jCheckBoxAbo.setSelected(Boolean.parseBoolean(MVConfig.get(MVConfig.Configs.SYSTEM_BLACKLIST_AUCH_ABO)));
jCheckBoxStart.setSelected(Boolean.parseBoolean(MVConfig.get(MVConfig.Configs.SYSTEM_BLACKLIST_START_ON)));
jCheckBoxBlacklistEingeschaltet.setSelected(Boolean.parseBoolean(MVCo... | |
980 | public void addNewUser(@RequestBody UserModel userModel){
userServiceImpl.addNewUserInfo(userModel);
System.out.println(userModel.getSpecialUserId());
} | public void addNewUser(@RequestBody UserModel userModel){
userServiceImpl.addNewUserInfo(userModel);
} | |
981 | public HttpResponse handle(HttpSession session){
String uri = session.getUri();
BufferedReader reader = null;
HttpResponse response = null;
try {
File file = new File(this.rootDir + uri);
reader = new BufferedReader(new FileReader(file));
char[] buf = new char[MAX_BUF_SIZE... | public HttpResponse handle(HttpSession session){
BufferedReader reader = null;
HttpResponse response = null;
try {
String uri = session.getUri();
reader = new BufferedReader(new FileReader(this.rootDir + uri));
char[] buf = new char[MAX_BUF_SIZE];
int offset = 0;
... | |
982 | public void saveDirectionsQuestionnaireDeadlineShouldReturnCaseDetails(){
Response providedResponse = SampleResponse.validDefaults();
Claim providedClaim = SampleClaim.getWithResponse(providedResponse);
when(jsonMapper.fromMap(anyMap(), eq(CCDCase.class))).thenReturn(CCDCase.builder().build());
when... | public void saveDirectionsQuestionnaireDeadlineShouldReturnCaseDetails(){
Response providedResponse = SampleResponse.validDefaults();
Claim providedClaim = SampleClaim.getWithResponse(providedResponse);
when(caseMapper.from(any(CCDCase.class))).thenReturn(SampleClaim.getWithResponse(providedResponse));
... | |
983 | public Result authedDatasource(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser, @RequestParam("userId") Integer userId){
logger.info("authorized data source, login user:{}, authorized useId:{}", loginUser.getUserName(), userId);
Map<String, Object> result = dataSourceService.authed... | public Result<List<DataSource>> authedDatasource(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser, @RequestParam("userId") Integer userId){
logger.info("authorized data source, login user:{}, authorized useId:{}", loginUser.getUserName(), userId);
return dataSourceService.authedData... | |
984 | public boolean prepareVideoRecorder(){
frameCount = 0;
mMediaRecorder = new MediaRecorder();
mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.DEFAULT);
mMediaRecorder.setVideoSource(MediaRecorder.VideoSource.SURFACE);
mMediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
... | public boolean prepareVideoRecorder(){
frameCount = 0;
mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.DEFAULT);
mMediaRecorder.setVideoSource(MediaRecorder.VideoSource.SURFACE);
mMediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
mMediaRecorder.setVideoEncoder(MediaRecor... | |
985 | public List<Product> findAllProductsFromASpecificCategory(InputStream inputStream, String categoryString){
Category category = CategoryUtil.processCategory(categoryString);
return FileReaderUtil.readAllProducts(inputStream).stream().filter(product -> product.getCategory() == category).collect(Collectors.toLis... | public List<Product> findAllProductsFromASpecificCategory(InputStream inputStream, String category){
return FileReaderUtil.readAllProducts(inputStream).stream().filter(product -> product.getCategory() == CategoryUtil.processCategory(category)).collect(Collectors.toList());
} | |
986 | public Map<String, Object> querySchedule(User loginUser, String projectName, Integer processDefineId, String searchVal, Integer pageNo, Integer pageSize){
HashMap<String, Object> result = new HashMap<>();
Project project = projectMapper.queryByName(projectName);
boolean hasProjectAndPerm = projectService... | public Result<PageListVO<Schedule>> querySchedule(User loginUser, String projectName, Integer processDefineId, String searchVal, Integer pageNo, Integer pageSize){
Project project = projectMapper.queryByName(projectName);
CheckParamResult checkResult = projectService.hasProjectAndPerm(loginUser, project);
... | |
987 | public void setUp() throws NoSuchFieldException{
Properties properties = new Properties();
properties.setProperty(BootstrapEnvironment.EnvironmentArgument.HOSTNAME.getKey(), "127.0.0.1");
System.setProperty("LIBPROCESS_IP", "127.0.0.1");
ReflectionUtils.setFieldValue(env, "properties", properties);
... | public void setUp() throws NoSuchFieldException{
Properties properties = new Properties();
properties.setProperty(BootstrapEnvironment.EnvironmentArgument.HOSTNAME.getKey(), "127.0.0.1");
System.setProperty("LIBPROCESS_IP", "127.0.0.1");
ReflectionUtils.setFieldValue(env, "properties", properties);
... | |
988 | private List<Contact> calculateContacts(){
final Context context = getApplication().getApplicationContext();
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
final boolean hideIgnoredContacts = prefs.getBoolean("hide_ignored_contacts", false);
final boolean sho... | private List<Contact> calculateContacts(){
final Context context = getApplication().getApplicationContext();
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
final boolean hideIgnoredContacts = prefs.getBoolean("hide_ignored_contacts", false);
final boolean sho... | |
989 | public SilverpeasKeyData getKeyData(){
SilverpeasKeyData keyData = new SilverpeasKeyData();
keyData.setTitle(nodeDetail.getName());
keyData.setAuthor(nodeDetail.getCreatorId());
try {
keyData.setCreationDate(DateUtil.parse(nodeDetail.getCreationDate()));
} catch (ParseException e) {
... | public SilverpeasKeyData getKeyData(){
SilverpeasKeyData keyData = new SilverpeasKeyData();
keyData.setTitle(nodeDetail.getName());
keyData.setAuthor(nodeDetail.getCreatorId());
keyData.setCreationDate(nodeDetail.getCreationDate());
keyData.setDesc(nodeDetail.getDescription());
return keyD... | |
990 | public void returnOnePositionForOneItemInInvoice(){
bookKeeper = new BookKeeper(new InvoiceFactory());
when(productData.getType()).thenReturn(productType);
InvoiceBuilderImpl invoiceBuilderImpl = new InvoiceBuilderImpl();
invoiceBuilderImpl.setItemsQuantity(1);
invoiceBuilderImpl.setProductData... | public void returnOnePositionForOneItemInInvoice(){
bookKeeper = new BookKeeper(new InvoiceFactory());
when(productData.getType()).thenReturn(productType);
request = buildRequest(1);
when(taxPolicy.calculateTax(productType, money)).thenReturn(tax);
invoice = bookKeeper.issuance(request, taxPoli... | |
991 | public Double removeBetEventOnTicket(@RequestBody String json){
Long id = Long.parseLong(JSON.parseObject(json).get("id").toString());
Character type = JSON.parseObject(json).get("type").toString().charAt(0);
BetEvent betEvent = betEventService.getBetEventById(id);
playedEvents.removeIf((PlayedEvent... | public Double removeBetEventOnTicket(@RequestBody String json){
Long id = Long.parseLong(JSON.parseObject(json).get("id").toString());
Character type = JSON.parseObject(json).get("type").toString().charAt(0);
BetEvent betEvent = betEventService.getBetEventById(id);
return calculateQuotaService.decre... | |
992 | public Response updateMovie(@NotNull Movie movie, @Context Request request){
Date lastModifiedDateDate = new Date();
Optional<Movie> optionalMovie = movies.stream().filter(m -> m.getTitle().equalsIgnoreCase(movie.getTitle())).findFirst();
Movie resultedMovie = null;
if (optionalMovie.isPresent()) {
... | public Response updateMovie(@NotNull Movie movie, @Context Request request){
Date lastModifiedDateDate = null;
Optional<Movie> optionalMovie = movies.stream().filter(m -> m.getTitle().equalsIgnoreCase(movie.getTitle())).findFirst();
Movie resultedMovie = null;
if (optionalMovie.isPresent()) {
... | |
993 | private static Optional<String> get(HttpGet request, RequestConfig.Builder config) throws IOException{
int CONNECTION_TIMEOUT_MS = 5 * 1000;
config.setConnectionRequestTimeout(CONNECTION_TIMEOUT_MS);
config.setConnectTimeout(CONNECTION_TIMEOUT_MS);
config.setSocketTimeout(CONNECTION_TIMEOUT_MS);
... | private static Optional<String> get(HttpGet request, RequestConfig.Builder config) throws IOException{
config.setConnectionRequestTimeout(CONNECTION_TIMEOUT_MS);
config.setConnectTimeout(CONNECTION_TIMEOUT_MS);
config.setSocketTimeout(CONNECTION_TIMEOUT_MS);
request.setConfig(config.build());
t... | |
994 | private static Object[] argsTwoNewsExtractorWithDifferentDelay(){
CollectorCallbackTester collectorCallbackTester = new CollectorCallbackTester(2, 2, 0);
StubNewsExtractor extractor1 = getStubNewsExtractor(10, new DateTime(), 100);
StubNewsExtractor extractor2 = getStubNewsExtractor(10, new DateTime(), 2... | private static Object[] argsTwoNewsExtractorWithDifferentDelay(){
CollectorCallbackTester collectorCallbackTester = new CollectorCallbackTester(2, 2, 0);
StubNewsExtractor extractor1 = getStubNewsExtractor(10, new DateTime(), 100);
StubNewsExtractor extractor2 = getStubNewsExtractor(10, new DateTime(), 2... | |
995 | protected void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_intro);
txtTitle = findViewById(R.id.txt_Tiltintro);
img_intro = findViewById(R.id.img_intro);
animationText = AnimationUtils.loadAnimation(this, R.anim.text_intro_animation)... | protected void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_intro);
txtTitle = findViewById(R.id.txt_Tiltintro);
img_intro = findViewById(R.id.img_intro);
new Handler().postDelayed(new Runnable() {
@Override
public... | |
996 | public ProcResult fetchResult() throws AnalysisException{
BaseProcResult result = new BaseProcResult();
result.setNames(TITLE_NAMES);
statMap = Catalog.getCurrentCatalog().getTabletScheduler().getStatisticMap();
statMap.values().stream().forEach(t -> {
List<List<String>> statistics = t.getC... | public ProcResult fetchResult() throws AnalysisException{
BaseProcResult result = new BaseProcResult();
result.setNames(TITLE_NAMES);
statMap = Catalog.getCurrentCatalog().getTabletScheduler().getStatisticMap();
statMap.values().forEach(t -> {
List<List<String>> statistics = t.getClusterSta... | |
997 | public void testLog(){
KafkaLogPublisher.getInstance().start();
logger.error("hiiiii");
} | public void testLog(){
logger.error("hiiiii");
} | |
998 | public void resolve20Test(){
StringMap<String> files_ = new StringMap<String>();
StringBuilder xml_;
xml_ = new StringBuilder();
xml_.append("$protected $class pkgtwo.Ex<#E> {\n");
xml_.append(" $public $normal $void instancemethod(#E i){\n");
xml_.append(" }\n");
xml_.append("}\n");
... | public void resolve20Test(){
StringMap<String> files_ = new StringMap<String>();
StringBuilder xml_;
xml_ = new StringBuilder();
xml_.append("$protected $class pkgtwo.Ex<#E> {\n");
xml_.append(" $public $normal $void instancemethod(#E i){\n");
xml_.append(" }\n");
xml_.append("}\n");
... | |
999 | public void onResume(){
super.onResume();
if (getActivity() == null) {
return;
}
PathVars pathVars = PathVars.getInstance(getActivity());
appDataDir = pathVars.getAppDataDir();
torTransPort = pathVars.getTorTransPort();
torSocksPort = pathVars.getTorSOCKSPort();
torHTTPT... | public void onResume(){
super.onResume();
if (getActivity() == null) {
return;
}
PathVars pathVars = PathVars.getInstance(getActivity());
appDataDir = pathVars.getAppDataDir();
torTransPort = pathVars.getTorTransPort();
torSocksPort = pathVars.getTorSOCKSPort();
torHTTPT... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.