buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
private static <J, S, D, I> void setValue(org.spine3.server.entity.storage.Column.MemoizedValue<J> columnValue, D destination, I columnIdentifier, org.spine3.server.entity.storage.ColumnType<J, S, D, I> columnType) {
final org.spine3.server.entity.storage.J initialValue = columnValue.getValue();
if (initialValu... | private static <J, S, D, I> void setValue(org.spine3.server.entity.storage.Column.MemoizedValue<J> columnValue, D destination, I columnIdentifier, org.spine3.server.entity.storage.ColumnType<J, S, D, I> columnType) {
final J initialValue = columnValue.getValue();
if (initialValue == null) {
columnType.s... |
public void onResume() {
super.onResume();
if (((isInitialPage()) && ((displayedPosts) != null)) && ((displayedPosts.size()) == 0)) {
showLoadingIndicator();
loadPage(currentPage);
}
} | public void onResume() {
super.onResume();
if ((isInitialPage()) && ((((displayedPosts) != null) && ((displayedPosts.size()) == 0)) || ((displayedPosts) == null))) {
showLoadingIndicator();
loadPage(currentPage);
}
} |
public static SQL.Query getSongQuery(java.lang.Object column, java.lang.Object... args) {
return org.fasola.fasolaminutes.SQL.select(C.SongLeader.leadId, C.Song.fullName, C.Leader.fullName.func("group_concat", "', '"), C.Singing.name, C.Singing.startDate, C.SongLeader.audioUrl).where(column, "IN", args).group(colum... | public static SQL.Query getSongQuery(java.lang.Object column, java.lang.Object... args) {
return org.fasola.fasolaminutes.SQL.select(C.SongLeader.leadId, C.Song.fullName, C.Leader.fullName.func("group_concat", "', '"), C.Singing.name, C.Singing.startDate, C.SongLeader.audioUrl).where(column, "IN", args).group(C.Son... |
private static org.json.JSONObject createJsonLocation(android.content.Context context) throws org.json.JSONException {
android.location.Location location = com.swiftsoft.colossus.mobileoil.Utils.getCurrentLocation(context);
org.json.JSONObject json = new org.json.JSONObject();
json.put("Latitude", location.... | private static org.json.JSONObject createJsonLocation(android.content.Context context) throws org.json.JSONException {
android.location.Location location = com.swiftsoft.colossus.mobileoil.Utils.getCurrentLocation(context);
if (location != null) {
org.json.JSONObject json = new org.json.JSONObject();
... |
private au.id.deejay.webserver.headers.Headers readHeaders(java.io.BufferedReader inputReader) throws java.io.IOException {
au.id.deejay.webserver.headers.Headers headers = new au.id.deejay.webserver.headers.HttpHeaders();
if (inputReader.ready()) {
java.lang.String line = inputReader.readLine();
... | private au.id.deejay.webserver.headers.Headers readHeaders() throws java.io.IOException {
au.id.deejay.webserver.headers.Headers headers = new au.id.deejay.webserver.headers.HttpHeaders();
if (inputReader.ready()) {
java.lang.String line = inputReader.readLine();
while ((line != null) && (!("".e... |
public java.util.Map<java.lang.String, java.lang.Double> getExchangeRates(javax.servlet.http.HttpServletRequest request) throws java.lang.Exception {
java.lang.String userEmail = request.getRemoteUser();
double usdRate = accountService.getUsdRate(userEmail);
double sarRate = accountService.getSarRate(userEm... | public java.util.Map<java.lang.String, java.lang.Double> getExchangeRates(javax.servlet.http.HttpServletRequest request) throws java.lang.Exception {
java.lang.String userEmail = request.getRemoteUser();
java.util.Map<java.lang.String, java.lang.Double> map = new java.util.HashMap<>();
map.put("usd_rate", a... |
public static void main(java.lang.String[] args) {
int width = 12;
int length = 10;
int height = 8;
FixDebugBox box1 = new DebugBox();
FixDebugBox box2 = new DebugBox(width, length, height);
java.lang.System.out.println("The dimensions of the first box are");
showData();
java.lang.System... | public static void main(java.lang.String[] args) {
int width = 12;
int length = 10;
int height = 8;
FixDebugBox box1 = new DebugBox();
FixDebugBox box2 = new DebugBox(width, length, height);
java.lang.System.out.println("The dimensions of the first box are");
box1.showData();
java.lang.S... |
public void setUp() throws java.lang.Exception {
this.playerName = "Fred";
this.bet = 5;
this.balance = 15;
this.limit = 0;
this.player = new game.Player(this.playerName, this.balance);
this.player.setLimit(this.limit);
} | public void setUp() throws java.lang.Exception {
this.playerName = "Fred";
this.bet = 5;
this.balance = 5;
this.limit = 0;
this.player = new game.Player(this.playerName, this.balance);
this.player.setLimit(this.limit);
} |
private void handleAction(javafx.event.ActionEvent event) {
if ((event.getSource()) instanceof javafx.scene.control.MenuItem) {
final javafx.scene.control.MenuItem source = ((javafx.scene.control.MenuItem) (event.getSource()));
buttonRespond(source.getText());
}else
if ((event.getSource(... | private void handleAction(javafx.event.ActionEvent event) {
if ((event.getSource()) instanceof javafx.scene.control.MenuItem) {
final javafx.scene.control.MenuItem source = ((javafx.scene.control.MenuItem) (event.getSource()));
buttonRespond(source.getText());
}else
if ((event.getSource(... |
private void initThrowable(final java.lang.Object[] params, final int argCount, final int usedParams) {
if (((usedParams < argCount) && ((this.throwable) == null)) && ((params[(argCount - 1)]) instanceof java.lang.Throwable)) {
this.throwable = ((java.lang.Throwable) (params[(argCount - 1)]));
}
} | private void initThrowable(final java.lang.Object[] params, final int argCount, final int usedParams) {
if ((usedParams < argCount) && ((params[(argCount - 1)]) instanceof java.lang.Throwable)) {
this.throwable = ((java.lang.Throwable) (params[(argCount - 1)]));
}else {
this.throwable = null;
... |
public static void sendUserProperty(android.app.Activity activity, @android.support.annotation.StringRes
int propertyId, @android.support.annotation.StringRes
int valueId) {
if (propertyId == 0) {
android.util.Log.w(com.massivedisaster.adal.analytics.FirebaseAnalyticsManager.class.getCanonicalName(), "You n... | public static void sendUserProperty(android.app.Activity activity, @android.support.annotation.StringRes
int propertyId, @android.support.annotation.StringRes
int valueId) {
if (propertyId == 0) {
android.util.Log.w(com.massivedisaster.adal.analytics.FirebaseAnalyticsManager.class.getCanonicalName(), "You n... |
public static de.btu.openinfra.backend.db.pojos.AttributeValueValuePojo mapToPojoStatically(java.util.Locale locale, de.btu.openinfra.backend.db.jpa.model.AttributeValueValue avv) {
de.btu.openinfra.backend.db.pojos.AttributeValueValuePojo avvPojo = new de.btu.openinfra.backend.db.pojos.AttributeValueValuePojo();
... | public static de.btu.openinfra.backend.db.pojos.AttributeValueValuePojo mapToPojoStatically(java.util.Locale locale, de.btu.openinfra.backend.db.jpa.model.AttributeValueValue avv) {
de.btu.openinfra.backend.db.pojos.AttributeValueValuePojo avvPojo = new de.btu.openinfra.backend.db.pojos.AttributeValueValuePojo();
... |
private void processStartOver() {
if (mainGame.isLanMultiplayer()) {
if (mainGame.isHost()) {
java.lang.System.out.println("HOST FORCES RESTART");
mainGame.getHost().updateRestart();
}else
if (mainGame.isClient()) {
java.lang.System.out.println("CL... | private void processStartOver() {
if (mainGame.isLanMultiplayer()) {
if (mainGame.isHost()) {
mainGame.getHost().updateRestart();
}else
if (mainGame.isClient()) {
mainGame.getClient().updateRestart();
}
}
mainGame.resetLifeCount();... |
public void onClickButtonSubmit(android.view.View view) {
android.util.Log.i("Hello", "onClickButtonSubmit(View view)");
android.widget.EditText editText = ((android.widget.EditText) (findViewById(R.id.edittext_name)));
java.lang.String name = editText.getText().toString();
android.util.Log.d("Hello", n... | public void onClickButtonSubmit(android.view.View view) {
android.util.Log.i("Hello", "onClickButtonSubmit(View view)");
android.widget.EditText editText = ((android.widget.EditText) (findViewById(R.id.edittext_name)));
java.lang.String name = editText.getText().toString();
android.util.Log.d("Hello", n... |
private boolean composite(edu.rosehulman.haussmsg.ai.Actor actor, edu.rosehulman.haussmsg.world.GameWorld world, boolean or) {
for (int i = 0; i < (vars.length); i++) {
boolean res = ((edu.rosehulman.haussmsg.ai.Condition) (vars[i])).consider(actor, world);
if (or && res)
return true;
... | private boolean composite(edu.rosehulman.haussmsg.ai.Actor actor, edu.rosehulman.haussmsg.world.GameWorld world, boolean or) {
for (int i = 0; i < (vars.length); i++) {
boolean res = ((edu.rosehulman.haussmsg.ai.Condition) (vars[i])).consider(actor, world);
if (or && res)
return true;
... |
public boolean isInsideMethod() {
boolean isInsideMethod = false;
java.lang.String[] p1 = this.body.split("<<<<<<<");
java.lang.String[] p2 = this.body.split(">>>>>>>");
java.lang.String[] p3 = p2[((p2.length) - 1)].split("\n");
if ((!(p1[0].equals(""))) && ((p3.length) > 1)) {
isInsideMetho... | public boolean isInsideMethod() {
boolean isInsideMethod = false;
java.lang.String[] p1 = this.body.split("<<<<<<<");
if (!(p1[0].equals(""))) {
isInsideMethod = true;
}
return isInsideMethod;
} |
public void onServiceConnected(android.content.ComponentName className, android.os.IBinder service) {
mediaPlayerService = ((com.bryantp.spotifystreamer.service.MediaPlayerService.MediaPlayerServiceBinder) (service)).getMediaPlayerService();
bound = true;
if (!(loaded)) {
mediaPlayerService.loadTrac... | public void onServiceConnected(android.content.ComponentName className, android.os.IBinder service) {
mediaPlayerService = ((com.bryantp.spotifystreamer.service.MediaPlayerService.MediaPlayerServiceBinder) (service)).getMediaPlayerService();
bound = true;
if (!(loaded)) {
mediaPlayerService.loadTrac... |
public int getFitness(v3.GeneticTree tree) {
int fitness = 0;
for (v3.Grid.Cell cell : tree.getCells()) {
fitness += 10;
if ((cell.getState()) == (State.LEAF)) {
fitness += cell.getLight();
fitness += 40;
}
}
return fitness;
} | public int getFitness(v3.GeneticTree tree) {
int fitness = 0;
for (v3.Grid.Cell cell : tree.getCells()) {
fitness += 10;
if ((cell.getState()) == (State.LEAF)) {
fitness += cell.getLight();
}
}
return fitness;
} |
public void getItemOffsets(android.graphics.Rect outRect, android.view.View view, android.support.v7.widget.RecyclerView parent, android.support.v7.widget.RecyclerView.State state) {
int position = parent.getChildAdapterPosition(view);
if (position > (columns)) {
outRect.top = padding;
}
if ((po... | public void getItemOffsets(android.graphics.Rect outRect, android.view.View view, android.support.v7.widget.RecyclerView parent, android.support.v7.widget.RecyclerView.State state) {
int position = parent.getChildAdapterPosition(view);
if (position >= (columns)) {
outRect.top = padding;
}
if ((p... |
public void testToString() {
org.junit.Assume.assumeFalse(java.awt.GraphicsEnvironment.isHeadless());
testNew();
java.lang.String ltsString = lts.toString();
org.junit.Assert.assertNotNull("ltsString not null", ltsString);
org.junit.Assert.assertEquals(ltsString, "LayoutSlip single");
java.lang.... | public void testToString() {
testNew();
java.lang.String ltsString = lts.toString();
org.junit.Assert.assertNotNull("ltsString not null", ltsString);
org.junit.Assert.assertEquals(ltsString, "LayoutSlip single");
java.lang.String ltdString = ltd.toString();
org.junit.Assert.assertNotNull("ltdStr... |
public void testInitByResource() throws java.io.IOException {
net.orzo.scripting.SourceCode src = net.orzo.scripting.SourceCode.fromResource("net/orzo/scripting/calculation.js");
assertEquals(src.getContents().trim().replaceAll("\\s+", " "), "(function(scope) { 'use strict'; scope.x1 = 100; scope.x2 = 12; scope... | public void testInitByResource() throws java.io.IOException {
net.orzo.scripting.SourceCode src = net.orzo.scripting.SourceCode.fromResource("net/orzo/scripting/calculation.js");
org.testng.Assert.assertEquals(src.getContents().trim().replaceAll("\\s+", " "), "(function(scope) { 'use strict'; scope.x1 = 100; sc... |
private boolean withinXBounds(int checkWidth, int i, java.awt.Point point) {
int widthLeftBounds = ((width) / 2) - (checkWidth / 2);
int widthRightBounds = ((width) / 2) + (checkWidth / 2);
return (((int) (point.getX())) >= widthLeftBounds) && (((int) (point.getX())) <= widthRightBounds);
} | private boolean withinXBounds(int checkWidth, int i, int x) {
int widthLeftBounds = ((width) / 2) - (checkWidth / 2);
int widthRightBounds = ((width) / 2) + (checkWidth / 2);
return (x >= widthLeftBounds) && (x <= widthRightBounds);
} |
private java.lang.String readIt(java.io.InputStream stream, int len) throws java.io.IOException {
java.io.Reader reader = new java.io.InputStreamReader(stream, "UTF-8");
char[] buffer = new char[len];
reader.read(buffer);
reader.read(buffer);
return new java.lang.String(buffer);
} | private java.lang.String readIt(java.io.InputStream stream, int len) throws java.io.IOException {
java.io.Reader reader = new java.io.InputStreamReader(stream, "UTF-8");
char[] buffer = new char[len];
reader.read(buffer);
return new java.lang.String(buffer);
} |
private void log(java.lang.String s) {
long startlogging = java.lang.System.currentTimeMillis();
android.util.Log.d(org.epfl.locationprivacy.adaptiveprotection.AdaptiveProtection.LOGTAG, s);
org.epfl.locationprivacy.util.Utils.appendLog(((org.epfl.locationprivacy.adaptiveprotection.AdaptiveProtection.LOGTAG... | private void log(java.lang.String s) {
long startlogging = java.lang.System.currentTimeMillis();
android.util.Log.d(org.epfl.locationprivacy.adaptiveprotection.AdaptiveProtection.LOGTAG, s);
org.epfl.locationprivacy.util.Utils.appendLog(((org.epfl.locationprivacy.adaptiveprotection.AdaptiveProtection.LOGTAG... |
public static void init() {
com.gamerking195.dev.thirst.listener.PlayerMoveListener.runnable.runTaskTimer(com.gamerking195.dev.thirst.Main.getInstance(), ((com.gamerking195.dev.thirst.Main.getInstance().getYAMLConfig().blockDrinkDelay) * 20), ((com.gamerking195.dev.thirst.Main.getInstance().getYAMLConfig().blockDri... | public static void init() {
com.gamerking195.dev.thirst.listener.PlayerMoveListener.runnable.runTaskTimer(com.gamerking195.dev.thirst.Main.getInstance(), (((long) (com.gamerking195.dev.thirst.Main.getInstance().getYAMLConfig().blockDrinkDelay)) * 20), (((long) (com.gamerking195.dev.thirst.Main.getInstance().getYAML... |
public void onJoin(org.dclayer.application.networktypeslotmap.NetworkEndpointSlot networkEndpointSlot, org.dclayer.net.Data ownAddressData) {
for (org.dclayer.net.Data partner : org.sblit.configuration.Configuration.getReceivers()) {
org.sblit.configuration.Configuration.getApp().requestApplicationChannel(n... | public void onJoin(org.dclayer.application.networktypeslotmap.NetworkEndpointSlot networkEndpointSlot, org.dclayer.net.Data ownAddressData) {
for (org.dclayer.net.Data partner : org.sblit.configuration.Configuration.getReceivers()) {
java.lang.System.out.println(new java.lang.String(partner.getData()));
... |
private void skipOffsetRow(org.apache.tajo.master.exec.NonForwardQueryResultScanner queryResultScanner, int offset) throws java.io.IOException {
if (offset < 0) {
return ;
}
int currentRow = queryResultScanner.getCurrentRowNumber();
if (offset < (currentRow + 1)) {
throw new java.lang.Ru... | private void skipOffsetRow(org.apache.tajo.master.exec.NonForwardQueryResultScanner queryResultScanner, int offset) throws java.io.IOException {
if (offset <= 0) {
return ;
}
int currentRow = queryResultScanner.getCurrentRowNumber();
if (offset < (currentRow + 1)) {
throw new java.lang.R... |
public void testOrderImportReport() {
org.kuali.ole.docstore.common.response.OleNGOrderImportResponse oleNGOrderImportResponse = new org.kuali.ole.docstore.common.response.OleNGOrderImportResponse();
org.kuali.ole.docstore.common.response.OrderResponse orderResponse = new org.kuali.ole.docstore.common.response.... | public void testOrderImportReport() {
org.kuali.ole.docstore.common.response.OleNGOrderImportResponse oleNGOrderImportResponse = new org.kuali.ole.docstore.common.response.OleNGOrderImportResponse();
org.kuali.ole.docstore.common.response.OrderResponse orderResponse = new org.kuali.ole.docstore.common.response.... |
public java.util.concurrent.CompletableFuture<io.discloader.discloader.entity.message.Message> sendEmbed(io.discloader.discloader.entity.RichEmbed embed) {
java.io.File file = null;
io.discloader.discloader.entity.sendable.Attachment attachment = null;
if (((embed.thumbnail) != null) && ((embed.thumbnail.fi... | public java.util.concurrent.CompletableFuture<io.discloader.discloader.entity.message.Message> sendEmbed(io.discloader.discloader.entity.RichEmbed embed) {
java.io.File file = null;
io.discloader.discloader.entity.sendable.Attachment attachment = null;
if (((embed.thumbnail) != null) && ((embed.thumbnail.fi... |
public void add(org.araqne.logdb.cep.EventContext ctx) {
if ((ctx.getExpireTime()) != 0)
synchronized(expireQueue) {
expireQueue.add(ctx);
}
if ((ctx.getTimeoutTime()) != 0)
synchronized(timeoutQueue) {
addTimeout(ctx);
}
} | public void add(org.araqne.logdb.cep.EventContext ctx) {
synchronized(expireQueue) {
if ((ctx.getExpireTime()) != 0)
expireQueue.add(ctx);
}
synchronized(timeoutQueue) {
if ((ctx.getTimeoutTime()) != 0)
addTimeout(ctx);
}
} |
public static void defaultInitGame(com.gfarcasiu.game.Game game) {
java.util.List<com.gfarcasiu.game.PlayingCard> cards = new java.util.ArrayList<>();
for (int val = 2; val <= 14; val++)
for (int suit = 0; suit <= 4; suit++)
cards.add(new com.gfarcasiu.game.PlayingCard(val, suit, true));
... | public static void defaultInitGame(com.gfarcasiu.game.Game game) {
java.util.List<com.gfarcasiu.game.PlayingCard> cards = new java.util.ArrayList<>();
for (int val = 2; val <= 14; val++)
for (int suit = 0; suit < 4; suit++)
cards.add(new com.gfarcasiu.game.PlayingCard(val, suit, true));
... |
public boolean onOverrideUrlLoading(java.lang.String var1) {
if (android.text.TextUtils.isEmpty(var1)) {
return false;
}
if ((this.largThan40) && (var1.startsWith("oneapm"))) {
this.oneapmWebViewClientApi.shouldOverrideUrlLoading(var1);
}
return false;
} | public boolean onOverrideUrlLoading(java.lang.String var1) {
if (android.text.TextUtils.isEmpty(var1)) {
return false;
}
if ((this.largThan40) && (var1.startsWith("oneapm"))) {
if (this.oneapmWebViewClientApi.shouldOverrideUrlLoading(var1)) {
return true;
}
}
retu... |
public void firstPresident() {
int length = client.getLength("data/Players.txt");
java.lang.String[] scores = new java.lang.String[length];
scores = client.readFile("data/Players.txt");
java.lang.String firstPres = scores[3];
client.openToWrite("data/Turn.txt");
client.writeToFile("#name of the ... | public void firstPresident() {
int length = client.getLength("data/Players.txt");
client.close();
java.lang.String[] scores = new java.lang.String[length];
scores = client.readFile("data/Players.txt");
java.lang.String firstPres = scores[3];
client.openToWrite("data/Turn.txt");
client.writeT... |
private void expectation() {
double probM = 0.0;
populateTheta();
java.util.Arrays.fill(expectedCounts, 0.0);
for (int i = 0; i < 4; i++) {
probM = theta[i];
expectedCounts[i] = probM * (numOfConfig[i]);
expectedCounts[(4 + i)] += (1 - probM) * (numOfConfig[(4 + i)]);
}
} | private void expectation() {
double probM = 0.0;
populateTheta();
for (int i = 0; i < 4; i++) {
probM = theta[i];
expectedCounts[i] = probM * (numOfConfig[i]);
expectedCounts[(4 + i)] = (1 - probM) * (numOfConfig[(4 + i)]);
}
} |
private static <T> java.util.List<T> prepend(T x, java.util.List<T> xs) {
java.util.ArrayList<T> rs = new java.util.ArrayList<T>();
rs.add(x);
rs.addAll(xs);
return rs;
} | private static <T> java.util.List<T> append(java.util.List<T> xs, T x) {
java.util.ArrayList<T> rs = new java.util.ArrayList<T>();
rs.addAll(xs);
rs.add(x);
return rs;
} |
private java.util.Properties maybeRetrieveProperties() {
java.util.Properties properties = new java.util.Properties();
if (new java.io.File(playn.java.JavaStorage.tempFile).exists()) {
try {
properties.load(new java.io.FileInputStream(new java.io.File(playn.java.JavaStorage.tempDir, playn.ja... | private java.util.Properties maybeRetrieveProperties() {
java.util.Properties properties = new java.util.Properties();
if (playn.java.JavaStorage.tempFile.exists()) {
try {
properties.load(new java.io.FileInputStream(playn.java.JavaStorage.tempFile));
isPersisted = true;
... |
public void invalidateCache(java.lang.String group) {
vg.civcraft.mc.namelayer.group.Group g = vg.civcraft.mc.namelayer.GroupManager.groupsByName.get(group);
if (g != null) {
g.setValid(false);
vg.civcraft.mc.namelayer.GroupManager.groupsByName.remove(group);
for (vg.civcraft.mc.namelaye... | public void invalidateCache(java.lang.String group) {
vg.civcraft.mc.namelayer.group.Group g = vg.civcraft.mc.namelayer.GroupManager.groupsByName.get(group.toLowerCase());
if (g != null) {
g.setValid(false);
vg.civcraft.mc.namelayer.GroupManager.groupsByName.remove(group.toLowerCase());
... |
public android.graphics.Bitmap decodeSampledBitmapFromRes(android.content.res.Resources resources, int resId, int reqWidth, int reqHeight) {
android.graphics.BitmapFactory.Options options = new android.graphics.BitmapFactory.Options();
options.inJustDecodeBounds = true;
android.graphics.BitmapFactory.decode... | public android.graphics.Bitmap decodeSampledBitmapFromRes(android.content.res.Resources resources, int resId, int reqWidth, int reqHeight) {
android.graphics.BitmapFactory.Options options = new android.graphics.BitmapFactory.Options();
options.inJustDecodeBounds = true;
android.graphics.BitmapFactory.decode... |
private void init(android.util.AttributeSet attrs) {
android.content.res.TypedArray typedArray = getContext().obtainStyledAttributes(attrs, R.styleable.ExpandableTextView);
mMaxCollapsedLines = typedArray.getInt(R.styleable.ExpandableTextView_maxCollapsedLines, com.thd.lib.ToggleExpandableTextView.MAX_COLLAPSED... | private void init(android.util.AttributeSet attrs) {
android.content.res.TypedArray typedArray = getContext().obtainStyledAttributes(attrs, R.styleable.ExpandableTextView);
mMaxCollapsedLines = typedArray.getInt(R.styleable.ExpandableTextView_maxCollapsedLines, com.thd.lib.ToggleExpandableTextView.MAX_COLLAPSED... |
public int compareTo(br.edu.ifrn.findyourpro.dominio.Localizacao o) {
int result = this.cep.compareTo(o.cep);
if (result == 0) {
return this.latitude.compareTo(o.latitude);
}
if (result == 0) {
return this.longitude.compareTo(o.longitude);
}
return result;
} | public int compareTo(br.edu.ifrn.findyourpro.dominio.Localizacao o) {
int result = this.cep.compareTo(o.cep);
if (result == 0) {
result = this.latitude.compareTo(o.latitude);
}
if (result == 0) {
result = this.longitude.compareTo(o.longitude);
}
return result;
} |
public void processWorkItem(final com.northernwall.hadrian.domain.WorkItem workItem) throws java.io.IOException {
if (workItem == null) {
return ;
}
workItem.setNextId(null);
dataAccess.saveWorkItem(workItem);
executor.submit(new java.lang.Runnable() {
@java.lang.Override
pub... | public void processWorkItem(final com.northernwall.hadrian.domain.WorkItem workItem) throws java.io.IOException {
if (workItem == null) {
return ;
}
workItem.setNextId(null);
dataAccess.saveWorkItem(workItem);
executor.submit(() -> {
process(workItem);
});
} |
public void onClick(android.view.View v) {
if (current_player.purchase(rowItem)) {
android.widget.Toast.makeText(getContext(), ((" +1 " + (rowItem.getName())) + " purchased!"), Toast.LENGTH_SHORT).show();
com.app.game.quizee.backend.BackEndManager.updateAchievements(current_player, getContext());
... | public void onClick(android.view.View v) {
if (current_player.purchase(rowItem)) {
android.widget.Toast.makeText(getContext(), ((" +1 " + (rowItem.getName())) + " purchased!"), Toast.LENGTH_SHORT).show();
com.app.game.quizee.backend.BackEndManager.updateAchievements(current_player, getContext());
... |
public static boolean verifyCertificatesExist(java.lang.String dockerCertPath) {
java.lang.String[] files = new java.lang.String[]{ "ca.pem" , "cert.pem" , "key.pem" };
for (java.lang.String file : files) {
java.io.File path = new java.io.File(dockerCertPath, file);
return path.exists();
}
... | public static boolean verifyCertificatesExist(java.lang.String dockerCertPath) {
java.lang.String[] files = new java.lang.String[]{ "ca.pem" , "cert.pem" , "key.pem" };
boolean result = true;
for (java.lang.String file : files) {
java.io.File path = new java.io.File(dockerCertPath, file);
re... |
public void onClick(android.view.View v) {
cz.pavelpilar.calculator.calculator.Display display = ((cz.pavelpilar.calculator.calculator.Display) (v.findViewById(R.id.history_display)));
java.lang.String source = display.getSource();
cz.pavelpilar.calculator.calculator.InputManager.setCurrent(((source.substri... | public void onClick(android.view.View v) {
cz.pavelpilar.calculator.calculator.Display display = ((cz.pavelpilar.calculator.calculator.Display) (v.findViewById(R.id.history_display)));
java.lang.String source = display.getSource();
cz.pavelpilar.calculator.calculator.InputManager.setCurrent((source + "|"));... |
public void shouldReturnTrueForIsInSimulationEnvironment() {
tds.session.ExternalSessionConfiguration externalSessionConfiguration = new tds.session.ExternalSessionConfiguration("UNIT_TEST", "Simulation", 0, 0);
org.assertj.core.api.Assertions.assertThat(externalSessionConfiguration.isInSimulationEnvironment())... | public void shouldReturnTrueForIsInSimulationEnvironment() {
tds.session.ExternalSessionConfiguration externalSessionConfiguration = new tds.session.ExternalSessionConfiguration("UNIT_TEST", "Simulation", 0, 0, 0, 0);
org.assertj.core.api.Assertions.assertThat(externalSessionConfiguration.isInSimulationEnvironm... |
public void delinkTeamFromExternalTeamOrphanExternalTeam() throws java.lang.Exception {
io.restassured.RestAssured.given().header(org.springframework.http.HttpHeaders.CONTENT_TYPE, "application/json").header("name-id", "urn:collab:person:surfnet.nl:tdoe").body(new teams.domain.ExternalTeamProperties(2L, "urn:collab... | public void delinkTeamFromExternalTeamOrphanExternalTeam() throws java.lang.Exception {
io.restassured.RestAssured.given().header(org.springframework.http.HttpHeaders.CONTENT_TYPE, "application/json").header("name-id", "urn:collab:person:surfnet.nl:tdoe").body(new teams.domain.ExternalTeamProperties(2L, "urn:collab... |
public static void setUp() {
ru.histone.v2.SimpleCompilerTest.parser = new ru.histone.v2.parser.Parser();
ru.histone.v2.SimpleCompilerTest.evaluator = new ru.histone.v2.evaluator.Evaluator();
ru.histone.v2.evaluator.resource.SchemaResourceLoader loader = new ru.histone.v2.evaluator.resource.SchemaResourceLo... | public static void setUp() {
ru.histone.v2.SimpleCompilerTest.parser = new ru.histone.v2.parser.Parser();
ru.histone.v2.SimpleCompilerTest.evaluator = new ru.histone.v2.evaluator.Evaluator();
ru.histone.v2.evaluator.resource.SchemaResourceLoader loader = new ru.histone.v2.evaluator.resource.SchemaResourceLo... |
public org.nschmidt.csg.VectorCSGd cross(org.nschmidt.csg.VectorCSGd a) {
return new org.nschmidt.csg.VectorCSGd((((this.y) * (a.z)) - ((this.z) * (a.y))), (((this.z) * (a.x)) - ((this.x) * (a.z))), (((this.x) * (a.y)) - ((this.y) * (a.x))));
} | public org.nschmidt.csg.VectorCSGd cross(org.nschmidt.csg.VectorCSGd a) {
return new org.nschmidt.csg.VectorCSGd((((y) * (a.z)) - ((z) * (a.y))), (((z) * (a.x)) - ((x) * (a.z))), (((x) * (a.y)) - ((y) * (a.x))));
} |
public java.lang.String receive() throws clientserver.exceptions.ConnectionException {
java.lang.String receivedStr = "";
java.lang.String tempStr;
try {
while ((tempStr = _in.readLine()) != null) {
receivedStr += tempStr;
}
} catch (java.io.IOException e) {
e.printS... | public java.lang.String receive() throws clientserver.exceptions.ConnectionException {
java.lang.String receivedStr = "";
java.lang.String tempStr;
try {
while ((tempStr = _in.readLine()) != null) {
receivedStr += tempStr + "\n";
}
} catch (java.io.IOException e) {
t... |
public android.view.ViewGroup listItemParent(android.view.View view) {
android.view.ViewGroup vg = ((android.view.ViewGroup) (view.getParent()));
while ((vg.getId()) != (R.id.list_item_parent)) {
vg = ((android.view.ViewGroup) (vg.getParent()));
}
return vg;
} | public android.view.ViewGroup listItemParent(android.view.View view) {
if ((view.getId()) == (R.id.list_item_parent)) {
return ((android.view.ViewGroup) (view));
}
android.view.ViewGroup vg = ((android.view.ViewGroup) (view.getParent()));
while ((vg.getId()) != (R.id.list_item_parent)) {
... |
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
if ((position == 0) && (positionOffsetPixels == 0)) {
finish();
}
if (position == 0) {
((me.ccrama.redditslide.Activities.CommentsScreenSingle.OverviewPagerAdapter) (pager.getAdapter())).blankPage.doOf... | public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
if ((position == 0) && (positionOffsetPixels == 0)) {
finish();
}
if ((position == 0) && ((((me.ccrama.redditslide.Activities.CommentsScreenSingle.OverviewPagerAdapter) (pager.getAdapter())).blankPage) != null... |
public void buttonClick(com.vaadin.ui.Button.ClickEvent event) {
final com.paolo.fht.vaadin.NodeBrowser nodeBrowser = new com.paolo.fht.vaadin.NodeBrowser("Root browser", "Select root", com.paolo.fht.vaadin.NodeBrowser.BrowserFilter.folder_only_no_hidden);
com.paolo.fht.vaadin.quick.QuickPopupWindow window = no... | public void buttonClick(com.vaadin.ui.Button.ClickEvent event) {
final com.paolo.fht.vaadin.NodeBrowser nodeBrowser = new com.paolo.fht.vaadin.NodeBrowser("Root browser", "Select root", pathField.getValue(), com.paolo.fht.vaadin.NodeBrowser.BrowserFilter.folder_only_no_hidden);
com.paolo.fht.vaadin.quick.QuickP... |
public java.lang.String checkTest(@org.springframework.web.bind.annotation.ModelAttribute(value = PASSED_TEST_MODEL)
com.englishschool.entity.spring.PassedTestModelAttribute passedModel, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) {
javax.servlet.http.HttpSession ... | public java.lang.String checkTest(@org.springframework.web.bind.annotation.ModelAttribute(value = PASSED_TEST_MODEL)
com.englishschool.entity.spring.PassedTestModelAttribute passedModel, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) {
javax.servlet.http.HttpSession ... |
public void failure(retrofit.RetrofitError error) {
mSignInButton.setEnabled(true);
mRegisterButton.setEnabled(true);
de.jhbruhn.moin.data.MoinError e = ((de.jhbruhn.moin.data.MoinError) (error.getBodyAs(de.jhbruhn.moin.data.MoinError.class)));
mSignInButton.setErrorText(e.message);
mSignInButton.se... | public void failure(retrofit.RetrofitError error) {
mSignInButton.setEnabled(true);
mRegisterButton.setEnabled(true);
de.jhbruhn.moin.data.MoinError e = ((de.jhbruhn.moin.data.MoinError) (error.getBodyAs(de.jhbruhn.moin.data.MoinError.class)));
if (e != null)
mSignInButton.setErrorText(e.message... |
public void onSwiped(android.support.v7.widget.RecyclerView.ViewHolder viewHolder, int swipeDir) {
com.android.summer.csula.foodvoter.models.User friend = ((com.android.summer.csula.foodvoter.models.User) (viewHolder.itemView.getTag()));
android.util.Log.d(com.android.summer.csula.foodvoter.FriendsActivity.TAG,... | public void onSwiped(android.support.v7.widget.RecyclerView.ViewHolder viewHolder, int swipeDir) {
com.android.summer.csula.foodvoter.models.User friend = ((com.android.summer.csula.foodvoter.models.User) (viewHolder.itemView.getTag()));
android.util.Log.d(com.android.summer.csula.foodvoter.FriendsActivity.TAG,... |
public void updateGeometricState() {
super.updateGeometricState();
if (!(children.isEmpty())) {
for (com.jme3.scene.BatchNode.Batch batch : batches.getArray()) {
if (batch.needMeshUpdate) {
batch.geometry.updateModelBound();
batch.geometry.updateWorldBound();
... | public void updateGeometricState() {
if (!(children.isEmpty())) {
for (com.jme3.scene.BatchNode.Batch batch : batches.getArray()) {
if (batch.needMeshUpdate) {
batch.geometry.updateModelBound();
batch.geometry.updateWorldBound();
batch.needMeshUpda... |
private void addDefaultStyleToLayer(it.geosolutions.geoserver.rest.encoder.GSLayerEncoder layerEncoder) {
if ((defaultStyle) != null) {
if (null == (defaultStyle.getWorkspace())) {
layerEncoder.setDefaultStyle(defaultStyle.getName());
}else {
layerEncoder.setDefaultStyle(defa... | private void addDefaultStyleToLayer(it.geosolutions.geoserver.rest.encoder.GSLayerEncoder layerEncoder) {
if ((defaultStyle) != null) {
if (null == (defaultStyle.getWorkspace())) {
layerEncoder.setDefaultStyle(defaultStyle.getName());
}else {
layerEncoder.setDefaultStyle(defa... |
protected void onJoin(java.lang.String channel, java.lang.String sender, java.lang.String login, java.lang.String hostname) {
java.lang.System.out.println(((("onJoin: " + sender) + " - ") + login));
it.biffi.jirc.bot.event.JoinEvent event = new it.biffi.jirc.bot.event.JoinEvent();
event.putData(JoinEvent.CH... | protected void onJoin(java.lang.String channel, java.lang.String sender, java.lang.String login, java.lang.String hostname) {
it.biffi.jirc.bot.event.JoinEvent event = new it.biffi.jirc.bot.event.JoinEvent();
event.putData(JoinEvent.CHANNEL, channel);
event.putData(JoinEvent.SENDER, sender);
event.putDa... |
public void onPostExecute(java.lang.String result) {
if (!((result.equals("false")) || (result == null))) {
android.widget.Toast.makeText(this, "帖子已创建", Toast.LENGTH_SHORT).show();
java.lang.System.out.println(bl.CampusBLService.inviteToAnswer(result, userList));
}else
android.widget.Toa... | public void onPostExecute(java.lang.String result) {
if (!((result.equals("false")) || (result == null))) {
android.widget.Toast.makeText(this, "帖子已创建", Toast.LENGTH_SHORT).show();
bl.CampusBLService.inviteToAnswer(result, userList);
}else
android.widget.Toast.makeText(this, "帖子创建失败", To... |
public void updateUI(com.carltaylordev.recordlisterandroidclient.UserInterface.EditListing.RecordSessionManager sessionManager) {
java.util.List<android.support.v4.app.Fragment> fragments = super.getActiveFragments(mFragList);
for (android.support.v4.app.Fragment frag : fragments) {
if (frag instanceof ... | public void updateUI(com.carltaylordev.recordlisterandroidclient.UserInterface.EditListing.RecordSessionManager sessionManager) {
java.util.List<android.support.v4.app.Fragment> fragments = super.getActiveFragments(mFragList);
for (android.support.v4.app.Fragment frag : fragments) {
if (frag instanceof ... |
public void onAuthStateChanged(@android.support.annotation.NonNull
com.google.firebase.auth.FirebaseAuth firebaseAuth) {
com.google.firebase.auth.FirebaseUser user = firebaseAuth.getCurrentUser();
if (user != null) {
android.util.Log.d("AUTH", ("Signed in... UserID: + " + (user.getUid())));
andr... | public void onAuthStateChanged(@android.support.annotation.NonNull
com.google.firebase.auth.FirebaseAuth firebaseAuth) {
com.google.firebase.auth.FirebaseUser user = firebaseAuth.getCurrentUser();
if (user != null) {
android.util.Log.d("AUTH", ("Signed in... UserID: + " + (user.getUid())));
andr... |
public src.Blockchain.ArrayList<java.lang.Integer> getBlockIndexes(int elem) {
src.Blockchain.ArrayList<java.lang.Integer> ret = new src.Blockchain.ArrayList();
for (src.Blockchain.BlockChain<T>.Block each : chain) {
if (each.elem.equals(elem)) {
ret.add(each.indice);
}
}
ret... | public java.util.ArrayList<java.lang.Integer> getBlockIndexes(int elem) {
java.util.ArrayList<java.lang.Integer> ret = new java.util.ArrayList<>();
for (src.Blockchain.BlockChain<T>.Block each : chain) {
if (each.elem.equals(elem)) {
ret.add(each.indice);
}
}
return ret;
} |
public java.lang.Integer getNextDate() {
len = inputStreamDecode.readRecord(buffer1, ((numEncrypted) * 98), 9);
if ((len) != 9) {
throw new java.lang.IllegalArgumentException("Error: Input DecompressStream must be pointing to file of at least 9 bytes");
}else {
currentDate = (java.nio.ByteBu... | public java.lang.Integer getNextDate() {
len = inputStreamDecode.readRecord(buffer1, 0, 9);
if ((len) != 9) {
throw new java.lang.IllegalArgumentException("Error: Input DecompressStream must be pointing to file of at least 9 bytes");
}else {
currentDate = (java.nio.ByteBuffer.wrap(buffer1).g... |
public java.lang.String getScopeName() {
java.lang.String scopeName = "";
if ((formattedScope) == null)
return null;
if (formattedScope.equals("0"))
scopeName = "Full";
if (formattedScope.equals("1"))
scopeName = "Broad";
if (formattedScope.equals("2"))
... | public java.lang.String getScopeName() {
java.lang.String scopeName = "";
if ((formattedScope) == null)
return scopeName;
if (formattedScope.equals("0"))
scopeName = "Full";
if (formattedScope.equals("1"))
scopeName = "Broad";
if (formattedScope.equals("2"))
... |
public void onEvent(com.orchid.ring.RingElement event, long sequence, boolean endOfBatch) throws java.lang.Exception {
java.lang.System.out.println(event.message);
publisher.send(event, event.userID);
assertNotNull(event.message);
assertNotNull(event.userID);
items.add(event.message.getIntroduce().g... | public void onEvent(com.orchid.ring.RingElement event, long sequence, boolean endOfBatch) throws java.lang.Exception {
publisher.send(event, event.userID);
assertNotNull(event.message);
assertNotNull(event.userID);
items.add(event.message.getIntroduce().getName());
if ((items.size()) == (messagesCou... |
public void changeViewPanel() {
if ((posPanel.getQty().compareTo(Env.ZERO)) == 0)
changeStatus(false);
else
changeStatus(true);
fieldQuantity.setValue(posPanel.getQty());
fieldPrice.setValue(posPanel.getPrice());
fieldDiscountPercentage.setValue(posPanel.getDiscountPercentage())... | public void changeViewPanel() {
if ((posPanel.getQty().compareTo(Env.ZERO)) < 0)
changeStatus(false);
else
changeStatus(true);
fieldQuantity.setValue(posPanel.getQty());
fieldPrice.setValue(posPanel.getPrice());
fieldDiscountPercentage.setValue(posPanel.getDiscountPercentage());... |
public void onClick(android.view.View v) {
if (getClicked()) {
if ((getS1()) == 2) {
C.setEnabled(true);
setClicked(true);
Handler.postDelayed(Correct1, 1750);
}else {
IC.setEnabled(true);
setClicked(true);
Handler.postDelayed(I... | public void onClick(android.view.View v) {
if (!(getClicked())) {
if ((getS1()) == 2) {
C.setEnabled(true);
setClicked(true);
Handler.postDelayed(Correct1, 1750);
}else {
IC.setEnabled(true);
setClicked(true);
Handler.postDelaye... |
protected void map(org.apache.hadoop.io.LongWritable key, org.apache.hadoop.io.Text value, fr.eurecom.dsg.mapreduce.Context context) throws java.io.IOException, java.lang.InterruptedException {
java.lang.String line = value.toString();
java.lang.String[] words = line.split("\\s+");
for (java.lang.String wor... | protected void map(org.apache.hadoop.io.LongWritable key, org.apache.hadoop.io.Text value, fr.eurecom.dsg.mapreduce.Context context) throws java.io.IOException, java.lang.InterruptedException {
java.lang.String line = value.toString();
java.lang.String[] words = line.split("\\s+");
for (java.lang.String wor... |
public static int maxDiff(int[] nums) {
if ((nums.length) <= 1) {
return -1;
}
int min = java.lang.Integer.MAX_VALUE;
int diff = 0;
for (int n : nums) {
diff = java.lang.Math.max((n - min), diff);
min = java.lang.Math.min(n, min);
}
return diff != 0 ? diff : -1;
} | public static int maxDiff(int[] nums) {
if ((nums.length) <= 1) {
return -1;
}
int min = nums[0];
int diff = 0;
for (int n : nums) {
diff = java.lang.Math.max((n - min), diff);
min = java.lang.Math.min(n, min);
}
return diff != 0 ? diff : -1;
} |
java.lang.String generateAuthorizationHeader(java.lang.String method, java.lang.String url, weibo4j.http.PostParameter[] params, weibo4j.http.OAuthToken token) {
java.util.TimeZone.setDefault(java.util.TimeZone.getTimeZone("GMT+8"));
long timestamp = (java.lang.System.currentTimeMillis()) / 1000;
long nonce... | java.lang.String generateAuthorizationHeader(java.lang.String method, java.lang.String url, weibo4j.http.PostParameter[] params, weibo4j.http.OAuthToken token) {
long timestamp = (java.lang.System.currentTimeMillis()) / 1000;
long nonce = timestamp + (weibo4j.http.OAuth.RAND.nextInt());
return generateAutho... |
public org.eclipse.titan.runtime.core.TitanUniversalCharString concatenate(final org.eclipse.titan.runtime.core.TitanUniversalCharString_Element other_value) {
mustBound("The left operand of concatenation is an unbound universal charstring value.");
other_value.mustBound("The right operand of concatenation is a... | public org.eclipse.titan.runtime.core.TitanUniversalCharString concatenate(final org.eclipse.titan.runtime.core.TitanUniversalCharString_Element other_value) {
mustBound("The left operand of concatenation is an unbound universal charstring value.");
other_value.mustBound("The right operand of concatenation is a... |
public static java.lang.String getFileNameWithoutExtension(java.io.File f) {
java.lang.String ext = null;
java.lang.String s = f.getName();
int i = s.lastIndexOf('.');
if ((i > 0) && (i < ((s.length()) - 1))) {
ext = s.substring(0, i);
}
return ext;
} | public static java.lang.String getFileNameWithoutExtension(java.io.File f) {
java.lang.String fileName = f.getName();
int i = fileName.lastIndexOf('.');
if ((i > 0) && (i < ((fileName.length()) - 1))) {
fileName = fileName.substring(0, i);
}
return fileName;
} |
public java.lang.Iterable<fiji.plugin.trackmate.Spot> getSpotsInFrame(java.lang.String channel, int cellNb, int frame) {
if (!(getCells(channel).containsKey(cellNb))) {
return null;
}
return getSpots(channel, cellNb).iterable(frame, true);
} | public java.lang.Iterable<fiji.plugin.trackmate.Spot> getSpotsInFrame(java.lang.String channel, int cellNb, int frame) {
if (!(getCells(channel).containsKey(cellNb))) {
return null;
}
return getSpots(channel, cellNb).iterable(frame, false);
} |
private void getScreenSize() {
android.view.WindowManager wm = ((android.view.WindowManager) (getContext().getSystemService(Context.WINDOW_SERVICE)));
android.view.Display display = wm.getDefaultDisplay();
android.graphics.Point size = new android.graphics.Point();
display.getSize(size);
widthOfSree... | private void getScreenSize() {
android.view.WindowManager wm = ((android.view.WindowManager) (getContext().getSystemService(Context.WINDOW_SERVICE)));
android.view.Display display = wm.getDefaultDisplay();
android.graphics.Point size = new android.graphics.Point();
display.getSize(size);
widthOfSree... |
public void flushToFile() throws java.io.IOException {
if (!(java.nio.file.Paths.get(com.warptronic.itdm.analyzer.AnalysisWriter.LOCATION).toFile().exists())) {
java.nio.file.Files.createDirectories(filePath);
}
java.nio.file.Files.write(filePath, lineToWrite, java.nio.charset.StandardCharsets.UTF_8... | public void flushToFile() throws java.io.IOException {
if (!(java.nio.file.Paths.get(com.warptronic.itdm.analyzer.AnalysisWriter.LOCATION).toFile().exists())) {
java.nio.file.Files.createDirectories(java.nio.file.Paths.get(com.warptronic.itdm.analyzer.AnalysisWriter.LOCATION));
}
java.nio.file.Files... |
public void setUp() throws java.lang.Exception {
emf = javax.persistence.Persistence.createEntityManagerFactory("GGO");
em = emf.createEntityManager();
player = em.find(entities.Player.class, 1);
game = em.find(entities.Game.class, 1);
message = em.find(entities.Message.class, 1);
} | public void setUp() throws java.lang.Exception {
emf = javax.persistence.Persistence.createEntityManagerFactory("GGO");
em = emf.createEntityManager();
player = em.find(entities.Player.class, 1);
game = em.find(entities.Game.class, 1);
} |
public boolean equals(java.lang.Object obj) {
if (!((set) instanceof util.IntSetTIntSet)) {
java.lang.System.err.println("OPERAND should be TIntSet");
java.lang.System.exit((-1));
}
util.IntSetTIntSet temp = ((util.IntSetTIntSet) (set));
return this.contentEq(temp);
} | public boolean equals(java.lang.Object obj) {
if (!(obj instanceof util.IntSetTIntSet)) {
java.lang.System.err.println("OPERAND should be TIntSet");
java.lang.System.exit((-1));
}
util.IntSetTIntSet temp = ((util.IntSetTIntSet) (obj));
return this.contentEq(temp);
} |
public boolean isNoWeight() {
final cc.ethon.logmaker.Exercise.ExerciseType type = set.getExercise().getType();
if ((type != (cc.ethon.logmaker.Exercise.ExerciseType.WeightReps)) && (type != (cc.ethon.logmaker.Exercise.ExerciseType.WeightTime))) {
return true;
}
return (set.getWeight()) <= 0.1;
... | public boolean isNoWeight() {
final cc.ethon.logmaker.Exercise.ExerciseType type = set.getExercise().getType();
if ((type != (cc.ethon.logmaker.Exercise.ExerciseType.WeightReps)) && (type != (cc.ethon.logmaker.Exercise.ExerciseType.WeightTime))) {
return true;
}
return (set.getWeight()) == 0.0;
... |
public void actionPerformed(java.awt.event.ActionEvent e) {
java.lang.String speed = speedField.getText();
try {
java.lang.Integer.parseInt(speed);
} catch (java.lang.NumberFormatException exept) {
return ;
}
int sp = java.lang.Integer.parseInt(speed);
model.timeSpeed = sp;
u... | public void actionPerformed(java.awt.event.ActionEvent e) {
java.lang.String speed = speedField.getText().trim();
try {
int sp = java.lang.Integer.parseInt(speed);
if (sp <= 0)
return ;
model.timeSpeed = sp;
updateTimeTimer.setDelay((1000 / sp));
} catch ... |
public void initFoodList(com.luvsoft.entities.Category cate) {
java.util.List<com.luvsoft.entities.Food> foodList = new java.util.ArrayList<com.luvsoft.entities.Food>();
if (cate != null) {
com.luvsoft.facades.FoodFacade foodFacade = new com.luvsoft.facades.FoodFacade();
for (java.lang.String fo... | public void initFoodList(com.luvsoft.entities.Category cate) {
if (cate != null) {
java.util.List<com.luvsoft.entities.Food> foodList = new java.util.ArrayList<com.luvsoft.entities.Food>();
com.luvsoft.facades.FoodFacade foodFacade = new com.luvsoft.facades.FoodFacade();
for (java.lang.Strin... |
public void convertToReducible(org.teavm.common.irreducible.Graph cfg, int[] weight, org.teavm.common.irreducible.GraphSplittingBackend backend) {
this.backend = backend;
int[] identityNodeMap = new int[cfg.size()];
for (int i = 0; i < (identityNodeMap.length); ++i) {
identityNodeMap[i] = i;
}
... | public void convertToReducible(org.teavm.common.irreducible.Graph cfg, int[] weight, org.teavm.common.irreducible.GraphSplittingBackend backend) {
this.backend = backend;
int[][] identityNodeMap = new int[cfg.size()][];
for (int i = 0; i < (identityNodeMap.length); ++i) {
identityNodeMap[i] = new in... |
public void canReturnWinOrLoseScoreWhenTheAiItselfWins() throws java.lang.Exception {
com.tictactoe.Board board = new com.tictactoe.Board();
populateBoard_X_Wins(board);
com.tictactoe.Rules rules = new com.tictactoe.RulesFor3x3();
com.tictactoe.Minimax minimax = new com.tictactoe.Minimax(rules, board, "... | public void canReturnWinOrLoseScoreWhenTheAiItselfWins() throws java.lang.Exception {
com.tictactoe.Board board = new com.tictactoe.Board();
populateBoard_X_Wins(board);
com.tictactoe.Rules rules = new com.tictactoe.RulesFor3x3();
com.tictactoe.Minimax minimax = new com.tictactoe.Minimax(rules, board, "... |
protected void onResume() {
android.util.Log.d("LocalBroadcastManager", "onResume");
if (sharedPref.getBoolean(Constants.REFRESH, false)) {
if ((mAdapter) != null) {
android.util.Log.d("MainActivity", "Refresh");
FilterReset(false);
}
android.content.SharedPrefere... | protected void onResume() {
android.util.Log.d("LocalBroadcastManager", "onResume");
if (sharedPref.getBoolean(Constants.REFRESH, false)) {
if ((mAdapter) != null) {
android.util.Log.d("MainActivity", "Refresh");
FilterReset(true);
}
android.content.SharedPreferen... |
public android.content.Loader<android.database.Cursor> onCreateLoader(int id, android.os.Bundle args) {
java.lang.String[] projection = new java.lang.String[]{ com.patane.riccardo.inventory.data.ProductContract.ProductEntry._ID , com.patane.riccardo.inventory.data.ProductContract.ProductEntry.COLUMN_NAME , com.pata... | public android.content.Loader<android.database.Cursor> onCreateLoader(int id, android.os.Bundle args) {
java.lang.String[] projection = new java.lang.String[]{ com.patane.riccardo.inventory.data.ProductContract.ProductEntry.COLUMN_NAME , com.patane.riccardo.inventory.data.ProductContract.ProductEntry.COLUMN_QUANTIT... |
private boolean cansplit(com.coloniergames.ld37.level.Bnt node, int minsize) {
return !(((node.getHeight()) < ((minsize + 1) * 2)) || ((node.getWidth()) < ((minsize + 1) * 2)));
} | private boolean cansplit(com.coloniergames.ld37.level.Bnt node, int minsize) {
return !(((node.getHeight()) < ((minsize * 2) + 1)) || ((node.getWidth()) < ((minsize * 2) + 1)));
} |
public android.view.View onCreateView(android.view.LayoutInflater inflater, @android.support.annotation.Nullable
android.view.ViewGroup container, @android.support.annotation.Nullable
android.os.Bundle savedInstanceState) {
final android.view.View rootView = inflater.inflate(R.layout.pager_fragment, container, fals... | public android.view.View onCreateView(android.view.LayoutInflater inflater, @android.support.annotation.Nullable
android.view.ViewGroup container, @android.support.annotation.Nullable
android.os.Bundle savedInstanceState) {
final android.view.View rootView = inflater.inflate(R.layout.pager_fragment, container, fals... |
private void restoreNonSharedSettings() {
org.sleuthkit.autopsy.experimental.configuration.AutoIngestUserPreferences.setSharedConfigFolder(sharedConfigFolder);
org.sleuthkit.autopsy.experimental.configuration.AutoIngestUserPreferences.setSharedConfigMaster(sharedConfigMaster);
org.sleuthkit.autopsy.experime... | private void restoreNonSharedSettings() {
org.sleuthkit.autopsy.experimental.configuration.AutoIngestUserPreferences.setSharedConfigFolder(sharedConfigFolder);
org.sleuthkit.autopsy.experimental.configuration.AutoIngestUserPreferences.setSharedConfigMaster(sharedConfigMaster);
org.sleuthkit.autopsy.core.Use... |
public java.lang.String toString() {
java.lang.String s = "";
switch (operation) {
case REPLACE :
s = ((("REPLACE(" + (source.toString())) + ",") + (target.toString())) + ")";
break;
case DISTRIBUTE :
s = ((("DISTRIBUTE(" + (source.toString())) + ",") + (targe... | public java.lang.String toString() {
java.lang.String s = "";
switch (operation) {
case REPLACE :
s = ((("REPLACE(" + (source.toString())) + ",") + (target.toString())) + ")";
break;
}
return s;
} |
private void deleteFromFavorites() {
android.net.Uri uri = FavouritesContract.FavouriteEntry.CONTENT_URI;
android.content.ContentResolver resolver = getApplicationContext().getContentResolver();
long noDeleted = resolver.delete(uri, ((FavouritesContract.FavouriteEntry.COLUMN_ID) + " = ? "), new java.lang.St... | private void deleteFromFavorites() {
android.net.Uri uri = FavouritesContract.FavouriteEntry.CONTENT_URI;
android.content.ContentResolver resolver = getApplicationContext().getContentResolver();
long noDeleted = resolver.delete(uri, ((FavouritesContract.FavouriteEntry.COLUMN_ID) + " = ? "), new java.lang.St... |
public java.lang.Object resolveArgument(org.springframework.core.MethodParameter parameter, org.springframework.web.method.support.ModelAndViewContainer mavContainer, org.springframework.web.context.request.NativeWebRequest webRequest, org.springframework.web.bind.support.WebDataBinderFactory binderFactory) throws java... | public java.lang.Object resolveArgument(org.springframework.core.MethodParameter parameter, org.springframework.web.method.support.ModelAndViewContainer mavContainer, org.springframework.web.context.request.NativeWebRequest webRequest, org.springframework.web.bind.support.WebDataBinderFactory binderFactory) throws java... |
public static void setSession(java.lang.String UUID2, java.lang.String time) throws java.sql.SQLException {
com.myththewolf.MythBans.lib.player.MythPlayer.ps = ((java.sql.PreparedStatement) (com.myththewolf.MythBans.lib.SQL.MythSQLConnect.getConnection().prepareStatement("UPDATE MythBans_PlayerStats SET session_sta... | public static void setSession(java.lang.String UUID2, java.lang.String time) throws java.sql.SQLException {
com.myththewolf.MythBans.lib.player.MythPlayer.ps = ((java.sql.PreparedStatement) (com.myththewolf.MythBans.lib.SQL.MythSQLConnect.getConnection().prepareStatement("UPDATE MythBans_PlayerStats SET session_sta... |
private shef.mutation.Declaration getDeclarationFromRuleBlock(shef.mutation.Declaration chosen, shef.mutation.RuleSet toMutate) {
try {
for (shef.mutation.Declaration d : toMutate.asList()) {
if (chosen.getProperty().equals(d.getProperty())) {
return d;
}
}
... | private shef.mutation.Declaration getDeclarationFromRuleBlock(shef.mutation.Declaration chosen, shef.mutation.RuleSet toMutate) {
try {
for (shef.mutation.Declaration d : toMutate.asList()) {
if (chosen.getProperty().equals(d.getProperty())) {
return d;
}
}
... |
private boolean isEvictableFreeHeapPercentage(final com.hazelcast.map.impl.MapContainer mapContainer) {
final long currentFreeHeapSize = getAvailableMemory();
final com.hazelcast.config.MaxSizeConfig maxSizeConfig = mapContainer.getMapConfig().getMaxSizeConfig();
final int freeHeapPercentage = com.hazelcast... | private boolean isEvictableFreeHeapPercentage(final com.hazelcast.map.impl.MapContainer mapContainer) {
final long currentFreeHeapSize = getAvailableMemory();
final com.hazelcast.config.MaxSizeConfig maxSizeConfig = mapContainer.getMapConfig().getMaxSizeConfig();
final float freeHeapPercentage = com.hazelca... |
public void addListeners() {
org.jnativehook.GlobalScreen.setEventDispatcher(new org.jnativehook.dispatcher.SwingDispatchService());
try {
org.jnativehook.GlobalScreen.registerNativeHook();
} catch (org.jnativehook.NativeHookException ex) {
java.lang.System.err.println(("Error starting KeyHa... | public void addListeners() {
org.jnativehook.GlobalScreen.setEventDispatcher(new org.jnativehook.dispatcher.SwingDispatchService());
try {
org.jnativehook.GlobalScreen.registerNativeHook();
org.jnativehook.GlobalScreen.addNativeKeyListener(this);
} catch (org.jnativehook.NativeHookException ... |
protected void addActionButton(int notificationId, java.lang.String action, android.support.v4.app.NotificationCompat.Builder builder, int iconResId, com.nu.art.cyborg.common.interfaces.StringResourceResolver stringResolver, android.os.Bundle notificationData) {
android.app.PendingIntent moreInfoIntent = createPend... | protected void addActionButton(android.support.v4.app.NotificationCompat.Builder builder, short notificationId, java.lang.String action, int iconResId, java.lang.String label, android.os.Bundle notificationData) {
android.app.PendingIntent moreInfoIntent = createPendingIntent(notificationId, action, notificationDat... |
public void await(org.araqne.logdb.client.LogDbClient.QueuedRows r) throws java.lang.InterruptedException {
try {
wCalls.put(r, r);
signal();
while (true) {
if (!(running)) {
r.setDone(new java.net.SocketException("closed"));
break;
}
... | public void await(org.araqne.logdb.client.LogDbClient.QueuedRows r) throws java.lang.InterruptedException {
try {
wCalls.put(r, r);
signal();
while (true) {
if (!(running)) {
r.setDone(new java.net.SocketException("closed"));
break;
}
... |
private void onClientFinishedMessage(tuc.werkstatt.doubleup.Network.ClientFinishedMessage msg) {
if (((msg.gameID) != (currMiniGameID)) || (miniGameAlreadyFinished)) {
return ;
}
miniGameAlreadyFinished = true;
Gdx.app.log("Server", ("ClientFinishedMessage received from client " + (msg.clientID)... | private void onClientFinishedMessage(tuc.werkstatt.doubleup.Network.ClientFinishedMessage msg) {
if (((msg.gameID) != (currMiniGameID)) || (miniGameAlreadyFinished)) {
return ;
}
miniGameAlreadyFinished = true;
Gdx.app.log("Server", ("ClientFinishedMessage received from client " + (msg.clientID)... |
public synchronized void setMap(java.util.Map m) {
fruitEditor.setMap(m);
map = m;
mapWidth = m.getCols();
mapHeight = m.getRows();
gridWidth = m.getGridWidth();
gridHeight = m.getGridHeight();
} | public synchronized void setMap(java.util.Map m) {
fruitEditor.setMap(m);
map = m;
mapWidth = m.getCols();
mapHeight = m.getRows();
gridWidth = m.getGridWidth();
gridHeight = m.getGridHeight();
update();
} |
public void compressorRegistry_null() {
io.grpc.CompressorRegistry defaultValue = builder.compressorRegistry;
builder.compressorRegistry(io.grpc.CompressorRegistry.newEmptyInstance());
org.junit.Assert.assertNotEquals(defaultValue, builder.compressorRegistry);
org.junit.Assert.assertEquals(builder, buil... | public void compressorRegistry_null() {
io.grpc.CompressorRegistry defaultValue = builder.compressorRegistry;
builder.compressorRegistry(io.grpc.CompressorRegistry.newEmptyInstance());
assertNotEquals(defaultValue, builder.compressorRegistry);
org.junit.Assert.assertEquals(builder, builder.compressorReg... |
public void onClick(int position) {
int taskId = tasks.get(position).getId();
android.content.Intent intent = new android.content.Intent(getActivity(), com.android.example.todoer.activity.EditorActivity.class);
intent.putExtra(EditorActivity.EXTRA_TASK_ID, taskId);
startActivity(intent);
} | public void onClick(int position) {
long taskId = tasks.get(position).getId();
android.content.Intent intent = new android.content.Intent(getActivity(), com.android.example.todoer.activity.EditorActivity.class);
intent.putExtra(EditorActivity.EXTRA_TASK_ID, taskId);
startActivity(intent);
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.