buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
final int length = readInt(); if (length == 0) { return java.util.Optional.empty(); } checkAvailable(length); final java.nio.ByteBuffer result = java.nio.ByteBuffer.allocate(length); result.put(byteBuffer.array(), byteBuffer.position(), ((byteBuffer.position()) + length)); result.pos...
final int length = readInt(); if (length == 0) { return java.util.Optional.empty(); } checkAvailable(length); final java.nio.ByteBuffer result = java.nio.ByteBuffer.allocate(length); result.put(byteBuffer.array(), byteBuffer.position(), length); result.position(length); result.fl...
protected void onResume() { super.onResume(); sManager.registerListener(this, accelerometer, SensorManager.SENSOR_DELAY_UI); sManager.registerListener(this, magnetometer, SensorManager.SENSOR_DELAY_UI); mSocket.on("connectOK", onConnectOK); mSocket.connect(); }
protected void onResume() { super.onResume(); sManager.registerListener(this, accelerometer, SensorManager.SENSOR_DELAY_UI); sManager.registerListener(this, magnetometer, SensorManager.SENSOR_DELAY_UI); if ((mSocket) != null) { mSocket.on("connectOK", onConnectOK); mSocket.connect(); ...
private void loadModel(java.lang.String path, com.jme3.test.Vector3f offset, float scale) { com.jme3.scene.Spatial s = assetManager.loadModel(path); s.scale(scale); s.move(offset); assets.add(s); if (playAnim) { playFirstAnim(s); } com.jme3.animation.SkeletonControl ctrl = findSkelet...
private void loadModel(java.lang.String path, com.jme3.test.Vector3f offset, float scale) { com.jme3.scene.Spatial s = assetManager.loadModel(path); s.scale(scale); s.move(offset); assets.add(s); if (playAnim) { playFirstAnim(s); } }
public static java.util.Map<de.uni_freiburg.informatik.ultimate.logic.TermVariable, de.uni_freiburg.informatik.ultimate.logic.Term> constructAuxVarMapping(final java.util.Set<de.uni_freiburg.informatik.ultimate.logic.TermVariable> auxVars, final de.uni_freiburg.informatik.ultimate.modelcheckerutils.boogie.VariableManag...
public static java.util.Map<de.uni_freiburg.informatik.ultimate.logic.TermVariable, de.uni_freiburg.informatik.ultimate.logic.Term> constructAuxVarMapping(final java.util.Set<de.uni_freiburg.informatik.ultimate.logic.TermVariable> auxVars, final de.uni_freiburg.informatik.ultimate.modelcheckerutils.boogie.VariableManag...
public void actionPerformed(java.awt.event.ActionEvent arg0) { (tictactoe_main.chance)++; if (((tictactoe_main.chance) % 2) == 0) { tictactoe_main.btnNewButton.setText("X"); tictactoe_main.arr[0] = 1; }else if (((tictactoe_main.chance) % 2) == 1) { tictactoe_main.btnNewBu...
public void actionPerformed(java.awt.event.ActionEvent arg0) { (tictactoe_main.chance)++; if (((tictactoe_main.chance) % 2) == 0) { tictactoe_main.btnNewButton.setText("X"); tictactoe_main.arr[0] = 1; }else if (((tictactoe_main.chance) % 2) == 1) { tictactoe_main.btnNewBu...
public void addInputData(java.util.List<java.lang.Double> inputValues) { validateInputValues(inputValues); for (pl.kordulewski.ai.neuralnetwork.Neuron inputNeuron : neuronsInInputLayer) { for (java.lang.Double inputValue : inputValues) { inputNeuron.cleanSources(); inputNeuron.re...
public void addInputData(java.util.List<java.lang.Double> inputValues) { validateInputValues(inputValues); for (pl.kordulewski.ai.neuralnetwork.Neuron inputNeuron : neuronsInInputLayer) { inputNeuron.cleanSources(); for (java.lang.Double inputValue : inputValues) { inputNeuron.regist...
public int getHealAmount(@javax.annotation.Nonnull net.minecraft.item.ItemStack stack) { com.girafi.culinarycultivation.item.ItemCropProduct.ProductType productType = com.girafi.culinarycultivation.item.ItemCropProduct.ProductType.byItemStack(stack); switch (type) { case CROP : return produc...
public int getHealAmount(@javax.annotation.Nonnull net.minecraft.item.ItemStack stack) { com.girafi.culinarycultivation.item.ItemCropProduct.ProductType productType = com.girafi.culinarycultivation.item.ItemCropProduct.ProductType.byItemStack(stack); switch (type) { case CROP : return produc...
public java.lang.String decoratedMessage() { java.text.DateFormat dateFormat = new java.text.SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); return (((((this.name) + " ") + (dateFormat.format(date))) + ":") + (textLine)) + (java.lang.System.lineSeparator()); }
public java.lang.String decoratedMessage() { java.text.DateFormat dateFormat = new java.text.SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); return ((((((dateFormat.format(date)) + ":") + (this.name)) + " ") + ":") + (textLine)) + (java.lang.System.lineSeparator()); }
public boolean next() throws java.io.IOException { assertPagedFileStillMapped(); if ((nextPageId) > (lastPageId)) { return false; } unpinCurrentPage(); pin(nextPageId, false); currentPageId = nextPageId; (nextPageId)++; return true; }
public boolean next() throws java.io.IOException { unpinCurrentPage(); assertPagedFileStillMapped(); if ((nextPageId) > (lastPageId)) { return false; } pin(nextPageId, false); currentPageId = nextPageId; (nextPageId)++; return true; }
public void onMessage(org.eclipse.jetty.websocket.api.Session session, java.lang.String message) { try { io.infectnet.server.controller.websocket.SocketMessage socketMessage = getMessage(message); io.infectnet.server.controller.websocket.Action action = socketMessage.getAction(); if (action ...
public void onMessage(org.eclipse.jetty.websocket.api.Session session, java.lang.String message) { try { io.infectnet.server.controller.websocket.SocketMessage socketMessage = getMessage(message); io.infectnet.server.controller.websocket.Action action = socketMessage.getAction(); if (action ...
public java.lang.String RecommendMappingTask(@org.springframework.web.bind.annotation.RequestParam(value = "openedMappingName") java.lang.String openedMappingName) throws it.unibas.spicy.persistence.DAOException, java.io.IOException { gr.aueb.users.recommendation.ActionFindCommonMappingTasks commonMappings = new gr...
public java.lang.String RecommendMappingTask(@org.springframework.web.bind.annotation.RequestParam(value = "openedMappingName") java.lang.String openedMappingName) throws it.unibas.spicy.persistence.DAOException, java.io.IOException { gr.aueb.users.recommendation.ActionFindCommonMappingTasks commonMappings = new gr...
public void onComplete(@android.support.annotation.NonNull com.google.android.gms.tasks.Task<com.google.firebase.auth.AuthResult> task) { android.util.Log.d(",", ("signInWithCredentialonComplete" + (task.isSuccessful()))); if (task.isSuccessful()) { android.util.Log.v(",", "signInWithCredential", task.g...
public void onComplete(@android.support.annotation.NonNull com.google.android.gms.tasks.Task<com.google.firebase.auth.AuthResult> task) { android.util.Log.d(",", ("signInWithCredentialonComplete" + (task.isSuccessful()))); if (task.isSuccessful()) { android.util.Log.v(",", "signInWithCredential", task.g...
public void insertGraph(java.lang.String target, java.lang.String source) throws quanto.core.CoreException { if ((backend) == null) { throw new java.lang.IllegalStateException("The core is not running"); } try { writer.addHeader("GMI", generateRequestId()); writer.addStringArg(target...
public void insertGraph(java.lang.String source, java.lang.String target) throws quanto.core.CoreException { if ((backend) == null) { throw new java.lang.IllegalStateException("The core is not running"); } try { writer.addHeader("GMI", generateRequestId()); writer.addStringArg(target...
public void initialize(org.apache.hadoop.fs.FSDataInputStream stream, com.datatorrent.lib.io.block.BlockMetadata blockMetadata, boolean consecutiveBlock) { super.initialize(stream, blockMetadata, consecutiveBlock); s3Params.initialzeFilepathAndFileLength(blockMetadata); try { int bytesRead = this.ge...
public void initialize(org.apache.hadoop.fs.FSDataInputStream stream, com.datatorrent.lib.io.block.BlockMetadata blockMetadata, boolean consecutiveBlock) { s3Params.initialzeFilepathAndFileLength(blockMetadata); super.initialize(stream, blockMetadata, consecutiveBlock); try { int bytesRead = this.ge...
private void showDocumentFromAssets(@android.support.annotation.NonNull final java.lang.String assetPath, @android.support.annotation.NonNull final com.pspdfkit.configuration.activity.PdfActivityConfiguration configuration, @android.support.annotation.Nullable final java.lang.String password, @android.support.annotatio...
private void showDocumentFromAssets(@android.support.annotation.NonNull final java.lang.String assetPath, @android.support.annotation.Nullable final java.lang.String password, @android.support.annotation.NonNull final com.pspdfkit.configuration.activity.PdfActivityConfiguration configuration, @android.support.annotatio...
public int compare(pl.mobilization.mobilizationcheckin.User u1, pl.mobilization.mobilizationcheckin.User u2) { int compareLast = pl.mobilization.mobilizationcheckin.MyAdapter.POLISH_COLLATOR.compare(u1.getLast(), u2.getLast()); if (compareLast != 0) return compareLast; int compareFirst = pl.mob...
public int compare(pl.mobilization.mobilizationcheckin.User u1, pl.mobilization.mobilizationcheckin.User u2) { int compareLast = pl.mobilization.mobilizationcheckin.MyAdapter.POLISH_COLLATOR.compare(u1.getLast(), u2.getLast()); if (compareLast != 0) return compareLast; int compareFirst = pl.mob...
public boolean validateWager() { final java.lang.String value = wagerText.getText().toString(); final java.lang.Long bet; if (value.isEmpty()) return false; bet = java.lang.Long.parseLong(value); if (bet > (this.score.getScore())) return false; return true; }
public boolean validateWager() { final java.lang.String value = wagerText.getText().toString(); final java.lang.Long bet; if (value.isEmpty()) return true; bet = java.lang.Long.parseLong(value); if (bet > (this.score.getScore())) return false; return true; }
public void ButtonClick(java.awt.event.ActionEvent aE) { java.lang.String lEingabe = aE.getActionCommand(); if (lEingabe == "+-") lEingabe = "-"; if (((lEingabe == "sin") || (lEingabe == "cos")) || (lEingabe == "tan")) lEingabe = lEingabe + "("; tfInput.setText(((tfInput.getTex...
public void ButtonClick(java.awt.event.ActionEvent aE) { java.lang.String lEingabe = aE.getActionCommand(); if ("+-".equals(lEingabe)) lEingabe = "-"; if ((("sin".equals(lEingabe)) || ("cos".equals(lEingabe))) || ("tan".equals(lEingabe))) lEingabe = lEingabe + "("; tfInput.setT...
public double trace() throws java.lang.IllegalArgumentException { m = this.m; n = this.n; double ace = 0; if ((m) != (n)) { java.lang.String ex = "Rows and Columns must be same length."; throw new java.lang.IllegalArgumentException(ex); } matrix = new double[m][n]; for (int i...
public double trace() throws java.lang.IllegalArgumentException { m = this.m; n = this.n; double ace = 0; if ((m) != (n)) { java.lang.String ex = "Rows and Columns must be same length."; throw new java.lang.IllegalArgumentException(ex); } for (int i = 0; i < (m); i++) { a...
protected void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); textView = ((android.widget.TextView) (findViewById(R.id.tv_path))); android.widget.Button pickButton = ((android.widget.Button) (findViewById(R.id.bt_pick))); ...
protected void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); textView = ((android.widget.TextView) (findViewById(R.id.tv_path))); pickButton = ((android.widget.Button) (findViewById(R.id.bt_pick))); imageView = ((android....
public void onDataChange(com.google.firebase.database.DataSnapshot dataSnapshot) { for (com.google.firebase.database.DataSnapshot eventSnapshot : dataSnapshot.getChildren()) { tpdev.megaphone.db.Message m = eventSnapshot.getValue(tpdev.megaphone.db.Message.class); addMessToHist(m); add_messa...
public void onDataChange(com.google.firebase.database.DataSnapshot dataSnapshot) { for (com.google.firebase.database.DataSnapshot eventSnapshot : dataSnapshot.getChildren()) { tpdev.megaphone.db.Message m = eventSnapshot.getValue(tpdev.megaphone.db.Message.class); add_message_marker(m); andr...
log.info(("get user id=" + id)); userMessageSender.sendId(id, ru.yakovburtsev.socialnetwork.webclient.controller.AbstractUserController.GET_USER, ru.yakovburtsev.socialnetwork.webclient.controller.AbstractUserController.TRUE); ru.yakovburtsev.socialnetwork.core.model.User user = userMessageReceiver.receive(...
log.info(("get user id=" + id)); userMessageSender.sendId(id, ru.yakovburtsev.socialnetwork.webclient.controller.AbstractUserController.GET_USER, ru.yakovburtsev.socialnetwork.webclient.controller.AbstractUserController.TRUE); ru.yakovburtsev.socialnetwork.core.model.User user = userMessageReceiver.receive(...
public void onMethodCall(io.flutter.plugin.common.MethodCall call, io.flutter.plugin.common.MethodChannel.Result result) { if (call.method.equals("check")) { android.net.NetworkInfo info = manager.getActiveNetworkInfo(); if ((info != null) && (info.isConnected())) { result.success(io.flu...
public void onMethodCall(io.flutter.plugin.common.MethodCall call, io.flutter.plugin.common.MethodChannel.Result result) { if (call.method.equals("check")) { android.net.NetworkInfo info = manager.getActiveNetworkInfo(); if ((info != null) && (info.isConnected())) { result.success(io.flu...
public static int findSecondLargestNumber(int[] input) { int largest = java.lang.Integer.MIN_VALUE; int secondLargest = java.lang.Integer.MIN_VALUE; for (int number : input) { if (number >= largest) { largest = number; }else if (number > secondLargest) { ...
public static int findSecondLargestNumber(int[] input) { int largest = java.lang.Integer.MIN_VALUE; int secondLargest = java.lang.Integer.MIN_VALUE; for (int number : input) { if (number >= largest) { largest = number; }else if (number >= secondLargest) { ...
protected JenkinsRule.WebClient getWebClient() { org.jvnet.hudson.test.JenkinsRule.WebClient webClient = j.createWebClient(); webClient.setThrowExceptionOnFailingStatusCode(false); webClient.setCssErrorHandler(new org.w3c.css.sac.ErrorHandler() { @java.lang.Override public void warning(org.w...
protected JenkinsRule.WebClient getWebClient() { org.jvnet.hudson.test.JenkinsRule.WebClient webClient = j.createWebClient(); webClient.setCssErrorHandler(new org.w3c.css.sac.ErrorHandler() { @java.lang.Override public void warning(org.w3c.css.sac.CSSParseException e) { } @java....
public boolean longClick(com.example.dell.minesweeper.GridButton button) { if (button.isFlaged()) { button.setBackground(button.getOriginal()); button.setFlaged(false); button.setClickable(true); }else { button.setBackgroundResource(R.drawable.israel); button.setFlaged(tr...
public boolean longClick(com.example.dell.minesweeper.GridButton button) { if (button.isFlaged()) { button.setBackground(button.getOriginal()); button.setFlaged(false); button.setClickable(true); }else { button.setBackgroundResource(R.drawable.israel); button.setFlaged(tr...
org.sbolstandard.core2.SBOLDocument doc = documentIO.read(); doc.setDefaultURIprefix(URIprefix); if ((rootURI) != null) { doc = doc.createRecursiveCopy(doc.getComponentDefinition(rootURI)); } if (editor.getDesign().load(doc)) { setCurrentFile(documentIO); } }
org.sbolstandard.core2.SBOLDocument doc = documentIO.read(); doc.setDefaultURIprefix(URIprefix); if ((rootURI) != null) { doc = doc.createRecursiveCopy(doc.getComponentDefinition(rootURI)); } if (editor.getDesign().load(doc, rootURI)) { setCurrentFile(documentIO); } }
public boolean onTouchEvent(android.view.MotionEvent event) { switch (mInteractionMode) { case com.agsw.FabricView.FabricView.DRAW_MODE : mCommend.onTouchEvent(mDrawableList, event); calculateDirtyRegion(); invalidate(((int) ((dirtyRect.left) - 20)), ((int) ((dirtyRect.to...
public boolean onTouchEvent(android.view.MotionEvent event) { mCommend.onTouchEvent(mDrawableList, event); calculateDirtyRegion(); invalidate(((int) ((dirtyRect.left) - 20)), ((int) ((dirtyRect.top) - 20)), ((int) ((dirtyRect.right) + 20)), ((int) ((dirtyRect.bottom) + 20))); return true; }
protected void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_dashboard); android.view.View members = findViewById(R.id.btn_members); android.view.View books = findViewById(R.id.btn_books); if (com.mpp.project.UserInfoMgr.getInst...
protected void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_dashboard); android.view.View members = findViewById(R.id.btn_members); android.view.View books = findViewById(R.id.btn_books); books.setOnClickListener(this); fin...
public void run() { if (pingGame.movePlayerUp()) { message = (PLAYER) + (pingGame.playerMessage()); gameManager.write(message.getBytes(java.nio.charset.Charset.defaultCharset())); } if ((handlerUp) != null) handlerUp.postDelayed(this, (1000 / (FPS))); }
public void run() { if (pingGame.movePlayerUp()) { message = (PLAYER) + (pingGame.playerMessage()); gameManager.write(message); } if ((handlerUp) != null) handlerUp.postDelayed(this, (1000 / (FPS))); }
private org.akaza.openclinica.domain.datamap.ItemData lookupItemData(java.lang.Integer itemId, java.lang.Integer eventCrfId, java.lang.Integer itemOrdinal, java.util.List<org.akaza.openclinica.domain.datamap.ItemData> itemDataList) { for (org.akaza.openclinica.domain.datamap.ItemData itemData : itemDataList) { ...
private org.akaza.openclinica.domain.datamap.ItemData lookupItemData(java.lang.Integer itemId, java.lang.Integer eventCrfId, java.lang.Integer itemOrdinal, java.util.List<org.akaza.openclinica.domain.datamap.ItemData> itemDataList) { for (org.akaza.openclinica.domain.datamap.ItemData itemData : itemDataList) { ...
public void writeCountries(java.lang.String userCountry) { try (java.io.PrintWriter out = new java.io.PrintWriter(new java.io.BufferedWriter(new java.io.FileWriter(aNewFile, true)))) { out.print(userCountry); out.close(); } catch (java.io.IOException e) { e.printStackTrace(); } }
public void writeCountries(java.lang.String userCountry) { try (java.io.PrintWriter out = new java.io.PrintWriter(new java.io.BufferedWriter(new java.io.FileWriter(aNewFile, true)))) { out.print(("\n" + userCountry)); out.close(); } catch (java.io.IOException e) { e.printStackTrace(); ...
public void onClick(android.view.View v) { int x = sb.getSpanStart(this); java.lang.System.out.print((("\npressed! x: " + x) + "\n")); MainActivity.cursor.setX(x); dcheungaa.procal.InputHandler.cursorPos = final_index + 1; dcheungaa.procal.CursorHandler.locate(((dcheungaa.procal.InputHandler.cursorP...
public void onClick(android.view.View v) { int x = sb.getSpanStart(this); java.lang.System.out.print((("\npressed! x: " + x) + "\n")); MainActivity.cursor.setX(x); dcheungaa.procal.InputHandler.cursorPos = final_index; dcheungaa.procal.CursorHandler.locate(((dcheungaa.procal.InputHandler.cursorPos) ...
private void configureGrid(com.alu.tat.view.Grid grid) { grid.setSizeFull(); final com.vaadin.data.util.BeanItemContainer<com.alu.tat.entity.schema.SchemaElement> container = new com.vaadin.data.util.BeanItemContainer(com.alu.tat.entity.schema.SchemaElement.class); grid.setContainerDataSource(container); ...
private void configureGrid(com.alu.tat.view.Grid grid) { final com.vaadin.data.util.BeanItemContainer<com.alu.tat.entity.schema.SchemaElement> container = new com.vaadin.data.util.BeanItemContainer(com.alu.tat.entity.schema.SchemaElement.class, new java.util.LinkedList<com.alu.tat.entity.schema.SchemaElement>()); ...
public boolean removeLabel(java.lang.String labelToRemove) { com.dpizarro.autolabel.library.Label view = ((com.dpizarro.autolabel.library.Label) (findViewWithTag(labelToRemove))); if (view != null) { removeView(view); decreaseLabelsCounter(); if ((getLabelsCounter()) == (com.dpizarro.aut...
public boolean removeLabel(java.lang.String labelToRemove) { com.dpizarro.autolabel.library.Label label = ((com.dpizarro.autolabel.library.Label) (findViewWithTag(labelToRemove))); if (label != null) { removeView(label); decreaseLabelsCounter(); if ((getLabelsCounter()) == (com.dpizarro....
public android.view.View getView(int index, android.view.View convertView, android.view.ViewGroup parent) { android.view.View view = convertView; if (view == null) { view = android.view.LayoutInflater.from(parent.getContext()).inflate(R.layout.user_view, parent, false); } java.lang.String uname ...
public android.view.View getView(int index, android.view.View convertView, android.view.ViewGroup parent) { android.view.View view = convertView; if (view == null) { view = android.view.LayoutInflater.from(parent.getContext()).inflate(R.layout.user_view, parent, false); } java.lang.String uname ...
public void run() { java.util.List<edu.fudan.se.bean.AgentOffer> offerAgents = new edu.fudan.se.dbopration.SelectOfferByMicroTaskOperator(offerTask).getResult(); java.util.List<edu.fudan.se.bean.AgentOffer> selectedAgent = edu.fudan.se.tfws.CrowdServicePlanner.getSelectedAgent(offerTask.compositeService, offerT...
public void run() { java.util.List<edu.fudan.se.bean.AgentOffer> offerAgents = new edu.fudan.se.dbopration.SelectOfferByMicroTaskOperator(offerTask).getResult(); java.util.List<edu.fudan.se.bean.AgentOffer> selectedAgent = edu.fudan.se.tfws.CrowdServicePlanner.getSelectedAgent(offerTask, offerAgents); new e...
public void removeController(java.lang.Object controller) { if (controller == null) return ; removeControllerBinds(notifybinds, controller); removeControllerBinds(propertybinds, controller); removeControllerBinds(propertiesbinds, controller); removeControllerBinds(pathbinds, controller)...
public void removeController(java.lang.Object controller) { removeControllerBinds(notifybinds, controller); removeControllerBinds(propertybinds, controller); removeControllerBinds(propertiesbinds, controller); removeControllerBinds(pathbinds, controller); removeControllerBinds(timelinenotifybinds, c...
public void setAssignment(com.googlesites.skcrawford.gradebook.model.Assignment assignment) { this.assignment = assignment; nameField.setText(assignment.getName()); java.lang.String firstCategory = addCategoryOptions(); categoryMenu.setValue(firstCategory); totalPointsField.setText(java.lang.Double....
public void setAssignment(com.googlesites.skcrawford.gradebook.model.Assignment assignment) { this.assignment = assignment; nameField.setText(assignment.getName()); java.lang.String firstCategory = addCategoryOptions(); categoryMenu.setValue(firstCategory); totalPointsField.setText(java.lang.Integer...
private void wireUI() { textView = ((android.widget.TextView) (findViewById(R.id.textView))); frame = ((android.widget.FrameLayout) (findViewById(R.id.parentView))); ((android.widget.Button) (findViewById(R.id.recordButton))).setOnClickListener(recordListener); xPane = ((android.widget.FrameLayout) (fin...
private void wireUI() { ((android.widget.Button) (findViewById(R.id.recordButton))).setOnClickListener(recordListener); xPane = ((android.widget.FrameLayout) (findViewById(R.id.xPane))); yPane = ((android.widget.FrameLayout) (findViewById(R.id.yPane))); zPane = ((android.widget.FrameLayout) (findViewByI...
public org.blub.domain.Document create(@org.blub.controller.RequestBody org.blub.domain.Document document) { java.sql.Timestamp timestamp = new java.sql.Timestamp(new java.util.Date().getTime()); document.setWasVersionedAt(timestamp); documentRepository.save(document); return documentRepository.findOne(...
public org.blub.domain.Document create(@org.blub.controller.RequestBody org.blub.domain.Document document) { java.sql.Timestamp timestamp = new java.sql.Timestamp(new java.util.Date().getTime()); document.setWasVersionedAt(timestamp); documentRepository.save(document, 1); return documentRepository.findO...
public void onHideCustomView() { android.app.Activity activity = mXWalkView.getActivity(); if (((mCustomXWalkView) == null) || (activity == null)) return ; if ((mContentsClient) != null) { mContentsClient.onToggleFullscreen(true); } android.widget.FrameLayout decor = ((android.w...
public void onHideCustomView() { android.app.Activity activity = mXWalkView.getActivity(); if (((mCustomXWalkView) == null) || (activity == null)) return ; if ((mContentsClient) != null) { mContentsClient.onToggleFullscreen(false); } android.widget.FrameLayout decor = ((android....
private char nextChar() { if (EOF) { return ''; } (pos)++; char retVal; if ((pos) < (chars.length)) { retVal = chars[pos]; if (!(java.lang.Character.isWhitespace(retVal))) lastNonWhitespace = retVal; }else { retVal = ''; } if ((pos) ...
private char nextChar() { if (EOF) return 0; (pos)++; if ((pos) == ((chars.length) - 1)) EOF = true; if ((pos) >= (chars.length)) return 0; char retVal = chars[pos]; if (!(java.lang.Character.isWhitespace(retVal))) lastNonWhitespace = retVal; ...
public java.util.List<ch.heigvd.amt.gamification.model.entities.EndUser> findEndUsersAndPaginate(ch.heigvd.amt.gamification.model.entities.Application app, int index, int limit) throws ch.heigvd.amt.gamification.services.dao.GamificationDomainEntityNotFoundException { return em.createNamedQuery("Application.findEnd...
public java.util.List<ch.heigvd.amt.gamification.model.entities.EndUser> findEndUsersAndPaginate(ch.heigvd.amt.gamification.model.entities.Application app, int index, int limit) throws ch.heigvd.amt.gamification.services.dao.GamificationDomainEntityNotFoundException { return em.createNamedQuery("Application.findEnd...
public void testGetResponseHeaders() { com.sangupta.jerry.http.mock.TestDefaultHttpServiceImpl.handler.clear(); com.sangupta.jerry.http.mock.TestDefaultHttpServiceImpl.handler.setResponse(RESPONSE_CODE, RANDOM_STRING); com.sangupta.jerry.http.mock.TestDefaultHttpServiceImpl.handler.setHeader(RANDOM_STRING, ...
public void testGetResponseHeaders() { com.sangupta.jerry.http.mock.TestDefaultHttpServiceImpl.handler.setResponse(RESPONSE_CODE, RANDOM_STRING); com.sangupta.jerry.http.mock.TestDefaultHttpServiceImpl.handler.setHeader(RANDOM_STRING, RANDOM_STRING); java.util.Map<java.lang.String, java.lang.String> result ...
public void test_create_from_ymd() throws java.lang.Exception { org.junit.Assert.assertEquals(20140912, dint.Dint.create(2014, 9, 12)); org.junit.Assert.assertEquals(0, dint.Dint.create(0, 0, 0)); org.junit.Assert.assertEquals(11332, dint.Dint.create(1, 13, 32)); }
public void test_create_from_ymd() throws java.lang.Exception { org.junit.Assert.assertEquals(20140912, create(2014, 9, 12)); org.junit.Assert.assertEquals(0, create(0, 0, 0)); org.junit.Assert.assertEquals(11332, create(1, 13, 32)); }
protected void onEnable() throws java.lang.Throwable { me.alf21.weaponsystem.WeaponSystem.instance = this; eventManager = getEventManager(); eventManagerNode = eventManager.createChildNode(); playerLifecycleHolder = new net.gtaun.shoebill.common.player.PlayerLifecycleHolder(eventManager); playerLife...
protected void onEnable() throws java.lang.Throwable { me.alf21.weaponsystem.WeaponSystem.instance = this; eventManager = getEventManager(); eventManagerNode = eventManager.createChildNode(); playerLifecycleHolder = new net.gtaun.shoebill.common.player.PlayerLifecycleHolder(eventManager); playerLife...
public void run() { android.widget.TextView tv1 = ((android.widget.TextView) (fragment.getView().findViewById(R.id.achievementscreen_pressure))); tv1.setText((((("Druck: " + (pressure_1)) + " mBar, ") + (pressure_2)) + " m")); }
public void run() { if ((fragment.getView()) != null) { android.widget.TextView tv1 = ((android.widget.TextView) (fragment.getView().findViewById(R.id.achievementscreen_pressure))); tv1.setText((((("Druck: " + (pressure_1)) + " mBar, ") + (pressure_2)) + " m")); } }
private kafka.consumer.ConsumerConfig createConsumerConfig(java.lang.String zookeeper, java.lang.String groupId) { java.util.Properties props = new java.util.Properties(); props.put("zookeeper.connect", zookeeper); props.put("group.id", groupId); props.put("offsets.storage", "kafka"); props.put("dua...
private kafka.consumer.ConsumerConfig createConsumerConfig(java.lang.String zookeeper, java.lang.String groupId) { java.util.Properties props = new java.util.Properties(); props.put("zookeeper.connect", zookeeper); props.put("group.id", groupId); props.put("offsets.storage", "kafka"); props.put("dua...
public android.os.Parcelable onSaveInstanceState() { if (com.mypopsy.widget.SlidingUpPaneLayout.DEBUG) android.util.Log.d(com.mypopsy.widget.SlidingUpPaneLayout.TAG, "-----onSaveInstanceState()"); android.os.Parcelable superState = super.onSaveInstanceState(); com.mypopsy.widget.SlidingUpPaneLa...
public android.os.Parcelable onSaveInstanceState() { if (com.mypopsy.widget.SlidingUpPaneLayout.DEBUG) android.util.Log.d(com.mypopsy.widget.SlidingUpPaneLayout.TAG, "-----onSaveInstanceState()"); android.os.Parcelable superState = super.onSaveInstanceState(); com.mypopsy.widget.SlidingUpPaneLa...
public void handle(view.IView view, entities.player.IPlayer player) throws entities.player.InsufficientFundsException { view.showMessage("CHANCE_MOVE_FIXED", player.getName(), this.position); if ((player.getPosition()) > (this.position)) { player.getAccount().deposit(4000); view.updateBalance(pl...
public void handle(view.IView view, entities.player.IPlayer player) throws entities.player.InsufficientFundsException { view.showMessage("CHANCE_MOVE_FIXED", player.getName(), this.position); if ((player.getPosition()) > (this.position)) { player.getAccount().deposit(4000); view.updateBalance(pl...
public static void selectionSort(int[] data) { int minimum = data[index]; for (int index = 0; index < (data.length); index++) { minimum = data[index]; minimumIndex = index; for (int tracker = index + 1; tracker < (data.length); tracker++) { if ((data[tracker]) < minimum) { ...
public static void selectionSort(int[] data) { for (int index = 0; index < (data.length); index++) { int minimum = data[index]; int minimumIndex = index; for (int tracker = index + 1; tracker < (data.length); tracker++) { if ((data[tracker]) < minimum) { minimum =...
private void setUpFeedbacksFromCache() { if (com.wewow.utils.FileCacheUtil.isCacheDataExist(CommonUtilities.CACHE_FILE_FEEDBACKS, this)) { java.lang.String fileContent = com.wewow.utils.FileCacheUtil.getCache(this, CommonUtilities.CACHE_FILE_FEEDBACKS); java.util.List<com.wewow.dto.Feedback> feedbac...
private void setUpFeedbacksFromCache() { if (com.wewow.utils.FileCacheUtil.isCacheDataExist(CommonUtilities.CACHE_FILE_FEEDBACKS, this)) { java.lang.String fileContent = com.wewow.utils.FileCacheUtil.getCache(this, CommonUtilities.CACHE_FILE_FEEDBACKS); java.util.List<com.wewow.dto.Feedback> feedbac...
public void checkCluster1HashIntSet(matching.eventProcessor.ClusterFamilyCheckerThread checker, long[] predicateVector) { long res; int[][] cluster = this.getSubscriptionsPredicates(); res = predicateVector[cluster[0][0]]; if (res != 0) { int r = this.getSubscriptionID(0); if (!(checker....
public void checkCluster1HashIntSet(matching.eventProcessor.ClusterFamilyCheckerThread checker, long[] predicateVector) { long res; int[][] cluster = this.getSubscriptionsPredicates(); res = predicateVector[cluster[0][0]]; if (res != 0) { int r = this.getSubscriptionID(0); if (!(checker....
void accept(int tokenExpected) throws miniJava.SyntacticAnalyzer.Parser.SyntaxError { if ((currentToken.kind) == tokenExpected) { previousTokenPosition = currentToken.position; currentToken = lexicalAnalyser.scan(); }else { parseError((((("Expecting '" + (miniJava.SyntacticAnalyzer.Token...
void accept(int tokenExpected) throws miniJava.SyntacticAnalyzer.Parser.SyntaxError { if ((currentToken.kind) == tokenExpected) { previousTokenPosition = currentToken.position; currentToken = lexicalAnalyser.scan(); }else { parseError((((("Expecting '" + (miniJava.SyntacticAnalyzer.Token...
public void onlyCssResourceBundlesUsedFromCssFilesAreReturnedAsContentPaths() throws java.lang.Exception { given(defaultAspect).indexPageHasContent("").and(defaultAspect).containsFiles("themes/common/usedFile.ext", "resources/css/usedFile.ext", "resources/css/unusedFile.ext", "resources/some-dir/unusedFile.ext").an...
public void onlyCssResourceBundlesUsedFromCssFilesAreReturnedAsContentPaths() throws java.lang.Exception { given(defaultAspect).indexPageHasContent("").and(defaultAspect).containsFiles("themes/common/usedFile.ext", "resources/css/usedFile.ext", "resources/css/unusedFile.ext", "resources/some-dir/unusedFile.ext").an...
public void update(long timestamp) { for (int segment = 0; segment < (segmentSizes.length); segment++) { us.ihmc.robotDataLogger.dataBuffers.RegistrySendBuffer buffer = ringBuffer.next(); if (buffer != null) { buffer.updateBufferFromVariables(timestamp, uid, segmentOffsets[segment], segm...
public void update(long timestamp) { for (int segment = 0; segment < (segmentSizes.length); segment++) { us.ihmc.robotDataLogger.dataBuffers.RegistrySendBuffer buffer = ringBuffer.next(); if (buffer != null) { buffer.updateBufferFromVariables(timestamp, uid, segment, segmentOffsets[segme...
protected void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); if ((mGoogleApiClient) == null) { mGoogleApiClient = new com.google.android.gms.common.api.GoogleApiClient.Builder(this).addConnectionCallbacks(this).addOnConnectionFailedListener(this).addApi(LocationSer...
protected void onCreate(android.os.Bundle savedInstanceState) { super.onCreate(savedInstanceState); context = super.getApplicationContext(); if ((mGoogleApiClient) == null) { mGoogleApiClient = new com.google.android.gms.common.api.GoogleApiClient.Builder(this).addConnectionCallbacks(this).addOnConn...
protected float GetEnergy(float x, float y, float z) { float Energy = 0.0F; Energy = ((float) (java.lang.Math.sqrt((((x * x) + (y * y)) + (z * z))))); return Energy; }
protected float GetEnergy(float x, float y, float z) { return ((float) (java.lang.Math.sqrt((((x * x) + (y * y)) + (z * z))))); }
private static java.util.List<java.lang.String> executeCommand(java.lang.String cmd) { try { pt.ulisboa.tecnico.amorphous.requestrouter.lvs.LVSImplementation.logger.debug(("executing command: " + cmd)); java.util.List<java.lang.String> result = pt.ulisboa.tecnico.amorphous.requestrouter.utils.System...
private static java.util.List<java.lang.String> executeCommand(java.lang.String cmd) { try { pt.ulisboa.tecnico.amorphous.requestrouter.lvs.LVSImplementation.logger.info(("executing command: " + cmd)); java.util.List<java.lang.String> result = pt.ulisboa.tecnico.amorphous.requestrouter.utils.SystemS...
public boolean newBid(com.auction.interfaces.AuctionClientInterface c, com.auction.models.Bid b) { com.auction.models.Auction a = auc_by_id.get(b.getAuction_id()); com.auction.models.Bid highest = a.getHighest_bid(); if ((b.getValue()) <= (highest.getValue())) return false; a.setHighest_bid...
public boolean newBid(com.auction.interfaces.AuctionClientInterface c, com.auction.models.Bid b) { com.auction.models.Auction a = auc_by_id.get(b.getAuction_id()); com.auction.models.Bid highest = a.getHighest_bid(); if ((b.getValue()) <= (highest.getValue())) return false; a.setHighest_bid...
public void call(java.util.List<com.google.gson.JsonObject> jsonObjects) { loadingDialog.dismiss(); if ((jsonObjects.size()) != 0) { getView().showSyncProgressDialog("Downloading Cases...Please wait a moment."); getView().setProgressMax(jsonObjects.size()); } }
public void call(java.util.List<com.google.gson.JsonObject> jsonObjects) { loadingDialog.dismiss(); if (((jsonObjects.size()) != 0) && ((getView()) != null)) { getView().showSyncProgressDialog("Downloading Cases...Please wait a moment."); getView().setProgressMax(jsonObjects.size()); } }
private boolean isCurrentLine(int rowStartOffset) { int caretPosition = component.getCaretPosition(); javax.swing.text.Element root = component.getDocument().getDefaultRootElement(); if ((root.getElementIndex(rowStartOffset)) == (root.getElementIndex(caretPosition))) return true; else re...
private boolean isCurrentLine(int rowStartOffset) { int caretPosition = component.getCaretPosition(); javax.swing.text.Element root = component.getDocument().getDefaultRootElement(); return (root.getElementIndex(rowStartOffset)) == (root.getElementIndex(caretPosition)); }
public void actionPerformed(java.awt.event.ActionEvent arg0) { if (!(getText(et_userName))) return ; boolean login = com.voyager.dao.UserDao.login(frame, userName, userPwd); java.lang.System.out.println(("UserDao.login(frame, userName, userPwd) :: " + login)); com.voyager.utils.ConfigUtils....
public void actionPerformed(java.awt.event.ActionEvent arg0) { if (!(getText(et_userName))) return ; boolean login = com.voyager.dao.UserDao.login(frame, userName, userPwd); java.lang.System.out.println(("UserDao.login(frame, userName, userPwd) :: " + login)); com.voyager.utils.ConfigUtils....
public void saveState(android.os.Bundle savedState) { java.util.ArrayList<java.lang.Integer> data = new java.util.ArrayList<>(); data.add(java.lang.Integer.valueOf(getColumns())); data.add(java.lang.Integer.valueOf(getRows())); saveLayoutData(data); savedState.putIntegerArrayList(com.github.ssnikola...
public void saveState(android.os.Bundle savedState) { java.util.ArrayList<java.lang.Integer> data = new java.util.ArrayList<>(); data.add(getColumns()); data.add(getRows()); saveLayoutData(data); savedState.putIntegerArrayList(com.github.ssnikolaevich.flipgame.game.Game.STATE_DATA, data); }
public void setUp() { model = new seedu.address.model.ModelManager(seedu.address.testutil.TypicalPersons.getTypicalAddressBook(), new seedu.address.model.UserPrefs()); expectedModel = new seedu.address.model.ModelManager(model.getAddressBook(), new seedu.address.model.UserPrefs()); sortCommand = new seedu.a...
public void setUp() { model = new seedu.address.model.ModelManager(seedu.address.testutil.TypicalPersons.getTypicalAddressBook(), new seedu.address.model.UserPrefs()); expectedModel = new seedu.address.model.ModelManager(model.getAddressBook(), new seedu.address.model.UserPrefs()); sortCommand = new seedu.a...
public java.lang.String getName() { if (!(className.contains("."))) { return className; } java.lang.String[] parts = className.split("\\."); return parts[((parts.length) - 1)].toLowerCase(); }
public java.lang.String getName() { if (!(className.contains("."))) { return className; } java.lang.String[] parts = className.split("\\."); return parts[((parts.length) - 1)]; }
private java.lang.String getUpdatedDestinationNumber(java.lang.String destinationAddress) { java.lang.String otherPartyData = destinationAddress; if ((otherPartyData != null) && ((otherPartyData.length()) >= 7)) { if (otherPartyData.matches("0")) { if (otherPartyData.matches("^[0][1-9].*")) ...
public java.lang.String getUpdatedDestinationNumber(java.lang.String destinationAddress) { java.lang.String otherPartyData = destinationAddress; if ((otherPartyData != null) && ((otherPartyData.length()) >= 7)) { if (otherPartyData.matches("0")) { if (otherPartyData.matches("^[0][1-9].*")) {...
public void display(com.vaadin.ui.HorizontalLayout layoutH) { layoutH.addComponent(new com.vaadin.ui.Label(timer)); layoutH.addComponent(new com.vaadin.ui.Label(question)); layoutH.addComponent(new com.vaadin.ui.Label(answer1)); layoutH.addComponent(new com.vaadin.ui.Label(answer2)); for (com.decide...
public void display(com.vaadin.ui.HorizontalLayout layoutH) { layoutH.addComponent(new com.vaadin.ui.Label(question)); layoutH.addComponent(new com.vaadin.ui.Label(answer1)); layoutH.addComponent(new com.vaadin.ui.Label(answer2)); for (com.decideme.definitions.MultiVoteAnswerDefinition answer : answers)...
public static int index(org.openstreetmap.josm.data.coor.LatLon ll, int level) { long noParts = 1 << level; long x = ((long) ((((ll.lon()) + 180.0) * noParts) / 360.0)) & 1; long y = ((long) ((((ll.lat()) + 90.0) * noParts) / 180.0)) & 1; return ((int) ((2 * x) + y)); }
public static int index(org.openstreetmap.josm.data.coor.LatLon ll, int level) { long noParts = 1L << level; long x = ((long) ((((ll.lon()) + 180.0) * noParts) / 360.0)) & 1; long y = ((long) ((((ll.lat()) + 90.0) * noParts) / 180.0)) & 1; return ((int) ((2 * x) + y)); }
public void insertIndexInterval(int index, int length, boolean before) { super.insertIndexInterval(index, length, before); for (int i = index; i < (index + length); i++) { T proxy = model.getProxy(i); if ((proxy != null) && (sel_model.isSelected(proxy))) super.addSelectionInterval(i,...
public void insertIndexInterval(int index, int length, boolean before) { super.insertIndexInterval(index, length, before); for (int i = index; i < (index + length); i++) { T proxy = model.getProxy(i, false); if ((proxy != null) && (sel_model.isSelected(proxy))) super.addSelectionInte...
public java.lang.Float getFloat(java.lang.String key, java.lang.Float defaultValue) { java.lang.String value = getString(key); if (value == null) return notFound(); try { return java.lang.Float.parseFloat(value); } catch (java.lang.NumberFormatException e) { return parseErro...
public java.lang.Float getFloat(java.lang.String key) { java.lang.String value = getString(key); if (value == null) return notFound(); try { return java.lang.Float.parseFloat(value); } catch (java.lang.NumberFormatException e) { return parseError(key, value, e); } }
private com.marcosdiez.extratocartao.sms.SMSData createSms(java.lang.String phoneNumber, java.lang.String message) { com.marcosdiez.extratocartao.sms.SMSData newSms = new com.marcosdiez.extratocartao.sms.SMSData(); newSms.setDate(java.text.DateFormat.getDateTimeInstance().format(new java.util.Date())); newS...
private com.marcosdiez.extratocartao.sms.SMSData createSms(java.lang.String phoneNumber, java.lang.String message) { com.marcosdiez.extratocartao.sms.SMSData newSms = new com.marcosdiez.extratocartao.sms.SMSData(); newSms.setDate(new java.util.Date()); newSms.setBody(message); newSms.setNumber(phoneNumb...
public cc.recommenders.io.Directory getParentDirectory(java.lang.String absoluteFileName) { java.io.File file = new java.io.File(absoluteFileName); cc.recommenders.assertions.Asserts.assertTrue(file.isAbsolute()); java.lang.String parent = file.getParent(); if (parent == null) { return new cc.re...
public cc.recommenders.io.Directory getParentDirectory(java.lang.String absoluteFileName) { java.io.File file = new java.io.File(absoluteFileName); cc.recommenders.assertions.Asserts.assertTrue(file.isAbsolute()); java.lang.String parent = file.getParent(); if (parent == null) { return new cc.re...
void logObjects() { org.mym.prettylog.data.User.Cat tom = new org.mym.prettylog.data.User.Cat("Tom", "Blue"); org.mym.prettylog.data.User.Cat jerry = new org.mym.prettylog.data.User.Cat("Jerry", "brown"); java.util.List<org.mym.prettylog.data.User.Cat> cats = new java.util.ArrayList<>(); java.util.Colle...
void logObjects() { org.mym.prettylog.data.User.Cat tom = new org.mym.prettylog.data.User.Cat("Tom", "Blue"); org.mym.prettylog.data.User.Cat jerry = new org.mym.prettylog.data.User.Cat("Jerry", "brown"); java.util.List<org.mym.prettylog.data.User.Cat> cats = new java.util.ArrayList<>(); java.util.Colle...
public void onClick(android.view.View v) { if ((story.getParentString()) != null) { java.lang.String uniqueIdentifier = story.getParentString(); com.bauble_app.bauble.StorySingleton.getInstance().setViewKey(uniqueIdentifier); mPlayer.stop(); android.support.v4.app.FragmentTransaction...
public void onClick(android.view.View v) { if ((story.getParentString()) != null) { java.lang.String uniqueIdentifier = story.getParentString(); com.bauble_app.bauble.StorySingleton.getInstance().setViewKey(uniqueIdentifier); android.support.v4.app.FragmentTransaction ft = mFragManager.begin...
protected void reset(float pos1, float pos2) { this.setSelected(true); super.reset(pos1, pos2); inventory.reset(); squadSelectButton = mainButton.addSelectButton(this); selectKey = com.esbjon.entities.Squad.handler.findOrAssignKey(this); }
protected void reset(float pos1, float pos2) { super.reset(pos1, pos2); inventory.reset(); squadSelectButton = mainButton.addSelectButton(this); this.setSelected(true); selectKey = com.esbjon.entities.Squad.handler.findOrAssignKey(this); }
public void givenSourceObjectAndDestClass_whenMapsSameNameFieldsCorrectly_thenCorrect() { com.baeldung.dozer.Source source = new com.baeldung.dozer.Source("Baeldung", 10); com.baeldung.dozer.Dest dest = mapper.map(source, com.baeldung.dozer.Dest.class); org.junit.Assert.assertEquals(dest.getName(), "Baeldun...
public void givenSourceObjectAndDestClass_whenMapsSameNameFieldsCorrectly_thenCorrect() { com.baeldung.dozer.Source source = new com.baeldung.dozer.Source("Baeldung", 10); com.baeldung.dozer.Dest dest = mapper.map(source, com.baeldung.dozer.Dest.class); assertEquals(dest.getName(), "Baeldung"); assertEq...
private void stopVpn() { if ((mBinder) == null) return ; mStopping = true; try { mBinder.stop(); } catch (java.lang.Exception e) { } getActivity().unbindService(mConnection); checkState(); }
private void stopVpn() { if ((mBinder) == null) return ; mStopping = true; try { mBinder.stop(); } catch (java.lang.Exception e) { } mBinder = null; getActivity().unbindService(mConnection); checkState(); }
public void onActivityResult(int requestCode, int resultCode, android.content.Intent data) { super.onActivityResult(requestCode, resultCode, data); switch (requestCode) { case com.whatsoft.contactbook.activity.MainActivity.REQUEST_ADD_CONTACT : if ((listType) == (com.whatsoft.contactbook.con...
public void onActivityResult(int requestCode, int resultCode, android.content.Intent data) { super.onActivityResult(requestCode, resultCode, data); switch (requestCode) { case com.whatsoft.contactbook.activity.MainActivity.REQUEST_ADD_CONTACT : if (((listType) == (com.whatsoft.contactbook.co...
public cn.finalteam.rxgalleryfinal.rxjob.job.Result onRunJob() { java.lang.String originalPath = mediaBean.getOriginalPath(); java.io.File bigThumFile = cn.finalteam.rxgalleryfinal.utils.MediaUtils.createThumbnailBigFileName(context, originalPath); java.io.File smallThumFile = cn.finalteam.rxgalleryfinal.ut...
public cn.finalteam.rxgalleryfinal.rxjob.job.Result onRunJob() { java.lang.String originalPath = mediaBean.getOriginalPath(); java.io.File bigThumFile = cn.finalteam.rxgalleryfinal.utils.MediaUtils.createThumbnailBigFileName(context, originalPath); java.io.File smallThumFile = cn.finalteam.rxgalleryfinal.ut...
public void testCanInstantiateAndDismissAStandardDriver() { org.openqa.selenium.WebDriver driver = factory.getDriver(org.openqa.selenium.remote.DesiredCapabilities.htmlUnit()); org.hamcrest.MatcherAssert.assertThat(driver, org.hamcrest.CoreMatchers.instanceOf(org.openqa.selenium.htmlunit.HtmlUnitDriver.class));...
public void testCanInstantiateAndDismissAStandardDriver() { org.openqa.selenium.WebDriver driver = factory.getDriver(org.openqa.selenium.remote.DesiredCapabilities.htmlUnit()); org.hamcrest.MatcherAssert.assertThat(driver, org.hamcrest.CoreMatchers.instanceOf(org.openqa.selenium.htmlunit.HtmlUnitDriver.class));...
private void updateRefreshingUI() { mSwipeRefreshLayout.setRefreshing(mIsRefreshing); android.support.design.widget.Snackbar snackbar; java.lang.String snackBarTextBegin = "Update "; java.lang.String snackBarTextEnd = (com.example.xyzreader.ui.ArticleListActivity.updateStart) ? "started" : "finished"; ...
private void updateRefreshingUI() { mSwipeRefreshLayout.setRefreshing(mIsRefreshing); android.support.design.widget.Snackbar snackbar; java.lang.String snackBarTextBegin = "Update "; java.lang.String snackBarTextEnd = (mIsRefreshing) ? "started" : "finished"; snackbar = android.support.design.widget...
private void onChar(char c) { if (c == '"') { if (m_isInQuotes) { resetSegment(); } m_isInQuotes = !(m_isInQuotes); }else if (org.opennms.core.utils.StringUtils.CommandArrayGenerator.isWhitespace(c)) { if (!(m_isInQuotes)) { resetSegment();...
private void onChar(char c) { if (c == '"') { m_isInQuotes = !(m_isInQuotes); }else if (org.opennms.core.utils.StringUtils.CommandArrayGenerator.isWhitespace(c)) { if (!(m_isInQuotes)) { resetSegment(); }else if (c == ' ') { ...
public final java.util.Set<de.uniulm.omi.cloudiator.visor.monitoring.Measurement<E>> getMeasurements() throws de.uniulm.omi.cloudiator.visor.exceptions.MeasurementNotAvailableException { com.google.common.base.Preconditions.checkState(isInitialized, "Measurement method was called before initialization."); java....
public final java.util.Set<de.uniulm.omi.cloudiator.visor.monitoring.Measurement<E>> getMeasurements() throws de.uniulm.omi.cloudiator.visor.exceptions.MeasurementNotAvailableException { com.google.common.base.Preconditions.checkState(isInitialized, "Measurement method was called before initialization."); java....
private void smallBlind() { java.math.BigDecimal amount = pokerTable.getDefaultPot().divide(new java.math.BigDecimal(2)); myDebt = myDebt.subtract(amount); alreadInPot = alreadInPot.add(amount); sendPlayerCommand(HoldemPlayerCommandType.BLIND, amount, null); }
private void smallBlind() { java.math.BigDecimal amount = pokerTable.getDefaultPot().divide(new java.math.BigDecimal(2)); myDebt = myDebt.add(amount); alreadInPot = alreadInPot.add(amount); sendPlayerCommand(HoldemPlayerCommandType.BLIND, amount, null); }
public int[] getDamage() { java.lang.String[] s = this.config.getString("damage").split(","); int[] a = new int[s.length]; for (int i = 0; i < (s.length); i++) { a[i] = (java.lang.Integer.parseInt(s[i])) + (getLevel()); } return a; }
public int[] getDamage() { java.lang.String[] s = this.config.getString("damage").split(","); int[] a = new int[s.length]; for (int i = 0; i < (s.length); i++) { a[i] = ((java.lang.Integer.parseInt(s[i])) + (getLevel())) - 1; } return a; }
public void reset() { org.bukkit.World w = plugin.getServer().getWorld("Time"); com.sk89q.worldguard.protection.managers.RegionManager mgr = plugin.worldGuard.getRegionManager(w); com.sk89q.worldguard.protection.regions.ProtectedRegion pr = mgr.getRegion(getName()); if (pr != null) { com.tengel....
public void reset() { org.bukkit.World w = plugin.getServer().getWorld("Time"); com.sk89q.worldguard.protection.managers.RegionManager mgr = plugin.worldGuard.getRegionManager(w); com.sk89q.worldguard.protection.regions.ProtectedRegion pr = mgr.getRegion(getName()); if (pr != null) { com.tengel....
protected static java.util.LinkedList<com.andrew.Ticket> searchByName(java.util.LinkedList<com.andrew.Ticket> ticketQueue, java.lang.String query) { java.util.LinkedList<com.andrew.Ticket> searchResults = new java.util.LinkedList<com.andrew.Ticket>(); for (com.andrew.Ticket ticket : ticketQueue) { java....
protected static java.util.LinkedList<com.andrew.Ticket> searchByName(java.util.LinkedList<com.andrew.Ticket> ticketQueue, java.lang.String query) { query = query.toLowerCase(); java.util.LinkedList<com.andrew.Ticket> searchResults = new java.util.LinkedList<com.andrew.Ticket>(); for (com.andrew.Ticket tick...
public synchronized void updateNames(java.util.Collection<Deliquescence.Player> players) { for (Deliquescence.Player newPlayer : players) { boolean addable = true; for (Deliquescence.Player cPlayer : allPlayers) { if (newPlayer.equals(cPlayer)) { addable = false; ...
public synchronized void updateNames(java.util.Collection<Deliquescence.Player> players) { for (Deliquescence.Player newPlayer : players) { boolean addable = true; for (Deliquescence.Player cPlayer : allPlayers) { if (newPlayer.equals(cPlayer)) { addable = false; ...
public void execute(com.baidu.palo.http.BaseRequest request, com.baidu.palo.http.BaseResponse response) { if (needCheckClientIsFe()) { try { checkFromValidFe(request, response); } catch (com.baidu.palo.http.meta.InvalidClientException e) { response.appendContent("invalid clie...
public void execute(com.baidu.palo.http.BaseRequest request, com.baidu.palo.http.BaseResponse response) { if (needCheckClientIsFe()) { try { checkFromValidFe(request, response); } catch (com.baidu.palo.http.meta.InvalidClientException e) { response.appendContent("invalid clie...
public android.content.pm.PackageInfo getPackageInfo() { android.content.pm.PackageInfo pi = null; try { android.content.Context c = getContext(); if (c != null) { pi = c.getPackageManager().getPackageInfo(c.getPackageName(), 0); } } catch (java.lang.Exception e) { ...
public android.content.pm.PackageInfo getPackageInfo() { if ((pi) == null) { try { android.content.Context c = getContext(); if (c != null) { pi = c.getPackageManager().getPackageInfo(c.getPackageName(), 0); } } catch (java.lang.Exception e) { ...
public org.apache.logging.log4j.core.filter.Result filter(final org.apache.logging.log4j.core.Logger logger, final org.apache.logging.log4j.Level level, final org.apache.logging.log4j.Marker marker, final java.lang.String msg, final java.lang.Object p0, final java.lang.Object p1, final java.lang.Object p2, final java.l...
public org.apache.logging.log4j.core.filter.Result filter(final org.apache.logging.log4j.core.Logger logger, final org.apache.logging.log4j.Level level, final org.apache.logging.log4j.Marker marker, final java.lang.String msg, final java.lang.Object p0, final java.lang.Object p1, final java.lang.Object p2, final java.l...
public long sum(int from, int to) { if (from > 0) return (sum(0, to)) - (sum(0, from)); long res = 0; for (int i = to; i >= 0; i = (i & (i + 1)) - 1) res += s[i]; return res; }
public long sum(int from, int to) { if (from > 0) return (sum(0, to)) - (sum(0, (from - 1))); long res = 0; for (int i = to; i >= 0; i = (i & (i + 1)) - 1) res += s[i]; return res; }
public static void jeu() { int score = 0; if ((pendu.joueurs) == 1) { score = pendu.UnJoueur(); if (profilGestion.existe()) { pendu.ajouteScore(score); } }else if ((pendu.joueurs) == 2) { score = pendu.choix2Jr(); if (profilGestion.existe()...
public static void jeu() { int score = 0; if ((pendu.joueurs) == 1) { score = pendu.UnJoueur(); if (profilGestion.existe()) { pendu.ajouteScore(score); profilGestion.saveProfil(); } }else if ((pendu.joueurs) == 2) { score = pendu.choix2Jr()...
private void receiveStates() throws java.io.IOException { for (int i = 0; i < 50; i++) { java.awt.image.BufferedImage a = javax.imageio.ImageIO.read(new java.io.File((("" + i) + ".jpg"))); java.awt.Image img = a.getScaledInstance(736, 568, java.awt.Image.SCALE_SMOOTH); this.states.add(new ja...
private void receiveStates() throws java.io.IOException { for (int i = 0; i < 50; i++) { java.awt.image.BufferedImage a = javax.imageio.ImageIO.read(new java.io.File((i + ".jpg"))); java.awt.Image img = a.getScaledInstance(736, 568, java.awt.Image.SCALE_SMOOTH); this.states.add(new javax.swi...
private void getGatewayInfo(com.google.gson.JsonObject jobject) { sid = jobject.get("sid").getAsString(); dest_port = jobject.get("port").getAsInt(); gatewayIP = jobject.get("ip").getAsString(); org.openhab.binding.xiaomigateway.internal.XiaomiGatewayBinding.logger.info(((((("Discovered Xiaomi Gateway -...
private void getGatewayInfo(com.google.gson.JsonObject jobject) { sid = jobject.get("sid").getAsString(); dest_port = jobject.get("port").getAsInt(); gatewayIP = jobject.get("ip").getAsString(); org.openhab.binding.xiaomigateway.internal.XiaomiGatewayBinding.logger.info(((((("Discovered Xiaomi Gateway -...
public java.util.List<br.ufs.dcomp.sigaaweb.model.AlunoBean> findAll() { try { java.sql.Statement statement = this.getConnection().createStatement(); java.sql.ResultSet resultSet = statement.executeQuery("SELECT * FROM alunos"); while (resultSet.next()) { this.alunoBean = extract...
public java.util.List<br.ufs.dcomp.sigaaweb.model.AlunoBean> findAll() { try { java.sql.Statement statement = this.getConnection().createStatement(); java.sql.ResultSet resultSet = statement.executeQuery("SELECT * FROM alunos"); while (resultSet.next()) { this.alunoBean = extract...
public static boolean primNumber(long number) { for (long i = 2; i < ((long) (java.lang.Math.sqrt(number))); i++) { if ((number % i) == 0) { return false; } } return true; }
public static boolean primNumber(long number) { for (long i = 2; i <= ((long) (java.lang.Math.sqrt(number))); i++) { if ((number % i) == 0) { return false; } } return true; }
public org.springframework.test.web.servlet.MvcResult testSavePolicy() throws java.lang.Exception { org.springframework.test.web.servlet.MvcResult result = mock().perform(post("/travel/policy").contentType(MediaType.APPLICATION_JSON).content(createValidTravel())).andExpect(org.springframework.test.web.servlet.resul...
public void testSavePolicy() throws java.lang.Exception { mock().perform(post("/travel/policy").contentType(MediaType.APPLICATION_JSON).content(createValidTravel())).andExpect(org.springframework.test.web.servlet.result.MockMvcResultMatchers.status().isCreated()).andReturn(); }