buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public void open() {
this.mark = false;
if (this.mine) {
javax.swing.JOptionPane.showMessageDialog(this, "Hävisit");
this.openAll();
}else {
this.close = false;
if ((neightborhoodBOOMCount()) == 0) {
for (fi.gosu.miinaharava.Hopscotch hopscotch : neighborhood) {
... | public boolean open() {
this.mark = false;
if (this.mine) {
return false;
}else {
this.close = false;
if ((neightborhoodBOOMCount()) == 0) {
for (fi.gosu.miinaharava.Hopscotch hopscotch : neighborhood) {
if ((hopscotch != null) && (hopscotch.isClose())) {
... |
public int clean() {
if ((mHost) == null) {
return 0;
}
try {
mHost.clean();
} catch (java.lang.Throwable e) {
e.printStackTrace();
}
mIsConnected = false;
mReceivedCount = 0;
mSentCount = 0;
mAnalytics.reset();
return 0;
} | public int clean() {
if ((mHost) == null) {
return 0;
}
try {
reset();
mHost.clean();
} catch (java.lang.Throwable e) {
e.printStackTrace();
}
mIsConnected = false;
mReceivedCount = 0;
mSentCount = 0;
mAnalytics.reset();
return 0;
} |
public void verifyDeleteServiceNoService() throws java.lang.Exception {
final org.springframework.mock.web.MockHttpServletResponse response = new org.springframework.mock.web.MockHttpServletResponse();
final org.springframework.http.ResponseEntity entity = this.controller.deleteRegisteredService(5000, response)... | public void verifyDeleteServiceNoService() throws java.lang.Exception {
final org.springframework.mock.web.MockHttpServletResponse response = new org.springframework.mock.web.MockHttpServletResponse();
final org.springframework.http.ResponseEntity entity = this.controller.deleteRegisteredService(5000);
asse... |
public void onChildChanged(com.google.firebase.database.DataSnapshot dataSnapshot, java.lang.String s) {
com.neelakshbhatia.roome.Card newVal = dataSnapshot.getValue(com.neelakshbhatia.roome.Card.class);
java.lang.String key = dataSnapshot.getKey();
int index = mKeys.indexOf(key);
if (index >= 0) {
... | public void onChildChanged(com.google.firebase.database.DataSnapshot dataSnapshot, java.lang.String s) {
com.neelakshbhatia.roome.Card newVal = dataSnapshot.getValue(com.neelakshbhatia.roome.Card.class);
java.lang.String key = dataSnapshot.getKey();
int index = mKeys.indexOf(key);
cardList.set(index, ne... |
public void updateUserData() {
int id = castofo_nower.com.co.nower.support.SharedPreferencesManager.getIntegerValue(SharedPreferencesManager.USER_ID);
java.lang.String email = castofo_nower.com.co.nower.support.SharedPreferencesManager.getStringValue(SharedPreferencesManager.USER_EMAIL);
java.lang.String na... | public void updateUserData() {
int id = castofo_nower.com.co.nower.support.SharedPreferencesManager.getIntegerValue(SharedPreferencesManager.USER_ID);
java.lang.String email = castofo_nower.com.co.nower.support.SharedPreferencesManager.getStringValue(SharedPreferencesManager.USER_EMAIL);
java.lang.String na... |
public void fireworks() {
java.lang.System.out.println("Hooray.");
javax.swing.JFrame frame = new javax.swing.JFrame();
javax.swing.ImageIcon icon = new javax.swing.ImageIcon("./img/fireworks.jpg");
javax.swing.JLabel label = new javax.swing.JLabel(icon);
frame.add(label);
frame.setDefaultCloseO... | public void fireworks() {
javax.swing.JFrame frame = new javax.swing.JFrame();
javax.swing.ImageIcon icon = new javax.swing.ImageIcon("./img/fireworks.jpg");
javax.swing.JLabel label = new javax.swing.JLabel(icon);
frame.add(label);
frame.setDefaultCloseOperation(javax.swing.JFrame.EXIT_ON_CLOSE);
... |
public void onItemClick(android.widget.AdapterView<?> parent, android.view.View view, int position, long id) {
java.lang.String selected = methods.get(position);
android.widget.Toast.makeText(com.aucklanduni.p4p.KeypadFragment.ctx, selected, Toast.LENGTH_LONG).show();
dialog.dismiss();
keypad.pushOnType... | public void onItemClick(android.widget.AdapterView<?> parent, android.view.View view, int position, long id) {
java.lang.String selected = methods.get(position);
android.widget.Toast.makeText(com.aucklanduni.p4p.KeypadFragment.ctx, selected, Toast.LENGTH_LONG).show();
dialog.dismiss();
keypad.setField(s... |
public void addScoreToChart(java.lang.String scoreType, int value) {
android.widget.TableRow tr = mRowMap.get(scoreType);
final android.widget.TextView tv = ((android.widget.TextView) (tr.getChildAt(1)));
tv.setText(value);
tr.setClickable(false);
android.widget.Toast.makeText(getActivity(), R.strin... | public void addScoreToChart(java.lang.String scoreType, int value) {
android.widget.TableRow tr = mRowMap.get(scoreType);
final android.widget.TextView tv = ((android.widget.TextView) (tr.getChildAt(1)));
tv.setText(java.lang.Integer.toString(value));
tr.setClickable(false);
android.widget.Toast.mak... |
public void backspace() {
ru.tesei7.textEditor.editor.document.Line currentLine = document.getCurrentLine();
if ((currentLine.getOffset()) == 0) {
concatLines(currentLine.getPrevious(), currentLine);
}else {
lineEditor.backspace(currentLine);
}
} | public void backspace() {
ru.tesei7.textEditor.editor.document.Line currentLine = document.getCurrentLine();
if ((currentLine.getOffset()) == 0) {
concatLines(currentLine.getPrevious(), currentLine, true);
}else {
lineEditor.backspace(currentLine);
}
} |
public void stopScan() {
if ((isScanning()) && ((bluetoothAdapter) != null)) {
if ((Build.VERSION.SDK_INT) >= (Build.VERSION_CODES.LOLLIPOP)) {
bluetoothAdapter.getBluetoothLeScanner().stopScan(scanCallback);
}else {
bluetoothAdapter.stopLeScan(leScanCallback);
}
... | public void stopScan() {
if ((isScanning()) && ((bluetoothAdapter) != null)) {
if ((Build.VERSION.SDK_INT) >= (Build.VERSION_CODES.LOLLIPOP)) {
if ((scanCallback) != null) {
bluetoothAdapter.getBluetoothLeScanner().stopScan(scanCallback);
}
}else {
... |
public void addLast(T value) {
(tail)--;
if ((size) == 0)
(head)--;
if ((tail) < 0) {
tail = (data.length) - 1;
}
data[tail] = value;
(size)++;
} | public void addLast(T value) {
if ((tail) < 0) {
tail = (data.length) - 1;
}
data[tail] = value;
(tail)--;
if ((size) == 0)
(head)--;
(size)++;
} |
public void givenSpriteFacingRightWhenPlayerMovingLeftThenSpriteShouldFlipLeft() {
when(sprite.isFlipX()).thenReturn(false);
animator.setHorizontalMovement(movingLeft);
animator.getUpdatedSprite(delta, angle, position);
verify(sprite).flip(true, false);
} | public void givenSpriteFacingRightWhenPlayerMovingLeftThenSpriteShouldFlipLeft() {
when(sprite.isFlipX()).thenReturn(false);
animator.setHorizontalMovement(movingLeft);
animator.getUpdatedSprite(delta, position, angle);
verify(sprite).flip(true, false);
} |
public void onCreate(cbstudios.coffeebreak.eventbus.OnCreateEvent event) {
if ((event.object) instanceof cbstudios.coffeebreak.view.activity.IMainView) {
mainView.setCategories(model.getToDoDataModule().getLabelCategories(), model.getToDoDataModule().getTimeCategories());
mainView.setTaskAdapter(tas... | public void onCreate(cbstudios.coffeebreak.eventbus.OnCreateEvent event) {
if ((event.object) instanceof cbstudios.coffeebreak.view.activity.IMainView) {
mainView = ((cbstudios.coffeebreak.view.activity.IMainView) (event.object));
mainView.setCategories(model.getToDoDataModule().getLabelCategories()... |
public void writeStatsFile(java.lang.String file, long duration) {
processSolutions();
java.io.PrintWriter writer;
try {
writer = new java.io.PrintWriter(file, "UTF-8");
} catch (java.io.FileNotFoundException | java.io.UnsupportedEncodingException e) {
throw new java.lang.RuntimeExceptio... | public void writeStatsFile(java.lang.String file, long duration) {
processSolutions();
java.io.PrintWriter writer;
try {
writer = new java.io.PrintWriter(file, "UTF-8");
} catch (java.io.FileNotFoundException | java.io.UnsupportedEncodingException e) {
throw new java.lang.RuntimeExceptio... |
public static void main(java.lang.String[] args) {
java.lang.System.out.println("Allocating cycle");
gc.Cycle survivingCycle = new gc.Cycle("Surviving cycle");
for (int i = 0; i < 1000; i++) {
gc.Cycle cycle2 = new gc.Cycle();
}
java.lang.System.out.println("Survived cycle allocation without... | public static void main(java.lang.String[] args) {
java.lang.System.out.println("Allocating cycle");
gc.Cycle survivingCycle = new gc.Cycle("Surviving cycle");
survivingCycle.familyGreeting();
for (int i = 0; i < 1000; i++) {
gc.Cycle cycle2 = new gc.Cycle();
}
java.lang.System.out.print... |
public static java.lang.String queueReadLine() {
while (true) {
try {
java.lang.String msg = com.gmt2001.Console.in.inputQueue.poll();
if (msg != null) {
out.println(" -> ");
return msg;
}
java.lang.Thread.sleep(100);
} ... | public static java.lang.String queueReadLine() {
while (true) {
try {
java.lang.String msg = com.gmt2001.Console.in.inputQueue.poll();
if (msg != null) {
out.println((" -> " + msg));
return msg;
}
java.lang.Thread.sleep(100);
... |
public void edgeInserted(V source, V target) {
java.util.Map<V, java.lang.Integer> incoming = incomingEdges.get(target);
if (incoming == null) {
incoming = new java.util.HashMap<V, java.lang.Integer>();
incomingEdges.put(target, incoming);
}
java.lang.Integer count = incoming.get(incomin... | public void edgeInserted(V source, V target) {
java.util.Map<V, java.lang.Integer> incoming = incomingEdges.get(target);
if (incoming == null) {
incoming = new java.util.HashMap<V, java.lang.Integer>();
incomingEdges.put(target, incoming);
}
java.lang.Integer count = incoming.get(source)... |
public void setNetInterface(org.eclipse.kura.web.shared.model.GwtBSNetInterfaceConfig config) {
setDirty(true);
if (((tcpStatus) == null) || ((selectedNetIfConfig) != config)) {
tcpStatus = tcpTab.getStatus();
}
if (config instanceof org.eclipse.kura.web.shared.model.GwtBSWifiNetInterfaceConfig)... | public void setNetInterface(org.eclipse.kura.web.shared.model.GwtBSNetInterfaceConfig config) {
if (((tcpStatus) == null) || ((selectedNetIfConfig) != config)) {
tcpStatus = tcpTab.getStatus();
}
if (config instanceof org.eclipse.kura.web.shared.model.GwtBSWifiNetInterfaceConfig) {
selectedN... |
public void updatePane() {
int index = gui.GUIPane.tabbedPane.getSelectedIndex();
gui.GraphTab graphTab = graphTabs.get(index);
graphTab.updateImage();
gui.GUIPane.tabbedPane.setComponentAt(index, graphTab.getpanel());
gui.GUIPane.tabbedPane.repaint();
} | public void updatePane() {
int index = gui.GUIPane.tabbedPane.getSelectedIndex();
if (index != (-1)) {
gui.GraphTab graphTab = graphTabs.get(index);
graphTab.updateImage();
gui.GUIPane.tabbedPane.setComponentAt(index, graphTab.getpanel());
gui.GUIPane.tabbedPane.repaint();
}
... |
public void clearErrorlog() {
try {
final java.io.PrintWriter log = new java.io.PrintWriter(new java.io.BufferedWriter(new java.io.FileWriter(this.errorlogLocation, false)));
log.print("\n");
log.close();
} catch (final java.io.IOException e) {
e.printStackTrace();
}
} | public void clearErrorlog() {
try {
final java.io.PrintWriter log = new java.io.PrintWriter(new java.io.BufferedWriter(new java.io.FileWriter(errorlogLocation, false)));
log.print("\n");
log.close();
} catch (final java.io.IOException e) {
e.printStackTrace();
}
} |
public void onRemove(java.lang.String packageName, boolean success) {
android.content.Intent intent = new android.content.Intent(ACTION_PLUGIN_CHANGED);
intent.putExtra(com.plugin.core.manager.PluginCallbackImpl.extra_type, "remove");
intent.putExtra(com.plugin.core.manager.PluginCallbackImpl.extra_id, pack... | public void onRemove(java.lang.String packageName, boolean success) {
android.content.Intent intent = new android.content.Intent(ACTION_PLUGIN_CHANGED);
intent.putExtra(com.plugin.core.manager.PluginCallbackImpl.extra_type, "remove");
intent.putExtra(com.plugin.core.manager.PluginCallbackImpl.extra_id, pack... |
public static void main(java.lang.String[] args) throws java.io.IOException {
java.util.Map<java.lang.Short, java.lang.Integer> huff = new java.util.HashMap<java.lang.Short, java.lang.Integer>();
java.lang.String infile = "src/plaintext.txt";
java.lang.String outfile = "src/encoded.grin";
BitInputStream... | public static void main(java.lang.String[] args) throws java.io.IOException {
java.util.Map<java.lang.Short, java.lang.Integer> huff = new java.util.HashMap<java.lang.Short, java.lang.Integer>();
java.lang.String infile = "src/plaintext.txt";
java.lang.String outfile = "src/encoded.grin";
BitInputStream... |
protected java.lang.String[] getStringArrayWithoutRegrister(java.lang.String name) {
java.lang.String[] values = request.getParameterValues(name);
if (((com.publiccms.common.tools.CommonUtils.notEmpty(values)) && (1 == (values.length))) && (0 <= (values[0].indexOf(com.publiccms.common.handler.COMMA_DELIMITED)))... | protected java.lang.String[] getStringArrayWithoutRegrister(java.lang.String name) {
java.lang.String[] values = request.getParameterValues(name);
if (((com.publiccms.common.tools.CommonUtils.notEmpty(values)) && (1 == (values.length))) && (0 <= (values[0].indexOf(com.publiccms.common.handler.COMMA_DELIMITED)))... |
private static pedca.context.Context getBottleneckContext(double sizeX, double sizeY, double bottleneckWidth, double bottleneckHeight, double bottleneckPosY) {
pedca.environment.grid.EnvironmentGrid environmentGrid = new pedca.environment.grid.EnvironmentGrid(((int) (sizeY / (matsimconnector.utility.Constants.CA_CE... | private static pedca.context.Context getBottleneckContext(float sizeX, float sizeY, float bottleneckWidth, float bottleneckHeight, float bottleneckPosY) {
pedca.environment.grid.EnvironmentGrid environmentGrid = new pedca.environment.grid.EnvironmentGrid(((int) (sizeY / (matsimconnector.utility.Constants.CA_CELL_SI... |
public ch.mobop.mse.vtrack.model.VoucherValidityStatusEnum getValidityStatus() {
if (dateOfexpiration.isBefore(org.joda.time.DateTime.now().minusMonths(1))) {
return VoucherValidityStatusEnum.valid;
}else
if (dateOfexpiration.isBefore(org.joda.time.DateTime.now())) {
return VoucherVa... | public ch.mobop.mse.vtrack.model.VoucherValidityStatusEnum getValidityStatus() {
if (org.joda.time.DateTime.now().isBefore(dateOfexpiration.minusMonths(1))) {
return VoucherValidityStatusEnum.valid;
}else
if (org.joda.time.DateTime.now().isBefore(dateOfexpiration)) {
return VoucherVa... |
public java.util.List<com.uts.sep.entity.ItemTbl> getItemsFiltedByPrice(double[] price) {
java.util.List<com.uts.sep.entity.ItemTbl> tempList = new java.util.ArrayList<com.uts.sep.entity.ItemTbl>();
for (com.uts.sep.entity.ItemTbl item : items)
if (((item.getPrice()) >= (price[0])) && ((item.getPrice())... | public java.util.List<com.uts.sep.entity.ItemTbl> getItemsFiltedByPrice(double[] price) {
tempList = null;
for (com.uts.sep.entity.ItemTbl item : items)
if (((item.getPrice()) >= (price[0])) && ((item.getPrice()) <= (price[1])))
tempList.add(item);
return tempList;
} |
private java.util.List<org.sosy_lab.cpachecker.cpa.smg.SMGState> handleDeclaration(org.sosy_lab.cpachecker.cpa.smg.SMGState smgState, org.sosy_lab.cpachecker.cfa.model.c.CDeclarationEdge edge) throws org.sosy_lab.cpachecker.exceptions.CPATransferException {
logger.log(java.util.logging.Level.ALL, ">>> Handling decl... | private java.util.List<org.sosy_lab.cpachecker.cpa.smg.SMGState> handleDeclaration(org.sosy_lab.cpachecker.cpa.smg.SMGState smgState, org.sosy_lab.cpachecker.cfa.model.c.CDeclarationEdge edge) throws org.sosy_lab.cpachecker.exceptions.CPATransferException {
logger.log(java.util.logging.Level.ALL, ">>> Handling decl... |
public static int distance(assignment1.Point p1, assignment1.Point p2) {
return ((int) ((java.lang.Math.pow(((p1.getX()) - (p2.getX())), 2)) + (java.lang.Math.pow(((p1.getY()) - (p2.getY())), 2))));
} | public static int distance(assignment1.Point p1, assignment1.Point p2) {
return (((p1.getX()) - (p2.getX())) * ((p1.getX()) - (p2.getX()))) + (((p1.getY()) - (p2.getY())) * ((p1.getY()) - (p2.getY())));
} |
public void testGetEvaluator() throws org.apache.hadoop.hive.ql.parse.SemanticException {
com.yahoo.sketches.hive.theta.DataToSketchUDAF udf = new com.yahoo.sketches.hive.theta.DataToSketchUDAF();
org.apache.hadoop.hive.ql.udf.generic.GenericUDAFParameterInfo params = new org.apache.hadoop.hive.ql.udf.generic.S... | public void testGetEvaluator() throws java.io.IOException, org.apache.hadoop.hive.ql.parse.SemanticException {
com.yahoo.sketches.hive.theta.DataToSketchUDAF udf = new com.yahoo.sketches.hive.theta.DataToSketchUDAF();
org.apache.hadoop.hive.ql.udf.generic.GenericUDAFParameterInfo params = new org.apache.hadoop.... |
public synchronized K removeRoot() {
if (heap.isEmpty())
throw new java.lang.RuntimeException("Heap is empty! Cannot remove anything.");
K root = heap.get(0);
(maxIndex)--;
K lastLeaf = heap.remove(maxIndex);
heap.set(0, lastLeaf);
bubbleDown(0);
return root;
} | public synchronized K removeRoot() {
if (heap.isEmpty())
throw new java.lang.RuntimeException("Heap is empty! Cannot remove anything.");
K root = heap.get(0);
(maxIndex)--;
K lastLeaf = heap.remove(maxIndex);
if (!(heap.isEmpty())) {
heap.set(0, lastLeaf);
bubbleDown(0);... |
public void onDeleteButtonClicked(android.view.View v) {
if ((mEventPosition) <= 0) {
finish();
return ;
}
DataManager.INSTANCE.removeEvent(mEventPosition);
android.content.Intent data = new android.content.Intent();
data.putExtra(org.drykiss.android.app.sapphire.EventEditActivity.EX... | public void onDeleteButtonClicked(android.view.View v) {
if ((mEventPosition) < 0) {
finish();
return ;
}
DataManager.INSTANCE.removeEvent(mEventPosition);
android.content.Intent data = new android.content.Intent();
data.putExtra(org.drykiss.android.app.sapphire.EventEditActivity.EXT... |
public final void notifyAdd(geogebra.common.kernel.geos.GeoElementInterface geo) {
if (notifyViewsActive) {
for (int i = 0; i < (viewCnt); ++i) {
if (((views[i].getViewID()) != (geogebra.common.main.AbstractApplication.VIEW_CONSTRUCTION_PROTOCOL)) || (isNotifyConstructionProtocolViewAboutAddRemo... | public final void notifyAdd(geogebra.common.kernel.geos.GeoElementInterface geo) {
if (notifyViewsActive) {
for (int i = 0; i < (viewCnt); ++i) {
if (((views[i].getViewID()) != (geogebra.common.main.AbstractApplication.VIEW_CONSTRUCTION_PROTOCOL)) || (isNotifyConstructionProtocolViewAboutAddRemo... |
public void stop(org.osgi.framework.BundleContext context) throws java.lang.Exception {
com.puresoltechnologies.commons.osgi.AbstractActivator.logger.info((("Stopping bundle '" + (context.getBundle().getSymbolicName())) + "'..."));
if ((com.puresoltechnologies.commons.osgi.AbstractActivator.context) == null) {
... | public void stop(org.osgi.framework.BundleContext context) throws java.lang.Exception {
com.puresoltechnologies.commons.osgi.AbstractActivator.logger.info((("Stopping bundle '" + (context.getBundle().getSymbolicName())) + "'..."));
if ((this.context) == null) {
throw new java.lang.RuntimeException("Bund... |
public void actionPerformed(java.awt.event.ActionEvent e) {
try {
com.devankuleindiren.mnist.ControlPanel.neuralNetwork.saveWeights(weightsSource.getText());
} catch (java.io.FileNotFoundException exception) {
javax.swing.JOptionPane.showMessageDialog(null, "Whoops!", ((weightsSource.getText()) ... | public void actionPerformed(java.awt.event.ActionEvent e) {
try {
com.devankuleindiren.mnist.ControlPanel.neuralNetwork.saveWeights(weightsSource.getText());
} catch (java.io.FileNotFoundException exception) {
javax.swing.JOptionPane.showMessageDialog(null, ((weightsSource.getText()) + " could n... |
private void clearNodeAddedMessage(org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryAbstractMessage msg) {
if (msg instanceof org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryNodeAddedMessage) {
org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryNodeAddedMessage nodeAddedMsg = ((org.ap... | private void clearNodeAddedMessage(org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryAbstractMessage msg) {
if (msg instanceof org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryNodeAddedMessage) {
org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryNodeAddedMessage nodeAddedMsg = ((org.ap... |
public void onConnected(android.os.Bundle bundle) {
android.util.Log.i(com.valevich.stormy.location.LocationProvider.TAG, "Location services connected.");
if (((android.support.v4.app.ActivityCompat.checkSelfPermission(mContext, Manifest.permission.ACCESS_FINE_LOCATION)) != (android.content.pm.PackageManager.PE... | public void onConnected(android.os.Bundle bundle) {
android.util.Log.i(com.valevich.stormy.location.LocationProvider.TAG, "Location services connected.");
if (((android.support.v4.app.ActivityCompat.checkSelfPermission(mContext, Manifest.permission.ACCESS_FINE_LOCATION)) != (android.content.pm.PackageManager.PE... |
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_show);
try {
android.support.v4.app.Fragment fragment = ((android.support.v4.app.Fragment) (java.lang.Class.forName(getIntent().getStringExtra("fragment")).newInstance... | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_show);
try {
android.support.v4.app.Fragment fragment = ((android.support.v4.app.Fragment) (java.lang.Class.forName(getIntent().getStringExtra("fragment")).newInstance... |
public boolean wasReleased(java.lang.String name) {
if (buttons_.containsKey(name)) {
org.usfirst.frc.team2647.robot.Joy.Button button = buttons_.get(name).state;
if (((button.state) == false) && ((button.state) != (button.prevState)))
return true;
}
return false;
} | public boolean wasReleased(java.lang.String name) {
if (buttons_.containsKey(name)) {
org.usfirst.frc.team2647.robot.Joy.Button button = buttons_.get(name);
if (((button.state) == false) && ((button.state) != (button.prevState)))
return true;
}
return false;
} |
public android.database.Cursor getPreviousSimilarWorkout(java.lang.String s) {
android.database.sqlite.SQLiteDatabase db = this.getWritableDatabase();
return db.rawQuery((((((((("SELECT EXERCISE1, REPS1, SERIES1, WEIGHT1, REST1," + ((((((("EXERCISE2, REPS2, SERIES2, WEIGHT2, REST2," + " EXERCISE3, REPS3, SERIES... | public android.database.Cursor getPreviousSimilarWorkout(java.lang.String s) {
android.database.sqlite.SQLiteDatabase db = this.getWritableDatabase();
return db.rawQuery(((((((("SELECT EXERCISE1, REPS1, SERIES1, WEIGHT1, REST1," + ((((((("EXERCISE2, REPS2, SERIES2, WEIGHT2, REST2," + " EXERCISE3, REPS3, SERIES3... |
public void sendCustomMessage(java.lang.String customMessage, int gamepadId) {
if ((mGameIO) == null)
return ;
if ((gamepadId != (-1)) && (isGamePadConnected(gamepadId))) {
return ;
}
com.fbessou.sofa.message.GameCustomMessage msg = new com.fbessou.sofa.message.GameCustomMessage(cus... | public void sendCustomMessage(java.lang.String customMessage, int gamepadId) {
if ((mGameIO) == null)
return ;
if ((gamepadId != (-1)) && (!(isGamePadConnected(gamepadId)))) {
return ;
}
com.fbessou.sofa.message.GameCustomMessage msg = new com.fbessou.sofa.message.GameCustomMessage(... |
private void jComboBox_fitmethodPropertyChange(java.beans.PropertyChangeEvent evt) {
javax.swing.JComboBox combo = ((javax.swing.JComboBox) (evt.getSource()));
int ind = combo.getSelectedIndex();
switch (ind) {
case 0 :
fitmethod = "2DG";
break;
case 1 :
f... | private void jComboBox_fitmethodPropertyChange(java.beans.PropertyChangeEvent evt) {
javax.swing.JComboBox combo = ((javax.swing.JComboBox) (evt.getSource()));
int ind = combo.getSelectedIndex();
switch (ind) {
case 0 :
fitmethod = "2DG";
break;
case 1 :
f... |
private org.projectbuendia.client.ui.SnackBar.Message getMessage(@android.support.annotation.StringRes
int message) {
org.projectbuendia.client.ui.SnackBar.Message theMessage = null;
for (java.util.Map.Entry<org.projectbuendia.client.ui.SnackBar.MessageKey, org.projectbuendia.client.ui.SnackBar.Message> entry :... | private org.projectbuendia.client.ui.SnackBar.Message getMessage(@android.support.annotation.StringRes
int message) {
org.projectbuendia.client.ui.SnackBar.Message theMessage = null;
for (java.util.Map.Entry<org.projectbuendia.client.ui.SnackBar.MessageKey, org.projectbuendia.client.ui.SnackBar.Message> entry :... |
private void writeVariableCopy(wyil.lang.SyntaxTree.Location<wyil.lang.Bytecode.VariableAccess> loc, java.io.PrintWriter out) {
wyil.lang.SyntaxTree.Location<wyil.lang.Bytecode.VariableDeclaration> vd = getVariableDeclaration(loc.getOperand(0));
if (wyjs.io.JavaScriptFileWriter.isCopyable(vd.getType())) {
... | private void writeVariableCopy(wyil.lang.SyntaxTree.Location<wyil.lang.Bytecode.VariableAccess> loc, java.io.PrintWriter out) {
wyil.lang.SyntaxTree.Location<wyil.lang.Bytecode.VariableDeclaration> vd = getVariableDeclaration(loc.getOperand(0));
if (isCopyable(vd.getType(), loc)) {
out.print(vd.getBytec... |
public synchronized void updateSeries(@android.support.annotation.NonNull
final android.content.Context context, @android.support.annotation.NonNull
final java.util.List<com.androidplot.xy.SimpleXYSeries> series, @android.support.annotation.NonNull
final com.sensirion.smartgadget.view.history.type.HistoryIntervalType i... | public synchronized void updateSeries(@android.support.annotation.NonNull
final android.content.Context context, @android.support.annotation.NonNull
final java.util.List<com.androidplot.xy.SimpleXYSeries> series, @android.support.annotation.NonNull
final com.sensirion.smartgadget.view.history.type.HistoryIntervalType i... |
private void create(net.minecraft.util.ResourceLocation l, java.lang.Exception e) throws java.io.IOException {
java.io.File f = new java.io.File(((("missingAssets/" + (l.getResourceDomain())) + "/") + (l.getResourcePath())));
f.getParentFile().mkdirs();
f.createNewFile();
java.io.PrintStream ps = new ja... | private void create(net.minecraft.util.ResourceLocation l, java.lang.Exception e) throws java.io.IOException {
java.io.File f = new java.io.File(((("missingAssets/" + (l.getResourceDomain())) + "/") + (l.getResourcePath())));
f.getParentFile().mkdirs();
f.createNewFile();
java.io.PrintStream ps = new ja... |
private org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rev160406.transport.zones.transport.zone.Subnets findSubnets(java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rev160406.transport.zones.transport.zone.Subnets> subnets, java.lang.String subnetIp) {
org.opendaylight.yang.gen.v1.u... | private org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rev160406.transport.zones.transport.zone.Subnets findSubnets(java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rev160406.transport.zones.transport.zone.Subnets> subnets, java.lang.String subnetIp) {
for (org.opendaylight.yang.gen... |
public java.sql.Connection createConnection(java.lang.String URL, java.lang.String USER, java.lang.String PASS) {
java.sql.Connection connection = null;
try {
connection = java.sql.DriverManager.getConnection(URL, USER, PASS);
} catch (java.sql.SQLException e) {
java.lang.System.out.println(... | private java.sql.Connection createConnection(java.lang.String URL, java.lang.String USER, java.lang.String PASS) {
java.sql.Connection connection = null;
try {
connection = java.sql.DriverManager.getConnection(URL, USER, PASS);
} catch (java.sql.SQLException e) {
java.lang.System.out.println... |
protected static boolean isLinepitchLargerThanExpected(pdfact.models.PdfDocument pdf, pdfact.models.PdfTextLine prevLine, pdfact.models.PdfTextLine line) {
if (pdf == null) {
return false;
}
pdfact.models.PdfCharacterStatistic characterStats = pdf.getCharacterStatistic();
pdfact.models.PdfTextLi... | protected static boolean isLinepitchLargerThanExpected(pdfact.models.PdfDocument pdf, pdfact.models.PdfTextLine prevLine, pdfact.models.PdfTextLine line) {
if (pdf == null) {
return false;
}
pdfact.models.PdfCharacterStatistic characterStats = line.getCharacterStatistic();
pdfact.models.PdfTextL... |
protected void generateSqlMapContentSelective(org.mybatis.generator.api.IntrospectedTable introspectedTable, org.mybatis.generator.api.dom.xml.XmlElement parent) {
generateTextBlockAppendTableName("insert into ", introspectedTable, parent);
generateActualColumnNamesWithParenthesis(com.freetmp.mbg.plugin.upsert.... | protected void generateSqlMapContentSelective(org.mybatis.generator.api.IntrospectedTable introspectedTable, org.mybatis.generator.api.dom.xml.XmlElement parent) {
generateTextBlockAppendTableName("insert into ", introspectedTable, parent);
generateActualColumnNamesWithParenthesis(com.freetmp.mbg.plugin.upsert.... |
public void actionPerformed(java.awt.event.ActionEvent e) {
controller.File_Manager file = new controller.File_Manager();
java.util.ArrayList<model.Lager> lager = file.load_inventory();
view.Warehouse window = new view.Warehouse();
window.frame.setVisible(true);
window.getModel().setLagerliste(lager... | public void actionPerformed(java.awt.event.ActionEvent e) {
controller.File_Manager file = new controller.File_Manager();
java.util.ArrayList<model.Lager> lager = file.load_inventory();
if (lager == null)
return ;
view.Warehouse window = new view.Warehouse();
window.frame.setVisible(tru... |
private static boolean isRequired(com.appupdate.update.ManifestEntity manifestEntity, java.lang.String localVersion) {
boolean isRequired = false;
if (!(android.text.TextUtils.isEmpty(localVersion))) {
java.util.List<java.lang.String> requiredVersions = manifestEntity.getRequired_versions();
if ... | private static boolean isRequired(com.appupdate.update.ManifestEntity manifestEntity, java.lang.String localVersion) {
boolean isRequired = false;
if (!(android.text.TextUtils.isEmpty(localVersion))) {
java.util.List<java.lang.String> requiredVersions = manifestEntity.getRequired_versions();
if ... |
public io.cattle.platform.engine.handler.HandlerResult handle(final io.cattle.platform.engine.process.ProcessState state, io.cattle.platform.engine.process.ProcessInstance process) {
final io.cattle.platform.core.model.Host host = ((io.cattle.platform.core.model.Host) (state.getResource()));
io.cattle.platform.... | public io.cattle.platform.engine.handler.HandlerResult handle(final io.cattle.platform.engine.process.ProcessState state, io.cattle.platform.engine.process.ProcessInstance process) {
final io.cattle.platform.core.model.Host host = ((io.cattle.platform.core.model.Host) (state.getResource()));
io.cattle.platform.... |
java.util.ArrayList<deckofcards.Card> tohold = videopoker.JacksOrBetter.isThereAPair(hand);
if (tohold != null)
if ((tohold.get(0).getScore()) < 10)
return tohold;
return null;
} | java.util.ArrayList<deckofcards.Card> tohold = videopoker.JacksOrBetter.isThereAPair(hand);
if (tohold != null)
if ((tohold.get(0).getScore()) <= 10)
return tohold;
return null;
} |
public void rule1_oneNeighbour() {
GOL.GameOfLife gameOfLife = new GOL.GameOfLife(3, 3);
GOL.Coordinates coords = new GOL.Coordinates(1, 1);
gameOfLife.set(coords, GameOfLife.ALIVE);
gameOfLife.set(coords.getX(), ((coords.getY()) + 1), GameOfLife.ALIVE);
assertEquals("Pre-condition failed.", GameOfL... | public void rule1_oneNeighbour() {
GOL.GameOfLife gameOfLife = new GOL.GameOfLife();
GOL.Coordinates coords = new GOL.Coordinates(1, 1);
gameOfLife.set(coords, GameOfLife.ALIVE);
gameOfLife.set(coords.getX(), ((coords.getY()) + 1), GameOfLife.ALIVE);
assertEquals("Pre-condition failed.", GameOfLife.... |
public void onGroupInfoAvailable(android.net.wifi.p2p.WifiP2pGroup wifiP2pGroup) {
android.util.Log.i(edu.rit.se.wifibuddy.WifiDirectHandler.TAG, "Group info available");
if (wifiP2pGroup != null) {
android.util.Log.i(edu.rit.se.wifibuddy.WifiDirectHandler.TAG, "WifiP2pGroup:");
android.util.Log... | public void onGroupInfoAvailable(android.net.wifi.p2p.WifiP2pGroup wifiP2pGroup) {
android.util.Log.i(edu.rit.se.wifibuddy.WifiDirectHandler.TAG, "Group info available");
if (wifiP2pGroup != null) {
android.util.Log.i(edu.rit.se.wifibuddy.WifiDirectHandler.TAG, "WifiP2pGroup:");
android.util.Log... |
public static java.lang.String getImplicitKeyword(java.lang.Class c, util.trace.ImplicitKeywordKind anImplicitKeywordKind) {
switch (anImplicitKeywordKind) {
case OBJECT_CLASS_NAME :
return c.getName();
case OBJECT_PACKAGE_NAME :
return c.getPackage().getName();
case ... | public static java.lang.String getImplicitKeyword(java.lang.Class c, util.trace.ImplicitKeywordKind anImplicitKeywordKind) {
switch (anImplicitKeywordKind) {
case OBJECT_CLASS_NAME :
return c.getName();
case OBJECT_PACKAGE_NAME :
if ((c.getPackage()) != null) {
... |
public void onReadyStateChange(com.byteshaft.requests.HttpRequest httpRequest, int i) {
switch (i) {
case com.byteshaft.requests.HttpRequest.STATE_DONE :
android.util.Log.i("URL", httpRequest.getResponseURL());
switch (httpRequest.getStatus()) {
case java.net.HttpURLC... | public void onReadyStateChange(com.byteshaft.requests.HttpRequest httpRequest, int i) {
switch (i) {
case com.byteshaft.requests.HttpRequest.STATE_DONE :
android.util.Log.i("URL", httpRequest.getResponseURL());
switch (httpRequest.getStatus()) {
case java.net.HttpURLC... |
public static java.lang.String convertToConsole(final java.lang.Iterable<java.lang.String> inputLines) {
if (inputLines == null) {
return null;
}
java.util.LinkedList<me.wiefferink.areashop.messages.FancyMessageFormat.InteractiveMessagePart> parts = me.wiefferink.areashop.messages.FancyMessageFormat... | public static java.lang.String convertToConsole(final java.lang.Iterable<java.lang.String> inputLines) {
if (inputLines == null) {
return null;
}
java.util.LinkedList<me.wiefferink.areashop.messages.FancyMessageFormat.InteractiveMessagePart> parts = me.wiefferink.areashop.messages.FancyMessageFormat... |
public void processFailedEvents() throws java.net.URISyntaxException {
org.ict4h.atomfeed.client.AtomFeedProperties atomProperties = new org.ict4h.atomfeed.client.AtomFeedProperties();
atomProperties.setFailedEventMaxRetry(1);
org.ict4h.atomfeed.client.service.AtomFeedClient atomFeedClient = atomFeedClient(... | public void processFailedEvents() throws java.net.URISyntaxException {
org.ict4h.atomfeed.client.AtomFeedProperties atomProperties = new org.ict4h.atomfeed.client.AtomFeedProperties();
atomProperties.setFailedEventMaxRetry(1);
org.ict4h.atomfeed.client.service.AtomFeedClient atomFeedClient = atomFeedClient(... |
public void pingRequestWithoutNamespaceShouldThrow() throws java.lang.Throwable {
se.inera.axel.shs.mime.ShsMessage testMessage = make(a(se.inera.axel.shs.mime.ShsMessage, with(se.inera.axel.shs.mime.ShsMessageMaker.ShsMessageInstantiator.label, a(se.inera.axel.shs.xml.label.ShsLabel, with(se.inera.axel.shs.xml.lab... | public void pingRequestWithoutNamespaceShouldThrow() throws java.lang.Throwable {
context.start();
se.inera.axel.shs.mime.ShsMessage testMessage = make(a(se.inera.axel.shs.mime.ShsMessage, with(se.inera.axel.shs.mime.ShsMessageMaker.ShsMessageInstantiator.label, a(se.inera.axel.shs.xml.label.ShsLabel, with(se.i... |
protected int resumeRaw(int crc, byte[] input, int index, int length) {
crc = reflect(crc);
for (int i = 0; i < length; ++i)
crc = (table[((crc ^ (input[(index + i)])) & 255)]) ^ (crc >>> 8);
return crc;
} | protected int resumeRaw(int crc, byte[] input, int index, int length) {
for (int i = 0; i < length; ++i)
crc = (table[((crc ^ (input[(index + i)])) & 255)]) ^ (crc >>> 8);
return crc;
} |
public frc3824.rohawkticsscouting2017.Firebase.DataModels.TeamLogistics getTeamLogistics(int team_number) {
com.google.firebase.database.DataSnapshot d = mMaps.get(Constants.Database_Lists.indices.LOGISTICS).get(java.lang.String.valueOf(team_number));
if (d == null) {
return null;
}
frc3824.roha... | public frc3824.rohawkticsscouting2017.Firebase.DataModels.TeamLogistics getTeamLogistics(int team_number) {
com.google.firebase.database.DataSnapshot d = mMaps.get(Constants.Database_Lists.indices.LOGISTICS).get(java.lang.String.valueOf(team_number));
if (d == null) {
return null;
}
frc3824.roha... |
protected void onCreate(@android.support.annotation.Nullable
android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_single_image);
imageNumber = getIntent().getIntExtra("number", 0);
singleImageViewPagerAdapter = new com.asimqasimzade.android.neatwal... | protected void onCreate(@android.support.annotation.Nullable
android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_single_image);
imageNumber = getIntent().getIntExtra("number", 0);
singleImageViewPagerAdapter = new com.asimqasimzade.android.neatwal... |
public void postHandle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.Object handler, org.springframework.web.servlet.ModelAndView modelAndView) throws java.lang.Exception {
java.security.Principal principal = request.getUserPrincipal();
if (principal !... | public void postHandle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.Object handler, org.springframework.web.servlet.ModelAndView modelAndView) throws java.lang.Exception {
java.security.Principal principal = request.getUserPrincipal();
if ((principal ... |
private void drawTag(java.awt.Graphics g, HtmlTag htmlTag, int yLoc) {
java.lang.System.out.println(htmlTag.getTag());
switch (htmlTag.getTag()) {
case "hr" :
drawHorizontalRule(g, yLoc);
break;
case "vr" :
drawVerticalRule(g, htmlTag.getHtmlComponentWidth());... | private void drawTag(java.awt.Graphics g, HtmlTag htmlTag, int yLoc) {
switch (htmlTag.getTag()) {
case "hr" :
drawHorizontalRule(g, yLoc);
break;
case "vr" :
drawVerticalRule(g, htmlTag.getHtmlComponentWidth());
break;
case "br" :
... |
public boolean isThreePair() {
boolean canMakeDedication = false;
int count = 0;
for (project.Color c : project.Color.values()) {
if ((numOfCardColor(c)) >= 2) {
threePairList.add(c);
count++;
}
}
if (count >= 3) {
canMakeDedication = true;
}
r... | public boolean isThreePair() {
boolean canMakeDedication = false;
int count = 0;
for (project.Color c : project.Color.values()) {
if ((numOfCardColor(c)) >= 2) {
if (count <= 2) {
threePairList.add(c);
}
count++;
}
}
if (count >= 3)... |
private core.parse.ParsedBillItem parseItem(java.lang.String billLine) {
core.parse.ParsedBillItem parsedBillItem = null;
billLine = clearInhumanCharacters(billLine);
java.lang.String[] billParts = billLine.split("\\s+");
core.parse.BillTextParser.NameExtracted nameExtracted = extractName(billParts);
... | private core.parse.ParsedBillItem parseItem(java.lang.String billLine) {
core.parse.ParsedBillItem parsedBillItem = null;
billLine = clearInhumanCharacters(billLine);
java.lang.String[] billParts = billLine.split("\\s+");
core.parse.BillTextParser.NameExtracted nameExtracted = extractName(billParts);
... |
private java.util.List<org.ocpsoft.rewrite.servlet.spi.DispatcherTypeProvider> getDispatcherTypeProviders() {
if ((dispatcherTypeProviders) == null) {
dispatcherTypeProviders = org.ocpsoft.common.util.Iterators.asList(org.ocpsoft.common.services.ServiceLoader.loadTypesafe(org.ocpsoft.rewrite.servlet.spi.Dis... | private java.util.List<org.ocpsoft.rewrite.servlet.spi.DispatcherTypeProvider> getDispatcherTypeProviders() {
java.util.List<org.ocpsoft.rewrite.servlet.spi.DispatcherTypeProvider> result = dispatcherTypeProviders;
if (result == null) {
synchronized(this) {
result = dispatcherTypeProviders;
... |
@butterknife.OnClick(value = R.id.btnSubmit)
void onClickSubmit() {
com.wondereight.airsensio.UtilClass.Global.GetInstance().SetStateSymptomList(symptomList);
if (isSelectedSymptom(symptomList)) {
com.wondereight.airsensio.UtilClass.SaveSharedPreferences.addSymptomData(this, getParam());
android... | @butterknife.OnClick(value = R.id.btnSubmit)
void onClickSubmit() {
if (isSelectedSymptom(symptomList)) {
com.wondereight.airsensio.UtilClass.SaveSharedPreferences.addSymptomData(this, getParam());
android.content.Intent intent = new android.content.Intent();
setResult(com.wondereight.airsen... |
private static double scan_double(java.lang.String prompt) {
boolean got = false;
double target = 0.0;
while (!got) {
try {
java.lang.System.out.print(prompt);
target = Main.scanner.nextDouble();
java.lang.System.out.println();
Main.scanner.nextLine();... | private static double scan_double(java.lang.String prompt) {
boolean got = false;
double target = 0.0;
while (!got) {
try {
java.lang.System.out.print(prompt);
target = Main.scanner.nextDouble();
Main.scanner.nextLine();
got = true;
} catch (ja... |
public boolean removeWirelessTransmitter(java.lang.String channelName, org.bukkit.Location loc) {
net.licks92.WirelessRedstone.Storage.WirelessChannel channel = getWirelessChannel(channelName);
if (channel != null) {
channel.removeTransmitterAt(loc);
return removeWirelessPoint(channelName, loc, ... | public boolean removeWirelessTransmitter(java.lang.String channelName, org.bukkit.Location loc) {
net.licks92.WirelessRedstone.Storage.WirelessChannel channel = getWirelessChannel(channelName, true);
if (channel != null) {
channel.removeTransmitterAt(loc);
return removeWirelessPoint(channelName,... |
private static int countNonZeroElements(int[] arr) {
int count = 0;
for (int i = 0; i < (arr.length); i++) {
if ((arr[i]) != 0)
count++;
}
} | private static int countNonZeroElements(int[] arr) {
int count = 0;
for (int i = 0; i < (arr.length); i++) {
if ((arr[i]) != 0)
count++;
}
return count;
} |
private defaultPart.Logic.CommandType parseCommandType(java.lang.String[] commandTypeAndArguments) {
if ((commandTypeAndArguments.length) == 0) {
return defaultPart.Logic.CommandType.BLANK;
}
java.lang.String commandTypeStr = commandTypeAndArguments[0].toUpperCase();
for (defaultPart.Logic.Comma... | private defaultPart.Logic.CommandType parseCommandType(java.lang.String[] commandTypeAndArguments) {
if ((commandTypeAndArguments.length) == 0) {
return defaultPart.Logic.CommandType.BLANK;
}
java.lang.String commandTypeStr = commandTypeAndArguments[0].toLowerCase();
for (defaultPart.Logic.Comma... |
protected void testDate() throws java.text.ParseException {
org.molgenis.data.Query<org.molgenis.data.Entity> query = new org.molgenis.data.support.QueryImpl().search(org.molgenis.integrationtest.data.abstracts.query.BIRTHDAY, "1950-01-31");
java.util.Set<org.molgenis.data.Entity> resultSet = org.elasticsearch.... | protected void testDate() throws java.text.ParseException {
org.molgenis.data.Query<org.molgenis.data.Entity> query = new org.molgenis.data.support.QueryImpl().search(org.molgenis.integrationtest.data.abstracts.query.BIRTHDAY, "1950-01-31");
java.util.Set<org.molgenis.data.Entity> resultSet = newHashSet(person3... |
private com.joyent.manta.client.MantaJob buildJob() {
java.util.List<com.joyent.manta.client.MantaJobPhase> phases = new java.util.ArrayList<>();
com.joyent.manta.client.MantaJobPhase map = new com.joyent.manta.client.MantaJobPhase();
map.setType("map");
map.setExec("echo 'Hello World'");
phases.add... | private com.joyent.manta.client.MantaJob buildJob() {
java.util.List<com.joyent.manta.client.MantaJobPhase> phases = new java.util.ArrayList<>();
com.joyent.manta.client.MantaJobPhase map = new com.joyent.manta.client.MantaJobPhase().setType("map").setExec("echo 'Hello World'");
phases.add(map);
java.la... |
public void success(com.getataxi.mobiletaxi.comm.models.OrderDetailsDM orderDetailsDM, retrofit.client.Response response) {
int status = response.getStatus();
if (status == (org.apache.http.HttpStatus.SC_OK)) {
clearStoredOrder();
toggleButton(com.getataxi.mobiletaxi.OrderMap.ButtonType.Place);
... | public void success(com.getataxi.mobiletaxi.comm.models.OrderDetailsDM orderDetailsDM, retrofit.client.Response response) {
int status = response.getStatus();
if (status == (org.apache.http.HttpStatus.SC_OK)) {
clearStoredOrder();
toggleButton(com.getataxi.mobiletaxi.OrderMap.ButtonType.Place);
... |
public java.util.HashSet<java.lang.String> getSearchHistory() {
java.util.HashSet<java.lang.String> set = new java.util.HashSet<>();
for (java.lang.String s : mSearchHistory) {
if ((s.length()) > 0)
set.add(s);
}
return set;
} | public java.util.HashSet<java.lang.String> getSearchHistory() {
java.util.HashSet<java.lang.String> set = new java.util.HashSet<>();
for (java.lang.String s : mSearchHistory) {
if ((s != null) && ((s.length()) > 0))
set.add(s);
}
return set;
} |
public void widgetSelected(org.eclipse.swt.events.SelectionEvent arg0) {
switch (tabMoments.getSelectionIndex()) {
case 0 :
compositeNextMoment.setFocus();
break;
case 1 :
compositeEffectiveMoment.setFocus();
break;
case 2 :
spinAva... | public void widgetSelected(org.eclipse.swt.events.SelectionEvent arg0) {
switch (tabMoments.getSelectionIndex()) {
case 0 :
if ((compositeNextMoment) != null)
compositeNextMoment.setFocus();
break;
case 1 :
if ((compositeEffectiveMomen... |
public void drawNum(int number, int i, int j) {
if (((((number < 0) || (number > 9)) || (i < 0)) || (j < 0)) || (this.bits[((j * 9) + i)])) {
return ;
}
this.number = number;
this.tmp[((j * 9) + i)] = this.number;
} | public void drawNum(int number, int i, int j) {
if ((((number < 0) || (number > 9)) || (i < 0)) || (j < 0)) {
return ;
}
this.number = number;
this.tmp[((j * 9) + i)] = this.number;
} |
private boolean checkCheck(Enums.PieceColor color) {
java.util.List<java.awt.Point> attackedSquares = getAttackedSquares(color);
boolean returnValue = false;
if ((color == (Enums.PieceColor.White)) && (attackedSquares.contains(blackKing.getLocation()))) {
returnValue = true;
java.lang.System... | private boolean checkCheck(Enums.PieceColor color) {
java.util.List<java.awt.Point> attackedSquares = getAttackedSquares(color);
boolean returnValue = false;
if ((color == (Enums.PieceColor.White)) && (attackedSquares.contains(blackKing.getLocation()))) {
returnValue = true;
}else
if ((c... |
protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException {
request.setCharacterEncoding("UTF-8");
java.lang.String detail = request.getParameter("tet");
com.tusheng.oa.Checko co = new com.... | protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException {
super.doPost(request, response);
java.lang.String detail = request.getParameter("tet");
com.tusheng.oa.Checko co = new com.tushen... |
public void onComplete(final com.vk.sdk.api.VKResponse response) {
super.onComplete(response);
news.clear();
try {
news.addAll(new com.vkclient.parsers.NewsParser(response.json).getNewsList());
} catch (org.json.JSONException e) {
e.printStackTrace();
}
listAdapter.notifyDataSetC... | public void onComplete(final com.vk.sdk.api.VKResponse response) {
super.onComplete(response);
news.clear();
try {
news.addAll(new com.vkclient.parsers.NewsParser().getNewsList(response));
} catch (org.json.JSONException e) {
e.printStackTrace();
}
listAdapter.notifyDataSetChange... |
public void getFile(java.lang.String user, java.lang.String checksum, java.lang.String localPath, int startIndex, int endIndex) {
studyproject.API.Lvl.Mid.FileConnectionThread fileConnectionThread = new studyproject.API.Lvl.Mid.FileConnectionThread(getUserConnectionInfo(user), checksum, getFileSize(checksum), local... | public void getFile(java.lang.String user, java.lang.String checksum, java.lang.String localPath, int startIndex, int endIndex) {
studyproject.API.Lvl.Mid.FileConnectionThread fileConnectionThread = new studyproject.API.Lvl.Mid.FileConnectionThread(getUserConnectionInfo(user), checksum, getFileSize(checksum), local... |
public void onRequestPermissionsResult(int requestCode, @android.support.annotation.NonNull
java.lang.String[] permissions, @android.support.annotation.NonNull
int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
switch (requestCode) {
case com.tmholen.thecrazy... | public void onRequestPermissionsResult(int requestCode, @android.support.annotation.NonNull
java.lang.String[] permissions, @android.support.annotation.NonNull
int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
switch (requestCode) {
case com.tmholen.thecrazy... |
public org.araqne.logstorage.engine.TableLock getExclusiveTableLock(java.lang.String tableName, java.lang.String owner, java.lang.String purpose) {
org.araqne.logstorage.engine.TableLockImpl tableLock = tableLocks.get(getTableSchema(tableName).getId());
if (tableLock == null)
throw new org.araqne.logsto... | public org.araqne.logstorage.engine.TableLock getExclusiveTableLock(java.lang.String tableName, java.lang.String owner, java.lang.String purpose) {
org.araqne.logstorage.engine.TableLockImpl tableLock = tableLocks.get(getTableSchema(tableName, true).getId());
if (tableLock == null)
throw new org.araqne.... |
protected static org.springframework.security.saml.key.KeyManager keyManager() {
org.springframework.core.io.DefaultResourceLoader loader = new org.springframework.core.io.DefaultResourceLoader();
org.springframework.core.io.Resource storeFile = loader.getResource("classpath:/saml/colombia.jks");
java.util.... | private static org.springframework.security.saml.key.KeyManager keyManager() {
org.springframework.core.io.DefaultResourceLoader loader = new org.springframework.core.io.DefaultResourceLoader();
org.springframework.core.io.Resource storeFile = loader.getResource("classpath:/saml/colombia.jks");
java.util.Ma... |
public java.lang.String read(java.lang.String id) {
DataManagers.DB db = mongoClient.getDB("test");
DataManagers.DBCollection col = db.getCollection("test1");
DataManagers.BasicDBObject query = new DataManagers.BasicDBObject("_id", new org.bson.types.ObjectId(id));
DataManagers.DBCursor cursor = col.fin... | public java.lang.String read(java.lang.String id) {
DataManagers.DB db = mongoClient.getDB("test");
DataManagers.DBCollection col = db.getCollection("test1");
DataManagers.BasicDBObject query = new DataManagers.BasicDBObject("_id", new org.bson.types.ObjectId(id));
DataManagers.DBCursor cursor = col.fin... |
protected void setUp() throws java.lang.Exception {
org.eclipse.core.runtime.IPath testrpath = new org.eclipse.core.runtime.Path("testresources");
createProjectClone(fJarProject, testrpath.append(fJarProject).toString(), false);
org.eclipse.jdt.debug.tests.sourcelookup.JarSourceLookupTests.fgJarProject = cr... | protected void setUp() throws java.lang.Exception {
org.eclipse.core.runtime.IPath testrpath = new org.eclipse.core.runtime.Path("testresources");
createProjectClone(fJarProject, testrpath.append(fJarProject).toString(), true);
org.eclipse.jdt.debug.tests.sourcelookup.JarSourceLookupTests.fgJarProject = cre... |
if (((index) == ((currentLine.length()) - 1)) || ((Tok) == (java.lang.Character.MIN_VALUE))) {
return TokenKind.EOF;
}
TokenKind getTok = TokenKind.ERROR;
Tok = currentLine.charAt(index);
if (java.lang.Character.isLowerCase(Tok)) {
getTok = TokenKind.LOWER_CASE_WORD;
}
return... | if ((((currentLine.length()) == 0) || ((index) == ((currentLine.length()) - 1))) || ((Tok) == (java.lang.Character.MIN_VALUE))) {
return TokenKind.EOF;
}
TokenKind getTok = TokenKind.ERROR;
Tok = currentLine.charAt(index);
if (java.lang.Character.isLowerCase(Tok)) {
getTok = TokenKin... |
public void moveEntity(double x, double y, double z) {
this.noClip = ((this.capabilities.isCreativeMode) && (me.dags.daflight.DaFlight.get().DFController.noClipOn)) && (me.dags.daflight.DaFlight.get().DFController.flyModOn);
super.moveEntity(x, y, z);
} | public void moveEntity(double x, double y, double z) {
if ((me.dags.daflight.DaFlight.get().DFController.noClipOn) && (me.dags.daflight.DaFlight.get().DFController.flyModOn))
this.noClip = true;
super.moveEntity(x, y, z);
} |
public void terminate(java.lang.String agentId, cd.go.contrib.elasticagents.docker.PluginSettings settings) throws java.lang.Exception {
cd.go.contrib.elasticagents.docker.DockerContainer instance = instances.get(agentId);
if (instance != null) {
instance.terminate(docker(settings));
}else {
... | public void terminate(java.lang.String agentId, cd.go.contrib.elasticagents.docker.PluginSettings settings) throws java.lang.Exception {
cd.go.contrib.elasticagents.docker.DockerContainer instance = instances.get(agentId);
if (instance != null) {
instance.terminate(docker(settings));
}else {
... |
protected void editItem(org.eclipse.jface.viewers.ISelection sel) {
org.eclipse.jface.viewers.IStructuredSelection selection = ((org.eclipse.jface.viewers.IStructuredSelection) (sel));
java.lang.String existing = ((java.lang.String) (selection.getFirstElement()));
java.lang.String value = getExistingInputOb... | protected void editItem(org.eclipse.jface.viewers.ISelection sel) {
org.eclipse.jface.viewers.IStructuredSelection selection = ((org.eclipse.jface.viewers.IStructuredSelection) (sel));
java.lang.String existing = ((java.lang.String) (selection.getFirstElement()));
java.lang.String value = getExistingInputOb... |
private boolean isVariableDefinition(com.ge.research.sadl.sADL.Declaration decl) {
if ((!(isDefiniteArticle(decl.getArticle()))) && ((isDeclInThereExists(decl)) || (((decl.getNewName()) == null) && ((decl.getType()) instanceof com.ge.research.sadl.sADL.SadlSimpleTypeReference)))) {
return true;
}
re... | private boolean isVariableDefinition(com.ge.research.sadl.sADL.Declaration decl) {
if ((!(isDefiniteArticle(decl.getArticle()))) && ((isDeclInThereExists(decl)) || ((decl.getType()) instanceof com.ge.research.sadl.sADL.SadlSimpleTypeReference))) {
return true;
}
return false;
} |
public boolean isBoardFull() {
for (int i = 1; i < ((width) - 1); i++) {
for (int j = 1; j < ((height) - 1); j++) {
if ((board[i][j]) == 0) {
return false;
}
}
}
return true;
} | public boolean isBoardFull() {
for (int i = 0; i < (width); i++) {
for (int j = 0; j < (height); j++) {
if ((board[i][j]) == 0) {
return false;
}
}
}
return true;
} |
public boolean onOptionsItemSelected(android.view.MenuItem item) {
int itemId = item.getItemId();
switch (itemId) {
case android.R.id.home :
{
android.content.Intent homeActivity = new android.content.Intent(getApplicationContext(), com.sefy.finalproject.HomeActivity.class);
... | public boolean onOptionsItemSelected(android.view.MenuItem item) {
int itemId = item.getItemId();
switch (itemId) {
case android.R.id.home :
{
android.content.Intent homeActivity = new android.content.Intent(getApplicationContext(), com.sefy.finalproject.HomeActivity.class);
... |
public napakalaki.Monster nextMonster() {
if (unusedMonster.isEmpty()) {
unusedMonster = usedMonster;
shuffleMonster();
usedMonster.clear();
}
napakalaki.Monster salida;
salida = unusedMonster.get(0);
unusedMonster.remove(0);
return salida;
} | public napakalaki.Monster nextMonster() {
if (unusedMonster.isEmpty()) {
unusedMonster = usedMonster;
shuffleMonster();
usedMonster.clear();
}
napakalaki.Monster salida;
salida = unusedMonster.get(((unusedMonster.size()) - 1));
unusedMonster.remove(((unusedMonster.size()) - 1... |
public void addRecord(com.experiment.chickenjohn.materialdemo.EcgData ecgData) {
int dataId;
dataId = ecgData.getDataId();
if (((dataId % 500) != 0) || (dataId == 0)) {
ecgDataTemp[(dataId % 500)] = ecgData;
}else {
com.experiment.chickenjohn.materialdemo.EcgDatabaseManager.dataInserting... | public void addRecord(com.experiment.chickenjohn.materialdemo.EcgData ecgData) {
int dataId;
dataId = ecgData.getDataId();
if (((dataId % 500) != 0) || (dataId == 0)) {
ecgDataTemp[(dataId % 500)] = ecgData;
}else {
com.experiment.chickenjohn.materialdemo.EcgDatabaseManager.dataInserting... |
public void fillTableSizeTest() throws java.lang.Exception {
infoeval.main.WikiData.Connector conn = new infoeval.main.WikiData.Connector();
assertNotNull(conn.getConnection());
conn.fillTableWithDBpediaResults();
java.sql.ResultSet rs = conn.runQuery("SELECT COUNT(*) FROM basic_info");
int size = r... | public void fillTableSizeTest() throws java.lang.Exception {
infoeval.main.WikiData.Connector conn = new infoeval.main.WikiData.Connector();
assert (conn.getConnection()) != null;
java.sql.ResultSet rs = conn.runQuery("SELECT COUNT(*) FROM basic_info");
int size = rs.getInt(1);
infoeval.main.WikiDat... |
public org.wordpress.android.ui.posts.adapters.PostsListAdapter getPostListAdapter() {
if ((mPostsListAdapter) == null) {
mPostsListAdapter = new org.wordpress.android.ui.posts.adapters.PostsListAdapter(getActivity(), org.wordpress.android.WordPress.getCurrentBlog(), mIsPage);
mPostsListAdapter.setO... | private org.wordpress.android.ui.posts.adapters.PostsListAdapter getPostListAdapter() {
if (((mPostsListAdapter) == null) && ((org.wordpress.android.WordPress.getCurrentBlog()) != null)) {
mPostsListAdapter = new org.wordpress.android.ui.posts.adapters.PostsListAdapter(getActivity(), org.wordpress.android.W... |
private void loadListing() {
clearListing();
java.util.ArrayList v = filterListing();
if (v != null) {
listing.setListData(v.toArray());
if ((currentMessage) == null) {
listing.ensureIndexIsVisible(0);
}else {
selectCurrentLine(currentMessage);
}
... | private void loadListing() {
clearListing();
if ((filterListing()) != null) {
listing.setListData(filterListing().toArray());
if ((currentMessage) == null) {
listing.ensureIndexIsVisible(0);
}else {
selectCurrentLine(currentMessage);
}
checkListCon... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.