buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
private void updateUI() {
if (!(this.success)) {
android.widget.Toast.makeText(getApplicationContext(), getString(R.string.http_call_error), Toast.LENGTH_SHORT).show();
}else {
com.danidevelop.lyricsoffline.adapters.SongAdapter adapter = new com.danidevelop.lyricsoffline.adapters.SongAdapter(get... | private void updateUI() {
if ((this.listSong.size()) == 0) {
android.widget.Toast.makeText(getApplicationContext(), getString(R.string.http_call_error), Toast.LENGTH_SHORT).show();
}else {
com.danidevelop.lyricsoffline.adapters.SongAdapter adapter = new com.danidevelop.lyricsoffline.adapters.Son... |
private void handleMenuOpen(javafx.event.ActionEvent event) {
javafx.stage.FileChooser fileChooser = new javafx.stage.FileChooser();
fileChooser.setTitle("Datei öffnen");
java.io.File file = fileChooser.showOpenDialog(((javafx.stage.Stage) (tableListen.getScene().getWindow())));
net.cgro.votemanager.mod... | private void handleMenuOpen(javafx.event.ActionEvent event) {
javafx.stage.FileChooser fileChooser = new javafx.stage.FileChooser();
fileChooser.setTitle("Datei öffnen");
java.io.File file = fileChooser.showOpenDialog(((javafx.stage.Stage) (tableListen.getScene().getWindow())));
if (file != null) {
... |
public <T extends java.io.Serializable> void setData(java.lang.String path, T t) throws java.lang.Exception {
byte[] payload = com.emc.ehc.cloudkeeper.utils.Object2ByteUtils.serialize(t);
if (com.emc.ehc.cloudkeeper.utils.ZooKeeperClientUtils.isPathExist(zkClient, path)) {
return ;
}
com.emc.ehc... | public <T extends java.io.Serializable> void setData(java.lang.String path, T t) throws java.lang.Exception {
byte[] payload = com.emc.ehc.cloudkeeper.utils.Object2ByteUtils.serialize(t);
if (!(com.emc.ehc.cloudkeeper.utils.ZooKeeperClientUtils.isPathExist(zkClient, path))) {
com.emc.ehc.cloudkeeper.uti... |
public int insert(compiler.Symbol symbol, compiler.ast.type.Type type) {
changeStack.push(new compiler.semantic.symbolTable.Change(symbol, symbol.getDeclaration(), symbol.getDeclarationScope()));
int variableNumber = (localVariables) + 1;
symbol.setDeclaration(currentScope, new compiler.ast.declaration.Loca... | public int insert(compiler.Symbol symbol, compiler.ast.type.Type type) {
changeStack.push(new compiler.semantic.symbolTable.Change(symbol, symbol.getDeclaration(), symbol.getDeclarationScope()));
int variableNumber = (localVariables)++;
symbol.setDeclaration(currentScope, new compiler.ast.declaration.LocalV... |
public seedu.address.logic.commands.CommandResult execute() {
seedu.address.commons.core.UnmodifiableObservableList<seedu.address.model.item.ReadOnlyItem> lastShownList = model.getFilteredItemList();
if ((lastShownList.size()) < (targetIndex)) {
indicateAttemptToExecuteIncorrectCommand();
return... | public seedu.address.logic.commands.CommandResult execute() {
seedu.address.commons.core.UnmodifiableObservableList<seedu.address.model.item.ReadOnlyItem> lastShownList = model.getFilteredItemList();
if ((lastShownList.size()) < (targetIndex)) {
indicateAttemptToExecuteIncorrectCommand();
return... |
public void scan(org.json.JSONArray args) {
android.content.Intent intentScan = new android.content.Intent(com.honeywell.scanintent.ScanIntent.SCAN_ACTION);
intentScan.addCategory(Intent.CATEGORY_DEFAULT);
intentScan.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
intentScan.addFlags(Intent.FLAG_ACTIVITY_CLEA... | public void scan(org.json.JSONArray args) {
android.content.Intent intentScan = new android.content.Intent(com.honeywell.scanintent.ScanIntent.SCAN_ACTION);
intentScan.addCategory(Intent.CATEGORY_DEFAULT);
intentScan.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
intentScan.addFlags(Intent.FLAG_ACTIVITY_CLEA... |
private boolean isSignificantMovementDetected() {
for (int i = 0; i < 3; i++) {
if ((java.lang.Math.abs(cachedAccelerationData[i])) > ((maximumDeltaAcceleration) * 2)) {
return true;
}
}
return false;
} | public boolean isSignificantMovementDetected() {
for (int i = 0; i < 3; i++) {
if ((java.lang.Math.abs(cachedAccelerationData[i])) > ((maximumDeltaAcceleration) * 2)) {
return true;
}
}
return false;
} |
protected void drawQueue(android.graphics.Canvas canvas) {
java.lang.System.out.println("DRAW QUEUE");
float paddingLeft = (getWidth()) - ((cardWidth) * (1 + ((fieldsOffsetInCards) / 2)));
float paddingTop = ((cardHeight) * (fieldsOffsetInCards)) / 2;
for (int card : player.getCardsFromQueue()) {
... | protected void drawQueue(android.graphics.Canvas canvas) {
float paddingLeft = (getWidth()) - ((cardWidth) * (1 + ((fieldsOffsetInCards) / 2)));
float paddingTop = ((cardHeight) * (fieldsOffsetInCards)) / 2;
for (int card : player.getCardsFromQueue()) {
drawCard(canvas, paddingLeft, paddingTop, card... |
public void onMessage(org.webbitserver.WebSocketConnection connection, java.lang.String msg) throws java.lang.Throwable {
log.debug("Websocket message received ({}): {}", connection.httpRequest().remoteAddress(), msg);
server.supplyMessage(new com.pploder.ehc.SimpleMessage(getHttpConsole(), connections.get(conn... | public void onMessage(org.webbitserver.WebSocketConnection connection, java.lang.String msg) throws java.lang.Throwable {
log.debug("Websocket message received ({}): {}", connection.httpRequest().remoteAddress(), msg);
server.supplyMessage(new com.pploder.ehc.SimpleMessage(connections.get(connection), msg));
} |
public void update(java.lang.Long cartId, com.emusicstore.model.Cart cart) {
if (!(listOfCarts.containsKey(cartId))) {
throw new java.lang.IllegalArgumentException(java.lang.String.format(("Cannot update cart. " + "The cart doesn't exist"), cart.getCartId()));
}
listOfCarts.put(cartId, cart);
} | public void update(java.lang.String cartId, com.emusicstore.model.Cart cart) {
if (!(listOfCarts.containsKey(cartId))) {
throw new java.lang.IllegalArgumentException(java.lang.String.format(("Cannot update cart. " + "The cart doesn't exist"), cart.getCartId()));
}
listOfCarts.put(cartId, cart);
} |
public void playTrackingLinePatterns(com.nisovin.magicspells.spelleffects.EffectPosition pos, org.bukkit.Location origin, org.bukkit.Location target, org.bukkit.entity.Entity originEntity, org.bukkit.entity.Entity targetEntity) {
java.util.List<com.nisovin.magicspells.spelleffects.SpellEffect> spellEffects = effect... | public void playTrackingLinePatterns(com.nisovin.magicspells.spelleffects.EffectPosition pos, org.bukkit.Location origin, org.bukkit.Location target, org.bukkit.entity.Entity originEntity, org.bukkit.entity.Entity targetEntity) {
if ((effects) != null) {
java.util.List<com.nisovin.magicspells.spelleffects.S... |
private void cancelAction() {
textFieldCash.setText("");
textAreaComment.setText("");
passwordFieldPassword.setText("");
labelTransactionMethod.setText("SELECT!");
isIOMethodSelected = false;
buttonGroupIO.clearSelection();
ioFrame.setVisible(false);
} | private void cancelAction() {
if (isIOMethodSelected) {
textFieldCash.setText("");
textAreaComment.setText("");
passwordFieldPassword.setText("");
labelTransactionMethod.setText("SELECT!");
isIOMethodSelected = false;
buttonGroupIO.clearSelection();
}
ioFrame.... |
public void deleteAccount(int account_id) {
java.sql.Statement stmt = null;
try {
stmt = connection.createStatement();
stmt.execute(("DELETE FROM accounts WHERE account_id=" + account_id));
java.lang.System.out.println("Account Deleted in DATABASE");
} catch (java.lang.Exception exc)... | public void deleteAccount(int account_id) {
java.sql.Statement stmt = null;
try {
stmt = connection.createStatement();
stmt.execute(("DELETE FROM accounts WHERE account_id=" + account_id));
java.lang.System.out.println("Account Deleted in DATABASE");
} catch (java.lang.Exception exc)... |
public java.lang.String renderHomePage(javax.servlet.http.HttpSession session, org.springframework.ui.ModelMap model) {
model.addAttribute("username", ((java.lang.String) (session.getAttribute("loggedInUsername"))));
java.util.List<app.model.Post> posts = service.getAllPosts();
java.lang.String postsJSON = ... | public java.lang.String renderHomePage(javax.servlet.http.HttpSession session, org.springframework.ui.ModelMap model) {
model.addAttribute("username", ((java.lang.String) (session.getAttribute("username"))));
java.util.List<app.model.Post> posts = service.getAllPosts();
java.lang.String postsJSON = service.... |
public fachklassen.LearningAgreement loescheLearningAgreementPosition(java.lang.String posId, fachklassen.LearningAgreement la) {
int idx = 0;
java.util.List<fachklassen.LearningAgreementPosition> laPosen = la.getLearningAgreementPositionen();
for (fachklassen.LearningAgreementPosition laPos : laPosen) {
... | public fachklassen.LearningAgreement loescheLearningAgreementPosition(java.lang.String posId, fachklassen.LearningAgreement la) {
int idx = 0;
java.util.List<fachklassen.LearningAgreementPosition> laPosen = la.getLearningAgreementPositionen();
for (fachklassen.LearningAgreementPosition laPos : laPosen) {
... |
public void onDialogPositiveClick(android.app.DialogFragment dialog, int index) {
android.widget.TextView t = ((android.widget.TextView) (dialog.getDialog().findViewById(R.id.word)));
if (index > 0) {
keys.set(index, t.getText().toString());
}else {
keys.add(t.getText().toString());
}
... | public void onDialogPositiveClick(android.app.DialogFragment dialog, int index) {
android.widget.TextView t = ((android.widget.TextView) (dialog.getDialog().findViewById(R.id.word)));
if (index >= 0) {
keys.set(index, t.getText().toString());
}else {
keys.add(t.getText().toString());
}
... |
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
app.storyteller.testing.MihaiTesting.testingProfile(getApplicationContext());
app.storyteller.testing.MihaiTesting.testingStory(getApplicationContext());
if (app.storyteller.LoadingScreen.hasAccount) {
... | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
app.storyteller.testing.MihaiTesting.testingProfile(getApplicationContext());
app.storyteller.testing.MihaiTesting.testingStory(getApplicationContext());
if (true) {
startActivity(new android.cont... |
public void resetPlayers(spil.Player... playerArray) {
for (int i = 0, n = playerArray.length; i < n; i++) {
desktop_resources.GUI.removeAllCars(playerArray[i].getName());
placePlayer(playerArray[i], 12);
}
} | public void resetPlayers(spil.Player... playerArray) {
if ((playerArray.length) != 0) {
for (int i = 0, n = playerArray.length; i < n; i++) {
desktop_resources.GUI.removeAllCars(playerArray[i].getName());
placePlayer(playerArray[i], 12);
}
}
} |
public static void makeRequest(java.lang.String codeSection, java.lang.String regId, final org.esn.mobilit.utils.callbacks.Callback<retrofit.client.Response> callback) {
org.esn.mobilit.network.providers.PostRegProvider.PostRegServiceInterface postRegService = org.esn.mobilit.network.providers.PostRegProvider.restA... | public static void makeRequest(java.lang.String codeSection, java.lang.String regId, final org.esn.mobilit.utils.callbacks.Callback<retrofit.client.Response> callback) {
org.esn.mobilit.network.providers.PostRegProvider.PostRegServiceInterface postRegService = org.esn.mobilit.network.providers.PostRegProvider.restA... |
public java.lang.String getFailureCauseName() throws hudson.AbortException {
java.util.Collection<java.lang.String> causes = org.jenkinsci.plugins.periodicreincarnation.Utils.getAvailableFailureCausesIds();
com.sonyericsson.jenkins.plugins.bfa.model.FailureCause fc = org.jenkinsci.plugins.periodicreincarnation.... | public java.lang.String getFailureCauseName() throws hudson.AbortException {
com.sonyericsson.jenkins.plugins.bfa.model.FailureCause fc = org.jenkinsci.plugins.periodicreincarnation.Utils.getFailureCauseById(this.value);
if (fc == null)
throw new hudson.AbortException((("Failure Cause with id " + (this.... |
public void readBuf(io.netty.buffer.ByteBuf buffer) {
int pointsLen = buffer.readUnsignedShort();
if (pointsLen > 0) {
points = new chat.onmap.app.Netty.Protokol.Packs2Client.MapPoint[pointsLen];
for (int i = 0; i < pointsLen; i++) {
points[i] = ((chat.onmap.app.Netty.Protokol.Packs2... | public void readBuf(io.netty.buffer.ByteBuf buffer) {
int pointsLen = buffer.readUnsignedShort();
if (pointsLen > 0) {
points = new chat.onmap.app.Netty.Protokol.Packs2Client.MapPoint[pointsLen];
for (int i = 0; i < pointsLen; i++) {
points[i] = ((chat.onmap.app.Netty.Protokol.Packs2... |
public com.alibaba.fastjson.JSONArray outViewBubbleList() {
com.alibaba.fastjson.JSONArray result = new com.alibaba.fastjson.JSONArray();
for (com.alibaba.weex.plugin.gcanvas.bubble.BubbleAnimateWrapper wrapper : mWrapperList) {
com.alibaba.weex.plugin.gcanvas.bubble.BubblePosition position = wrapper.ge... | public com.alibaba.fastjson.JSONArray outViewBubbleList() {
com.alibaba.fastjson.JSONArray result = new com.alibaba.fastjson.JSONArray();
for (com.alibaba.weex.plugin.gcanvas.bubble.BubbleAnimateWrapper wrapper : mWrapperList) {
com.alibaba.weex.plugin.gcanvas.bubble.BubblePosition position = wrapper.ge... |
public void testDeleteobtainStringHashMap() throws java.text.ParseException {
Task.StringParser.getStringHashMap(COMMAND_TYPE.DELETE_TASK, "", keywordHash);
assertEquals(0, keywordHash.size());
Task.StringParser.getStringHashMap(COMMAND_TYPE.EDIT_TASK, "10", keywordHash);
assertEquals("10", keywordHash.... | public void testDeleteobtainStringHashMap() throws java.text.ParseException {
Task.StringParser.getStringHashMap(COMMAND_TYPE.DELETE_TASK, "", keywordHash);
assertEquals(1, keywordHash.size());
Task.StringParser.getStringHashMap(COMMAND_TYPE.EDIT_TASK, "10", keywordHash);
assertEquals("10", keywordHash.... |
public boolean onOptionsItemSelected(android.view.MenuItem item) {
if ((item.getItemId()) == (R.id.clear_search)) {
com.example.downloaderdemo.util.QueryPreferences.setSavedQueryString(getActivity(), null);
timber.log.Timber.i("Cleared shared prefs");
if ((com.example.downloaderdemo.fragment... | public boolean onOptionsItemSelected(android.view.MenuItem item) {
if ((item.getItemId()) == (R.id.clear_search)) {
if ((com.example.downloaderdemo.fragment.DownloadFragment.sRecentSuggestions) != null) {
com.example.downloaderdemo.fragment.DownloadFragment.ConfirmationDialogFragment dialog = ne... |
public void testNewWhenTheExpectedConstructorIsNotFound() throws java.lang.Exception {
final java.lang.Object object = new java.lang.Object();
try {
org.powermock.api.mockito.PowerMockito.whenNew(samples.expectnew.VarArgsConstructorDemo.class).withArguments(object);
org.junit.Assert.fail("Should... | public void testNewWhenTheExpectedConstructorIsNotFound() throws java.lang.Exception {
final java.lang.Object object = new java.lang.Object();
try {
whenNew(samples.expectnew.VarArgsConstructorDemo.class).withArguments(object);
org.junit.Assert.fail("Should throw ConstructorNotFoundException!");... |
public synchronized nz.org.nesi.common.db.project.pojo.Project getProjectByProjectCode(final java.lang.String projectCode) throws java.lang.Exception {
final nz.org.nesi.common.db.project.pojo.Project p = ((nz.org.nesi.common.db.project.pojo.Project) (getSqlSession().selectOne("getProjectByCode", projectCode)));
... | public synchronized nz.org.nesi.common.db.project.pojo.Project getProjectByProjectCode(final java.lang.String projectCode) throws java.lang.Exception {
final nz.org.nesi.common.db.project.pojo.Project p = ((nz.org.nesi.common.db.project.pojo.Project) (getSqlSession().selectOne("getProjectByCode", projectCode)));
... |
protected void encodeListInput(javax.faces.context.FacesContext context, java.lang.String clientId) throws java.io.IOException {
javax.faces.context.ResponseWriter writer = context.getResponseWriter();
writer.startElement("select", null);
writer.writeAttribute("id", clientId, null);
writer.writeAttribut... | protected void encodeListInput(javax.faces.context.FacesContext context, java.lang.String clientId) throws java.io.IOException {
javax.faces.context.ResponseWriter writer = context.getResponseWriter();
writer.startElement("select", null);
writer.writeAttribute("id", clientId, null);
writer.writeAttribut... |
public void handle(se.sics.gvod.core.msg.PlayReady resp) {
se.sics.gvod.manager.VoDManagerImpl.LOG.info("{} video:{} ready to play", logPrefix, resp.videoName);
vsMngrs.put(resp.videoName, resp.vsMngr);
com.google.common.util.concurrent.SettableFuture<java.lang.Boolean> myFuture = pendingJobs.remove(resp.id... | public void handle(se.sics.gvod.core.msg.PlayReady resp) {
se.sics.gvod.manager.VoDManagerImpl.LOG.info("{} video:{} ready to play", logPrefix, resp.videoName);
vsMngrs.put(resp.videoName, resp.vsMngr);
com.google.common.util.concurrent.SettableFuture<java.lang.Boolean> myFuture = pendingJobs.remove(resp.id... |
public void linkBoth(final com.syncleus.ferma.VertexFrame vertex, final java.lang.String... labels) {
for (final java.lang.String label : labels) {
vertex.getElement().addEdge(label, this.getElement(), null);
this.getElement().addEdge(label, vertex.getElement(), null);
}
} | public void linkBoth(final com.syncleus.ferma.VertexFrame vertex, final java.lang.String... labels) {
for (final java.lang.String label : labels) {
vertex.getElement().addEdge(label, this.getElement());
this.getElement().addEdge(label, vertex.getElement());
}
} |
public void CalculateChecksum() {
if (this.isVerify)
return ;
int CS = 0;
for (int i = 0; i < (this.position); i++)
CS += this.FrameData[i];
this.CheckSum = 255 - (CS & 255);
this.isVerify = true;
} | public void CalculateChecksum() {
if (this.isVerify)
return ;
int CS = 0;
for (int i = 0; i < (this.position); i++)
CS += this.FrameData[i];
this.CheckSum = (255 - CS) & 255;
this.isVerify = true;
} |
private void setDBSaveSummary(java.lang.String saveDate) {
int key = R.string.pkDBSave;
android.preference.Preference doDBSave = findPreference(de.aw.monma.preferences.PreferencesAllgemein.prefsArray.get(key));
java.lang.StringBuilder sb = new java.lang.StringBuilder(getString(R.string.lastSave)).append(": ... | private void setDBSaveSummary(java.lang.String saveDate) {
int key = R.string.pkDBSave;
android.preference.Preference doDBSave = findPreference(getString(key));
java.lang.StringBuilder sb = new java.lang.StringBuilder(getString(R.string.lastSave)).append(": ");
if (saveDate == null) {
sb.append(... |
public void insertBack(java.lang.Object arg, icse.singlylinkedlist.SinglyLinkedListNode freshNode) {
freshNode.value = arg;
freshNode.next.next = null;
if ((this.header) == null) {
header.next = freshNode;
}else {
icse.singlylinkedlist.icse.singlylinkedlist.SinglyLinkedListNode current;
... | public void insertBack(java.lang.Object arg, icse.singlylinkedlist.SinglyLinkedListNode freshNode) {
freshNode.value = arg;
freshNode.next.next = null;
if ((this.header) != null) {
header.next = freshNode;
}else {
icse.singlylinkedlist.icse.singlylinkedlist.SinglyLinkedListNode current;
... |
public void onSensorChanged(android.hardware.SensorEvent event) {
if ((event.sensor.getType()) == (android.hardware.Sensor.TYPE_ACCELEROMETER)) {
io.github.kajdreef.smartphonesensing.Sensor.Accelerometer.gravity[0] = event.values[0];
io.github.kajdreef.smartphonesensing.Sensor.Accelerometer.gravity[... | public void onSensorChanged(android.hardware.SensorEvent event) {
if ((event.sensor.getType()) == (android.hardware.Sensor.TYPE_ACCELEROMETER)) {
io.github.kajdreef.smartphonesensing.Sensor.Accelerometer.gravity[0] = event.values[0];
io.github.kajdreef.smartphonesensing.Sensor.Accelerometer.gravity[... |
public void run() {
if (((switchcmd.equals(eu.masar.decster.MainActivity.switchcmds.SWITCH_ON)) || (switchcmd.equals(eu.masar.decster.MainActivity.switchcmds.SWITCH_OFF))) || (switchcmd.equals(eu.masar.decster.MainActivity.switchcmds.SWITCH_GET))) {
buttonToggleDevice.setChecked(result.contains("1"));
}... | public void run() {
if (result != null) {
if (((switchcmd.equals(eu.masar.decster.MainActivity.switchcmds.SWITCH_ON)) || (switchcmd.equals(eu.masar.decster.MainActivity.switchcmds.SWITCH_OFF))) || (switchcmd.equals(eu.masar.decster.MainActivity.switchcmds.SWITCH_GET))) {
buttonToggleDevice.setCh... |
public static void postToPage(java.lang.String url, java.lang.String postBody) {
try {
java.net.HttpURLConnection con = ((java.net.HttpURLConnection) (new java.net.URL(url).openConnection()));
con.setRequestMethod("POST");
con.setDoOutput(true);
con.setRequestProperty("Content-Type",... | public static void postToPage(java.lang.String url, java.lang.String postBody) {
try {
java.net.HttpURLConnection con = ((java.net.HttpURLConnection) (new java.net.URL(url).openConnection()));
con.setRequestMethod("POST");
con.setDoOutput(true);
con.setRequestProperty("Content-Type",... |
public boolean equals(java.lang.Object obj) {
ch.unige.pinfo.device.dom.Device device = ((ch.unige.pinfo.device.dom.Device) (obj));
if (device == null)
return false;
return (this.getDeviceId().equals(device.deviceId)) && (this.getType().equals(device.type));
} | public boolean equals(java.lang.Object obj) {
if (obj == null) {
return false;
}
if ((this.getClass()) != (obj.getClass())) {
return false;
}
ch.unige.pinfo.device.dom.Device device = ((ch.unige.pinfo.device.dom.Device) (obj));
return (this.getDeviceId().equals(device.deviceId)) ... |
private boolean isSimplified(java.lang.String exp) {
if (exp.contains("("))
return false;
java.util.ArrayList<java.util.ArrayList<term.Term>> likeTerms = sortTerms(getTerms(exp));
for (java.util.ArrayList<term.Term> l : likeTerms) {
if ((l.size()) > 1)
return false;
... | private boolean isSimplified(java.lang.String exp) {
if (exp.contains("("))
return false;
java.util.ArrayList<java.util.ArrayList<term.Term>> likeTerms = sortTerms(getTerms(exp));
for (java.util.ArrayList<term.Term> l : likeTerms) {
if (((l.size()) > 1) || (!(l.get(0).toString().equals(... |
public boolean exists(java.lang.String key) throws java.sql.SQLException, org.pi.litepost.databaseAccess.DatabaseCriticalErrorException {
if ((sessionId) != null) {
java.sql.ResultSet rs = model.getQueryManager().executeQuery("sessionKeyExists", sessionId, key);
return (rs.next()) && ((rs.getInt(0))... | public boolean exists(java.lang.String key) throws java.sql.SQLException, org.pi.litepost.databaseAccess.DatabaseCriticalErrorException {
if ((sessionId) != null) {
java.sql.ResultSet rs = model.getQueryManager().executeQuery("sessionKeyExists", sessionId, key);
return (rs.next()) && ((rs.getInt(1))... |
public void mouseDragged(java.awt.event.MouseEvent e) {
if (mCont.mouseMoved(((e.getWhen()) * 1000L), bits.glui.AwtEventTranslator.modsFor(e), e.getX(), (((mSource.getHeight()) - 1) - (e.getY())))) {
e.consume();
}
} | public void mouseDragged(java.awt.event.MouseEvent e) {
if (mCont.mouseMoved(((e.getWhen()) * 1000L), bits.glui.AwtEventTranslator.modsFor(e), e.getX(), ((mSource.getHeight()) - (e.getY())))) {
e.consume();
}
} |
protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException {
java.lang.String status = request.getParameter("status");
int orderID = java.lang.Integer.parseInt(request.getParameter("orderID"));
... | protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException {
java.lang.String status = request.getParameter("status");
int orderID = java.lang.Integer.parseInt(request.getParameter("orderID"));
... |
public void performSearch() throws nl.ru.crpx.search.QueryException {
try {
if ((crpThis) == null) {
errHandle.DoError("There is no CRP");
return ;
}
if (this.objEx.ExecuteQueriesFile(this, intCrpFileId)) {
if (errHandle.bInterrupt) {
errHa... | public void performSearch() throws nl.ru.crpx.search.QueryException {
try {
if ((crpThis) == null) {
errHandle.DoError("There is no CRP");
return ;
}
if (objEx.ExecuteQueriesFile(this, intCrpFileId)) {
if (errHandle.bInterrupt) {
errHandle.... |
protected void updateControls() {
android.graphics.drawable.Drawable icon;
if ((getCurrentState()) == (State.STARTED)) {
icon = context.getResources().getDrawable(R.drawable.fvl_selector_pause);
}else {
icon = context.getResources().getDrawable(R.drawable.fvl_selector_play);
}
imgpla... | protected void updateControls() {
if ((imgplay) == null)
return ;
android.graphics.drawable.Drawable icon;
if ((getCurrentState()) == (State.STARTED)) {
icon = context.getResources().getDrawable(R.drawable.fvl_selector_pause);
}else {
icon = context.getResources().getDrawabl... |
public java.lang.Integer addDepo(com.epam.project.model.Depo depo) throws org.springframework.dao.DataAccessException {
com.epam.project.serviceimpl.DepoServiceImpl.LOGGER.debug("addDepo", depo);
org.springframework.util.Assert.hasText(depo.getName(), "must have name");
java.lang.Integer id;
try {
... | public java.lang.Integer addDepo(com.epam.project.model.Depo depo) throws org.springframework.dao.DataAccessException {
com.epam.project.serviceimpl.DepoServiceImpl.LOGGER.debug("addDepo", depo);
org.springframework.util.Assert.hasText(depo.getName(), "must have name");
java.lang.Integer id;
try {
... |
private void render(int offset) {
float range = state.range;
if (range == 0) {
for (org.vaadin.sonarwidget.widgetset.client.ui.ImageRenderer renderer : renderers) {
if (renderer.isVisible(offset)) {
if ((renderer.getMaxDepthArea()) > range) {
range = rende... | public void render(int offset) {
float range = state.range;
if (range == 0) {
for (org.vaadin.sonarwidget.widgetset.client.ui.ImageRenderer renderer : renderers) {
if (renderer.isVisible(offset)) {
if ((renderer.getMaxDepthArea()) > range) {
range = render... |
public void onBlur(com.google.gwt.event.dom.client.BlurEvent event) {
if (((permittedNw.getText().trim().length()) != 0) && (!(permittedNw.getText().trim().matches(FieldType.NETWORK.getRegex())))) {
groupPermittedNw.setValidationState(ValidationState.ERROR);
}else {
groupPermittedNw.setValidatio... | public void onBlur(com.google.gwt.event.dom.client.BlurEvent event) {
if ((!(permittedNw.getText().trim().isEmpty())) && (!(permittedNw.getText().trim().matches(FieldType.NETWORK.getRegex())))) {
groupPermittedNw.setValidationState(ValidationState.ERROR);
}else {
groupPermittedNw.setValidationSt... |
createLevelBtn.addActionListener(new controllers.CreateLevelBtnController(this, b));
for (view.ExistingLevelView elv : viewerAndEditor.getExistingLevelButtons()) {
elv.addActionListener(new controllers.ExistingLevelEditController());
}
for (view.LevelTypeToggle ltt : levelTypesAndText.getLevelTy... | createLevelBtn.addActionListener(new controllers.CreateLevelBtnController(b));
for (view.ExistingLevelView elv : viewerAndEditor.getExistingLevelButtons()) {
elv.addActionListener(new controllers.ExistingLevelEditController());
}
for (view.LevelTypeToggle ltt : levelTypesAndText.getLevelTypeButt... |
private void runAssignment(org.w3c.dom.Node node) {
org.w3c.dom.Node identifier = node.getChildNodes().item(0);
org.w3c.dom.Node expression = node.getChildNodes().item(1);
mt.edu.um.cs.cps2000.runtime.VariableStruct var = stackFrames.peek().getVariable(identifier.getTextContent());
var.setValue(runExpre... | private void runAssignment(org.w3c.dom.Node node) {
org.w3c.dom.Node identifier = node.getChildNodes().item(0);
org.w3c.dom.Node expression = node.getChildNodes().item(1);
mt.edu.um.cs.cps2000.runtime.VariableStruct var = stackFrames.peek().getVariable(identifier.getTextContent());
var.setValue(runExpre... |
public java.util.Map<java.lang.Object, java.lang.Double> classDistribution(net.sf.javaml.core.Instance inst) {
double min = java.lang.Double.POSITIVE_INFINITY;
net.sf.javaml.distance.EuclideanDistance ed = new net.sf.javaml.distance.EuclideanDistance();
int index = 0;
for (int i = 0; i < (centroids.leng... | public java.util.Map<java.lang.Object, java.lang.Double> classDistribution(net.sf.javaml.core.Instance inst) {
double min = java.lang.Double.POSITIVE_INFINITY;
net.sf.javaml.distance.EuclideanDistance ed = new net.sf.javaml.distance.EuclideanDistance();
int index = 0;
for (int i = 0; i < (centroids.leng... |
protected boolean onViewClicked(final android.view.View myView) {
com.ameron32.apps.tapnotes.v2.ui.mc_adapter.ProgramAdapter.ChildViewHolder h = null;
if ((myView.getTag()) instanceof com.ameron32.apps.tapnotes.v2.ui.mc_adapter.ProgramAdapter.ChildViewHolder)
h = ((com.ameron32.apps.tapnotes.v2.ui.mc_ad... | protected boolean onViewClicked(final android.view.View myView) {
com.ameron32.apps.tapnotes.v2.ui.mc_adapter.ProgramAdapter.ChildViewHolder h = null;
if ((myView.getTag()) instanceof com.ameron32.apps.tapnotes.v2.ui.mc_adapter.ProgramAdapter.ChildViewHolder)
h = ((com.ameron32.apps.tapnotes.v2.ui.mc_ad... |
public void EmptyFileData() throws com.itextpdf.text.DocumentException, java.io.IOException {
Project.DataTester.EmptyFile = Project.DataToArray.textToArray("EmptyFile.txt");
emptyResult = (Project.DataTester.EmptyFile.isEmpty()) ? true : false;
barResult = ((Project.DataTester.EmptyFile.size()) == 0) ? tru... | public void EmptyFileData() throws com.itextpdf.text.DocumentException, java.io.IOException {
java.io.File[] file = new java.io.File[]{ new java.io.File("EmptyFile.txt") };
Project.DataTester.EmptyFile = Project.DataToArray.textToArray(file);
emptyResult = (Project.DataTester.EmptyFile.isEmpty()) ? true : f... |
public boolean evaluate(org.wso2.andes.server.queue.QueueEntry message) throws org.wso2.andes.kernel.AndesException {
long messageID = message.getMessage().getMessageNumber();
org.wso2.andes.kernel.ProtocolMessage protocolMessage = ((org.wso2.andes.server.message.AMQMessage) (message.getMessage())).getAndesMeta... | public boolean evaluate(org.wso2.andes.server.queue.QueueEntry message) throws org.wso2.andes.kernel.AndesException {
long messageID = message.getMessage().getMessageNumber();
org.wso2.andes.kernel.ProtocolMessage protocolMessage = ((org.wso2.andes.server.message.AMQMessage) (message.getMessage())).getAndesMeta... |
public static void main(java.lang.String[] args) {
logger.debug("Hello World GitHub - Master Updated Again!");
java.lang.String str = "Hello World";
java.lang.String anotherString = "hello world";
java.lang.Object objStr = str;
java.lang.System.out.println(str.compareTo(anotherString));
java.lan... | public static void main(java.lang.String[] args) {
java.lang.String str = "Hello World";
java.lang.String anotherString = "hello world";
java.lang.Object objStr = str;
java.lang.System.out.println(str.compareTo(anotherString));
java.lang.System.out.println(str.compareToIgnoreCase(anotherString));
... |
public wyc.builder.Nominal resolveAsType(wyc.builder.SyntacticType type, wyc.lang.WhileyFile.Context context) {
wyil.lang.Type nominalType = resolveAsType(type, context, true, false);
wyil.lang.Type rawType = resolveAsType(type, context, false, false);
wyc.builder.Nominal r = wyc.builder.Nominal.construct(n... | public wyc.builder.Nominal resolveAsType(wyc.builder.SyntacticType type, wyc.lang.WhileyFile.Context context) {
wyil.lang.Type nominalType = resolveAsType(type, context, true, false);
wyil.lang.Type rawType = resolveAsType(type, context, false, false);
return wyc.builder.Nominal.construct(nominalType, rawTy... |
public void onInteractorsResourceChanged(org.reactome.web.diagram.client.InteractorsResourceChangedEvent event) {
context.getContent().clearDisplayedInteractors();
if (context.getInteractors().isInteractorResourceCached(event.getResource())) {
org.reactome.web.diagram.util.MapSet<java.lang.String, org.r... | public void onInteractorsResourceChanged(org.reactome.web.diagram.client.InteractorsResourceChangedEvent event) {
context.getContent().clearDisplayedInteractors();
if (context.getInteractors().isInteractorResourceCached(event.getResource())) {
context.getInteractors().restoreInteractorsSummary(event.get... |
protected int delete(java.lang.String table, java.lang.String whereClause) {
int rowsAffected = 0;
if (com.spiddekauga.android.sqlite.SqliteGateway.isInitialized()) {
android.database.sqlite.SQLiteDatabase db = com.spiddekauga.android.sqlite.SqliteGateway.mSqlite.getWritableDatabase();
rowsAffec... | protected int delete(java.lang.String table, java.lang.String whereClause) {
int rowsAffected = 0;
if (com.spiddekauga.android.sqlite.SqliteGateway.isInitialized()) {
android.database.sqlite.SQLiteDatabase db = com.spiddekauga.android.sqlite.SqliteGateway.mSqlite.getWritableDatabase();
rowsAffec... |
public boolean onMarkerClick(final com.google.android.gms.maps.model.Marker marker) {
if (mDeleteMode) {
com.task.pins.entity.Pin pin = new com.task.pins.entity.Pin(mUserId, marker.getPosition());
changePinsSelection(pin);
changeMarkerSelection(marker, pin);
}else {
moveCameraToL... | public boolean onMarkerClick(final com.google.android.gms.maps.model.Marker marker) {
if (mDeleteMode) {
com.task.pins.entity.Pin pin = new com.task.pins.entity.Pin(mUserId, marker.getPosition());
changeMarkerSelection(marker, pin);
}else {
moveCameraToLocation(marker.getPosition(), com.... |
public boolean create_reminder(android.content.Context context, com.nego.flite.database.DbAdapter dbHelper) {
com.nego.flite.Functions.AlarmF.addAlarm(context, this.getId(), this.getAlarm(), this.getAlarm_repeat());
if ((dbHelper.createReminder(this)) > 0) {
return true;
}
return false;
} | public boolean create_reminder(android.content.Context context, com.nego.flite.database.DbAdapter dbHelper) {
this.id = ((int) (dbHelper.createReminder(this)));
if ((id) > 0) {
com.nego.flite.Functions.AlarmF.addAlarm(context, this.getId(), this.getAlarm(), this.getAlarm_repeat());
return true;
... |
protected java.lang.Float doInBackground(java.lang.Void... params) {
float currentBrightness = brightness;
if ((screenFadeTime) > 0) {
final long millis = (screenFadeTime) / (com.zhun.sununtouch.smart_sunrise.AlarmActivity.BRIGHTNESS_STEPS);
currentBrightness = 0.0F;
while (currentBright... | protected java.lang.Void doInBackground(java.lang.Void... params) {
float currentBrightness = brightness;
if ((screenFadeTime) > 0) {
final long millis = (screenFadeTime) / (com.zhun.sununtouch.smart_sunrise.AlarmActivity.BRIGHTNESS_STEPS);
currentBrightness = 0.0F;
while (currentBrightn... |
public void init(java.lang.String map_name, int start_x, int start_y, float health_max, float health_current, float health_regen) {
map_handler.handlerInit(map_name);
entity_handler.handlerInit(start_x, start_y, healthbar_max, healthbar_current, healthbar_regen);
camera_handler.handlerInit();
collision_... | public void init(java.lang.String map_name, int start_x, int start_y, float health_max, float health_current, float health_regen) {
map_handler.handlerInit(map_name);
entity_handler.handlerInit(map_name, start_x, start_y, health_max, health_current, health_regen);
camera_handler.handlerInit();
collision... |
private void moveUp() {
java.lang.String[] pathParts = splitPath();
java.lang.String path = (systemIsWindows()) ? pathParts[0] : ChangeDirectoryCommand.PATTERN_ROOT_UNIX;
java.lang.StringBuilder stringBuilder = new java.lang.StringBuilder(path);
if (systemIsWindows()) {
moveUpWindowsPath(pathPar... | private void moveUp() {
java.lang.String[] pathParts = splitPath();
java.lang.String path = (systemIsWindows()) ? pathParts[0] : ChangeDirectoryCommand.PATTERN_ROOT_UNIX;
if (systemIsWindows()) {
moveUpWindowsPath(pathParts);
}else {
moveUpUnixPath(pathParts);
}
} |
private boolean touchingRight() {
boolean c1 = (collider.getLeft()) >= (collidee.getRight());
boolean c2 = (collider.getLeft()) <= ((collidee.getRight()) - (Constants.COLLISION_PRECISION));
return ((colliding()) && c1) && c2;
} | private boolean touchingRight() {
boolean c1 = (collider.getLeft()) >= ((collidee.getRight()) - (Constants.COLLISION_PRECISION));
boolean c2 = (collider.getLeft()) <= (collidee.getRight());
return ((colliding()) && c1) && c2;
} |
public void onBindViewHolder(final com.christian.adapter.HomeAdapter.ViewHolder viewHolder, int position) {
int adapterPosition = viewHolder.getAdapterPosition();
android.view.animation.Animation animation = android.view.animation.AnimationUtils.loadAnimation(viewHolder.itemView.getContext(), (adapterPosition >... | public void onBindViewHolder(final com.christian.adapter.HomeAdapter.ViewHolder viewHolder, int position) {
int adapterPosition = viewHolder.getAdapterPosition();
android.view.animation.Animation animation = android.view.animation.AnimationUtils.loadAnimation(viewHolder.itemView.getContext(), (adapterPosition >... |
public boolean setCalsPerDay() {
calPerDay = etCalPerDay.getText().toString().trim();
editor.putString(Constants.CALORIES_PER_DAY, calPerDay);
editor.apply();
android.util.Log.d("check", sPreferences.getString(Constants.CALORIES_PER_DAY, "0"));
tvLeftCals.setText(calDiff());
return false;
} | public boolean setCalsPerDay() {
calPerDay = etCalPerDay.getText().toString().trim();
editor.putString(Constants.CALORIES_PER_DAY, calPerDay);
editor.apply();
tvLeftCals.setText(calDiff());
return false;
} |
public void checkRule8(java.lang.String bookId, final com.order.databean.RulesCallback.RulesCallback callback) {
if ((orderType) != 2) {
return ;
}
int orderPvs = bookOrderPv.sizeOfBookOrderTimesWithOrderType(bookId, 2);
int readPvs = bookReadPv.sizeWithTimeThreshold(bookId, lastUpdateTime, Cons... | public void checkRule8(java.lang.String bookId, final com.order.databean.RulesCallback.RulesCallback callback) {
if ((orderType) != 2) {
return ;
}
int orderPvs = bookOrderPv.sizeOfBookOrderTimesWithOrderType(bookId, 2);
int readPvs = bookReadPv.sizeWithTimeThreshold(bookId, lastUpdateTime, Cons... |
public static org.bukkit.block.Block getNearCauldron(io.github.davidg95.equestricraftplugin.MyHorse horse) {
final org.bukkit.entity.Horse h = horse.getHorse();
for (org.bukkit.block.Block b : io.github.davidg95.equestricraftplugin.MyHorse.getNearbyBlocks(h)) {
if ((b.getType()) == (org.bukkit.Material.... | public static org.bukkit.block.Block getNearCauldron(io.github.davidg95.equestricraftplugin.MyHorse horse) {
if ((horse == null) || ((horse.getHorse()) == null)) {
return null;
}
final org.bukkit.entity.Horse h = horse.getHorse();
for (org.bukkit.block.Block b : io.github.davidg95.equestricraftp... |
public void decodeAFP(byte[] sfData, int offset, int length, com.mgz.afp.parser.AFPParserConfiguration config) throws com.mgz.afp.exceptions.AFPParserException {
length = com.mgz.util.UtilBinaryDecoding.parseShort(sfData, offset, 1);
tripletID = com.mgz.afp.triplets.Triplet.TripletID.valueOf(com.mgz.util.UtilBi... | public void decodeAFP(byte[] sfData, int offset, int length, com.mgz.afp.parser.AFPParserConfiguration config) throws com.mgz.afp.exceptions.AFPParserException {
this.length = com.mgz.util.UtilBinaryDecoding.parseShort(sfData, offset, 1);
this.tripletID = com.mgz.afp.triplets.Triplet.TripletID.valueOf(com.mgz.u... |
public void setNewMode(@org.springframework.web.bind.annotation.RequestParam
java.lang.String displayElementType, @org.springframework.web.bind.annotation.RequestParam
java.lang.String requestType, @org.springframework.web.bind.annotation.RequestParam(required = false)
java.lang.String groupedBy) {
io.mlh.controlle... | public void setNewMode(@org.springframework.web.bind.annotation.RequestParam
java.lang.String displayElementType, @org.springframework.web.bind.annotation.RequestParam
java.lang.String requestType, @org.springframework.web.bind.annotation.RequestParam(required = false)
java.lang.String groupedBy) {
io.mlh.controlle... |
protected void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws java.io.IOException, javax.servlet.ServletException {
req.setAttribute(com.dmmsoft.ConstantsProvider.FUND_COUNT, container.getMainContainer().getCurrenciesCount());
req.setAttribute(com.dmmsoft.Co... | protected void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws java.io.IOException, javax.servlet.ServletException {
req.setAttribute(com.dmmsoft.ConstantsProvider.CURRENCY_COUNT, container.getMainContainer().getCurrenciesCount());
req.setAttribute(com.dmmsof... |
private void setSettings() throws java.sql.SQLException {
if ((kvr.getKeyValue("userGender").getString(0)) != "Gender")
spGender.setSelection(genderAdapter.getPosition(kvr.getKeyValue("userGender").getString(0)));
etName.setText(kvr.getKeyValue("userName").getString(0));
} | private void setSettings() throws java.sql.SQLException {
if ((kvr.getKeyValue("userGender").getString(1)) != "Gender")
spGender.setSelection(genderAdapter.getPosition(kvr.getKeyValue("userGender").getString(1)));
etName.setText(kvr.getKeyValue("userName").getString(1));
} |
public void checkPlayer() {
for (int k = 0; k < (players.size()); k++) {
Player person = players.get(k);
if (((person.getUnitList().size()) == 0) && ((person.getAmountOfMoney()) < 100)) {
players.remove(k);
k--;
}
}
} | public void checkPlayer() {
for (int k = 0; k < (players.size()); k++) {
Player person = players.get(k);
if (person != null) {
if (((person.getUnitList().size()) == 0) && ((person.getAmountOfMoney()) < 100)) {
players.set(k, null);
}
}
}
} |
public void actionPerformed(java.awt.event.ActionEvent e) {
javax.swing.JFileChooser pdfFc = new javax.swing.JFileChooser();
pdfFc.setDialogTitle("Locate folder for PDF-outputfile");
pdfFc.setAcceptAllFileFilterUsed(false);
pdfFc.setFileSelectionMode(javax.swing.JFileChooser.DIRECTORIES_ONLY);
if ((... | public void actionPerformed(java.awt.event.ActionEvent e) {
javax.swing.JFileChooser pdfFc = new javax.swing.JFileChooser();
pdfFc.setDialogTitle("Locate folder for PDF-outputfile");
pdfFc.setAcceptAllFileFilterUsed(false);
pdfFc.setFileSelectionMode(javax.swing.JFileChooser.DIRECTORIES_ONLY);
if ((... |
public android.view.View onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState) {
com.fred.inventory.databinding.ItemBinding binding = android.databinding.DataBindingUtil.inflate(inflater, R.layout.item, container, false);
com.fred.inventory.Ma... | public android.view.View onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState) {
com.fred.inventory.databinding.ItemBinding binding = android.databinding.DataBindingUtil.inflate(inflater, R.layout.item, container, false);
com.fred.inventory.Ma... |
private it.isislab.dmason.experimentals.systemmanagement.worker.WorkerInfo getInfoWorker() {
it.isislab.dmason.experimentals.systemmanagement.worker.WorkerInfo info = new it.isislab.dmason.experimentals.systemmanagement.worker.WorkerInfo();
info.setIP(it.isislab.dmason.experimentals.systemmanagement.worker.Work... | private it.isislab.dmason.experimentals.systemmanagement.worker.WorkerInfo getInfoWorker() {
it.isislab.dmason.experimentals.systemmanagement.worker.WorkerInfo info = new it.isislab.dmason.experimentals.systemmanagement.worker.WorkerInfo();
info.setIP(it.isislab.dmason.experimentals.systemmanagement.worker.Work... |
protected boolean isCollectFile(java.lang.String[] targetExts, java.lang.String targetKeyword, java.util.List<java.lang.String> exceptPathList, java.io.File currentFile) {
if (isExceptFile(exceptPathList, currentFile)) {
return false;
}
for (java.lang.String ext : targetExts) {
return isHitB... | protected boolean isCollectFile(java.lang.String[] targetExts, java.lang.String targetKeyword, java.util.List<java.lang.String> exceptPathList, java.io.File currentFile) {
if (isExceptFile(exceptPathList, currentFile)) {
return false;
}
for (java.lang.String ext : targetExts) {
if (isHitByTa... |
public LinkedList<Node> applyOperators(Node node) {
for (Char operator : operators) {
if (facingEdge(node)) {
switch (operator) {
case 'R' :
rotateRight(Node);
break;
case 'L' :
rotateLeft(Node);
... | public LinkedList<Node> applyOperators(Node node) {
for (Char operator : operators) {
if (facingEdge(node)) {
switch (operator) {
case 'R' :
rotateRight(node);
break;
case 'L' :
rotateLeft(node);
... |
public static long deriveLong(byte[] key) {
java.nio.ByteBuffer buffer = java.nio.ByteBuffer.allocate(((java.lang.Long.SIZE) / (java.lang.Byte.SIZE)));
buffer.put(key);
buffer.flip();
return buffer.getLong();
} | public static long deriveLong(byte[] key) {
java.nio.ByteBuffer buffer = java.nio.ByteBuffer.allocate(((java.lang.Long.SIZE) / (java.lang.Byte.SIZE)));
buffer.put(key, 0, ((java.lang.Long.SIZE) / (java.lang.Byte.SIZE)));
buffer.flip();
return buffer.getLong();
} |
public boolean onOptionsItemSelected(android.view.MenuItem item) {
switch (item.getItemId()) {
case R.id.action_search :
android.util.Log.d("Click", "Hua re baab");
android.content.Intent i = new android.content.Intent(this.getActivity(), sodevan.lafly.addNewEvent.class);
... | public boolean onOptionsItemSelected(android.view.MenuItem item) {
switch (item.getItemId()) {
case R.id.action_search :
android.util.Log.d("Click", "Hua re baab");
android.content.Intent i = new android.content.Intent(getContext(), sodevan.lafly.addNewEvent.class);
start... |
public static byte[] getPskToken() {
try {
java.security.SecureRandom sr = java.security.SecureRandom.getInstanceStrong();
byte[] nonce = new byte[16];
sr.nextBytes(nonce);
return nonce;
} catch (java.security.NoSuchAlgorithmException nsa) {
throw new java.lang.RuntimeExc... | private static byte[] getPskToken() {
try {
java.security.SecureRandom sr = java.security.SecureRandom.getInstanceStrong();
byte[] nonce = new byte[16];
sr.nextBytes(nonce);
return nonce;
} catch (java.security.NoSuchAlgorithmException nsa) {
throw new java.lang.RuntimeEx... |
public void spawnEast(int offX, int offY, int width) {
java.awt.Graphics2D e2d = backImage.createGraphics();
e2d.drawImage(this.getEast(), offX, offY, width, this.getEast().getHeight(), null);
updateGeneratedImage();
} | public java.lang.String spawnEast(int offX, int offY, int width) {
java.awt.Graphics2D e2d = backImage.createGraphics();
e2d.drawImage(this.getEast(), offX, offY, width, this.getEast().getHeight(), null);
java.lang.String name = updateGeneratedImage();
return name;
} |
public static void clearImageCacheForMediaEntity(org.tinymediamanager.core.entities.MediaEntity entity) {
java.util.List<org.tinymediamanager.core.entities.MediaFile> mediaFiles = new java.util.ArrayList(entity.getMediaFiles());
for (org.tinymediamanager.core.entities.MediaFile mediaFile : mediaFiles) {
... | public static void clearImageCacheForMediaEntity(org.tinymediamanager.core.entities.MediaEntity entity) {
java.util.List<org.tinymediamanager.core.entities.MediaFile> mediaFiles = new java.util.ArrayList(entity.getMediaFiles());
for (org.tinymediamanager.core.entities.MediaFile mediaFile : mediaFiles) {
... |
private void initUserItems(javafx.scene.layout.HBox container, javafx.scene.Node[] elements) {
container.setAlignment(javafx.geometry.Pos.CENTER);
container.setMinWidth(300);
loginLink.setVisible(true);
signupLink.setVisible(true);
usernameLink.setVisible(false);
myOrdrdesLink.setVisible(false);... | private void initUserItems(javafx.scene.layout.HBox container, javafx.scene.Node[] elements) {
container.setAlignment(javafx.geometry.Pos.CENTER);
container.setMinWidth(300);
loginLink.setVisible(true);
signupLink.setVisible(true);
usernameLink.setVisible(false);
myOrdrdesLink.setVisible(false);... |
public static void main(java.lang.String[] args) throws java.rmi.RemoteException {
try {
java.rmi.registry.Registry referenciaServicoNomes = java.rmi.registry.LocateRegistry.getRegistry(9898);
rmi.InterfaceServ refServenteServidor = ((rmi.InterfaceServ) (referenciaServicoNomes.lookup("ServenteServ")... | public static void main(java.lang.String[] args) throws java.rmi.RemoteException {
try {
java.rmi.registry.Registry referenciaServicoNomes = java.rmi.registry.LocateRegistry.getRegistry(9898);
rmi.InterfaceServ refServenteServidor = ((rmi.InterfaceServ) (referenciaServicoNomes.lookup("ServenteServ")... |
private double mintermCountUpperBound(espresso.boolFunction.Cover cover) {
double retValue = 0;
for (espresso.boolFunction.cube.Cube cube : cover) {
int dontcareCount = 0;
for (int i = 0; i < (cube.inputLength()); ++i) {
if ((cube.getInputState(0)) == (espresso.boolFunction.InputStat... | private static double mintermCountUpperBound(espresso.boolFunction.Cover cover) {
double retValue = 0;
for (espresso.boolFunction.cube.Cube cube : cover) {
int dontcareCount = 0;
for (int i = 0; i < (cube.inputLength()); ++i) {
if ((cube.getInputState(i)) == (espresso.boolFunction.In... |
public void mousePressed(bms.player.beatoraja.MainState state, int button, int x, int y) {
for (bms.player.beatoraja.skin.SkinObject obj : objects) {
if (isDraw(obj.getOption(), state)) {
obj.mousePressed(state, button, x, y);
}
}
} | public void mousePressed(bms.player.beatoraja.MainState state, int button, int x, int y) {
for (int i = (objects.size()) - 1; i >= 0; i--) {
final bms.player.beatoraja.skin.SkinObject obj = objects.get(i);
if ((isDraw(obj.getOption(), state)) && (obj.mousePressed(state, button, x, y))) {
... |
public java.lang.Boolean createRoomInUserList(java.lang.Integer userId, java.lang.Integer roomId) {
java.lang.Integer seqId = super.getIdFromSequencer("USERS_ROOMS_SEQ");
java.lang.String query = "INSERT INTO CHAT.USERS_ROOMS VALUES (?, ?, ?)";
commons.dao.ChatUserDaoImpl.log.info((((((((query + " [seqId=")... | public java.lang.Boolean createRoomInUserList(java.lang.Integer userId, java.lang.Integer roomId) {
java.lang.Integer seqId = super.getIdFromSequencer();
java.lang.String query = "INSERT INTO CHAT.USERS_ROOMS VALUES (?, ?, ?)";
commons.dao.ChatUserDaoImpl.log.info((((((((query + " [seqId=") + seqId) + ", us... |
public void steerLeft() {
startTimerIfNotStarted();
this.steerReleased = false;
if ((timer.getDuration()) > (timeStep)) {
if ((state) >= ((hu.oe.nik.szfmv17t.automatedcar.hmi.SteeringWheel.maxLeft) + (steeringStep))) {
state -= steeringStep;
automaticIndicationLeft();
... | public void steerLeft() {
startTimerIfNotStarted();
this.steerReleased = false;
if ((timer.getDuration()) > (timeStep)) {
if ((state) >= ((hu.oe.nik.szfmv17t.automatedcar.hmi.SteeringWheel.maxLeft) + (steeringStep))) {
state -= steeringStep;
}
this.start();
}
} |
private com.tsystems.javaschool.logiweb.entities.Driver populateAllowedDriverFieldsFromModel(com.tsystems.javaschool.logiweb.entities.Driver driverToPopulate, com.tsystems.javaschool.logiweb.model.DriverModel source) {
com.tsystems.javaschool.logiweb.entities.City city = new com.tsystems.javaschool.logiweb.entities... | private com.tsystems.javaschool.logiweb.entities.Driver populateAllowedDriverFieldsFromModel(com.tsystems.javaschool.logiweb.entities.Driver driverToPopulate, com.tsystems.javaschool.logiweb.model.DriverModel source) {
com.tsystems.javaschool.logiweb.entities.City city = new com.tsystems.javaschool.logiweb.entities... |
public void onClick(android.view.View v) {
android.widget.Toast.makeText(getApplicationContext(), "CALL ACTION", Toast.LENGTH_SHORT).show();
java.lang.String phone = mPhone.getText().toString();
android.content.Intent intent = new android.content.Intent(android.content.Intent.ACTION_CALL);
intent.setDat... | public void onClick(android.view.View v) {
java.lang.String phone = mPhone.getText().toString();
android.content.Intent intent = new android.content.Intent(android.content.Intent.ACTION_CALL);
intent.setData(android.net.Uri.parse(("tel:" + phone)));
try {
startActivity(intent);
} catch (java... |
protected void onPreExecute() {
super.onPreExecute();
tableLayout.removeAllViews();
tvGrandTotal.setText("");
tvGrandTotalComm.setText("");
android.widget.TextView TvAgentId = ((android.widget.TextView) (findViewById(R.id.txt_agent_id)));
pDialog = new android.app.ProgressDialog(this);
pDial... | protected void onPreExecute() {
super.onPreExecute();
tableLayout.removeAllViews();
tvGrandTotal.setText("");
tvGrandTotalComm.setText("");
android.widget.TextView TvAgentId = ((android.widget.TextView) (findViewById(R.id.txt_agent_id)));
pDialog = android.app.ProgressDialog.show(this, "", "Send... |
public edu.jalc.automobile.onlinebuilder.builders.dodgeram.ram1500.builders.TruckDodgeRamBuilderInterface askForTruckDrive() {
edu.jalc.automobile.onlinebuilder.builders.dodgeram.ram1500.builders.TerminalPrompterBuilder truckDrivePrompter = edu.jalc.automobile.onlinebuilder.builders.dodgeram.ram1500.builders.Termin... | public edu.jalc.automobile.onlinebuilder.builders.dodgeram.ram1500.builders.TruckDodgeRamBuilderInterface askForTruckDrive() {
edu.jalc.automobile.onlinebuilder.builders.dodgeram.ram1500.builders.TerminalPrompterBuilder truckDrivePrompter = edu.jalc.automobile.onlinebuilder.builders.dodgeram.ram1500.builders.Termin... |
public java.lang.String getCategory(java.lang.String signal) {
for (java.lang.String cat : categories) {
if (signal.contains((cat + "."))) {
return cat;
}
}
return categories.get(((categories.size()) - 1));
} | public java.lang.String getCategory(java.lang.String signal) {
for (java.lang.String cat : categories) {
if (signal.startsWith((cat + "."))) {
return cat;
}
}
return categories.get(((categories.size()) - 1));
} |
public javax.ws.rs.core.Response get(@org.jbei.ice.services.rest.HeaderParam(value = "X-ICE-Authentication-SessionId")
java.lang.String sessionId, @org.jbei.ice.services.rest.DefaultValue(value = "0")
@org.jbei.ice.services.rest.QueryParam(value = "offset")
final int offset, @org.jbei.ice.services.rest.DefaultValue(val... | public javax.ws.rs.core.Response get(@org.jbei.ice.services.rest.DefaultValue(value = "0")
@org.jbei.ice.services.rest.QueryParam(value = "offset")
final int offset, @org.jbei.ice.services.rest.DefaultValue(value = "15")
@org.jbei.ice.services.rest.QueryParam(value = "limit")
final int limit, @org.jbei.ice.services.res... |
public BitSequence firstNBits(int N) {
if (N > (numBits)) {
throw new java.lang.IllegalArgumentException(((((("More bits requested than present in sequence, " + "requested ") + N) + ", but have ") + (numBits)) + "."));
}
BitSequence firstN = new BitSequence(this);
firstN.bits = this.bits;
fi... | public BitSequence firstNBits(int N) {
if (N > (numBits)) {
throw new java.lang.IllegalArgumentException(((((("More bits requested than present in sequence, " + "requested ") + N) + ", but have ") + (numBits)) + "."));
}
BitSequence firstN = new BitSequence();
firstN.bits = this.bits;
firstN... |
public void printMatrix(char[][] board) {
java.lang.StringBuilder sb = new java.lang.StringBuilder();
for (int i = 0; i < (board.length); i++) {
sb.append("\n");
for (int j = 0; j < (board[i].length); j++) {
sb.append(board[i][j]);
}
}
java.lang.System.out.println(sb.... | public void printMatrix(char[][] board) {
java.lang.StringBuilder sb = new java.lang.StringBuilder();
for (int i = 0; i < (board.length); i++) {
int c = board[i].length;
for (int j = 0; j < c; j++) {
sb.append(board[i][j]);
}
sb.append("\n");
}
java.lang.Syste... |
public boolean perform(hudson.model.AbstractBuild<?, ?> build, hudson.Launcher launcher, hudson.model.BuildListener listener) throws java.io.IOException, java.lang.InterruptedException {
hudson.util.ArgumentListBuilder cliCommand = composeFlywayCommand(build, listener);
int exitStatus = launcher.launch().cmds(c... | public boolean perform(hudson.model.AbstractBuild<?, ?> build, hudson.Launcher launcher, hudson.model.BuildListener listener) throws java.io.IOException, java.lang.InterruptedException {
boolean result = false;
hudson.util.ArgumentListBuilder cliCommand = composeFlywayCommand(build, listener);
if (cliComman... |
public void setUp() {
context = new org.springframework.context.annotation.AnnotationConfigApplicationContext(com.poc.mongodbredisintegration.config.CustomCacheErrorHandlerTest.Config.class);
this.cache = context.getBean("mockCache", org.springframework.cache.Cache.class);
this.cacheInterceptor = context.ge... | public void setUp() {
context = new org.springframework.context.annotation.AnnotationConfigApplicationContext(com.poc.mongodbredisintegration.config.CustomCacheErrorHandlerTest.Config.class);
this.cache = context.getBean("mockCache", org.springframework.cache.Cache.class);
this.cacheInterceptor = context.ge... |
public void init(final de.uni_freiburg.informatik.ultimate.core.model.models.ModelType modelType, final int currentModelIndex, final int numberOfModels) throws java.lang.Throwable {
mWaitForMe = numberOfModels > 1;
if ("de.uni_freiburg.informatik.ultimate.ltl2aut".equals(modelType.getCreator())) {
mLogg... | public void init(final de.uni_freiburg.informatik.ultimate.core.model.models.ModelType modelType, final int currentModelIndex, final int numberOfModels) throws java.lang.Throwable {
mWaitForMe = currentModelIndex < (numberOfModels - 1);
if ("de.uni_freiburg.informatik.ultimate.ltl2aut".equals(modelType.getCreat... |
public java.util.LinkedList<integratedtoolkit.scheduler.types.AllocatableAction<P, T>> getHostedActions(integratedtoolkit.types.resources.Worker<T> worker) {
integratedtoolkit.util.ResourceScheduler<P, T> ui = workers.get(worker);
if (ui != null) {
hostedActions = ui.getHostedActions();
}else {
... | public java.util.LinkedList<integratedtoolkit.scheduler.types.AllocatableAction<P, T>> getHostedActions(integratedtoolkit.types.resources.Worker<T> worker) {
integratedtoolkit.util.ResourceScheduler<P, T> ui = workers.get(worker);
java.util.LinkedList<integratedtoolkit.scheduler.types.AllocatableAction<P, T>> h... |
public void writeJson(org.springframework.extensions.webscripts.WebScriptResponse response) throws java.io.IOException {
response.setContentEncoding("UTF-8");
response.setContentType(MimetypeMap.MIMETYPE_JSON);
try {
org.json.JSONObject jsonOutput = generateJsonOutput();
response.getWriter()... | public void writeJson(org.springframework.extensions.webscripts.WebScriptResponse response) throws java.io.IOException {
response.setContentEncoding("UTF-8");
response.setContentType(MimetypeMap.MIMETYPE_JSON);
try {
org.json.JSONObject jsonOutput = generateJsonOutput();
response.getWriter()... |
public void testUsername() throws java.lang.Exception {
com.rusticisoftware.tincan.RemoteLRS obj = new com.rusticisoftware.tincan.RemoteLRS();
obj.setPassword("pass");
org.junit.Assert.assertNull(obj.getUsername());
org.junit.Assert.assertNull(obj.getAuth());
obj.setUsername("test");
org.junit.A... | public void testUsername() throws java.lang.Exception {
com.rusticisoftware.tincan.RemoteLRS obj = new com.rusticisoftware.tincan.RemoteLRS();
obj.setPassword("pass");
org.junit.Assert.assertNull(obj.getUsername());
org.junit.Assert.assertNull(obj.getAuth());
obj.setUsername("test");
org.junit.A... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.