buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public void onFinish(java.lang.String responseText) { try { org.json.JSONObject response = new org.json.JSONObject(responseText); switch (response.getInt("status")) { case 0 : appointment.setStatus(Appointment.FINISHED); com.droidcare.control.Global.getApp...
public void onFinish(java.lang.String responseText) { try { org.json.JSONObject response = new org.json.JSONObject(responseText); switch (response.getInt("status")) { case 0 : com.droidcare.control.Global.getAppointmentManager().addFinishedAppointment(appointment); ...
public java.lang.String checkYourself(java.lang.String stringGuess) { int guess = java.lang.Integer.parseInt(stringGuess); java.lang.String result = "miss"; for (int cell : locationCells) { if (guess == cell) { result = "hit"; (numOfHits)++; break; } }...
public java.lang.String checkYourself(java.lang.String stringGuess) { int guess = java.lang.Integer.parseInt(stringGuess); java.lang.String result = "miss"; for (int i = 0; i < (locationCells.length); i++) { if (guess == (locationCells[i])) { result = "hit"; (numOfHits)++; ...
public void handleSnesReport(int size, byte[] status) { android.util.Log.i("incomingstate", ((("handleSnesOpenReport " + (status[0])) + " ") + (status[1]))); byte[] status_ = new byte[size]; for (int i = 0; i < size; i++) status_[i] = status[i]; snesState.setStatus(status_); }
public void handleSnesReport(int size, byte[] status) { byte[] status_ = new byte[size]; for (int i = 0; i < size; i++) status_[i] = status[i]; snesState.setStatus(status_); }
public void resolveSpace() throws java.lang.Exception { org.mockito.Mockito.when(this.componentManager.getInstance(EntityReferenceResolver.TYPE_STRING, "current")).thenReturn(this.stringEntityReferenceResolver); org.xwiki.model.reference.SpaceReference reference = new org.xwiki.model.reference.SpaceReference("S...
public void resolveSpace() throws java.lang.Exception { when(this.componentManager.getInstance(EntityReferenceResolver.TYPE_STRING, "current")).thenReturn(this.stringEntityReferenceResolver); org.xwiki.model.reference.SpaceReference reference = new org.xwiki.model.reference.SpaceReference("Space", new org.xwiki...
public com.lhc.highlight.HighLight addHighLight(android.view.View view, int decorLayoutId, com.lhc.highlight.position.IPositionStrategy posStrategy, com.lhc.highlight.shape.IHighLight highLightShape) { checkAnchor(); android.view.View parent = mAnchor; com.lhc.highlight.HighLight.ViewInfo viewInfo = new com...
public com.lhc.highlight.HighLight addHighLight(android.view.View view, int decorLayoutId, com.lhc.highlight.position.IPositionStrategy posStrategy, com.lhc.highlight.shape.IHighLight highLightShape) { checkAnchor(); if (view == null) { return this; } android.view.View parent = mAnchor; com....
public void onReceiveResult(int resultCode, android.os.Bundle resultData) { if (resultData != null) { java.util.ArrayList<xyz.belvi.permissiondialog.Permission.SmoothPermission> smoothPermissions = resultData.getParcelableArrayList(RationaleDialog.SMOOTH_PERMISSIONS); if (resultCode == (RationaleDia...
public void onReceiveResult(int resultCode, android.os.Bundle resultData) { if (resultData != null) { if (resultCode == (RationaleDialog.PERMISSION_RESOLVE)) { setResult(resultCode, new android.content.Intent().putExtra("data", resultData)); finish(); } }else { fi...
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws java.io.IOException, javax.servlet.ServletException { try { authenticate(((javax.servlet.http.HttpServletRequest) (request))); chain.doFilter(request, response);...
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws java.io.IOException, javax.servlet.ServletException { try { authenticate(((javax.servlet.http.HttpServletRequest) (request)), ((javax.servlet.http.HttpServletResponse) (...
protected org.vaadin.tori.category.CategoryPresenter createPresenter() { final org.vaadin.tori.ToriApplication app = org.vaadin.tori.ToriApplication.getCurrent(); final org.vaadin.tori.category.CategoryPresenter categoryPresenter = new org.vaadin.tori.category.CategoryPresenter(app.getDataSource(), app.getAutho...
protected org.vaadin.tori.category.CategoryPresenter createPresenter() { final org.vaadin.tori.ToriApplication app = org.vaadin.tori.ToriApplication.getCurrent(); final org.vaadin.tori.category.CategoryPresenter categoryPresenter = new org.vaadin.tori.category.CategoryPresenter(app.getDataSource(), app.getAutho...
public static <T extends org.roda.core.data.v2.index.IsIndexed> java.util.List<T> retrieve(org.roda.core.data.v2.user.RodaUser user, java.lang.Class<T> classToReturn, org.roda.core.data.v2.index.SelectedItems<T> selectedItems) throws org.roda.core.data.exceptions.AuthorizationDeniedException, org.roda.core.data.excepti...
public static <T extends org.roda.core.data.v2.index.IsIndexed> java.util.List<T> retrieve(final org.roda.core.data.v2.user.RodaUser user, final java.lang.Class<T> classToReturn, final org.roda.core.data.v2.index.SelectedItems<T> selectedItems) throws org.roda.core.data.exceptions.AuthorizationDeniedException, org.roda...
public beans.Question getNextQuestion() { if (((usedQuestion) != null) && ((usedQuestion.size()) >= 0)) { if (currentQuestionAnswered) { currentQuestionAnswered = false; currentQuestion = usedQuestion.getFirst(); usedQuestion.removeFirst(); } return curren...
public beans.Question getNextQuestion() { if (((usedQuestion) != null) && ((usedQuestion.size()) > 0)) { if (currentQuestionAnswered) { currentQuestionAnswered = false; currentQuestion = usedQuestion.getFirst(); usedQuestion.removeFirst(); } return current...
public void from_string_test() { java.lang.String input = "{\"person\":{\"name\":\"Aidan\",\"_id\":3,\"age\":21}}"; com.afollestad.ason.Ason ason = new com.afollestad.ason.Ason(input); org.junit.Assert.assertEquals(ason.size(), 1); org.junit.Assert.assertTrue(ason.equal("person.name", "Aidan")); org...
public void from_string_test() { java.lang.String input = "{\"person\":{\"name\":\"Aidan\",\"_id\":3,\"age\":21}}"; com.afollestad.ason.Ason ason = new com.afollestad.ason.Ason(input); assertEquals(ason.size(), 1); assertTrue(ason.equal("person.name", "Aidan")); assertTrue(ason.equal("person._id", 3...
protected void display_popup(java.lang.String title, java.lang.String message) { java.awt.Font font = new java.awt.Font(java.awt.Font.SANS_SERIF, java.awt.Font.PLAIN, 20); javax.swing.UIManager.put("OptionPane.messageFont", font); javax.swing.JFrame popup_parent = new javax.swing.JFrame(); javax.swing.J...
private void display_popup(java.lang.String title, java.lang.String message) { java.awt.Font font = new java.awt.Font(java.awt.Font.SANS_SERIF, java.awt.Font.PLAIN, 20); javax.swing.UIManager.put("OptionPane.messageFont", font); javax.swing.JFrame popup_parent = new javax.swing.JFrame(); javax.swing.JOp...
private boolean doesParentLoopMatch(org.pb.x12.Cf child, java.lang.String[] tokens, org.pb.x12.Loop loop) { org.pb.x12.Cf parent = child.getParent(); if (parent == null) return false; loopMarker = loop.getParent(); for (org.pb.x12.Cf cf : parent.childList()) { if (doesLoopMatch(cf, ...
private boolean doesParentLoopMatch(org.pb.x12.Cf child, java.lang.String[] tokens, org.pb.x12.Loop loop) { org.pb.x12.Cf parent = child.getParent(); if (parent == null) return false; loopMarker = loop.getParent(); for (org.pb.x12.Cf cf : parent.childList()) { if (doesLoopMatch(cf, ...
public void setClip(java.awt.Shape clip) { checkNoCloneActive(); this.clipShape = (clip == null) ? null : transform.createTransformedShape(clip); try { contentStream.restoreGraphicsState(); contentStream.saveGraphicsState(); if (clip != null) { walkShape(clip); ...
public void setClip(java.awt.Shape clip) { checkNoCloneActive(); this.clipShape = transform.createTransformedShape(clip); try { contentStream.restoreGraphicsState(); contentStream.saveGraphicsState(); if (clip != null) { walkShape(clip); contentStream.clip(); ...
private java.lang.String join(java.lang.Iterable<java.lang.String> items) { java.lang.StringBuilder sb = new java.lang.StringBuilder(); boolean first = true; for (java.lang.String item : items) { if (!first) { sb.append(","); } sb.append(item); } return sb.toStrin...
private java.lang.String join(java.lang.Iterable<java.lang.String> items) { java.lang.StringBuilder sb = new java.lang.StringBuilder(); boolean first = true; for (java.lang.String item : items) { if (!first) { sb.append(","); } sb.append(item); first = false; ...
private boolean doEquals(java.lang.String s1, java.lang.String s2, int length) { if (((s1.length()) < length) || ((s2.length()) < length)) { return false; } for (int i = 0; i < length; ++i) { if ((s1.charAt(i)) != (s2.charAt(i))) { return false; } } return true; }
private boolean doEquals(java.lang.String s1, java.lang.String s2, int length) { if (((s1.length()) != length) || ((s2.length()) < length)) { return false; } for (int i = 0; i < length; ++i) { if ((s1.charAt(i)) != (s2.charAt(i))) { return false; } } return true; ...
public com.schoovello.ai.treesearch.rubiks.RubState.Face rightFace() { switch (this) { case FRONT : return com.schoovello.ai.treesearch.rubiks.RubState.Face.RIGHT; case BACK : return com.schoovello.ai.treesearch.rubiks.RubState.Face.LEFT; case LEFT : retur...
public com.schoovello.ai.treesearch.rubiks.RubState.Face rightFace() { switch (this) { case FRONT : return com.schoovello.ai.treesearch.rubiks.RubState.Face.RIGHT; case BACK : return com.schoovello.ai.treesearch.rubiks.RubState.Face.LEFT; case LEFT : retur...
private void removeSelectedFile() { isImgSelected = false; isDocSelected = false; isPdfSelected = false; mImgpath = ""; mDocpath = ""; mPdfpath = ""; mImgpathExtenstion = ""; mEncodedImage = ""; txt_path.setText(""); txt_path.setVisibility(View.GONE); ll_file_layout.setVisibi...
private void removeSelectedFile() { isImgSelected = false; isDocSelected = false; isPdfSelected = false; mImgpath = ""; mDocpath = ""; mPdfpath = ""; mImgpathExtenstion = ""; mEncodedImage = ""; txt_path.setText(""); txt_path.setVisibility(View.GONE); ll_file_layout.setVisibi...
public static com.google.api.services.gmail.model.Message createMessageWithEmail(javax.mail.internet.MimeMessage email) throws java.io.IOException, javax.mail.MessagingException { final java.io.ByteArrayOutputStream bytes = new java.io.ByteArrayOutputStream(); email.writeTo(bytes); java.lang.String encodedE...
private static com.google.api.services.gmail.model.Message createMessageWithEmail(javax.mail.internet.MimeMessage email) throws java.io.IOException, javax.mail.MessagingException { final java.io.ByteArrayOutputStream bytes = new java.io.ByteArrayOutputStream(); email.writeTo(bytes); java.lang.String encoded...
public double getWave(double hertz, double frame, double bendRate, Waves.WaveType type) { switch (type) { case sin : return sin(hertz, frame, bendRate); case square : return square(hertz, frame); case saw : return saw(hertz, frame); case triangle :...
public double getWave(double hertz, double frame, Waves.WaveType type) { switch (type) { case sin : return sin(hertz, frame); case square : return square(hertz, frame); case saw : return saw(hertz, frame); case triangle : return triangl...
public void add(int position, java.util.List<? extends T> items) { if ((this.items) == null) return ; this.items.addAll(position, items); if (isAutoNotify) com.easy.adapter.EasyAdapter.notifyDataSetChanged(); }
public void add(int position, java.util.List<? extends T> items) { if ((this.items) == null) items = new java.util.ArrayList<>(); this.items.addAll(position, items); if (isAutoNotify) com.easy.adapter.EasyAdapter.notifyDataSetChanged(); }
public void connect(org.glassfish.jersey.media.sse.EventListener listener, java.lang.String... names) { fintSseClient = new no.fint.sse.FintSseClient(listener, names); createEventSource(); if (concurrentConnections) { java.util.concurrent.ExecutorService executorService = java.util.concurrent.Execut...
private void connect() { createEventSource(); if (concurrentConnections) { java.util.concurrent.ExecutorService executorService = java.util.concurrent.Executors.newFixedThreadPool(1); executorService.submit(() -> { try { java.lang.Thread.sleep(sseThreadInterval); ...
public java.lang.String getAllFunctionsByFundIdAndDepartmentId(final org.springframework.ui.Model model, @org.springframework.web.bind.annotation.RequestParam(value = "fundId") final java.lang.Integer fundId, @org.springframework.web.bind.annotation.RequestParam(value = "departmentId") final java.lang.Long departmentId...
public java.util.List<org.egov.commons.CFunction> getAllFunctionsByFundIdAndDepartmentId(final org.springframework.ui.Model model, @org.springframework.web.bind.annotation.RequestParam(value = "fundId") final java.lang.Integer fundId, @org.springframework.web.bind.annotation.RequestParam(value = "departmentId") final j...
public void afterTextChanged(android.text.Editable s) { if (floatingLabelEnabled) { if ((s.length()) == 0) { if (floatingLabelShown) { floatingLabelShown = false; getLabelAnimator().reverse(); } }else if (!(floatingLabelShown)) { ...
public void afterTextChanged(android.text.Editable s) { if (floatingLabelEnabled) { if ((s.length()) == 0) { if (floatingLabelShown) { floatingLabelShown = false; getLabelAnimator().reverse(); } }else if (!(floatingLabelShown)) { ...
public void getPosters(java.lang.String path) { if ((MainMoviePosters) != null) MainMoviePosters.clear(); if ((mRecyclerAdapter) != null) mRecyclerAdapter.notifyDataSetChanged(); mRecyclerAdapter = null; java.net.URL url = com.example.android.popularmoviesapp.Utils.NetworkUtils...
public void getPosters(java.lang.String path) { MainMoviePosters.clear(); if ((mRecyclerAdapter) != null) mRecyclerAdapter.notifyDataSetChanged(); java.net.URL url = com.example.android.popularmoviesapp.Utils.NetworkUtils.buildUrl(this, path); progressBar.setVisibility(View.VISIBLE); ne...
private static int maximumSubarraySum(int[] arr) { int globalMax = arr[0]; int maxCurrent = arr[0]; for (int num : arr) { maxCurrent = java.lang.Math.max((maxCurrent + num), num); globalMax = java.lang.Math.max(globalMax, maxCurrent); } return globalMax; }
private static int maximumSubarraySum(int[] arr) { int globalMax = arr[0]; int maxCurrent = arr[0]; int num; for (int i = 1; i < (arr.length); i++) { num = arr[i]; maxCurrent = java.lang.Math.max((maxCurrent + num), num); globalMax = java.lang.Math.max(globalMax, maxCurrent); ...
public void addAverageResourceInterests(java.lang.String groupId, se.kth.honeytap.scaling.monitoring.RuleSupport.ResourceType resourceType, float lowerPercentile, float upperPercentile, int timeDuration) throws se.kth.honeytap.scaling.exceptions.HoneyTapException { se.kth.honeytap.scaling.monitoring.InterestedEvent...
public void addAverageResourceInterests(java.lang.String groupId, se.kth.honeytap.scaling.monitoring.RuleSupport.ResourceType resourceType, float lowerPercentile, float upperPercentile, int timeDuration) throws se.kth.honeytap.scaling.exceptions.HoneyTapException { se.kth.honeytap.scaling.monitoring.InterestedEvent...
protected void loadDefaultEventType(java.io.File eventTypeFile) { try { java.lang.String fileContent = new java.lang.String(java.nio.file.Files.readAllBytes(java.nio.file.Paths.get(eventTypeFile.toURI())), java.nio.charset.StandardCharsets.UTF_8); com.google.gson.JsonObject jsonEventType = de.hpi.bp...
protected void loadDefaultEventType(java.io.File eventTypeFile) { try { java.lang.String fileContent = new java.lang.String(java.nio.file.Files.readAllBytes(java.nio.file.Paths.get(eventTypeFile.toURI())), java.nio.charset.StandardCharsets.UTF_8); com.google.gson.JsonObject jsonEventType = de.hpi.bp...
public java.lang.Void call() throws java.lang.Exception { com.parse.ParseObject usrObj = obj.getParseObject("user_obj"); usrObj.fetchIfNeeded(); com.parse.ParseFile pf = usrObj.getParseFile("user_photo"); if ((edu.gvsu.cis.dulimarh.checkout.ImageStore.get(pf.getUrl())) == null) { android.graphic...
public java.lang.Void call() throws java.lang.Exception { com.parse.ParseObject usrObj = obj.getParseObject("user_obj"); usrObj.fetchIfNeeded(); com.parse.ParseFile pf = usrObj.getParseFile("user_photo"); if ((pf != null) && ((edu.gvsu.cis.dulimarh.checkout.ImageStore.get(pf.getUrl())) == null)) { ...
public void setProps() { name = ((android.widget.TextView) (activity.findViewById(R.id.name_entry))).getText().toString(); directions = ((android.widget.TextView) (activity.findViewById(R.id.direction_entry))).getText().toString(); notes = ((android.widget.TextView) (activity.findViewById(R.id.notes_entry))...
public void setProps() { name = ((android.widget.TextView) (activity.findViewById(R.id.name_entry))).getText().toString(); directions = ((android.widget.TextView) (activity.findViewById(R.id.direction_entry))).getText().toString(); notes = ((android.widget.TextView) (activity.findViewById(R.id.notes_entry))...
public boolean isWithAllAttributesFilled() { java.util.Set<java.lang.String> keySet = this.responseMap.keySet(); if ((keySet.size()) == (this.replyAttributes.length)) { keySet.removeAll(java.util.Arrays.asList(this.replyAttributes)); return (keySet.size()) == 0; } return false; }
public boolean isWithAllAttributesFilled() { java.util.Set<java.lang.String> keySet = this.responseMap.keySet(); if ((keySet.size()) == (this.replyAttributes.length)) { new java.util.HashSet<java.lang.String>(keySet).removeAll(java.util.Arrays.asList(this.replyAttributes)); return (keySet.size()...
private void build() { android.view.ViewGroup viewGroup = ((android.view.ViewGroup) (((android.view.ViewGroup) (activity.findViewById(android.R.id.content))).getChildAt(0))); sheetLayout = new com.github.fabactivitytransition.SheetLayout(activity, properties); sheetLayout.setFab(fab); sheetLayout.setFab...
private void build() { android.view.ViewGroup viewGroup = ((android.view.ViewGroup) (activity.findViewById(android.R.id.content))); sheetLayout = new com.github.fabactivitytransition.SheetLayout(activity, properties); sheetLayout.setFab(fab); sheetLayout.setFabAnimationEndListener(new com.github.fabacti...
public void updateSrcPort(int srcPort) { this.srcPort = srcPort; data[0] = ((byte) (srcPort & 255)); data[1] = ((byte) ((srcPort & 255) >> 8)); }
public void updateSrcPort(int srcPort) { this.srcPort = srcPort; data[1] = ((byte) (srcPort & 255)); data[0] = ((byte) ((srcPort & 255) >> 8)); }
public java.lang.String getProxyCallbackUrl() { java.lang.String path = (context.getContextPath()) + (proxyCallbackPath); return org.springframework.security.web.util.UrlUtils.buildFullRequestUrl(context.getScheme(), context.getServerName(), context.getServerPort(), path, null); }
public java.lang.String getProxyCallbackUrl() { if ((proxyCallbackPath) == null) { return null; } java.lang.String path = (context.getContextPath()) + (proxyCallbackPath); return org.springframework.security.web.util.UrlUtils.buildFullRequestUrl(context.getScheme(), context.getServerName(), cont...
public static java.lang.String findIndexOfSubBoard(int subBoard) { for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { subBoard--; if (subBoard == 0) { return ("" + i) + j; } } } return null; }
private static java.lang.String findIndexOfSubBoard(int subBoard) { for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { subBoard--; if (subBoard == 0) { return ("" + i) + j; } } } return null; }
public gr8pefish.ironbackpacks.api.backpack.variant.BackpackSize applySizeSpecialtyModifier(@javax.annotation.Nonnull gr8pefish.ironbackpacks.api.backpack.variant.BackpackSpecialty specialty, @javax.annotation.Nonnegative int rowIncreaseAmount, @javax.annotation.Nonnegative int colIncreaseAmount) { if (specialty.eq...
public gr8pefish.ironbackpacks.api.backpack.variant.BackpackSize applySizeSpecialtyModifier(@javax.annotation.Nonnull gr8pefish.ironbackpacks.api.backpack.variant.BackpackSpecialty specialty, @javax.annotation.Nonnegative int rowIncreaseAmount, @javax.annotation.Nonnegative int colIncreaseAmount) { if (specialty.eq...
public static void unregisterShellModule(java.lang.Class shellModule) { final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(net.es.netshell.shell.ShellCommandsFactory.class); java.lang.reflect.Method[] methods = shellModule.getMethods(); for (java.lang.reflect.Method method : methods) { ...
public static void unregisterShellModule(java.lang.Class shellModule) { final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(net.es.netshell.shell.ShellCommandsFactory.class); java.lang.reflect.Method[] methods = shellModule.getMethods(); for (java.lang.reflect.Method method : methods) { ...
public java.lang.String getLineCode(int i) { if (!(this.isStart)) return null; java.lang.String[] srcArray = this.src.split("\n"); if (((srcArray.length) >= i) || (i < 0)) return null; return srcArray[i]; }
public java.lang.String getLineCode(int i) { if (!(this.isStart)) return null; java.lang.String[] srcArray = this.src.split("\n"); if (((srcArray.length) < i) || (i < 0)) return null; return srcArray[i]; }
public void convertShouldSucceed() throws command.ValidateException, java.io.IOException, java.lang.InterruptedException { java.lang.String res = process.Pyicos.runConvert(process.test.PyicosTest.inSamFile.getCanonicalPath(), process.test.PyicosTest.outWigFile.getCanonicalPath()); assertTrue(process.test.Pyicos...
public void convertShouldSucceed() throws command.ValidateException, java.io.IOException, java.lang.InterruptedException { java.lang.String res = process.Pyicos.runConvert(process.test.PyicosTest.inSamFile.getCanonicalPath(), process.test.PyicosTest.outWigFile.getCanonicalPath(), true); assertTrue(process.test....
public int extendedBareiss(final de.feu.algebra.computeralgebra.matrix.Matrix matrix) throws de.feu.algebra.computeralgebra.algorithm.AlgorithmFailedException { final int bound = (java.lang.Math.min(matrix.getColCount(), matrix.getRowCount())) - 1; checkPrincipalMinorsNonZero(matrix, bound); for (int k = 0;...
public int extendedBareiss(final de.feu.algebra.computeralgebra.matrix.Matrix matrix) throws de.feu.algebra.computeralgebra.algorithm.AlgorithmFailedException { final int bound = (java.lang.Math.min(matrix.getColCount(), matrix.getRowCount())) - 1; for (int k = 0; k < bound; k++) { checkForZeroDivisorAn...
private void handleFaint(com.pokegoapi.api.gym.Battle.BattleHandler handler, com.pokegoapi.api.gym.Battle.ServerAction action) { com.pokegoapi.api.gym.Battle.BattlePokemon pokemon = getActivePokemon(action.getAttackerIndex(), true); if ((action.getAttackerIndex()) == 0) { pokemon = activeAttacker; }...
private void handleFaint(com.pokegoapi.api.gym.Battle.BattleHandler handler, com.pokegoapi.api.gym.Battle.ServerAction action) { com.pokegoapi.api.gym.Battle.BattlePokemon pokemon = null; if ((action.getAttackerIndex()) == 0) { pokemon = activeAttacker; }else if ((action.getAttackerIndex()) ...
public void process(org.apache.camel.Exchange exchange) throws java.lang.Exception { java.lang.Integer batchSize = exchange.getProperty(Exchange.AGGREGATED_SIZE, java.lang.Integer.class); if (batchSize > 0) { me.tingenek.camel.component.marklogic.MLProducer.LOG.info(("Sending Batch of " + batchSize)); ...
public void process(org.apache.camel.Exchange exchange) throws java.lang.Exception { java.lang.Integer batchSize = exchange.getProperty(Exchange.AGGREGATED_SIZE, java.lang.Integer.class); if ((batchSize != null) && (batchSize > 0)) { me.tingenek.camel.component.marklogic.MLProducer.LOG.info(("Sending Ba...
public void validate() { com.mka.common.ProfileValidator valid = new com.mka.common.ProfileValidator(profile); final java.util.List<com.mka.common.ErrorType<java.lang.String, java.lang.String>> errors = valid.Validate(); for (com.mka.common.ErrorType<java.lang.String, java.lang.String> error : errors) { ...
public void validate() { com.mka.common.ProfileValidator valid = new com.mka.common.ProfileValidator(profile); final java.util.List<com.mka.common.ErrorType<java.lang.String, java.lang.String>> errors = valid.Validate(); for (com.mka.common.ErrorType<java.lang.String, java.lang.String> error : errors) { ...
private java.lang.String genReport(org.g6.laas.server.controllers.JobController.TaskRunningResult taskRunningResult, org.g6.laas.server.database.entity.task.Task task) { org.g6.laas.core.engine.task.report.ReportModel model = new org.g6.laas.core.engine.task.report.ReportModel(); model.setAttribute("task_runnin...
private java.lang.String genReport(org.g6.laas.server.controllers.JobController.TaskRunningResult taskRunningResult, org.g6.laas.server.database.entity.task.Task task) { org.g6.laas.core.engine.task.report.ReportModel model = new org.g6.laas.core.engine.task.report.ReportModel(); model.setAttribute("task_runnin...
public void visit(double v) { isValid = true; if (v < (lastV)) { (numSortedAsc)++; }else if (v > (lastV)) { (numSortedDesc)++; }else { (numEqual)++; } lastV = v; (n)++; }
public void visit(double v) { isValid = true; if ((lastV) < v) { (numSortedAsc)++; }else if ((lastV) > v) { (numSortedDesc)++; }else { (numEqual)++; } lastV = v; (n)++; }
protected void onCreate(@android.support.annotation.Nullable android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); android.content.SharedPreferences sharedPref = android.preference.PreferenceManager.getDefaultSharedPreferences(this); if (sharedPref.getBoolean(ISettings.FORCE_NEW_REGIST...
protected void onCreate(@android.support.annotation.Nullable android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); android.content.SharedPreferences sharedPref = android.preference.PreferenceManager.getDefaultSharedPreferences(this); if (sharedPref.getBoolean(ISettings.FORCE_NEW_REGIST...
public void onComplete(java.lang.String response) { super.onComplete(response); if (!(android.text.TextUtils.isEmpty(response))) { if (response.startsWith("{\"comments\"")) { mCommentList = mCommentList.parse(response); if (null != (mCommentList)) { mCommentsAdapt...
public void onComplete(java.lang.String response) { super.onComplete(response); if (!(android.text.TextUtils.isEmpty(response))) { if (response.startsWith("{\"comments\"")) { mCommentList = mCommentList.parse(response); if (null != (mCommentList)) { mCommentsAdapt...
private void updateUI() { mSongTitle.setText(mSongs.get(songIndex).getTitle().replace(".ogg", "")); mBackgroundImage.setImageResource(images.get(songIndex)); pl.droidsonroids.gif.GifDrawable gifDrawable = ((pl.droidsonroids.gif.GifDrawable) (mBackgroundImage.getDrawable())); gifDrawable.start(); }
private void updateUI() { mSongTitle.setText(mSongs.get(songIndex).getTitle().substring(1).replace(".ogg", "")); mBackgroundImage.setImageResource(images.get(songIndex)); pl.droidsonroids.gif.GifDrawable gifDrawable = ((pl.droidsonroids.gif.GifDrawable) (mBackgroundImage.getDrawable())); gifDrawable.sta...
public static boolean validateYear(java.lang.String year) { if (Main.isInteger(year)) { if (((java.lang.Integer.parseInt(year)) < 1900) || ((java.lang.Integer.parseInt(year)) > 2000)) { return true; } } return false; }
public static boolean validateYear(java.lang.String year) { if (Main.isInteger(year)) { if (((java.lang.Integer.parseInt(year)) > 1900) && ((java.lang.Integer.parseInt(year)) < 2000)) { return true; } } return false; }
private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) { titleField.setText(tapes.getCurrent().getTitle()); lengthField.setText(java.lang.Integer.toString(tapes.getCurrent().getLength())); isOnLoan.setSelected(tapes.getCurrent().isLent()); videoNumberLabel.setText((((currentNumber) + "...
private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) { titleField.setText(tapes.getCurrent().getTitle()); lengthField.setText(java.lang.Integer.toString(tapes.getCurrent().getLength())); isOnLoan.setSelected(tapes.getCurrent().isLent()); videoNumberLabel.setText(((((currentNumber) + ...
protected void onResume() { super.onResume(); if ((recipes) == null) { android.widget.Toast.makeText(getApplicationContext(), "I've missunderstood :(", Toast.LENGTH_LONG).show(); } if (!(hasPlayedSplash)) { android.content.Intent intent = new android.content.Intent(this, nu.geeks.coffeek...
protected void onResume() { super.onResume(); if (!(hasPlayedSplash)) { android.content.Intent intent = new android.content.Intent(this, nu.geeks.coffeekeeper.SplashScreen.class); startActivityForResult(intent, splashRequestCode); overridePendingTransition(android.R.anim.slide_in_left, a...
public java.util.Vector readAllTestModelSummaries(org.eclipse.persistence.testing.framework.Expression expression) { org.eclipse.persistence.testing.framework.ReadAllQuery query = new org.eclipse.persistence.testing.framework.ReadAllQuery(org.eclipse.persistence.testing.framework.TestResultsSummary.class, expressio...
public java.util.Vector readAllTestModelSummaries(org.eclipse.persistence.testing.framework.Expression expression) { org.eclipse.persistence.testing.framework.ReadAllQuery query = new org.eclipse.persistence.testing.framework.ReadAllQuery(org.eclipse.persistence.testing.framework.TestResultsSummary.class, expressio...
public void theUserReceiveABadQualificationTwoTimesThenYourPointsDecreaseAt1000() { unq.tpi.desapp.grupof.model.BadQualification badQualification = org.mockito.Mockito.mock(unq.tpi.desapp.grupof.model.BadQualification.class); org.mockito.Mockito.when(badQualification.getPoints()).thenReturn((-1000)); unq.tp...
public void theUserReceiveABadQualificationTwoTimesThenYourPointsDecreaseAt1000() { unq.tpi.desapp.grupof.model.BadQualification badQualification = mock(unq.tpi.desapp.grupof.model.BadQualification.class); when(badQualification.getPoints()).thenReturn((-1000)); unq.tpi.desapp.grupof.model.User anUser = new ...
protected boolean validate() { return (((((bg.tusofia.models.Cluster) (getData())).getStructure()) != null) && (!(url.getText().isEmpty()))) && (!(name.getText().isEmpty())); }
protected boolean validate() { return (((((((bg.tusofia.models.Cluster) (getData())).getStructure()) != null) && ((url.getText()) != null)) && (!(url.getText().isEmpty()))) && ((name.getText()) != null)) && (!(name.getText().isEmpty())); }
public void valueChanged(javax.swing.event.ListSelectionEvent e) { java.lang.String selectedWord = wordList.getSelectedValue(); java.lang.String result = dict.search(selectedWord); if (result != null) { meaningEditorPane.setText(((("<b>" + selectedWord) + "</b><br/>") + (dict.search(selectedWord))))...
public void valueChanged(javax.swing.event.ListSelectionEvent e) { java.lang.String selectedWord = list.getSelectedValue(); java.lang.String result = dict.search(selectedWord); if (result != null) { meaningEditorPane.setText(((("<b>" + selectedWord) + "</b><br/>") + (dict.search(selectedWord)))); ...
public void setup() { g = new xbhs.battleship.game.Game(10, 10, this); list = new java.util.ArrayList<xbhs.battleship.gui.GUIElement>(); size(initWidth, initHeight); background(0); for (int i = 0; i < (list.size()); i++) list.get(i).init(); }
public void setup() { list = new java.util.ArrayList<xbhs.battleship.gui.GUIElement>(); size(initWidth, initHeight); background(0); g = new xbhs.battleship.game.Game(10, 10, this); for (int i = 0; i < (list.size()); i++) list.get(i).init(); }
public org.metaborg.sdf2table.symbol.Symbol get(org.metaborg.sdf2table.symbol.Symbol symbol, boolean create) { if (symbol == null) return null; org.metaborg.sdf2table.symbol.Symbol s = get(symbol); if ((s == null) && create) _symbols.add((s = symbol)); return s; }
public org.metaborg.sdf2table.symbol.Symbol get(org.metaborg.sdf2table.symbol.Symbol symbol, boolean create) { org.metaborg.sdf2table.symbol.Symbol s = get(symbol); if (((s == null) && (symbol != null)) && create) _symbols.add((s = symbol)); return s; }
void remove(java.net.Socket skt) { if (server.NetworkState.sConnectionMap.containsKey(skt)) server.NetworkState.sConnectionMap.remove(skt); if (server.NetworkState.sAddressMap.containsKey(skt.getInetAddress())) server.NetworkState.sConnectionMap.remove(skt.getInetAddress()); if (mL...
void remove(java.net.Socket skt) { if (server.NetworkState.sConnectionMap.containsKey(skt)) server.NetworkState.sConnectionMap.remove(skt); if (server.NetworkState.sAddressMap.containsKey(skt.getInetAddress())) server.NetworkState.sAddressMap.remove(skt.getInetAddress()); if (mList...
public void onDestroy() { for (fr.pchab.webrtcclient.WebRtcClient.Peer peer : peers.values()) { peer.pc.dispose(); } videoSource.stop(); factory.dispose(); client.disconnect(); client.close(); }
public void onDestroy() { for (fr.pchab.webrtcclient.WebRtcClient.Peer peer : peers.values()) { peer.pc.dispose(); } if ((videoSource) != null) { videoSource.stop(); } factory.dispose(); client.disconnect(); client.close(); }
public void onDrawFrame(javax.microedition.khronos.opengles.GL10 glUnused) { glClear(com.example.travis.a3dmodeller.GL_COLOR_BUFFER_BIT); multiplyMM(viewProjectionMatrix, 0, projectionMatrix, 0, viewMatrix, 0); positionPlaneInScene(); colorProgram.useProgram(); colorProgram.setUniforms(modelViewProj...
public void onDrawFrame(javax.microedition.khronos.opengles.GL10 glUnused) { glClear(com.example.travis.a3dmodeller.GL_COLOR_BUFFER_BIT); multiplyMM(viewProjectionMatrix, 0, projectionMatrix, 0, viewMatrix, 0); positionPlaneInScene(); colorProgram.useProgram(); colorProgram.setUniforms(modelViewProj...
public java.util.List<java.awt.Rectangle> generateGrid() { java.util.List<java.awt.Rectangle> list = new java.util.ArrayList<>(); for (int x = 0; x < (width); x += tileWidth) { for (int y = 0; y < (height); y += tileHeight) { list.add(new java.awt.Rectangle(x, y, tileWidth, tileHeight)); ...
public java.util.List<java.awt.Rectangle> generateGrid() { java.util.List<java.awt.Rectangle> list = new java.util.ArrayList<>(); for (int x = 0; x <= (width); x += tileWidth) { for (int y = 0; y <= (height); y += tileHeight) { list.add(new java.awt.Rectangle(x, y, tileWidth, tileHeight)); ...
private void uploadClients(com.google.gson.JsonArray jsonArray) { for (com.google.gson.JsonElement jsonElement : jsonArray) { long harvestClientId = java.lang.Long.parseLong(jsonElement.getAsJsonObject().get("client").getAsJsonObject().get("id").toString()); java.lang.String clientName = jsonElement...
private void uploadClients(com.google.gson.JsonArray jsonArray) { for (com.google.gson.JsonElement jsonElement : jsonArray) { long harvestClientId = java.lang.Long.parseLong(jsonElement.getAsJsonObject().get("client").getAsJsonObject().get("id").toString()); java.lang.String clientName = jsonElement...
private void outputAndUpdateMess(java.io.DataOutputStream out, java.lang.String whoClientOrServer) { try { java.lang.System.out.println(("outputAndUpdateMess " + (sendingMessage))); out.writeUTF(sendingMessage); java.lang.System.out.println(("After outputAndUpdateMess " + (sendingMessage)));...
private void outputAndUpdateMess(java.io.DataOutputStream out, java.lang.String whoClientOrServer) { try { java.lang.System.out.println(("outputAndUpdateMess " + (sendingMessage))); java.lang.String message = java.lang.String.format(sendingMessage); out.writeUTF(message); java.lang.S...
public cx.hell.android.pdfviewpro.BookmarkEntry toBookmarkEntry() { return new cx.hell.android.pdfviewpro.BookmarkEntry(decodeService.getPageCount(), documentView.getCurrentPage(), ((documentView.getZoomModel().getZoom()) * 1000), 0, documentView.getScrollX(), ((documentView.getScrollY()) - ((documentView.getHeight...
public cx.hell.android.pdfviewpro.BookmarkEntry toBookmarkEntry() { return new cx.hell.android.pdfviewpro.BookmarkEntry(decodeService.getPageCount(), documentView.getCurrentPage(), ((documentView.getZoomModel().getZoom()) * 1000), 0, documentView.getScrollX(), documentView.getScrollY()); }
public void map(org.apache.hadoop.io.IntWritable docId, org.apache.mahout.math.VectorWritable document, org.apache.mahout.clustering.lda.cvb.Context context) throws java.io.IOException, java.lang.InterruptedException { org.apache.mahout.math.Vector topicVector = new org.apache.mahout.math.DenseVector(new double[num...
public void map(org.apache.hadoop.io.IntWritable docId, org.apache.mahout.math.VectorWritable document, org.apache.mahout.clustering.lda.cvb.Context context) throws java.io.IOException, java.lang.InterruptedException { org.apache.mahout.math.Vector topicVector = new org.apache.mahout.math.DenseVector(new double[num...
private void printArguments(java.util.List<pj.parser.ast.expr.Expression> args, java.lang.Object arg) { printer.print("("); if (args != null) { for (java.util.Iterator<pj.parser.ast.expr.Expression> i = args.iterator(); i.hasNext();) { pj.parser.ast.expr.Expression e = i.next(); ...
public void printArguments(java.util.List<pj.parser.ast.expr.Expression> args, java.lang.Object arg) { printer.print("("); if (args != null) { for (java.util.Iterator<pj.parser.ast.expr.Expression> i = args.iterator(); i.hasNext();) { pj.parser.ast.expr.Expression e = i.next(); e...
public static void main(java.lang.String[] args) throws java.io.IOException { java.lang.String name = args[1]; java.lang.String file = args[0]; MessagePasser mp = new MessagePasser(file, name); while (true) { java.lang.System.out.println(">>"); java.util.Scanner sc = new java.util.Scanne...
public static void main(java.lang.String[] args) throws java.io.IOException { java.lang.String name = args[1]; java.lang.String file = args[0]; MessagePasser mp = new MessagePasser(file, name); while (true) { java.lang.System.out.print(">>"); java.util.Scanner sc = new java.util.Scanner(...
public static int getDialogColor(android.content.Context context) { switch (cw.kop.autobackground.settings.AppSettings.getTheme()) { default : case cw.kop.autobackground.settings.AppSettings.APP_LIGHT_THEME : return context.getResources().getColor(R.color.LIGHT_THEME_DIALOG); cas...
public static int getDialogColor(android.content.Context context) { switch (cw.kop.autobackground.settings.AppSettings.getTheme()) { default : case cw.kop.autobackground.settings.AppSettings.APP_LIGHT_THEME : return context.getResources().getColor(R.color.LIGHT_THEME_DIALOG); cas...
public int nextStep(int current) { if (!(this.stepCorrect(current))) { return -69; } this.needsRefresh = true; int move = this.getComputerMove(current); com.puzzlegalaxy.slider.Main.debug(("MOVE: " + (this.stepsTaken))); (this.stepsTaken)++; this.solved = move == 9; return move; ...
public int nextStep(int current) { if (!(this.stepCorrect(current))) { return -69; } this.needsRefresh = true; (this.stepsTaken)++; int move = this.getComputerMove(current); com.puzzlegalaxy.slider.Main.debug(("MOVE: " + (this.stepsTaken))); this.solved = move == 9; return move; ...
public static models.User authenticate(java.lang.String username, java.lang.String password) { models.User user = models.User.find.where().eq("username", username).findUnique(); final boolean matched = org.mindrot.jbcrypt.BCrypt.checkpw(password, user.password); if (matched) { return user; } ...
public static models.User authenticate(java.lang.String username, java.lang.String password) { models.User user = models.User.find.where().eq("username", username).findUnique(); if (user == null) { return null; } final boolean matched = org.mindrot.jbcrypt.BCrypt.checkpw(password, user.password)...
private static java.util.List<java.lang.Long> get_comments_down(long child_AID) { java.util.List<java.lang.Long> list = new java.util.LinkedList<java.lang.Long>(); while (zxl.redis.Cluster.jc.exists(("get_commented:" + child_AID))) { list.add(java.lang.Long.parseLong(zxl.redis.Cluster.jc.zrange(("get_co...
private static java.util.List<java.lang.Long> get_comments_down(java.lang.Long child_AID) { java.util.List<java.lang.Long> list = new java.util.LinkedList<java.lang.Long>(); while (zxl.redis.Cluster.jc.exists(("get_commented:" + child_AID))) { child_AID = java.lang.Long.parseLong(zxl.redis.Cluster.jc.zr...
public java.lang.String getCache(org.springframework.ui.Model m) { java.lang.String cache = this.cache.toString(); java.lang.System.out.println(("Cache is: " + cache)); if ((cache.length()) < 2) m.addAttribute("cache", "No cache available"); else m.addAttribute("cache", (("<span>" + cach...
public java.lang.String getCache(org.springframework.ui.Model m) { java.lang.String cache = this.cache.toString(); if ((cache.length()) < 2) m.addAttribute("cache", "No cache available"); else m.addAttribute("cache", (("<span>" + cache) + "</span>")); return "getCache"; }
private void loadOnDemand(final android.app.Activity _activity) { loadOndemand.removeCallbacksAndMessages(null); java.lang.Runnable loadOnDemandRunnable = new java.lang.Runnable() { @java.lang.Override public void run() { _activity.runOnUiThread(new java.lang.Runnable() { ...
private void loadOnDemand(final android.app.Activity _activity) { loadOndemand.removeCallbacksAndMessages(null); java.lang.Runnable loadOnDemandRunnable = new java.lang.Runnable() { @java.lang.Override public void run() { _activity.runOnUiThread(new java.lang.Runnable() { ...
protected edu.clemson.rsrg.relemu.model.OMObject withSubOMObjectReplaced(int index, edu.clemson.rsrg.relemu.model.OMObject o) { java.util.List<edu.clemson.rsrg.relemu.model.OMExpression> newExpressions = new java.util.LinkedList(expressions); if ((index >= 0) && (index < ((expressions.size()) - 1))) { n...
protected edu.clemson.rsrg.relemu.model.OMObject withSubOMObjectReplaced(int index, edu.clemson.rsrg.relemu.model.OMObject o) { java.util.List<edu.clemson.rsrg.relemu.model.OMExpression> newExpressions = new java.util.LinkedList(expressions); if ((index >= 0) && (index < (expressions.size()))) { newExpr...
public battleship.interfaces.Position getPosFromShotArrList(java.util.ArrayList<battleship.interfaces.Position> previousShots, java.util.ArrayList<java.lang.Integer> fleet) { int[] sea = this.generateSeaFromPositions(previousShots); int[] heatmap = this.simpleHeatMap(sea, fleet); battleship.interfaces.Posit...
public battleship.interfaces.Position getPosFromShotArrList(java.util.ArrayList<battleship.interfaces.Position> previousShots, java.util.ArrayList<java.lang.Integer> fleet) { int[] sea = this.generateSeaFromPositions(previousShots); int[] heatmap = this.simpleHeatMap(sea, fleet); battleship.interfaces.Posit...
public void valueChanged(edu.wpi.first.wpilibj.tables.ITable source, java.lang.String key, java.lang.Object pvalue, boolean isNew) { if ((oldTestEnable) == ((boolean) (pvalue))) return ; if (((boolean) (pvalue))) { if (cpi.CANTalon.testList.contains(thisInstance)) return ; ...
public void valueChanged(edu.wpi.first.wpilibj.tables.ITable source, java.lang.String key, java.lang.Object pvalue, boolean isNew) { if ((oldTestEnable) == ((boolean) (pvalue))) return ; oldTestEnable = ((boolean) (pvalue)); if (((boolean) (pvalue))) { if (cpi.CANTalon.testList.contains...
public void run() { init(); long startTime = java.lang.System.currentTimeMillis(); boolean succ = calc(0, 0); long endTime = java.lang.System.currentTimeMillis(); java.lang.System.out.println((("Total time: " + (((float) (startTime - endTime)) / 1000)) + "s")); java.lang.System.out.println(succ)...
public void run() { init(); long startTime = java.lang.System.currentTimeMillis(); boolean succ = calc(0, (-1)); long endTime = java.lang.System.currentTimeMillis(); java.lang.System.out.println((("Total time: " + (((float) (startTime - endTime)) / 1000)) + "s")); java.lang.System.out.println(su...
private java.lang.Object[] convertToCorrectType(java.util.List<java.lang.String> instr) { java.util.List<java.lang.Integer> intParameters = new java.util.LinkedList<java.lang.Integer>(); instr.remove(0); if (arguments.contains("-s")); instr.forEach(( instrString) -> intParameters.add(java.lang.Integer.p...
private java.lang.Object[] convertToCorrectType(java.util.List<java.lang.String> instr) { java.util.List<java.lang.Integer> intParameters = new java.util.LinkedList<java.lang.Integer>(); instr.remove(0); instr.forEach(( instrString) -> intParameters.add(java.lang.Integer.parseInt(instrString))); return ...
protected boolean isSysfsGpioExported(int gpioNum) { boolean exported = false; final java.lang.String gpioPath = ((org.eclipse.kura.linux.net.modem.ModemDriver.GPIO_PATH) + "/gpio") + (java.lang.String.valueOf(org.eclipse.kura.linux.net.modem.ModemDriver.RELIAGATE_10_05_GSM_RESET_GPIO_NUM)); java.io.File fg...
protected boolean isSysfsGpioExported(java.lang.String gpioNum) { boolean exported = false; final java.lang.String gpioPath = ((org.eclipse.kura.linux.net.modem.ModemDriver.GPIO_PATH) + "/gpio") + (org.eclipse.kura.linux.net.modem.ModemDriver.RELIAGATE_10_05_GSM_RESET_GPIO_NUM); java.io.File fgpioFolder = n...
public org.springframework.web.servlet.ModelAndView saveRecette(@javax.validation.Valid @com.github.rmnasri.controller.ModelAttribute(value = "recetteForm") com.github.rmnasri.controller.RecetteForm recetteForm, org.springframework.validation.BindingResult result) { org.springframework.web.servlet.ModelAndView mav ...
public org.springframework.web.servlet.ModelAndView saveRecette(@javax.validation.Valid @com.github.rmnasri.controller.ModelAttribute(value = "recetteForm") com.github.rmnasri.controller.RecetteForm recetteForm, org.springframework.validation.BindingResult result) { org.springframework.web.servlet.ModelAndView mav ...
public java.lang.String runID(@org.springframework.web.bind.annotation.PathVariable(value = "id") java.lang.Integer id) throws java.lang.Exception { insynctive.model.Account nightlyAcc = accDao.getAccountByID(NIGHTLY_ACCOUNT_ID); insynctive.model.test.TestSuite ts = testSuiteDao.getTestByID(id); insynctive....
public java.lang.String runID(@org.springframework.web.bind.annotation.PathVariable(value = "id") java.lang.Integer id) throws java.lang.Exception { insynctive.model.Account nightlyAcc = accDao.getAccountByID(NIGHTLY_ACCOUNT_ID); insynctive.model.test.TestSuite ts = testSuiteDao.getTestByID(id); insynctive....
public int[] mainCharacterInfo() { int[] character = new int[3]; int self_no = client.character(); int index = info.clientNumberList.indexOf(self_no); if (info.CD) { character[0] = 0; }else { character[0] = 1; } character[1] = info.dirList.get(index); character[2] = self_...
public int[] mainCharacterInfo() { int[] character = new int[3]; int self_no = client.character(); int index = info.clientNumberList.indexOf(self_no); if (info.CD) { character[0] = 1; }else { character[0] = 0; } character[1] = info.dirList.get(index); character[2] = self_...
public <T> T getCapability(net.minecraftforge.common.capabilities.Capability<T> capability, net.minecraft.util.EnumFacing facing) { if (capability == (net.minecraftforge.items.CapabilityItemHandler.ITEM_HANDLER_CAPABILITY)) { if ((this) instanceof net.minecraft.inventory.ISidedInventory) { retur...
public <T> T getCapability(net.minecraftforge.common.capabilities.Capability<T> capability, net.minecraft.util.EnumFacing facing) { if (capability == (net.minecraftforge.items.CapabilityItemHandler.ITEM_HANDLER_CAPABILITY)) { if (((this) instanceof net.minecraft.inventory.ISidedInventory) && (facing != null...
public void elseIf() { int id = ((int) (labelNameStack.pop())); java.lang.String etiquette = ("FSI" + id) + ":"; jump(etiquette); compiler.Ecriture.ecrireStringln(flux, (("SINON" + id) + ":"), indent); labelNameStack.push(new java.lang.Integer(id)); }
public void elseIf() { int id = ((int) (labelNameStack.pop())); java.lang.String etiquette = ("FSI" + id) + ":"; jump(etiquette); compiler.Ecriture.ecrireStringln(flux, (("SINON" + id) + ":")); labelNameStack.push(new java.lang.Integer(id)); }
private void addDevice(android.bluetooth.BluetoothDevice device, int rssi) { if (!(mLeDevices.contains(device))) { mLeDevices.add(device); mLeDevices_rssi.put(device, rssi); DeviceFound(); }else { mLeDevices_rssi.put(device, rssi); } RssiChanged(); }
private void addDevice(android.bluetooth.BluetoothDevice device, int rssi) { if (!(mLeDevices.contains(device))) { mLeDevices.add(device); mLeDevices_rssi.put(device, rssi); DeviceFound(); }else { mLeDevices_rssi.put(device, rssi); } }
public void startTurn() { if ((roundNumber) > 0) { timeLeft = getTimeAfterFoodCheck(); } if (((roundNumber) == 1) && ((currentPlayer) == (players.get(0)))) { Controller.MasterController.getInstance().getMapController().startTimer(); } checkProduction(); refreshLabels(); }
public void startTurn() { checkProduction(); if ((roundNumber) > 0) { timeLeft = getTimeAfterFoodCheck(); } if (((roundNumber) == 1) && ((currentPlayer) == (players.get(0)))) { Controller.MasterController.getInstance().getMapController().startTimer(); } refreshLabels(); }
private static void processSignature(org.json.JSONObject jsonCommand) throws org.json.JSONException { if (jsonCommand.has(GNSProtocol.SIGNATURE.toString())) { java.lang.String signature = jsonCommand.getString(GNSProtocol.SIGNATURE.toString()); jsonCommand.remove(GNSProtocol.SIGNATURE.toString()); ...
protected static void processSignature(org.json.JSONObject jsonCommand) throws org.json.JSONException { if (jsonCommand.has(GNSProtocol.SIGNATURE.toString())) { java.lang.String signature = jsonCommand.getString(GNSProtocol.SIGNATURE.toString()); jsonCommand.remove(GNSProtocol.SIGNATURE.toString());...
public void run() { android.graphics.Canvas canvas; android.util.Log.d(ac.robinson.bettertogether.plugin.base.cardgame.dealer.DealerThread.TAG, "Starting game loop for dealer"); while (running) { canvas = null; try { canvas = this.surfaceHolder.lockCanvas(); synchroni...
public void run() { android.graphics.Canvas canvas; android.util.Log.d(ac.robinson.bettertogether.plugin.base.cardgame.dealer.DealerThread.TAG, "Starting game loop for dealer"); while (running) { canvas = null; try { canvas = this.surfaceHolder.lockCanvas(); synchroni...
void testMultipleMarginalized() { double[] gd_marginalized = new double[]{ 0.6 , 0.4 }; discreteFactor.marginalize(new java.lang.String[]{ "D" , "G" }, true); org.junit.jupiter.api.Assertions.assertArrayEquals(new java.lang.String[]{ "I" }, discreteFactor.getScope()); org.junit.jupiter.api.Assertions.as...
void testMultipleMarginalized() { double[] gd_marginalized = new double[]{ 0.6 , 0.4 }; discreteFactor.marginalize(new java.lang.String[]{ "D" , "G" }, true); org.junit.jupiter.api.Assertions.assertArrayEquals(new java.lang.String[]{ "I" }, discreteFactor.getScope()); org.junit.jupiter.api.Assertions.as...
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws java.io.IOException, javax.servlet.ServletException { if ((request.getServerPort()) == 443) { java.util.regex.Matcher m = domainPattern.matcher(request.getServerName());...
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws java.io.IOException, javax.servlet.ServletException { if ((request.getServerPort()) == 443) { java.util.regex.Matcher m = domainPattern.matcher(request.getServerName());...
public void setup() { observer = new tests.TestBoardObserver.MockBoardObserver(); testBoard = new game.PlayerBoard(game.GameBoard.User.PLAYER1, new game.TurnObserver()); pieces = new game.AbstractPiece[10][4]; for (int i = 0; i < 4; i++) { for (int j = 0; j < 10; j++) { pieces[j][i] ...
public void setup() { observer = new tests.TestBoardObserver.MockBoardObserver(); testBoard = new game.PlayerBoard(game.GameBoard.User.PLAYER1, new game.TurnObserver(), observer); pieces = new game.AbstractPiece[10][4]; for (int i = 0; i < 4; i++) { for (int j = 0; j < 10; j++) { pie...
public org.hibernate.boot.internal.MetadataImpl buildMetadataInstance(org.hibernate.boot.spi.MetadataBuildingContext buildingContext) { processSecondPasses(buildingContext); processExportableProducers(buildingContext); try { return new org.hibernate.boot.internal.MetadataImpl(uuid, options, getBoots...
public org.hibernate.boot.internal.MetadataImpl buildMetadataInstance(org.hibernate.boot.spi.MetadataBuildingContext buildingContext) { processSecondPasses(buildingContext); processExportableProducers(buildingContext); try { return new org.hibernate.boot.internal.MetadataImpl(uuid, options, getBoots...
public boolean onOptionsItemSelected(android.view.MenuItem item) { if ((item.getItemId()) == (R.id.send_data)) { startSet(); }else if ((item.getItemId()) == (R.id.delete)) { deleteSet(); } return super.onOptionsItemSelected(item); }
public boolean onOptionsItemSelected(android.view.MenuItem item) { if ((item.getItemId()) == (R.id.send_data)) { }else if ((item.getItemId()) == (R.id.delete)) { deleteSet(); } return super.onOptionsItemSelected(item); }
public void close() { try { super.close(); if ((connection) != null) connection.close(); connection = null; if ((xa_connection) != null) xa_connection.close(); xa_connection = null; } catch (java.lang.Exception e) { throw ...
public void close() { try { super.close(); if ((connection) != null) connection.close(); connection = null; xa_connection = null; } catch (java.lang.Exception e) { throw new virtuoso.jena.driver.JenaException(e); } }
public void lost() { stopGame(); new javafx.scene.media.MediaPlayer(new javafx.scene.media.Media(new java.io.File("sound/explosion.mp3").toURI().toString())).play(); javafx.scene.control.Alert alert = new javafx.scene.control.Alert(javafx.scene.control.Alert.AlertType.INFORMATION); alert.setTitle("Train...
public void lost() { new javafx.scene.media.MediaPlayer(new javafx.scene.media.Media(new java.io.File("sound/explosion.mp3").toURI().toString())).play(); javafx.scene.control.Alert alert = new javafx.scene.control.Alert(javafx.scene.control.Alert.AlertType.INFORMATION); alert.setTitle("Train Simulator 2017"...
public void drawLogic() { for (int i = 0; i <= ((gg_grid.getMaxCellsWidth()) - 1); i++) { for (int j = 0; j <= ((gg_grid.getMaxCellsHeight()) - 1); j++) { isAlive[i][j] = false; java.lang.System.out.println(isAlive[i][j]); } } }
public void drawLogic() { isAlive = new boolean[(gg_grid.getMaxCellsWidth()) + 1][(gg_grid.getMaxCellsHeight()) + 1]; for (int i = 0; i <= (gg_grid.getMaxCellsWidth()); i++) { for (int j = 0; j <= (gg_grid.getMaxCellsHeight()); j++) { isAlive[i][j] = false; java.lang.System.out.p...
public void onLocationChanged(android.location.Location location) { if (location != null) { locationChanged(location.getLatitude(), location.getLongitude()); if ((location.hasAccuracy()) && ((location.getAccuracy()) < (com.ushahidi.android.app.MapUserLocation.ACCURACY_THRESHOLD))) { stop...
public void onLocationChanged(android.location.Location location) { if (location != null) { locationChanged(location.getLatitude(), location.getLongitude(), true); if ((location.hasAccuracy()) && ((location.getAccuracy()) < (com.ushahidi.android.app.MapUserLocation.ACCURACY_THRESHOLD))) { ...
public T removeFirst() { if ((size) < 1) { throw new java.util.NoSuchElementException(); } T ret = data[head]; data[head] = null; if (((head) + 1) == (data.length)) { head = 0; }else { head += 1; } (size)--; return ret; }
public T removeFirst() { if ((size) < 1) { throw new java.util.NoSuchElementException(); } T ret = data[start]; data[start] = null; if (((start) + 1) == (data.length)) { start = 0; }else { (start)++; } (size)--; return ret; }
public void displayNewGrid() { removeGrid(); beetleKit.setKitProgress(((beetleKit.getKitProgress()) + 1)); beetleKit.setUserKitProgress(beetleKit.getKitProgress()); if (!(hasViewedAnswer)) { (currentGridNum)++; } java.lang.System.out.println(("current grid num " + (currentGridNum))); ...
public void displayNewGrid() { removeGrid(); if (!(hasViewedAnswer)) { beetleKit.setKitProgress(((beetleKit.getKitProgress()) + 1)); beetleKit.setUserKitProgress(beetleKit.getKitProgress()); (currentGridNum)++; } hasViewedAnswer = false; createNextRound(); }
public boolean onNavigationItemSelected(@android.support.annotation.NonNull android.view.MenuItem item) { switch (item.getItemId()) { case R.id.Action1 : startActivity(new android.content.Intent(this, com.wein3.weinapp.GPSTester.class)); break; case R.id.Action2 : ...
public boolean onNavigationItemSelected(@android.support.annotation.NonNull android.view.MenuItem item) { switch (item.getItemId()) { case R.id.Action1 : startActivity(new android.content.Intent(this, com.wein3.weinapp.GPSTester.class)); break; case R.id.Action2 : ...