buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public static search.Genre getGenreByByteId(byte id) {
int convertedByte = (id >= 0) ? id : ((int) (id)) + 256;
if ((convertedByte < 0) || (convertedByte >= (search.Genre.values().length))) {
return search.Genre.values()[0];
}else {
return search.Genre.values()[convertedByte];
}
} | public static search.Genre getGenreByByteId(byte id) {
int convertedByte = (id >= 0) ? id : ((int) (id)) + 256;
if ((convertedByte < 0) || (convertedByte >= (search.Genre.values().length))) {
return search.Genre.values()[0];
}else {
return search.Genre.values()[(convertedByte + 1)];
}
} |
public void init(org.csstudio.utility.toolbox.types.DocumentCategory documentCategory, org.csstudio.utility.toolbox.types.ForeignKey foreignKey) {
org.apache.commons.lang.Validate.notNull(documentCategory, "documentCategory must not be null");
org.apache.commons.lang.Validate.notEmpty(documentCategory.getValue(... | public void init(org.csstudio.utility.toolbox.types.DocumentCategory documentCategory, org.csstudio.utility.toolbox.types.ForeignKey foreignKey) {
org.apache.commons.lang.Validate.notNull(documentCategory, "documentCategory must not be null");
org.apache.commons.lang.Validate.notEmpty(documentCategory.getValue(... |
public void digest(java.util.Set<gomoku.Action> actions) {
int i = 0;
int j = 0;
for (gomoku.Action a : actions) {
i = a.y();
j = a.x();
ref[i][j].setIcon(empty);
ref[i][j].paintImmediately((i * (gomoku.Main.L)), (j * (gomoku.Main.L)), gomoku.Main.L, gomoku.Main.L);
}
} | public void digest(java.util.Set<gomoku.Action> actions) {
int i = 0;
int j = 0;
for (gomoku.Action a : actions) {
i = a.x();
j = a.y();
ref[i][j].setIcon(empty);
ref[i][j].paintImmediately(j, i, gomoku.Main.L, gomoku.Main.L);
}
} |
public void printBoard(boolean show) {
for (int i = 0; i < (board.length); i++) {
for (int j = 0; j < (board.length); j++) {
MineSweeper.Square curr = board[i][j];
java.lang.System.out.print((show || (curr.shown) ? board[i][j] : " "));
}
java.lang.System.out.println("... | public void printBoard(boolean show) {
for (int i = 0; i < (board.length); i++) {
for (int j = 0; j < (board.length); j++) {
MineSweeper.Square curr = board[i][j];
java.lang.System.out.print(curr);
}
java.lang.System.out.println("");
}
} |
private boolean executeModule(com.sun.net.httpserver.HttpExchange exchange) throws java.io.IOException {
namvc.framework.httpcontext.NaMvcHttpContext httpContext = getHttpContext(exchange);
boolean result = false;
try {
result = module.execute(httpContext);
} catch (java.io.IOException ex) {
... | private boolean executeModule(com.sun.net.httpserver.HttpExchange exchange) {
boolean result = false;
try {
namvc.framework.httpcontext.NaMvcHttpContext httpContext = getHttpContext(exchange);
result = module.execute(httpContext);
} catch (java.io.IOException ex) {
java.lang.System.o... |
public void fail(int i, java.lang.String s) {
android.util.Log.d(com.centralink.account.SignUpActivity.TAG, ((("login() - errCode = " + i) + ", errMsg = ") + s));
android.widget.Toast.makeText(context, ("Login Fail!" + (com.centralink.account.CloudResConverter.getErrMsg(s))), Toast.LENGTH_LONG);
} | public void fail(int i, java.lang.String s) {
android.util.Log.d(com.centralink.account.SignUpActivity.TAG, ((("login() - errCode = " + i) + ", errMsg = ") + s));
android.widget.Toast.makeText(context, ("Login Fail!" + (com.centralink.account.CloudResConverter.getErrMsg(s))), Toast.LENGTH_LONG).show();
} |
public void setSortMode(org.ligi.fast.model.DynamicAppInfoList.SortMode mode) {
currentSortMode = mode;
if (mode.equals(org.ligi.fast.model.DynamicAppInfoList.SortMode.ALPHABETICAL)) {
this.sorter = new org.ligi.fast.model.AppInfoSortByLabelComparator();
}else
if (mode.equals(org.ligi.fast.m... | public void setSortMode(org.ligi.fast.model.DynamicAppInfoList.SortMode mode) {
currentSortMode = mode;
if (mode.equals(org.ligi.fast.model.DynamicAppInfoList.SortMode.ALPHABETICAL)) {
sorter = new org.ligi.fast.model.AppInfoSortByLabelComparator();
}else
if (mode.equals(org.ligi.fast.model.... |
public void addGameObject() {
adventure.GameObject gameobj = null;
junit.framework.Assert.assertNull("Should be null since uninitialized.", gameobj);
gameobj = new adventure.Thing("Box", "A box to hold things");
java.util.List<java.lang.String> objwords = null;
junit.framework.Assert.assertNull("Sho... | public void addGameObject() {
adventure.GameObject gameobj = null;
junit.framework.Assert.assertNull("Should be null since uninitialized.", gameobj);
gameobj = new adventure.Thing("Box", "A box to hold things");
java.util.List<java.lang.String> objwords = new java.util.List<java.lang.String>();
objw... |
public java.lang.String getRandomString(int length) {
char[] chars = "abcdefghijklmnopqrstuvwxyz1234567890".toCharArray();
java.lang.StringBuilder sb = new java.lang.StringBuilder();
java.util.Random random = new java.util.Random();
for (int i = 0; i < (length - 1); i++) {
char c = chars[random.... | public java.lang.String getRandomString(int length) {
char[] chars = "abcdefghijklmnopqrstuvwxyz1234567890".toCharArray();
java.lang.StringBuilder sb = new java.lang.StringBuilder();
java.util.Random random = new java.util.Random();
for (int i = 0; i < length; i++) {
char c = chars[random.nextIn... |
public java.lang.String updateVenue(java.lang.Long venue_ID, java.lang.String updatedVenue) {
com.qa.cinema.persistence.Venue updateVenue = util.getObjectForJSON(updatedVenue, com.qa.cinema.persistence.Venue.class);
com.qa.cinema.persistence.Venue venue = findVenue(java.lang.Long.valueOf(venue_ID));
java.la... | public java.lang.String updateVenue(java.lang.Long venue_ID, java.lang.String updatedVenue) {
com.qa.cinema.persistence.Venue updateVenue = util.getObjectForJSON(updatedVenue, com.qa.cinema.persistence.Venue.class);
com.qa.cinema.persistence.Venue venue = findVenue(java.lang.Long.valueOf(venue_ID));
java.la... |
protected void onPostExecute(java.lang.String result) {
android.util.Log.d("GooglePlacesReadTask", "onPostExecute Entered");
java.util.List<java.util.HashMap<java.lang.String, java.lang.String>> nearbyPlacesList = null;
com.untitledapps.meetasweedt.DataParser dataParser = new com.untitledapps.meetasweedt.Da... | protected void onPostExecute(java.lang.String result) {
java.lang.System.out.println(result);
android.util.Log.d("GooglePlacesReadTask", "onPostExecute Entered");
java.util.List<java.util.HashMap<java.lang.String, java.lang.String>> nearbyPlacesList = null;
com.untitledapps.meetasweedt.DataParser dataPa... |
public void onViewCreated(android.view.View view, android.os.Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
login = getArguments().getString(com.globant.practice.presentation.view.fragment.SubscriberDetailsFragment.LOGIN_KEY);
if ((login) != null) {
((android.support.v7.... | public void onViewCreated(android.view.View view, android.os.Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
login = getArguments().getString(com.globant.practice.presentation.view.fragment.SubscriberDetailsFragment.LOGIN_KEY);
if (!(login.isEmpty())) {
((android.support.... |
public void testDeleteColumnDeletesColumn() {
com.buabook.kdb.data.KdbTable table = new com.buabook.kdb.data.KdbTable("my-test-table");
table.setInitialDataSet(getTable());
table.deleteColumn("key1");
org.junit.Assert.assertThat(table.getTableData(), org.hamcrest.Matchers.not(org.hamcrest.Matchers.hasKe... | public void testDeleteColumnDeletesColumn() {
com.buabook.kdb.data.KdbTable table = new com.buabook.kdb.data.KdbTable("my-test-table");
table.setInitialDataSet(getTable());
table.deleteColumn("key1");
org.junit.Assert.assertThat(table.getTableData(), not(hasKey("key1")));
} |
for (android.bluetooth.BluetoothGattService svc : mServices) {
for (android.bluetooth.BluetoothGattCharacteristic charac : svc.getCharacteristics()) {
android.util.Log.w(android.bluetooth.BluetoothGatt.TAG, ((("getCharacteristicById() comparing " + (charac.getInstanceId())) + " and ") + instance... | for (android.bluetooth.BluetoothGattService svc : mServices) {
for (android.bluetooth.BluetoothGattCharacteristic charac : svc.getCharacteristics()) {
if ((charac.getInstanceId()) == instanceId)
return charac;
}
}
return null;
} |
public java.awt.geom.Point2D.Double getPageOffset() {
org.apache.poi.xdgf.usermodel.XDGFCell xoffcell = _pageSheet.getCell("XRulerOrigin");
org.apache.poi.xdgf.usermodel.XDGFCell yoffcell = _pageSheet.getCell("YRulerOrigin");
double xoffset = 0;
double yoffset = 0;
if (xoffcell != null)
xoff... | public java.awt.geom.Point2D.Double getPageOffset() {
org.apache.poi.xdgf.usermodel.XDGFCell xoffcell = _pageSheet.getCell("XRulerOrigin");
org.apache.poi.xdgf.usermodel.XDGFCell yoffcell = _pageSheet.getCell("YRulerOrigin");
double xoffset = 0;
double yoffset = 0;
if (xoffcell != null)
xoff... |
protected void moveKibble(boydjohnson.Snake s) {
java.util.Random rng = new java.util.Random();
boolean kibbleInSnake = true;
while (kibbleInSnake == true) {
kibbleX = rng.nextInt(boydjohnson.SnakeGame.getxSquares());
kibbleY = rng.nextInt(boydjohnson.SnakeGame.getySquares());
kibble... | protected void moveKibble(boydjohnson.Snake s) {
java.util.Random rng = new java.util.Random();
boolean kibbleInSnake = true;
while (kibbleInSnake) {
kibbleX = rng.nextInt(boydjohnson.SnakeGame.getxSquares());
kibbleY = rng.nextInt(boydjohnson.SnakeGame.getySquares());
kibbleInSnake ... |
public com.ning.billing.entitlement.alignment.TimedMigration[] getEventsOnFuturePlanCancelMigration(com.ning.billing.entitlement.api.user.SubscriptionData subscription, com.ning.billing.catalog.api.Plan plan, com.ning.billing.catalog.api.PlanPhase initialPhase, java.lang.String priceList, org.joda.time.DateTime effecti... | private com.ning.billing.entitlement.alignment.TimedMigration[] getEventsOnFuturePlanCancelMigration(com.ning.billing.catalog.api.Plan plan, com.ning.billing.catalog.api.PlanPhase initialPhase, java.lang.String priceList, org.joda.time.DateTime effectiveDate, org.joda.time.DateTime effectiveDateForCancellation) {
c... |
private byte[] getBytesFromPrefs(java.lang.String service, java.lang.String prefix) {
java.lang.String key = service + prefix;
java.lang.String value = prefs.getString((service + prefix), null);
if (value != null) {
return android.util.Base64.decode(value, Base64.DEFAULT);
}
return null;
} | private byte[] getBytesFromPrefs(java.lang.String service, java.lang.String prefix) {
java.lang.String value = prefs.getString((service + prefix), null);
if (value != null) {
return android.util.Base64.decode(value, Base64.DEFAULT);
}
return null;
} |
public int compareTo(final couch.cushion.media.ImageSegment other) {
if ((getId()) < (other.getId())) {
return -1;
}
if ((getId()) > (other.getId())) {
return 1;
}
if ((getIndex()) < (other.getIndex())) {
return -1;
}
if ((getIndex()) > (other.getIndex())) {
r... | public int compareTo(final couch.cushion.media.ImageSegment other) {
if ((getId()) < (other.getId())) {
return -1;
}
if ((getId()) > (other.getId())) {
return 1;
}
if ((getIndex()) < (other.getIndex())) {
return -1;
}
if ((getIndex()) > (other.getIndex())) {
r... |
public void start() {
try {
quickfix.SessionSettings settings = new quickfix.SessionSettings("src/Server.cfg");
com.thanatos.FixServer server = new com.thanatos.FixServer();
quickfix.FileStoreFactory storeFactory = new quickfix.FileStoreFactory(settings);
quickfix.ScreenLogFactory lo... | public void start() {
try {
setupJobs();
quickfix.SessionSettings settings = new quickfix.SessionSettings("src/Server.cfg");
com.thanatos.FixServer server = new com.thanatos.FixServer();
quickfix.FileStoreFactory storeFactory = new quickfix.FileStoreFactory(settings);
quickfi... |
public synchronized boolean lockRoute(int trainID, int entry, int exit) {
if (!(isValidRoute(entry, exit))) {
return false;
}
queue.add(trainID);
return (queue.size()) == 1;
} | public synchronized boolean lockRoute(int trainID, int entry, java.lang.Integer exit) {
if ((exit != null) && (!(isValidRoute(entry, exit)))) {
return false;
}
queue.add(trainID);
return (queue.size()) == 1;
} |
public void getSplits() throws java.io.IOException, java.lang.InterruptedException {
splits = new java.util.ArrayList<com.rasp.interfaces.InputSplit>();
long l = blockSize(workerCount);
for (int i = 0; i < (workerCount); i++) {
splits.add(new com.rasp.interfaces.com.rasp.fs.InputSplit(offset(l, i), ... | public void getSplits() throws java.io.IOException, java.lang.InterruptedException {
splits = new java.util.ArrayList<com.rasp.interfaces.InputSplit>();
long l = blockSize(workerCount);
for (int i = 0; i < (workerCount); i++) {
splits.add(new com.rasp.interfaces.com.rasp.fs.InputSplit(i, offset(l, i... |
private void truckData(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException {
com.deloitte.classes.datamodel.Truck truck = new com.deloitte.classes.datamodel.Truck();
setTruckData(truck, request.getPathInfo());
com.google.gson.GsonBuilder... | private void truckData(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException {
com.deloitte.classes.datamodel.Truck truck = new com.deloitte.classes.datamodel.Truck();
setTruckData(truck, request.getPathInfo().substring(1));
com.google.gso... |
private void paddleCollide(Tennis game) {
if (boundingBox.intersects(game.player.boundingBox)) {
velocityX = speed;
this.intersectionHits += 1;
if (((this.intersectionHits) % 3) == 0)
game.playerScore += 1;
}else
if (boundingBox.intersects(game.compplayer.bou... | private void paddleCollide(Tennis game) {
if (boundingBox.intersects(game.player.boundingBox)) {
velocityX = speed;
this.intersectionHits += 1;
if ((((this.intersectionHits) % 3) == 0) && ((this.intersectionHits) != 0)) {
game.playerScore += 1;
this.intersectionHits =... |
public void add(org.apache.log4j.spi.LoggingEvent event) {
boolean publish = false;
synchronized(EVENTQUEUELOCK) {
if ((eventQueueLength) < (capacity)) {
eventQueue.add(event);
(eventQueueLength)++;
}else {
publish = true;
}
}
if (publish) {
... | public void add(org.apache.log4j.spi.LoggingEvent event) {
boolean publish = false;
synchronized(EVENTQUEUELOCK) {
eventQueue.add(event);
(eventQueueLength)++;
if ((eventQueueLength) >= (capacity)) {
publish = true;
}
}
if (publish) {
flushAndPublishQu... |
public void onChanged(dev.blunch.blunch.activity.EventType type) {
dev.blunch.blunch.domain.CollaborativeMenu menu = service.getAll().get(0);
if ((menu != null) && ((idMenu) == null)) {
toolbar.setTitle(("Answers for " + (menu.getName())));
idMenu = menu.getId();
}
} | public void onChanged(dev.blunch.blunch.activity.EventType type) {
dev.blunch.blunch.domain.CollaborativeMenu menu = service.get(idMenu);
if ((menu != null) && ((idMenu) == null)) {
toolbar.setTitle(("Answers for " + (menu.getName())));
idMenu = menu.getId();
}
} |
private start.models.Info Do(start.models.Step step) {
engine.LastFmEngine engine = new engine.LastFmEngine();
engine.Recommendation r = engine.GetRecommendation(step);
start.controllers.HomeController.steps.add(r);
engine.Recommendation result = engine.Merge(start.controllers.HomeController.steps);
... | private start.models.Info Do(start.models.Step step) {
engine.LastFmEngine engine = new engine.LastFmEngine();
if (step != null) {
engine.Recommendation r = engine.GetRecommendation(step);
start.controllers.HomeController.steps.add(r);
}
engine.Recommendation result = engine.Merge(start.... |
public void setOnLocationAndSpeedListener(com.shlomicko.monit.services.gps.OnLocationAndSpeedListener listener) {
_listener = listener;
android.util.Log.d(TAG, ("listener is:" + (_listener)));
_locAndSpeedManager = new com.shlomicko.monit.services.gps.LocationAndSpeedManager(((android.app.Activity) (_listen... | public void setOnLocationAndSpeedListener(com.shlomicko.monit.services.gps.OnLocationAndSpeedListener listener) {
_listener = listener;
android.util.Log.d(TAG, ("listener is:" + (_listener)));
_locAndSpeedManager = new com.shlomicko.monit.services.gps.LocationAndSpeedManager(((android.app.Activity) (_listen... |
public static void queueWriteTask(java.nio.file.Path path, byte[] data) {
assert (path != null) && (data != null);
assert java.nio.file.Files.isWritable(path);
assert (!(java.nio.file.Files.exists(path))) || (java.nio.file.Files.isRegularFile(path));
nbtool.nio.FileIO.addTaskToQueue(new nbtool.nio.FileI... | public static void queueWriteTask(java.nio.file.Path path, byte[] data) {
assert (path != null) && (data != null);
assert (!(java.nio.file.Files.exists(path))) || (java.nio.file.Files.isRegularFile(path));
nbtool.nio.FileIO.addTaskToQueue(new nbtool.nio.FileIO.Task(path, data));
} |
public void remove() {
deliveredCount.incrementAndGet();
org.hornetq.core.paging.cursor.PagedReference delivery = currentDelivery;
if (delivery != null) {
org.hornetq.core.paging.cursor.impl.PageSubscriptionImpl.PageCursorInfo info = this.getPageInfo(currentDelivery.getPosition());
if (info ... | public void remove() {
deliveredCount.incrementAndGet();
org.hornetq.core.paging.cursor.PagedReference delivery = currentDelivery;
if (delivery != null) {
org.hornetq.core.paging.cursor.impl.PageSubscriptionImpl.PageCursorInfo info = this.getPageInfo(delivery.getPosition());
if (info != null... |
public void onDrawerSlide(android.view.View drawerView, float slideOffset) {
if (slidingDrawerEffect)
super.onDrawerSlide(drawerView, slideOffset);
else
super.onDrawerSlide(drawerView, 0);
if ((drawerListener) != null)
drawerListener.onDrawerSlide(drawerView, slideOffset);
... | public void onDrawerSlide(android.view.View drawerView, float slideOffset) {
if (slidingDrawerEffect)
super.onDrawerSlide(drawerView, slideOffset);
else
super.onDrawerSlide(drawerView, 0.0F);
if ((drawerListener) != null)
drawerListener.onDrawerSlide(drawerView, slideOffset);
... |
public void scanFinished(int routeId) {
mLog.d((("[scanFinished][" + (mRouteManager.getInstallRouteDescription(routeId))) + "]"));
com.iwedia.example.tvinput.ui.SetupActivity.mDtvManager.getChannelManager().refreshChannelList();
if ((com.iwedia.example.tvinput.utils.ExampleSwitches.ENABLE_IWEDIA_EMU) == tru... | public void scanFinished(int routeId) {
mLog.d((("[scanFinished][" + (mRouteManager.getInstallRouteDescription(routeId))) + "]"));
com.iwedia.example.tvinput.ui.SetupActivity.mDtvManager.getChannelManager().refreshChannelList();
onClickScanAction(null);
android.content.Intent intent = new android.conten... |
private void modifyProperty(org.springframework.beans.MutablePropertyValues propertyValues, org.springframework.beans.BeanWrapper target, org.springframework.beans.PropertyValue propertyValue, int index) {
java.lang.String oldName = propertyValue.getName();
java.lang.String name = normalizePath(target, oldName)... | private org.springframework.beans.PropertyValue modifyProperty(org.springframework.beans.BeanWrapper target, org.springframework.beans.PropertyValue propertyValue) {
java.lang.String oldName = propertyValue.getName();
java.lang.String name = normalizePath(target, oldName);
if (!(name.equals(oldName))) {
... |
public android.support.v4.content.Loader<java.lang.Boolean> onCreateLoader(int id, android.os.Bundle args) {
mProgressBar.setVisibility(View.VISIBLE);
switch (id) {
case R.id.rss_feed_loader :
final java.lang.String[] sources = getResources().getStringArray(R.array.rss_sources_array);
... | public android.support.v4.content.Loader<java.lang.Boolean> onCreateLoader(int id, android.os.Bundle args) {
switch (id) {
case R.id.rss_feed_loader :
final java.lang.String[] sources = getResources().getStringArray(R.array.rss_sources_array);
return new com.friendoye.rss_reader.load... |
protected void updateContainer(net.minecraft.inventory.IContainerListener listener) {
if ((cookCost) != (infuser.cookCost)) {
listener.sendProgressBarUpdate(this, 0, ((int) (infuser.cookCost)));
}
if ((cookTime) != (infuser.cookTime)) {
listener.sendProgressBarUpdate(this, 1, ((int) (infuser... | protected void updateContainer(net.minecraft.inventory.IContainerListener listener, boolean add) {
if (add || ((cookCost) != (infuser.cookCost))) {
listener.sendProgressBarUpdate(this, 0, ((int) (infuser.cookCost)));
}
if (add || ((cookTime) != (infuser.cookTime))) {
listener.sendProgressBar... |
private static org.raistlic.common.adt.BitMap buildBitMap(java.lang.String pattern) {
pattern = pattern.replaceAll(" ", "");
org.raistlic.common.adt.BitMap.Builder builder = org.raistlic.common.adt.BitMap.builder(pattern.length());
for (int i = 0, len = pattern.length(); i < len; i++) {
if ((pattern... | private static org.raistlic.common.adt.BitMap buildBitMap(java.lang.String pattern) {
pattern = pattern.replaceAll(" ", "");
org.raistlic.common.adt.BitMap.Builder builder = org.raistlic.common.adt.BitMap.builder(pattern.length());
for (int i = 0, len = pattern.length(); i < len; i++) {
if ((pattern... |
public int execFac(java.util.Scanner inputFile) {
int result = 0;
switch (type) {
case "integer" :
result = value;
break;
case "id" :
result = nonterminals.Id.getValue(id);
break;
case "exp" :
value = exp.execExp(inputFile);
... | public int execFac(java.util.Scanner inputFile) {
int result = 0;
switch (type) {
case "integer" :
result = value;
break;
case "id" :
result = nonterminals.Id.getValue(id);
break;
case "exp" :
result = exp.execExp(inputFile);
... |
public static java.lang.String method2FieldSign(java.lang.String mSign) {
if (mSign == null)
return null;
else
if ((mSign.length()) == 0)
return "";
else
if ((mSign.charAt(0)) > 'Z')
return mSign;
else {
char[] chars = m... | public static java.lang.String method2FieldSign(java.lang.String mSign) {
if (mSign == null)
return null;
else
if ((mSign.length()) == 0)
return "";
else
if ((mSign.charAt(0)) > 'Z')
return mSign;
else {
char[] chars = m... |
private java.lang.String teamTwoSetup(com.amazon.speech.speechlet.Session session) {
teamTwoName = session.getAttribute("TeamTwoName").toString();
currentTeamAttribute = session.getAttribute("TeamOneName").toString();
session.setAttribute("TeamTwoScore", 0);
return teamSetup.setupTeams(session.getAttrib... | private java.lang.String teamTwoSetup(com.amazon.speech.speechlet.Session session) {
teamTwoName = session.getAttribute("TeamTwoName").toString();
session.setAttribute("TeamTwoScore", 0);
return teamSetup.setupTeams(session.getAttribute("TeamOneName").toString(), session.getAttribute("TeamTwoName").toString... |
private void createTables() {
try {
stat.execute("CREATE TABLE CourseParticipantTable (Professor TEXT, Course TEXT, Student TEXT, OverallGrade REAL)");
stat.execute("CREATE TABLE AssignmentTable (Professor TEXT, Course TEXT, Assignment TEXT, TotalPossible REAL)");
stat.execute("CREATE TABLE ... | public void createTables() {
try {
stat.execute("CREATE TABLE CourseParticipantTable (Professor TEXT, Course TEXT, Student TEXT, OverallGrade REAL)");
stat.execute("CREATE TABLE AssignmentTable (Professor TEXT, Course TEXT, Assignment TEXT, TotalPossible REAL)");
stat.execute("CREATE TABLE G... |
public void init() {
littleMaidMobX.io.FileManager.getModFile("littleMaidMobX", "littleMaidMob");
littleMaidMobX.io.FileManager.getModFile("littleMaidMobX", "mmmlibx");
littleMaidMobX.io.FileManager.getModFile("littleMaidMobX", "ModelMulti");
littleMaidMobX.io.FileManager.getModFile("littleMaidMobX", "L... | public void init() {
littleMaidMobX.io.FileManager.getModFile("mmmlibx", "littleMaidMob");
littleMaidMobX.io.FileManager.getModFile("mmmlibx", "mmmlibx");
littleMaidMobX.io.FileManager.getModFile("mmmlibx", "ModelMulti");
littleMaidMobX.io.FileManager.getModFile("mmmlibx", "LittleMaidMob");
addSearc... |
private boolean areAnyLegalMovesForCurrentSide() {
for (net.torocraft.chess.engine.chess.ChessPieceState chessPieceState : internalState) {
if (chessPieceState.side.equals(internalChessPieceToMove.side)) {
net.torocraft.chess.engine.chess.ChessMoveResult moveResult = getChessPieceWorker(chessPie... | private boolean areAnyLegalMovesForCurrentSide() {
for (net.torocraft.chess.engine.chess.ChessPieceState chessPieceState : internalState) {
if (chessPieceState.side.equals(internalChessPieceToMove.side)) {
net.torocraft.chess.engine.chess.ChessMoveResult moveResult = getChessPieceWorker(internal... |
public static void show() {
javafx.fxml.FXMLLoader l = new javafx.fxml.FXMLLoader();
l.setLocation(main.SwekJeweled.class.getClassLoader().getResource(main.gui.NewGameViewController.fileName));
java.lang.System.out.println("Fissa");
try {
javafx.scene.layout.AnchorPane newgame = l.load();
... | public static void show() {
javafx.fxml.FXMLLoader l = new javafx.fxml.FXMLLoader();
l.setLocation(main.SwekJeweled.class.getClassLoader().getResource(main.gui.NewGameViewController.fileName));
try {
javafx.scene.layout.AnchorPane newgame = l.load();
main.SwekJeweled.getStage().setScene(new ... |
public boolean equals(java.lang.Object o) {
if ((this) == o)
return true;
if ((o == null) || ((getClass()) != (o.getClass())))
return false;
com.danielflower.apprunner.router.mgmt.Runner runner = ((com.danielflower.apprunner.router.mgmt.Runner) (o));
return (((maxApps) == (runn... | public boolean equals(java.lang.Object o) {
if ((this) == o)
return true;
if ((o == null) || ((getClass()) != (o.getClass())))
return false;
com.danielflower.apprunner.router.mgmt.Runner runner = ((com.danielflower.apprunner.router.mgmt.Runner) (o));
return id.equals(runner.id)... |
public int compare(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent o1, com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent o2) {
return new java.lang.Integer(((java.lang.Object) (o1)).hashCode()).compareTo(new java.lang.Integer(((java.lang.Object) (o2)).hashCode()));
} | public int compare(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent o1, com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent o2) {
if ((o1 == null) && (o2 == null)) {
return 0;
}
if ((o1 != null) && (o2 == null)) {
return 1;
}
if ((o1 == nu... |
public final void retrievesKeys() throws java.lang.Exception {
final com.jcabi.github.PublicKeys keys = this.keys();
final com.jcabi.github.PublicKey key = keys.create("key", "ssh 1AA");
org.hamcrest.MatcherAssert.assertThat(keys.iterate(), org.hamcrest.Matchers.hasItem(key));
keys.remove(key.number());... | public final void retrievesKeys() throws java.lang.Exception {
final com.jcabi.github.PublicKeys keys = this.keys();
final com.jcabi.github.PublicKey key = keys.create("key", this.key());
org.hamcrest.MatcherAssert.assertThat(keys.iterate(), org.hamcrest.Matchers.hasItem(key));
keys.remove(key.number())... |
public void process(java.lang.String RECIEVED_IP, int RECIEVED_PORT) throws java.io.IOException {
int clusterID;
clusterID = lk.filetributed.util.Utils.getClusterID(RECIEVED_IP, RECIEVED_PORT, lk.filetributed.client.Client.NO_CLUSTERS);
lk.filetributed.model.Node node = new lk.filetributed.model.Node(RECIEV... | public void process(java.lang.String RECIEVED_IP, int RECIEVED_PORT) throws java.io.IOException {
int clusterID;
clusterID = lk.filetributed.util.Utils.getClusterID(RECIEVED_IP, RECIEVED_PORT, lk.filetributed.client.Client.NO_CLUSTERS);
lk.filetributed.model.Node node = new lk.filetributed.model.Node(RECIEV... |
public void run() {
while (true) {
try {
java.lang.Thread.sleep(10);
} catch (java.lang.InterruptedException e) {
e.printStackTrace();
}
for (com.capstone.plasma.mob.Mob mob : com.capstone.plasma.mob.Mob.mobs) {
mob.tick();
}
}
} | public void run() {
while (true) {
try {
java.lang.Thread.sleep(10);
} catch (java.lang.InterruptedException e) {
e.printStackTrace();
}
for (int i = 0; i < (com.capstone.plasma.mob.Mob.mobs.size()); i++) {
com.capstone.plasma.mob.Mob mob = com.cap... |
public int unshift(int value) {
if ((size) == (capacity)) {
resize();
}
for (int i = size; i > 0; i--) {
arr[i] = arr[(i - 1)];
}
arr[0] = value;
(size)++;
} | public int unshift(int value) {
if ((size) == (capacity)) {
resize();
}
for (int i = size; i > 0; i--) {
data[i] = data[(i - 1)];
}
data[0] = value;
(size)++;
} |
public java.lang.String detail(javax.servlet.http.HttpServletRequest request, org.springframework.ui.Model model) {
int id = 0;
try {
id = java.lang.Integer.parseInt(request.getParameter("goodsId"));
} catch (java.lang.Exception e) {
return "redirect:/";
}
com.parknshop.bean.GoodsDbB... | public java.lang.String detail(javax.servlet.http.HttpServletRequest request, org.springframework.ui.Model model) {
int id = 0;
try {
id = java.lang.Integer.parseInt(request.getParameter("goodsId"));
} catch (java.lang.Exception e) {
return "redirect:/";
}
com.parknshop.bean.GoodsDbB... |
public synchronized void removePendingDisplayHpcJobInfo(final java.util.Set<edu.pitt.dbmi.tetrad.db.entity.HpcJobInfo> removingJobSet) {
for (final edu.pitt.dbmi.tetrad.db.entity.HpcJobInfo hpcJobInfo : removingJobSet) {
for (java.util.Iterator<edu.pitt.dbmi.tetrad.db.entity.HpcJobInfo> it = pendingDisplayH... | public synchronized void removePendingDisplayHpcJobInfo(final java.util.Set<edu.pitt.dbmi.tetrad.db.entity.HpcJobInfo> removingJobSet) {
for (final edu.pitt.dbmi.tetrad.db.entity.HpcJobInfo hpcJobInfo : removingJobSet) {
for (edu.pitt.dbmi.tetrad.db.entity.HpcJobInfo pendingJob : pendingDisplayHpcJobInfoSet... |
public model.character next() {
if (this.hasNext()) {
(currentIndex)++;
java.lang.System.out.println(this.characterList.get(currentIndex).getName());
return this.characterList.get(currentIndex);
}else {
currentIndex = 0;
java.lang.System.out.println("New Round!");
... | public model.character next() {
if (this.hasNext()) {
(currentIndex)++;
java.lang.System.out.println(this.characterList.get(currentIndex).getName());
return this.characterList.get(currentIndex);
}else {
currentIndex = 0;
java.lang.System.out.println("New Round!");
... |
public boolean onOptionsItemSelected(android.view.MenuItem item) {
int id = item.getItemId();
switch (id) {
case R.id.action_settings :
android.widget.Toast.makeText(this, "暂未添加", Toast.LENGTH_SHORT).show();
break;
case R.id.action_help :
break;
case R... | public boolean onOptionsItemSelected(android.view.MenuItem item) {
int id = item.getItemId();
switch (id) {
case R.id.action_settings :
android.widget.Toast.makeText(this, "暂未添加", Toast.LENGTH_SHORT).show();
break;
case R.id.action_updata :
tk.imrhj.autologin.... |
public static void createFragment(java.lang.String url) {
if (url.equals(null))
com.tona.mousebrowser2.MainActivity.adapter.add(("page" + ((com.tona.mousebrowser2.MainActivity.count)++)), new com.tona.mousebrowser2.CustomWebViewFragment(null));
else
com.tona.mousebrowser2.MainActivity.adapter.ad... | public static void createFragment(java.lang.String url) {
if (url == null)
com.tona.mousebrowser2.MainActivity.adapter.add(("page" + ((com.tona.mousebrowser2.MainActivity.count)++)), new com.tona.mousebrowser2.CustomWebViewFragment(null));
else
com.tona.mousebrowser2.MainActivity.adapter.add(("p... |
public java.util.List<kr.ac.yonsei.fyea.domain.Student> getStudents(kr.ac.yonsei.fyea.web.model.StatsQueryModel queryModel) {
java.util.List<java.lang.String> idStartsWith = queryModel.getIdStartsWith();
if (idStartsWith.isEmpty()) {
return studentRepository.findAll();
}
return idStartsWith.stre... | public java.util.List<kr.ac.yonsei.fyea.domain.Student> getStudents(kr.ac.yonsei.fyea.web.model.StatsQueryModel queryModel) {
java.util.List<java.lang.String> idStartsWith = queryModel.getIdStartsWith();
if ((idStartsWith == null) || (idStartsWith.isEmpty())) {
return studentRepository.findAll();
}
... |
private android.widget.CheckBox addSupport(android.widget.CheckBox check, android.view.View convertView, boolean action, int id) {
check = ((android.widget.CheckBox) (convertView.findViewById(id)));
check.setVisibility(View.VISIBLE);
if (action) {
check.setOnCheckedChangeListener(this);
}
re... | private android.widget.CheckBox addSupport(android.view.View convertView, boolean action, int id) {
android.widget.CheckBox check = ((android.widget.CheckBox) (convertView.findViewById(id)));
check.setVisibility(View.VISIBLE);
if (action) {
check.setOnCheckedChangeListener(this);
}
return ch... |
public static java.lang.String differenceRule(java.lang.String term1, java.lang.String term2) throws simpleDifferentiation.rj.InvalidExpression {
if (term1.equals(""))
return "-" + (simpleDifferentiation.rj.Calculator.getDerivative(term2));
else
if (term2.equals(""))
return simpleDif... | public java.lang.String differenceRule(java.lang.String term1, java.lang.String term2) throws simpleDifferentiation.rj.InvalidExpression {
if (term1.equals(""))
return "-" + (getDerivative(term2));
else
if (term2.equals(""))
return getDerivative(term1);
else
retur... |
public double mean() {
double meanSum = 0;
for (int i = 0; i < (totalTests); i++) {
meanSum += ((double) (openSites[i])) / (totalSites);
java.lang.System.out.println(openSites[i]);
}
return meanSum / (totalTests);
} | public double mean() {
double meanSum = 0;
for (int i = 0; i < (totalTests); i++) {
meanSum += ((double) (openSites[i])) / (totalSites);
}
return meanSum / (totalTests);
} |
public java.lang.String registerUser(java.lang.String firstName, java.lang.String lastName, java.lang.String email, java.lang.String password, java.lang.String passwordConfirmation) {
try {
gppmds.wikilegis.model.User user = new gppmds.wikilegis.model.User(firstName, lastName, email, password, passwordConfi... | public java.lang.String registerUser(java.lang.String firstName, java.lang.String lastName, java.lang.String email, java.lang.String password, java.lang.String passwordConfirmation) {
try {
gppmds.wikilegis.model.User user = new gppmds.wikilegis.model.User(firstName, lastName, email, password, passwordConfi... |
public static java.lang.String formatQueryString(java.lang.String url, java.lang.String field, java.lang.Integer value) {
if (null == value) {
return url;
}
return url.contains("?") ? (("&" + field) + "=") + value : (("?" + field) + "=") + value;
} | public static java.lang.String formatQueryString(java.lang.String url, java.lang.String field, java.lang.Integer value) {
if (null == value) {
return url;
}
return url + (url.contains("?") ? (("&" + field) + "=") + value : (("?" + field) + "=") + value);
} |
public void processResult(javafx.event.ActionEvent event) {
Random ran = new Random();
java.lang.String log = inputName.getText();
int pass = java.lang.Integer.parseInt(inputDate.getText());
int fourdigit = pass % 10000;
int num = (ran.nextInt(90)) + 10;
result.setText((((((log.substring(0, 2)) ... | public void processResult(javafx.event.ActionEvent event) {
java.util.Random ran = new java.util.Random();
java.lang.String log = inputName.getText();
int pass = java.lang.Integer.parseInt(inputDate.getText());
int fourdigit = pass % 10000;
int num = (ran.nextInt(90)) + 10;
result.setText((((((l... |
public double[] gradientAscent(double[] oldState, double[] currentState, int maxIterations) {
double[] state = currentState;
double alpha = 0.01;
double oldGradient;
double gradient;
for (int i = 0; i < maxIterations; i++) {
if ((gradient - oldGradient) < 0) {
break;
}
... | public void gradientAscent(double[] oldState, double[] currentState, int maxIterations) {
double[] state = currentState;
double alpha = 0.01;
double oldGradient = 0;
double gradient = 1;
for (int i = 0; i < maxIterations; i++) {
if ((gradient - oldGradient) < 0) {
break;
... |
public static void main(java.lang.String... args) {
int runs = 1;
java.lang.String paramDir = args[0];
java.lang.String specificParamDir = ((args[0]) + "/") + (args[1]);
playground.michalm.taxi.run.TaxiLauncherParams params = playground.michalm.taxi.run.TaxiLauncherParams.readParams(paramDir, specificPa... | public static void main(java.lang.String... args) {
int runs = 1;
java.lang.String paramDir = args[0];
java.lang.String specificParamDir = args[1];
playground.michalm.taxi.run.TaxiLauncherParams params = playground.michalm.taxi.run.TaxiLauncherParams.readParams(paramDir, specificParamDir);
playgroun... |
public void g(float f, float f1) {
if ((npc) == null) {
super.g(f, f1);
}else
if (!(npc.isFlyable())) {
g(f, f1);
}else {
net.citizensnpcs.util.NMS.flyingMoveLogic(this, f, f1);
}
} | public void g(float f, float f1) {
if (((npc) == null) || (!(npc.isFlyable()))) {
super.g(f, f1);
}else {
net.citizensnpcs.util.NMS.flyingMoveLogic(this, f, f1);
}
} |
private static boolean checkIdentity(com.jrodolfo.basichibernate.entity.Message message_01, com.jrodolfo.basichibernate.entity.Message message_02) {
java.lang.System.out.println("Checking if the following objects are identical:");
java.lang.System.out.println(("\tmessage_01: " + message_01));
java.lang.Syst... | private static boolean checkIdentity(com.jrodolfo.basichibernate.entity.Message message_01, com.jrodolfo.basichibernate.entity.Message message_02) {
java.lang.System.out.println("Checking if the following objects are identical:");
java.lang.System.out.println(("\tmessage_01: " + message_01));
java.lang.Syst... |
public void removeAll(E e) {
if (this.contains(e)) {
QueueNode current = this.front;
while ((current.next) != null) {
if (current.next.data.equals(e)) {
current.next = current.next.next;
}else {
current = current.next;
}
}
... | public void removeAll(E e) {
if (this.contains(e)) {
QueueNode current = this.front;
while ((current.next) != null) {
if (current.next.data.equals(e)) {
current.next = current.next.next;
(this.size)--;
}else {
current = current.... |
public static <O> com.google.android.material.motion.tweens.MaterialAnimator ofFloat(O target, android.util.Property<O, java.lang.Float> property, java.lang.Float... values) {
return new com.google.android.material.motion.tweens.MaterialAnimator(new com.google.android.material.motion.interactions.Tween(target, prop... | public static <O> com.google.android.material.motion.tweens.MaterialAnimator ofFloat(O target, android.util.Property<O, java.lang.Float> property, java.lang.Float... values) {
return new com.google.android.material.motion.tweens.MaterialAnimator(new com.google.android.material.motion.interactions.Tween(target, prop... |
public void setTip(int tip) {
tipBar = ((org.adw.library.widgets.discreteseekbar.DiscreteSeekBar) (findViewById(R.id.tip_spinner)));
tipText = ((android.widget.EditText) (findViewById(R.id.tip_textView)));
tipBar.setProgress(tip);
tipText.setText(java.lang.Integer.toString(tip));
} | private void setTip(int tip) {
tipBar = ((org.adw.library.widgets.discreteseekbar.DiscreteSeekBar) (findViewById(R.id.tip_spinner)));
tipText = ((android.widget.EditText) (findViewById(R.id.tip_textView)));
tipBar.setProgress(tip);
tipText.setText(java.lang.Integer.toString(tip));
} |
public java.lang.Object call(com.tinkerpop.blueprints.impls.orient.OrientBaseGraph graph) {
for (com.orientechnologies.orient.core.id.ORecordId rid : rids) {
final com.tinkerpop.blueprints.impls.orient.OrientEdge e = graph.getEdge(rid);
if (e != null) {
e.remove();
removed = ... | public java.lang.Object call(com.tinkerpop.blueprints.impls.orient.OrientBaseGraph graph) {
for (com.orientechnologies.orient.core.id.ORecordId rid : rids) {
final com.tinkerpop.blueprints.impls.orient.OrientEdge e = graph.getEdge(rid);
if (e != null) {
e.remove();
(removed)+... |
protected void createMetadata(uk.ac.diamond.scisoft.analysis.io.DataHolder output, @java.lang.SuppressWarnings(value = "unused")
javax.imageio.ImageReader reader) {
metadata = new org.eclipse.january.metadata.Metadata();
metadata.setFilePath(fileName);
for (java.lang.String n : output.getNames()) {
... | protected void createMetadata(uk.ac.diamond.scisoft.analysis.io.DataHolder output, @java.lang.SuppressWarnings(value = "unused")
javax.imageio.ImageReader reader) {
if ((metadata) == null) {
metadata = new org.eclipse.january.metadata.Metadata();
}
metadata.setFilePath(fileName);
for (java.lang.... |
public void trainer(java.lang.String dataConfigFileName, java.lang.String corpusConfigFileName) throws java.io.IOException {
data.GNTdataProperties dataProps = new data.GNTdataProperties(dataConfigFileName);
dataProps.copyConfigFile(dataConfigFileName);
corpus.GNTcorpusProperties corpusProps = new corpus.GN... | public void trainer(java.lang.String dataConfigFileName, java.lang.String corpusConfigFileName) throws java.io.IOException {
data.GNTdataProperties dataProps = new data.GNTdataProperties(dataConfigFileName);
corpus.GNTcorpusProperties corpusProps = new corpus.GNTcorpusProperties(corpusConfigFileName);
train... |
private java.lang.String cleanPointBracket(java.lang.String str) {
java.lang.StringBuffer sb = new java.lang.StringBuffer();
int count = 0;
for (char c : str.toCharArray()) {
if ('<' == c)
++count;
if ('>' == c)
--count;
if (count == 0)
... | private java.lang.String cleanPointBracket(java.lang.String str) {
java.lang.StringBuffer sb = new java.lang.StringBuffer();
int count = 0;
for (char c : str.toCharArray()) {
if ('<' == c)
++count;
if (count == 0)
sb.append(c);
if ('>' == c)
... |
public void onProgressChanged(android.widget.SeekBar seekBar, int i, boolean b) {
if ((currentTime) == (song.getSongDuration())) {
nextSong();
}else {
currentTime = seekBar.getProgress();
currentTxt.setText(com.example.kyler.musicplayer.Utils.Helper.millisecondsToTimer(currentTime));
... | public void onProgressChanged(android.widget.SeekBar seekBar, int i, boolean b) {
if ((currentTime) == (song.getSongDuration())) {
}else {
currentTime = seekBar.getProgress();
currentTxt.setText(com.example.kyler.musicplayer.Utils.Helper.millisecondsToTimer(currentTime));
}
} |
public void onStop() {
super.onStop();
android.content.SharedPreferences myPrefs = getPreferences(tskaws.app.MODE_PRIVATE);
android.content.SharedPreferences.Editor myPrefsEditor = myPrefs.edit();
myPrefsEditor.putString("Application", tskaws.app.Application.sendAppToJson(this.app));
myPrefsEditor.a... | public void onStop() {
super.onStop();
android.content.SharedPreferences myPrefs = getPreferences(tskaws.app.MODE_PRIVATE);
android.content.SharedPreferences.Editor myPrefsEditor = myPrefs.edit();
myPrefsEditor.putString("Application", this.app.sendAppToJson());
myPrefsEditor.apply();
} |
private void submitPlayToProgram(java.lang.String methodFullName, jackplay.bootstrap.Genre genre, java.lang.String src) throws java.lang.Exception {
jackplay.bootstrap.PlayGround pg = new jackplay.bootstrap.PlayGround(methodFullName);
checkValidity(pg);
if ((genre == (jackplay.bootstrap.Genre.METHOD_REDEFIN... | private void submitPlayToProgram(java.lang.String methodFullName, jackplay.bootstrap.Genre genre, java.lang.String src) throws java.lang.Exception {
jackplay.bootstrap.PlayGround pg = new jackplay.bootstrap.PlayGround(methodFullName);
checkValidity(pg);
if ((genre == (jackplay.bootstrap.Genre.METHOD_REDEFIN... |
public void seedsAsListTest() {
java.util.List<java.lang.String> seeds = new java.util.ArrayList<java.lang.String>();
seeds.add(com.augminish.app.common.util.object.PropertyHashMapTest.seedTest[0]);
seeds.add(com.augminish.app.common.util.object.PropertyHashMapTest.seedTest[1]);
seeds.add(com.augminish.... | public void seedsAsListTest() {
java.util.List<java.lang.String> seeds = new java.util.ArrayList<java.lang.String>();
seeds.add(com.augminish.app.common.util.object.PropertyHashMapTest.seedTest[0]);
seeds.add(com.augminish.app.common.util.object.PropertyHashMapTest.seedTest[1]);
seeds.add(com.augminish.... |
private static void setStringProperty(final java.lang.String paramName, final javax.servlet.http.HttpServletRequest request, final jetbrains.buildServer.controllers.BasePropertiesBean bean, final boolean includeEmptyValues) {
java.lang.String propName = paramName.substring(jetbrains.buildServer.clouds.google.utils.... | private static void setStringProperty(final java.lang.String paramName, final java.lang.String propertyValue, final jetbrains.buildServer.controllers.BasePropertiesBean bean, final boolean includeEmptyValues) {
java.lang.String propName = paramName.substring(jetbrains.buildServer.clouds.google.utils.PluginPropertie... |
protected void start() {
try {
com.imesong.springdream.database.AssetsDatabaseManager.getInstance(context.getApplicationContext()).initLoacalDatabase(AssetsDatabaseManager.DB_NAME);
} catch (java.lang.NoSuchFieldException e) {
e.printStackTrace();
com.imesong.springdream.utils.EventAgent... | protected void start() {
try {
com.imesong.springdream.database.AssetsDatabaseManager.getInstance(context).initLoacalDatabase(AssetsDatabaseManager.DB_NAME);
} catch (java.lang.NoSuchFieldException e) {
e.printStackTrace();
com.imesong.springdream.utils.EventAgentUtil.reportError(context... |
private void updateStatus() {
piranha.llp2st.data.Downloads.Status status = piranha.llp2st.data.Downloads.getStatus(id);
switch (status) {
case None :
downloadButton.resetIcon();
break;
case InProgress :
downloadButton.showProgress(true);
break;
... | private void updateStatus() {
piranha.llp2st.data.Downloads.Status status = piranha.llp2st.data.Downloads.getStatus(id);
switch (status) {
case None :
downloadButton.onProgressCompleted();
downloadButton.resetIcon();
break;
case InProgress :
downlo... |
private void closeResources() {
if (com.jthink.skyeye.client.core.producer.LazySingletonProducer.isInstanced()) {
com.jthink.skyeye.client.core.producer.LazySingletonProducer.getInstance(this.config).close();
}
org.I0Itec.zkclient.ZkClient client = ((this.zkRegister) == null) ? null : this.zkRegiste... | public void closeResources() {
if (com.jthink.skyeye.client.core.producer.LazySingletonProducer.isInstanced()) {
com.jthink.skyeye.client.core.producer.LazySingletonProducer.getInstance(this.config).close();
}
org.I0Itec.zkclient.ZkClient client = ((this.zkRegister) == null) ? null : this.zkRegister... |
public static void main(java.lang.String[] args) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException {
com.hazelcast.config.Config config = new com.hazelcast.config.Config();
com.hazelcast.config.DurableExecutorConfig durableExecutorConfig = config.getDurableExecutorConfig("exec");
... | public static void main(java.lang.String[] args) throws java.lang.Exception {
com.hazelcast.config.Config config = new com.hazelcast.config.Config();
config.getDurableExecutorConfig("exec").setCapacity(200).setDurability(2).setPoolSize(8);
com.hazelcast.core.HazelcastInstance instance = com.hazelcast.core.H... |
private com.google.javascript.rhino.Node replaceCallNode(com.google.javascript.jscomp.JsMessage message, com.google.javascript.rhino.Node callNode) throws com.google.javascript.jscomp.MalformedException {
checkNode(callNode, Token.CALL);
com.google.javascript.rhino.Node getPropNode = callNode.getFirstChild();
... | private com.google.javascript.rhino.Node replaceCallNode(com.google.javascript.jscomp.JsMessage message, com.google.javascript.rhino.Node callNode) throws com.google.javascript.jscomp.MalformedException {
checkNode(callNode, Token.CALL);
com.google.javascript.rhino.Node getPropNode = callNode.getFirstChild();
... |
public boolean isPendingIncludePartialWaivers() {
if ((!((isPaid()) || (isWaived()))) || ((isWaived()) && ((this.amount) != (this.amountWaived)))) {
return true;
}
return false;
} | public boolean isPendingIncludePartialWaivers() {
if ((!((isPaid()) || (isWaived()))) || ((isWaived()) && (!(this.amount.equals(this.amountWaived))))) {
return true;
}
return false;
} |
protected void buzz(android.view.View view) {
stopTimer();
android.widget.LinearLayout layout = ((android.widget.LinearLayout) (findViewById(R.id.onBuzzLayout)));
android.view.ViewGroup.LayoutParams params = layout.getLayoutParams();
params.height = android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
... | public void buzz(android.view.View view) {
stopTimer();
android.widget.LinearLayout layout = ((android.widget.LinearLayout) (findViewById(R.id.onBuzzLayout)));
android.view.ViewGroup.LayoutParams params = layout.getLayoutParams();
params.height = android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
lay... |
public void updateStation(de.rwth.idsg.bikeman.web.rest.dto.modify.CreateEditStationDTO dto) throws de.rwth.idsg.bikeman.web.rest.exception.DatabaseException {
de.rwth.idsg.bikeman.web.rest.dto.modify.ChangeStationOperationStateDTO changeDTO = new de.rwth.idsg.bikeman.web.rest.dto.modify.ChangeStationOperationState... | public void updateStation(de.rwth.idsg.bikeman.web.rest.dto.modify.CreateEditStationDTO dto) throws de.rwth.idsg.bikeman.web.rest.exception.DatabaseException {
de.rwth.idsg.bikeman.web.rest.dto.modify.ChangeStationOperationStateDTO changeDTO = new de.rwth.idsg.bikeman.web.rest.dto.modify.ChangeStationOperationState... |
private void sortUp(uk.sliske.rs.map.webwalker.Node item) {
while (true) {
int parentIndex = ((item.heapIndex) - 1) / 2;
uk.sliske.rs.map.webwalker.Node parentItem = data[parentIndex];
if ((item.compareTo(parentItem)) > 0) {
swap(item, parentItem);
}else {
bre... | private void sortUp(uk.sliske.rs.map.webwalker.Node item) {
while (true) {
int parentIndex = ((item.heapIndex) - 1) / 2;
if (parentIndex <= 0)
break;
uk.sliske.rs.map.webwalker.Node parentItem = data[parentIndex];
if ((item.compareTo(parentItem)) < 0) {
... |
public int findCurrentIdbyStudentId(int sid) {
java.util.List<com.javaweb.po.Lease> leases = this.queryByForeignId(com.javaweb.po.Lease.class, "studentId", sid);
for (com.javaweb.po.Lease element : leases) {
if (element.getStatus().equals("current"))
return element.getId();
}
... | public int findCurrentIdbyStudentId(int sid) {
java.util.List<com.javaweb.po.Lease> leases = this.queryByForeignId(com.javaweb.po.Lease.class, "studentId", sid);
if (leases != null) {
for (com.javaweb.po.Lease element : leases) {
if (element.getStatus().equals("current"))
ret... |
public void ShowCard(int player) {
for (int i = 0; i < (ListPlayer.get(player).PlayerCards.size()); i++)
if ((ListPlayer.get(player).PlayerCards.get(i)) != null)
java.lang.System.out.println((((i + 1) + "- ") + (ListPlayer.get(player).PlayerCards.get(i).GetName())));
} | public void ShowCard(int player) {
for (int i = 0; i < (ListPlayer.get(player).PlayerCards.size()); i++)
if ((ListPlayer.get(player).PlayerCards.get(i)) != null)
java.lang.System.out.println(((i + "- ") + (ListPlayer.get(player).PlayerCards.get(i).GetName())));
} |
public void organization(io.apiman.manager.api.beans.orgs.OrganizationBean org) {
currentOrg = org;
try {
logger.info(((Messages.i18n.format("StorageImportDispatcher.ImportingOrg")) + org));
storage.createOrganization(org);
} catch (io.apiman.manager.api.core.exceptions.StorageException e) {... | public void organization(io.apiman.manager.api.beans.orgs.OrganizationBean org) {
currentOrg = org;
try {
logger.info(((Messages.i18n.format("StorageImportDispatcher.ImportingOrg")) + (org.getName())));
storage.createOrganization(org);
} catch (io.apiman.manager.api.core.exceptions.StorageEx... |
private synchronized void loadMap() {
map = new net.hollowbit.archipelo.world.Map(nextMapSnapshot, nextChunkData, this);
for (net.hollowbit.archipelo.entity.Entity entity : entities)
entity.unload();
entities.clear();
for (net.hollowbit.archipeloshared.ChunkData chunk : nextChunkData) {
... | private synchronized void loadMap() {
map = new net.hollowbit.archipelo.world.Map(nextMapSnapshot, nextChunkData, this);
for (net.hollowbit.archipelo.entity.Entity entity : entities)
entity.unload();
entities.clear();
for (net.hollowbit.archipeloshared.ChunkData chunk : nextChunkData) {
... |
public void onViewCreated(android.view.View view, @android.support.annotation.Nullable
android.os.Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
mMusicItemAdapter = new com.ape.transfer.adapter.FileItemAdapter(getContext(), mFileCategory, this);
recyclerView.setLayoutManager(get... | public void onViewCreated(android.view.View view, @android.support.annotation.Nullable
android.os.Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
mMusicItemAdapter = new com.ape.transfer.adapter.FileItemAdapter(getContext(), mFileCategory, this);
recyclerView.setLayoutManager(get... |
public void makeParkourList() {
java.util.ArrayList<java.lang.String> blank = new java.util.ArrayList<java.lang.String>();
parkourList = blank;
for (java.lang.String key : data.getKeys(false)) {
if (!((key.contains("spawn")) && ((data.getString((key + ".world"))) == null)))
parkourList.a... | public void makeParkourList() {
java.util.ArrayList<java.lang.String> blank = new java.util.ArrayList<java.lang.String>();
parkourList = blank;
for (java.lang.String key : data.getKeys(false)) {
if (!(key.contains("spawn")))
parkourList.add(key);
}
} |
private void showErrorDialog(final java.lang.String message) {
android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(getActivity());
builder.setIcon(android.R.drawable.ic_dialog_alert);
builder.setTitle(R.string.sonycamera_confirm_wifi);
builder.setMessage(message);
builder.s... | private void showErrorDialog(final java.lang.String title, final java.lang.String message) {
android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(getActivity());
builder.setIcon(android.R.drawable.ic_dialog_alert);
builder.setTitle(title);
builder.setMessage(message);
builde... |
public static void main(java.lang.String[] args) {
try {
startClient("com.icloud.itfukui0922.player.AITWolfPlayer", "AITWolf", "kachako.org", 10000, 5);
} catch (java.lang.ClassNotFoundException e) {
java.lang.System.err.println("指定したクラスが見つかりません");
e.printStackTrace();
} catch (java.... | public static void main(java.lang.String[] args) {
try {
startClient("com.icloud.itfukui0922.player.AITWolfPlayer", "AITWolf", "kachako.org", 10000, 1);
} catch (java.lang.ClassNotFoundException e) {
java.lang.System.err.println("指定したクラスが見つかりません");
e.printStackTrace();
} catch (java.... |
public void batchCancel(java.util.Set<java.lang.Long> userIds, long courseId, long courseSkuId) {
if (userIds.isEmpty())
return ;
java.lang.String sql = ("UPDATE SG_BookedCourse SET Status=0 WHERE UserId IN (" + (org.apache.commons.lang3.StringUtils.join(userIds, ","))) + ") AND CourseId=? AND Cour... | public void batchCancel(java.util.Collection<java.lang.Long> userIds, long courseId, long courseSkuId) {
if (userIds.isEmpty())
return ;
java.lang.String sql = ("UPDATE SG_BookedCourse SET Status=0 WHERE UserId IN (" + (org.apache.commons.lang3.StringUtils.join(userIds, ","))) + ") AND CourseId=? A... |
public boolean removeFirst() {
if (isLinkedListEmpty())
return false;
else
if ((size) == 1) {
destroy();
(size)--;
return true;
}else {
datastructures.linkedlist.Node<E> temp = root.getNext();
root.setNext(null);
roo... | public boolean removeFirst() {
if (isLinkedListEmpty())
return false;
else
if ((size) == 1) {
destroy();
(size)--;
return true;
}else {
datastructures.linkedlist.Node<E> temp = root.getNext();
root.setNext(null);
roo... |
public int compareTo(org.opendaylight.monitor.provider.packetHandler.utils.TraceElement traceElement) {
org.opendaylight.monitor.provider.packetHandler.utils.TraceElement p1 = traceElement;
org.opendaylight.monitor.provider.packetHandler.utils.TraceElement p2 = this;
int ret = -1;
if ((p1.ttl) == (p2.tt... | public int compareTo(org.opendaylight.monitor.provider.packetHandler.utils.TraceElement traceElement) {
org.opendaylight.monitor.provider.packetHandler.utils.TraceElement p1 = traceElement;
org.opendaylight.monitor.provider.packetHandler.utils.TraceElement p2 = this;
int ret = -1;
if ((p1.ttl) > (p2.ttl... |
public static java.lang.String lType2(java.lang.String line) {
int i = line.indexOf('r');
Assembler.rd = Assembler.prettyRegs(i, line);
Assembler.immediate = Assembler.prettyLarge((i + 4), line.length(), 15, line);
java.lang.System.out.println(Assembler.immediate);
return ((Assembler.blank) + (Assem... | public static java.lang.String lType2(java.lang.String line) {
int i = line.indexOf('r');
Assembler.rd = Assembler.prettyRegs(i, line);
Assembler.immediate = Assembler.prettyLarge((i + 4), line.length(), 15, line);
return ((Assembler.blank) + (Assembler.rd)) + (Assembler.immediate);
} |
private void initializeTWatch() {
player = new edu.umich.eecs.twatchw.Player(this);
tap = new edu.umich.eecs.twatchw.SpiralBuffer("BTap", this);
recorder = new edu.umich.eecs.twatchw.Recorder(this, tap);
recorder.startRecording();
player.turnOffSound(true);
player.setSoftwareVolume(0.4);
pla... | private void initializeTWatch() {
player = new edu.umich.eecs.twatchw.Player(this);
tap = new edu.umich.eecs.twatchw.SpiralBuffer("BTap", this);
recorder = new edu.umich.eecs.twatchw.Recorder(this, tap);
recorder.startRecording();
player.turnOffSound(true);
player.setSpace(((int) (0.05 * 44100))... |
public boolean setPersistentData(java.lang.String key, byte[] buffer) {
if ((ariel.device.ArielHardwareManager.sService) == null) {
android.util.Log.w(ariel.device.ArielHardwareManager.TAG, "not connected to ArielHardwareService");
return null;
}
try {
return ariel.device.ArielHardwa... | public boolean setPersistentData(java.lang.String key, byte[] buffer) {
if ((ariel.device.ArielHardwareManager.sService) == null) {
android.util.Log.w(ariel.device.ArielHardwareManager.TAG, "not connected to ArielHardwareService");
return false;
}
try {
return ariel.device.ArielHardw... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.