buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
private void showDates() {
if ((allWorkoutDates) != null) {
allWorkoutDates.close();
}
if ((allEercises) != null) {
allEercises.close();
}
allWorkoutDates = adapter.getAllWorkoutDates();
startManagingCursor(allWorkoutDates);
setListAdapter(new com.alexrothberg.afitness.LogAct... | private void showDates() {
allWorkoutDates = adapter.getAllWorkoutDates();
startManagingCursor(allWorkoutDates);
setListAdapter(new com.alexrothberg.afitness.LogActivity.WorkoutDateSummary(this, R.layout.workout_summary_list_item, allWorkoutDates, new java.lang.String[]{ android.provider.BaseColumns._ID , "... |
public void run() {
byte[] buffer = new byte[1024];
int bytes;
while (true) {
try {
bytes = mmInStream.read(buffer);
onUpdate.OnUpdate(new app.arbiterlab.ticandroid.library.datas.Update(connectionContext, app.arbiterlab.ticandroid.library.libs.Constants.RESULT_MESSAGE, bytes)... | public void run() {
byte[] buffer = new byte[1024];
int bytes;
while (true) {
try {
bytes = mmInStream.read(buffer);
onUpdate.OnUpdate(new app.arbiterlab.ticandroid.library.datas.Update(connectionContext, app.arbiterlab.ticandroid.library.libs.Constants.RESULT_MESSAGE, true, ... |
public int doStartTag() throws javax.servlet.jsp.JspException {
javax.servlet.http.HttpSession session = pageContext.getSession();
java.util.ResourceBundle bundle = ((java.util.ResourceBundle) (session.getAttribute("bundle")));
try {
javax.servlet.jsp.JspWriter out = pageContext.getOut();
ou... | public int doStartTag() throws javax.servlet.jsp.JspException {
javax.servlet.http.HttpSession session = pageContext.getSession();
java.util.ResourceBundle bundle = ((java.util.ResourceBundle) (session.getAttribute("bundle")));
try {
javax.servlet.jsp.JspWriter out = pageContext.getOut();
ou... |
public org.ejml.data.DMatrixSparseCSC getRowPivot(org.ejml.data.DMatrixSparseCSC pivot) {
if (pivot == null)
pivot = new org.ejml.data.DMatrixSparseCSC(L.numRows, L.numRows, 0);
pivot.reshape(L.numRows, L.numRows, L.numRows);
org.ejml.sparse.csc.CommonOps_DSCC.permutationMatrix(pinv, false, L.n... | public org.ejml.data.DMatrixSparseCSC getRowPivot(org.ejml.data.DMatrixSparseCSC pivot) {
if (pivot == null)
pivot = new org.ejml.data.DMatrixSparseCSC(L.numRows, L.numRows, 0);
pivot.reshape(L.numRows, L.numRows, L.numRows);
org.ejml.sparse.csc.CommonOps_DSCC.permutationMatrix(pinv, true, L.nu... |
public void onItemSelected(android.widget.AdapterView<?> parent, android.view.View view, int position, long id) {
switch (parent.getId()) {
case R.id.menu_spinner :
switch (position) {
case 0 :
mUtil.setBooleanState(com.jrdcom.systrace.StartAtraceActivity.ICON... | public void onItemSelected(android.widget.AdapterView<?> parent, android.view.View view, int position, long id) {
switch (parent.getId()) {
case R.id.menu_spinner :
switch (position) {
case 0 :
mUtil.setBooleanState(com.jrdcom.systrace.StartAtraceActivity.ICON... |
public void createSnake() {
int x = 15;
int y = 30;
for (int i = 0, j = y; i <= (snakeLen); i++ , j++) {
matrix[x][j].setBackground(snakeColor);
snake.add(((x + ",") + j));
}
direction = "Left";
len = (snake.size()) / 2;
instanceGame.updateLenght(len);
} | public void createSnake() {
int x = 15;
int y = 30;
for (int i = 0, j = y; i <= (snakeLen); i++ , j++) {
matrix[x][j].setBackground(snakeColor);
snake.add(((x + ",") + j));
}
direction = "Left";
len = snake.size();
instanceGame.updateLenght(len);
} |
public java.lang.String getTeamNames() {
java.util.List<com.macklive.objects.Team> teams = com.macklive.storage.DataManager.getInstance().getTeams();
teams.sort(new java.util.Comparator<com.macklive.objects.Team>() {
@java.lang.Override
public int compare(com.macklive.objects.Team t1, com.mackli... | public java.lang.String getTeamNames() {
java.util.List<com.macklive.objects.Team> teams = com.macklive.storage.DataManager.getInstance().getTeams();
java.util.Collections.sort(teams, new java.util.Comparator<com.macklive.objects.Team>() {
@java.lang.Override
public int compare(com.macklive.obje... |
public boolean removeAll(com.hopkins.collections.Collection<?> items) {
boolean hasChanged = false;
com.hopkins.collections.Iterator<?> iter = items.iterator();
while (iter.hasNext()) {
hasChanged = hasChanged || (remove(iter.next()));
}
return hasChanged;
} | public boolean removeAll(com.hopkins.collections.Collection<?> items) {
boolean hasChanged = false;
com.hopkins.collections.Iterator<?> iter = items.iterator();
while (iter.hasNext()) {
if (remove(iter.next())) {
hasChanged = true;
}
}
return hasChanged;
} |
public void onClick(android.view.View v) {
try {
if ((mediaPlayer) == null)
throw new java.lang.Exception("No file loaded!");
mediaPlayer.seekTo(mediaPlayer.getDuration());
android.support.design.widget.Snackbar.make(v, "Reached end", Snackbar.LENGTH_LONG).setAction("Act... | public void onClick(android.view.View v) {
try {
if ((mediaPlayer) == null)
throw new java.lang.Exception("No file loaded!");
mediaPlayer.seekTo(mediaPlayer.getDuration());
} catch (java.lang.Exception e) {
android.support.design.widget.Snackbar.make(v, e.toString(),... |
public java.lang.String orderEquipment(@org.lab_manager.controller.RequestParam(value = "assetName")
java.lang.String assetName, @org.lab_manager.controller.RequestParam(value = "number")
int num, @org.lab_manager.controller.RequestParam(value = "days")
int days, @org.lab_manager.controller.RequestParam(value = "applic... | public java.lang.String orderEquipment(@org.lab_manager.controller.RequestParam(value = "assetName")
java.lang.String assetName, @org.lab_manager.controller.RequestParam(value = "number")
java.lang.String num, @org.lab_manager.controller.RequestParam(value = "startTime")
java.lang.String startTime, @org.lab_manager.con... |
public void onItemSelected(android.widget.AdapterView<?> parent, android.view.View view, int position, long id) {
com.example.nguyennam.financialbook.recordtab.ExpenseFormInput expenseFormInput = new com.example.nguyennam.financialbook.recordtab.ExpenseFormInput();
com.example.nguyennam.financialbook.recordtab.... | public void onItemSelected(android.widget.AdapterView<?> parent, android.view.View view, int position, long id) {
com.example.nguyennam.financialbook.recordtab.ExpenseFormInput expenseFormInput = new com.example.nguyennam.financialbook.recordtab.ExpenseFormInput();
com.example.nguyennam.financialbook.recordtab.... |
public java.lang.String medical() {
org.json.simple.parser.JSONParser parser = new org.json.simple.parser.JSONParser();
try {
java.lang.Object obj = parser.parse(new java.io.FileReader("my_friends.json"));
org.json.simple.JSONObject jsonObject = ((org.json.simple.JSONObject) (obj));
} catch ... | public java.lang.String medical() {
org.json.simple.parser.JSONParser parser = new org.json.simple.parser.JSONParser();
org.json.simple.JSONObject jsonObject;
try {
java.lang.Object obj = parser.parse(new java.io.FileReader("my_friends.json"));
jsonObject = ((org.json.simple.JSONObject) (obj... |
public java.lang.Long tradeCount(com.acuo.common.model.ids.PortfolioId portfolioId) {
java.lang.String query = "MATCH (portfolio:Portfolio {id:{id}})<-[:BELONGS_TO]-(trade:Trade) " + "RETURN count(trade) as count";
final com.google.common.collect.ImmutableMap<java.lang.String, java.lang.String> parameters = com... | public java.lang.Long tradeCount(com.acuo.common.model.ids.PortfolioId portfolioId) {
java.lang.String query = "MATCH (portfolio:Portfolio {id:{id}})<-[:BELONGS_TO]-(trade:Trade) " + "RETURN count(trade) as count";
final com.google.common.collect.ImmutableMap<java.lang.String, java.lang.String> parameters = com... |
public boolean hideItem(java.lang.String item) {
java.lang.String itemsToRemove = null;
org.oscarehr.common.model.Property p = propertyDao.checkByName(org.oscarehr.managers.PreventionManager.HIDE_PREVENTION_ITEM);
itemsToRemove = p.getValue();
if (itemsToRemove != null) {
java.util.List<java.lan... | public boolean hideItem(java.lang.String item) {
java.lang.String itemsToRemove = null;
org.oscarehr.common.model.Property p = propertyDao.checkByName(org.oscarehr.managers.PreventionManager.HIDE_PREVENTION_ITEM);
if ((p != null) && ((p.getValue()) != null)) {
itemsToRemove = p.getValue();
j... |
public void terminatingConfigurationContext(org.apache.axis2.context.ConfigurationContext configCtx) {
int tenantID = org.wso2.carbon.utils.multitenancy.MultitenantUtils.getTenantId(configCtx);
org.apache.axis2.context.ConfigurationContext clientContext = org.wso2.carbon.tenant.configcontext.provider.store.Tena... | public void terminatingConfigurationContext(org.apache.axis2.context.ConfigurationContext configCtx) {
int tenantID = org.wso2.carbon.utils.multitenancy.MultitenantUtils.getTenantId(configCtx);
org.apache.axis2.context.ConfigurationContext clientContext = org.wso2.carbon.tenant.configcontext.provider.store.Tena... |
public void removeAt(int position) {
charger();
ElementSuite avant = getAt((position - 1));
ElementSuite courant = getAt(position);
if (courant == null) {
java.lang.System.out.println("Erreur removeAt: element hors de portee");
return ;
}
if (avant != null) {
avant.procha... | public void removeAt(int position) {
charger();
ElementSuite courant = getAt(position);
if (courant == null) {
java.lang.System.out.println("Erreur removeAt: element hors de portee");
return ;
}
ElementSuite avant = getAt((position - 1));
if (avant != null) {
avant.procha... |
synchronized(locks[es.valcarcelsainz.dce.DCEAgent.currInd(i)]) {
double[] mu = mus[es.valcarcelsainz.dce.DCEAgent.currInd(i)];
double inverse_weight = 1.0 / weight;
for (int j = 0; j < (mu.length); j++) {
mu[j] *= inverse_weight;
mu[j] += mu_hat[j];
mu[j] ... | synchronized(locks[es.valcarcelsainz.dce.DCEAgent.currInd(i)]) {
double[] mu = mus[es.valcarcelsainz.dce.DCEAgent.currInd(i)];
for (int j = 0; j < (mu.length); j++) {
mu[j] += weight * (mu_hat[j]);
}
}
} |
private void profilesjComboBoxActionPerformed(java.awt.event.ActionEvent evt) {
project.getPhotoSeries().clear();
de.quadrillenschule.azocamsyncd.astromode.PhotoProjectProfile ppp = ((de.quadrillenschule.azocamsyncd.astromode.PhotoProjectProfile) (profilesjComboBox.getSelectedItem()));
project.getPhotoSerie... | private void profilesjComboBoxActionPerformed(java.awt.event.ActionEvent evt) {
project.getPhotoSeries().clear();
de.quadrillenschule.azocamsyncd.astromode.PhotoProjectProfile ppp = ((de.quadrillenschule.azocamsyncd.astromode.PhotoProjectProfile) (profilesjComboBox.getSelectedItem()));
if (ppp != null) {
... |
private java.lang.CharSequence generateFieldNotPresentCondition(final int sinceVersion, final uk.co.real_logic.sbe.ir.Encoding encoding, final java.lang.String indent) {
if (0 == sinceVersion) {
return "";
}
return java.lang.String.format((indent + " if (_actingVersion < %1$d) return %2$s;\n\... | private java.lang.CharSequence generateFieldNotPresentCondition(final int sinceVersion, final uk.co.real_logic.sbe.ir.Encoding encoding, final java.lang.String indent) {
if (0 == sinceVersion) {
return "";
}
return java.lang.String.format((indent + " if (_actingVersion < %1$d) return %2$s;\n\... |
public com.google.android.gms.ads.AdView showRemoveAds(android.app.Activity activity) {
if (((com.rothconsulting.android.common.Utils.isPlatformBelow_2_3_0()) || (com.rothconsulting.android.common.Utils.hasValidKey())) || (!(com.rothconsulting.android.common.Utils.isNetworkAvailable(activity, null, false)))) {
... | public com.google.android.gms.ads.AdView showRemoveAds(android.app.Activity activity) {
if ((com.rothconsulting.android.common.Utils.hasValidKey()) || (!(com.rothconsulting.android.common.Utils.isNetworkAvailable(activity, null, false)))) {
android.widget.LinearLayout adsLayout = ((android.widget.LinearLayo... |
public void testLogInfo() throws java.io.IOException {
consoleOutput.reset();
final java.lang.String logMsg = "Test info log";
final java.lang.String expectedLog = ("INFO [] - " + logMsg) + " \n";
org.ballerinalang.test.utils.BTestUtils.invoke(result, "testInfo", new org.ballerinalang.model.values.BValu... | public void testLogInfo() throws java.io.IOException {
consoleOutput.reset();
final java.lang.String logMsg = "Test info log";
final java.lang.String expectedLog = ("INFO [] - " + logMsg) + " \n";
org.ballerinalang.test.utils.BTestUtils.invoke(result, "testInfo", new org.ballerinalang.model.values.BValu... |
public org.vertx.java.core.json.JsonObject mapToJson(java.lang.Object[] values) {
org.vertx.java.core.json.JsonObject ret = new org.vertx.java.core.json.JsonObject();
for (int i = 0; i < (fields.length); i++) {
java.lang.String field = fields[i];
int pt = field.indexOf('.');
if (pt != (-... | public org.vertx.java.core.json.JsonObject mapToJson(java.lang.Object[] values) {
org.vertx.java.core.json.JsonObject ret = new org.vertx.java.core.json.JsonObject();
for (int i = 0; i < (fields.length); i++) {
java.lang.String field = fields[i];
int pt = field.indexOf('.');
if (pt != (-... |
public java.util.List<org.skife.config.TimeSpan> getIncompleteTransactionsRetries(@org.skife.config.Param(value = "dummy")
final org.killbill.billing.callcontext.InternalTenantContext tenantContext) {
final java.lang.reflect.Method method = new java.lang.Object() { }.getClass().getEnclosingMethod();
final ja... | public java.util.List<org.skife.config.TimeSpan> getIncompleteTransactionsRetries(@org.skife.config.Param(value = "dummy")
final org.killbill.billing.callcontext.InternalTenantContext tenantContext) {
final java.lang.reflect.Method method = new java.lang.Object() { }.getClass().getEnclosingMethod();
final ja... |
public void setInputPath(java.lang.String inputPath) {
this.inputPath = inputPath;
if ((getInputPath()) == null)
setInputFilename("");
setInputFilename(java.nio.file.Paths.get(getInputPath()).getFileName().toString());
} | public void setInputPath(java.lang.String inputPath) {
this.inputPath = inputPath;
if ((getInputPath()) == null)
setInputFilename("");
else
setInputFilename(java.nio.file.Paths.get(getInputPath()).getFileName().toString());
} |
protected void processWindowEvent(java.awt.event.WindowEvent e) {
if ((e.getID()) == (java.awt.event.WindowEvent.WINDOW_CLOSING)) {
if (net.sf.memoranda.util.Configuration.get("ON_CLOSE").equals("exit"))
doExit();
else
super.processWindowEvent(e);
}else
s... | protected void processWindowEvent(java.awt.event.WindowEvent e) {
if ((e.getID()) == (java.awt.event.WindowEvent.WINDOW_CLOSING)) {
if (net.sf.memoranda.util.Configuration.get("ON_CLOSE").equals("exit"))
doExit();
else
doExit();
}else
super.processWindowE... |
public void work() {
int offset = index;
int width = getWidth();
for (int x = 1; x <= width; x++ , offset++) {
float adjacentValueSum = fluidField.sumAdjacentValues(offset, destination);
destination[offset] = (constant) * ((source[offset]) + ((a) * adjacentValueSum));
}
} | public void work() {
int offset = index;
int width = getWidth();
for (int x = 1; x <= width; x++ , offset++) {
float adjacentValueSum = fluidField.sumAdjacentValues(offset, source);
destination[offset] = (constant) * ((source[offset]) + ((a) * adjacentValueSum));
}
} |
public void onRequestPermissionsResult(int requestCode, java.lang.String[] permissions, int[] grantResults) {
switch (requestCode) {
case ch.zhaw.bait17.audio_signal_processing_toolbox.ui.MediaListActivity.REQUEST_READ_EXTERNAL_STORAGE :
{
if (((grantResults.length) > 0) && ((gra... | public void onRequestPermissionsResult(int requestCode, @android.support.annotation.NonNull
java.lang.String[] permissions, @android.support.annotation.NonNull
int[] grantResults) {
if (requestCode == (ch.zhaw.bait17.audio_signal_processing_toolbox.ui.MediaListActivity.REQUEST_READ_EXTERNAL_STORAGE)) {
if (... |
public static void copy(java.io.PrintWriter out, java.io.InputStream stream, java.nio.charset.Charset cs) throws java.io.IOException {
java.io.InputStreamReader reader = new java.io.InputStreamReader(stream, cs);
char[] buffer = new char[1024];
int len = reader.read(buffer);
while (len != (-1)) {
... | public static void copy(java.io.PrintWriter out, java.io.InputStream stream) throws java.io.IOException {
java.io.InputStreamReader reader = new java.io.InputStreamReader(stream);
char[] buffer = new char[1024];
int len = reader.read(buffer);
while (len != (-1)) {
out.write(buffer, 0, len);
... |
public void setBiome(int x, int z, org.spongepowered.api.world.biome.BiomeType biome) {
checkOpen();
checkRange(x, z);
this.biomes[((x - (this.start.getX())) | ((z - (this.start.getY())) << 4))] = ((byte) (((net.minecraft.world.biome.BiomeGenBase) (biome)).biomeID));
} | public void setBiome(int x, int z, org.spongepowered.api.world.biome.BiomeType biome) {
checkOpen();
checkRange(x, z);
this.biomes[((x - (this.start.getX())) + ((z - (this.start.getY())) * (this.size.getX())))] = ((byte) (((net.minecraft.world.biome.BiomeGenBase) (biome)).biomeID));
} |
public static java.lang.String setLetters(java.lang.String fullName) {
java.lang.String[] names = fullName.split(" ");
java.lang.String letters = "";
for (int i = 0; i < (names.length); i++) {
if (i == 2)
break;
letters += names[i].charAt(0);
}
return letters.toU... | public static java.lang.String setLetters(java.lang.String fullName) {
java.lang.String[] names = fullName.split(" ");
java.lang.String letters = "";
for (int i = 0; i < (names.length); i++) {
if (i == 2)
break;
if ((names[i].length()) > 0)
letters += names[i... |
public static void main(java.lang.String[] args) {
int[][] matrix = new int[][]{ new int[]{ 1 , 1 , 1 } , new int[]{ 9 , 1 , 1 } , new int[]{ 0 , 1 , 0 } };
amazon.MazePath.m = matrix.length;
amazon.MazePath.n = matrix[0].length;
amazon.MazePath.maze = matrix;
java.lang.System.out.println(amazon.Maz... | public static void main(java.lang.String[] args) {
int[][] matrix = new int[][]{ new int[]{ 1 , 0 , 0 } , new int[]{ 1 , 0 , 9 } , new int[]{ 0 , 0 , 1 } };
amazon.MazePath.m = matrix.length;
amazon.MazePath.n = matrix[0].length;
amazon.MazePath.maze = matrix;
java.lang.System.out.println(amazon.Maz... |
public int compare(java.util.Calendar o1, java.util.Calendar o2) {
java.lang.Long diff1 = new java.lang.Long(((now.getTimeInMillis()) - (o1.getTimeInMillis())));
java.lang.Long diff2 = new java.lang.Long(((now.getTimeInMillis()) - (o2.getTimeInMillis())));
return diff1.compareTo(diff2);
} | public int compare(java.util.Calendar o1, java.util.Calendar o2) {
java.lang.Long diff1 = (now.getTimeInMillis()) - (o1.getTimeInMillis());
java.lang.Long diff2 = (now.getTimeInMillis()) - (o2.getTimeInMillis());
return diff1.compareTo(diff2);
} |
public void commitButtonPressed(android.view.View v) {
java.util.List<java.lang.Long> selectedIds = new java.util.ArrayList<>();
for (cwa115.trongame.Lists.FriendListItem item : friendListItems) {
if (item.isSelected())
selectedIds.add(item.getPlayer().getId());
}
commit(com... | public void commitButtonPressed(android.view.View v) {
java.util.ArrayList<java.lang.Integer> selectedIds = new java.util.ArrayList<>();
for (cwa115.trongame.Lists.FriendListItem item : friendListItems) {
if (item.isSelected())
selectedIds.add(((int) (item.getPlayer().getId())));
... |
@java.lang.Override
edu.umn.biomedicus.framework.SearchExpr.State search(edu.umn.biomedicus.framework.SearchExpr.DefaultSearcher search, edu.umn.biomedicus.framework.SearchExpr.State state) {
edu.umn.biomedicus.framework.SearchExpr.State res = condition.search(search, state.copy());
if (res.isMiss()) {
... | @java.lang.Override
edu.umn.biomedicus.framework.SearchExpr.State search(edu.umn.biomedicus.framework.SearchExpr.DefaultSearcher search, edu.umn.biomedicus.framework.SearchExpr.State state) {
edu.umn.biomedicus.framework.SearchExpr.State res = condition.search(search, state.copy());
if (res.isMiss()) {
... |
public boolean onNavigationItemSelected(android.view.MenuItem menuItem) {
switch (menuItem.getItemId()) {
case R.id.create_note_item :
toCreateMindFragment();
menuItem.setChecked(true);
break;
case R.id.list_item :
toListViewFragment();
men... | public boolean onNavigationItemSelected(android.view.MenuItem menuItem) {
switch (menuItem.getItemId()) {
case R.id.create_note_item :
toCreateMindFragment();
menuItem.setChecked(true);
break;
case R.id.list_item :
toListViewFragment();
men... |
public void enqueue(T element) {
if ((this.count) >= (this.elements.length)) {
this.grow();
}
this.elements[endIndex] = element;
endIndex = ((endIndex) + 1) % (this.elements.length);
(this.count)++;
} | public void enqueue(T element) {
if (((this.count) + 1) >= (this.elements.length)) {
this.grow();
}
this.elements[endIndex] = element;
endIndex = ((endIndex) + 1) % (this.elements.length);
(this.count)++;
} |
public void onInventoryClickEvent(org.bukkit.event.inventory.InventoryClickEvent event) {
org.bukkit.inventory.ItemStack item = event.getCurrentItem();
if (item.hasItemMeta()) {
if (item.getItemMeta().hasLore()) {
if (item.getItemMeta().getLore().contains("BjornNotice GUI")) {
... | public void onInventoryClickEvent(org.bukkit.event.inventory.InventoryClickEvent event) {
org.bukkit.inventory.ItemStack item = event.getCurrentItem();
if (item != null) {
if (((item.hasItemMeta()) && (item.getItemMeta().hasLore())) && (item.getItemMeta().getLore().contains("BjornNotice GUI"))) {
... |
private void remove() {
android.util.Log.d("debug", "remove called");
str = str.substring(0, java.lang.Math.max(((str.length()) - 1), 0));
showResult.setText(str);
if ((str) == "")
str = " ";
} | private void remove() {
android.util.Log.d("debug", "remove called");
str = str.substring(0, java.lang.Math.max(((str.length()) - 1), 0));
showResult.setText(str);
if (str.equals(""))
str = " ";
} |
private org.bedework.caldav.util.sharing.InviteNotificationType deletedNotification(final java.lang.String shareeHref, final java.lang.String sharedUrl, final java.lang.String sharerHref) throws org.bedework.calfacade.exc.CalFacadeException {
final org.bedework.caldav.util.sharing.InviteNotificationType in = new or... | private org.bedework.caldav.util.sharing.InviteNotificationType deletedNotification(final java.lang.String shareeHref, final java.lang.String sharerHref) throws org.bedework.calfacade.exc.CalFacadeException {
final org.bedework.caldav.util.sharing.InviteNotificationType in = new org.bedework.caldav.util.sharing.Inv... |
private void miniMoveDown() {
if (((getWCstartY()) + (wcDisplacement)) >= ((building.getBuildingStartY()) + (getWCheight()))) {
if ((scups.getLRscupsY()) >= (scups.getLRscupsPauseY())) {
miniMoveDown = false;
if (!(cleanWindow)) {
moveDown = true;
}else {
... | private void miniMoveDown() {
if (((getWCstartY()) + (wcDisplacement)) >= ((building.getBuildingStartY()) + (getWCheight()))) {
miniMoveDown = false;
if (!(cleanWindow)) {
moveDown = true;
}else {
moveRight = true;
firstMoveRight = true;
}
}els... |
private xdtic.projpool.util.Pair<java.util.List<xdtic.projpool.model.User>, java.lang.Long> getUsers(java.lang.String keyword, int pageNum, int pageSize) {
java.lang.String condition = getSearchCondition(keyword);
com.github.pagehelper.Page page = com.github.pagehelper.PageHelper.startPage((pageNum + 1), pageSi... | private xdtic.projpool.util.Pair<java.util.List<xdtic.projpool.model.User>, java.lang.Long> getUsers(java.lang.String keyword, int pageNum, int pageSize) {
com.github.pagehelper.Page page = com.github.pagehelper.PageHelper.startPage((pageNum + 1), pageSize);
java.util.List<xdtic.projpool.model.User> users = use... |
public void testSize2() throws java.io.IOException {
try (net.openhft.chronicle.map.ChronicleMap map = map5(((net.openhft.chronicle.engine.map.StatelessChronicleMapTest.s_port)++))) {
try (net.openhft.chronicle.map.ChronicleMap empty = net.openhft.chronicle.engine.map.StatelessChronicleMapTest.newShmIntStri... | public void testSize2() throws java.io.IOException {
try (net.openhft.chronicle.map.ChronicleMap map = map5()) {
try (net.openhft.chronicle.map.ChronicleMap empty = net.openhft.chronicle.engine.map.StatelessChronicleMapTest.newShmIntString()) {
assertEquals(0, empty.size());
assertEq... |
public com.google.gson.JsonObject call(java.lang.String s) {
android.util.Log.d("sfparks parksModule", "about to parse 1");
try {
return jsonParser.parse(s.trim()).getAsJsonObject();
} catch (com.google.gson.JsonSyntaxException e) {
android.util.Log.d("sfparks parksModule", ((("poorly formed... | public com.google.gson.JsonObject call(java.lang.String s) {
try {
return jsonParser.parse(s.trim()).getAsJsonObject();
} catch (com.google.gson.JsonSyntaxException e) {
android.util.Log.d("sfparks parksModule", ((("poorly formed json: " + s) + " Error: ") + e));
return null;
}
} |
public java.util.List<java.lang.String> getAllParserExtensionTypes() throws org.apache.metron.rest.RestException {
java.util.List<java.lang.String> types;
try {
types = client.getChildren().forPath(ConfigurationType.PARSER_EXTENSION.getZookeeperRoot());
} catch (org.apache.zookeeper.KeeperException ... | public java.util.List<java.lang.String> getAllParserExtensionTypes() throws org.apache.metron.rest.RestException {
java.util.List<java.lang.String> types;
try {
types = client.getChildren().forPath(ConfigurationType.PARSER_EXTENSION.getZookeeperRoot());
} catch (org.apache.zookeeper.KeeperException ... |
protected void addIssuesFromDependentBuilds(hudson.model.Run<?, ?> build, hudson.plugins.jira.JiraSite site, hudson.model.TaskListener listener, java.util.Set<java.lang.String> issueIds) {
for (hudson.model.AbstractBuild.DependencyChange depc : hudson.plugins.jira.RunScmChangeExtractor.getDependencyChanges(build.ge... | protected void addIssuesFromDependentBuilds(hudson.model.Run<?, ?> build, hudson.plugins.jira.JiraSite site, hudson.model.TaskListener listener, java.util.Set<java.lang.String> issueIds) {
for (hudson.model.AbstractBuild.DependencyChange depc : hudson.plugins.jira.RunScmChangeExtractor.getDependencyChanges(build).v... |
private void loadMenuItemAction() {
javax.swing.JFileChooser fileChooser = new javax.swing.JFileChooser(com.tkomiya.main.MainController.DEFAULT_SAVE_DIRECTORY);
fileChooser.setFileFilter(new javax.swing.filechooser.FileNameExtensionFilter("Text files", com.tkomiya.main.MainController.TEXT_FILE_EXTENSION));
... | public void loadMenuItemAction() {
javax.swing.JFileChooser fileChooser = new javax.swing.JFileChooser(com.tkomiya.main.MainController.DEFAULT_SAVE_DIRECTORY);
fileChooser.setFileFilter(new javax.swing.filechooser.FileNameExtensionFilter("Text files", com.tkomiya.main.MainController.TEXT_FILE_EXTENSION));
i... |
public void onReadyStateChange(com.byteshaft.requests.HttpRequest httpRequest, int i) {
switch (i) {
case com.byteshaft.requests.HttpRequest.STATE_DONE :
switch (httpRequest.getStatus()) {
case java.net.HttpURLConnection.HTTP_OK :
finish();
... | public void onReadyStateChange(com.byteshaft.requests.HttpRequest httpRequest, int i) {
switch (i) {
case com.byteshaft.requests.HttpRequest.STATE_DONE :
switch (httpRequest.getStatus()) {
case java.net.HttpURLConnection.HTTP_OK :
finish();
... |
public void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
boolean isPushPluginActive = com.plugin.gcm.NotificationService.getInstance(getApplicationContext()).isActive();
android.util.Log.v(com.plugin.gcm.PushHandlerActivity.TAG, ("onCreate - isPushPluginActive: " + is... | public void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
boolean isPushPluginActive = com.plugin.gcm.NotificationService.getInstance(getApplicationContext()).isActive();
android.util.Log.v(com.plugin.gcm.PushHandlerActivity.TAG, ("onCreate - isPushPluginActive: " + is... |
private void _showMyAccountLoadedFragment(rx.subjects.PublishSubject<com.objectivetruth.uoitlibrarybooking.data.models.usermodel.MyAccountSignoutEvent> signoutEventPublishSubject, com.objectivetruth.uoitlibrarybooking.data.models.usermodel.MyAccountDataLoginState myAccountDataLoginState) {
java.lang.String MY_ACCOU... | private void _showMyAccountLoadedFragment(rx.subjects.PublishSubject<com.objectivetruth.uoitlibrarybooking.data.models.usermodel.MyAccountSignoutEvent> signoutEventPublishSubject, com.objectivetruth.uoitlibrarybooking.data.models.usermodel.MyAccountDataLoginState myAccountDataLoginState) {
java.lang.String MY_ACCOU... |
public void savePartnerDetails(com.rjn.model.VendorProfile partnerDetails) {
partnerDetailsDao.savePartnerDetails(partnerDetails);
if (((partnerDetails.getId()) == null) || ("".equals(partnerDetails.getId()))) {
com.rjn.model.Account account = new com.rjn.model.Account();
account.setMy_user_name... | public void savePartnerDetails(com.rjn.model.VendorProfile partnerDetails) {
partnerDetailsDao.savePartnerDetails(partnerDetails);
com.rjn.model.Account account = new com.rjn.model.Account();
account.setMy_user_name(partnerDetails.getEmail());
account.setPassword(partnerDetails.getPassword());
accou... |
public void testRetrieveTodoByDate() {
java.util.ArrayList<object.Todo> expectedList = new java.util.ArrayList<object.Todo>();
expectedList.add(todo3);
expectedList.add(todo7);
expectedList.add(todo5);
java.util.ArrayList<object.Todo> actualList = storagetest.FileTodoHandlerTest.fTodoH.retrieveTodoB... | public void testRetrieveTodoByDate() {
java.util.ArrayList<object.Todo> expectedList = new java.util.ArrayList<object.Todo>();
expectedList.add(todo7);
expectedList.add(todo5);
expectedList.add(todo3);
java.util.ArrayList<object.Todo> actualList = storagetest.FileTodoHandlerTest.fTodoH.retrieveTodoB... |
private boolean checkVertical(int row, int col) {
if (row <= ((board[0].length) - 3)) {
if (((board[row][col]) == (board[(row + 1)][col])) && ((board[row][col]) == (board[(row + 2)][col]))) {
java.lang.System.out.println("There is a win there");
return true;
}
}
retur... | private boolean checkVertical(int row, int col) {
if (row <= ((board.length) - 3)) {
if (((board[row][col]) == (board[(row + 1)][col])) && ((board[row][col]) == (board[(row + 2)][col]))) {
java.lang.System.out.println("There is a win there");
return true;
}
}
return f... |
private void startGame(android.view.View view) {
android.content.Intent intent = new android.content.Intent(this, com.boardgame.friday.GameActivity.class);
android.os.Bundle bundle = new android.os.Bundle();
bundle.putSerializable(GameActivity.GAME_LEVEL, currentLevel);
intent.putExtras(bundle);
sta... | public void startGame(android.view.View view) {
android.content.Intent intent = new android.content.Intent(this, com.boardgame.friday.GameActivity.class);
android.os.Bundle bundle = new android.os.Bundle();
bundle.putSerializable(GameActivity.GAME_LEVEL, currentLevel);
intent.putExtras(bundle);
star... |
private void setYearAdapters() {
java.util.List<java.lang.String> years = new java.util.ArrayList<>();
for (com.onelio.connectu.Containers.AcademicYear year : app.academicYears) {
years.add(year.getYear());
}
yearAdapter = new android.widget.ArrayAdapter(getContext(), R.layout.view_dialog_select... | private void setYearAdapters() {
java.util.List<java.lang.String> years = new java.util.ArrayList<>();
if ((app.academicYears) == null)
return ;
for (com.onelio.connectu.Containers.AcademicYear year : app.academicYears) {
years.add(year.getYear());
}
yearAdapter = new android.wi... |
public static java.io.File findMavenTargetJar(java.lang.String module, java.lang.String name) throws java.io.IOException {
if (new java.io.File(module).isDirectory()) {
java.io.File inModule = new java.io.File(((module + "/target/") + name));
if (inModule.isFile()) {
return inModule;
... | private static java.io.File findMavenTargetJar(java.lang.String module, java.lang.String name) throws java.io.IOException {
if (new java.io.File(module).isDirectory()) {
java.io.File inModule = new java.io.File(((module + "/target/") + name));
if (inModule.isFile()) {
return inModule;
... |
public void onSaveInstanceState(android.os.Bundle outState) {
super.onSaveInstanceState(outState);
if ((getFragmentManager().getBackStackEntryCount()) == 0) {
outState.putBoolean(Constants.STATE_RESOLVING_ERROR, mResolvingError);
outState.putString(Constants.DESTINATION, mButtonSetDestination.ge... | public void onSaveInstanceState(android.os.Bundle outState) {
super.onSaveInstanceState(outState);
if ((getFragmentManager().getBackStackEntryCount()) == 0) {
outState.putBoolean(Constants.STATE_RESOLVING_ERROR, mResolvingError);
outState.putString(Constants.DESTINATION, mButtonSetDestination.ge... |
public java.util.Collection<javax.cim.CIMObjectPath> getStorageSynchronizationsInRemoteGroup(com.emc.storageos.db.client.model.StorageSystem provider, com.emc.storageos.db.client.model.RemoteDirectorGroup group) {
javax.cim.CIMObjectPath remoteGroupPath = cimPath.getRemoteReplicationCollection(provider, group);
... | public java.util.Collection<javax.cim.CIMObjectPath> getStorageSynchronizationsInRemoteGroup(com.emc.storageos.db.client.model.StorageSystem provider, com.emc.storageos.db.client.model.RemoteDirectorGroup group) {
javax.cim.CIMObjectPath remoteGroupPath = cimPath.getRemoteReplicationCollection(provider, group);
... |
public void run() {
if (barrier != null)
barrier.await();
if ((bf) != null)
bf.close();
if ((summary) != null)
summary.close();
if ((runOnClose) != null)
runOnClose.run();
dfile.close();
if ((ifile) != null)
ifile.close();
type... | public void run() {
if (barrier != null)
barrier.await();
if ((bf) != null)
bf.close();
if ((summary) != null)
summary.close();
if ((runOnClose) != null)
runOnClose.run();
if ((dfile) != null)
dfile.close();
if ((ifile) != null)
... |
public java.util.List<partypeople.Item> getItemsNeeded() {
java.util.ArrayList<partypeople.Item> itemsList = new java.util.ArrayList<partypeople.Item>();
if ((itemsNeeded) != null) {
for (com.googlecode.objectify.Ref<partypeople.Item> item : itemsNeeded) {
itemsList.add(item.safeGet());
... | public java.util.List<partypeople.Item> getItemsNeeded() {
java.util.ArrayList<partypeople.Item> itemsList = new java.util.ArrayList<partypeople.Item>();
if ((itemsNeeded) != null) {
for (com.googlecode.objectify.Ref<partypeople.Item> item : itemsNeeded) {
partypeople.Item temp = item.getVal... |
public java.util.List<org.apache.hadoop.hive.metastore.api.SFileLocation> getSFileLocations(long fid) throws org.apache.hadoop.hive.metastore.api.MetaException {
boolean commited = false;
java.util.List<org.apache.hadoop.hive.metastore.api.SFileLocation> sfl = new java.util.ArrayList<org.apache.hadoop.hive.meta... | public java.util.List<org.apache.hadoop.hive.metastore.api.SFileLocation> getSFileLocations(long fid) throws org.apache.hadoop.hive.metastore.api.MetaException {
boolean commited = false;
java.util.List<org.apache.hadoop.hive.metastore.api.SFileLocation> sfl = new java.util.ArrayList<org.apache.hadoop.hive.meta... |
public boolean isValidPlay(final models.Card selectedCard, final models.Player player) {
if (getCurrentPlayer().equals(player)) {
if (getCardsInPlay().isEmpty()) {
return true;
}
models.Suit leadSuit = getFirstPlayedCard().getCardSuit();
if (!(player.getHand().containsSui... | public boolean isValidPlay(final models.Card selectedCard, final models.Player player) {
if (getCardsInPlay().isEmpty()) {
return true;
}
models.Suit leadSuit = getFirstPlayedCard().getCardSuit();
if (!(player.getHand().containsSuit(leadSuit))) {
return true;
}else {
return (... |
public void onGenerated(android.support.v7.graphics.Palette palette) {
plus.mcpe.mcpe_plus.widget.CardView cardView = ((plus.mcpe.mcpe_plus.widget.CardView) (itemView));
int start = ((titleView.getHeight()) + (imageView.getHeight())) - 1;
cardView.setCardBackgroundShader(new android.graphics.LinearGradient(... | public void onGenerated(android.support.v7.graphics.Palette palette) {
plus.mcpe.mcpe_plus.widget.CardView cardView = ((plus.mcpe.mcpe_plus.widget.CardView) (itemView));
int start = ((titleView.getHeight()) + (imageView.getHeight())) - 1;
cardView.setCardBackgroundShader(new android.graphics.LinearGradient(... |
public void actionPerformed(java.awt.event.ActionEvent arg0) {
if ((dlg.showSaveDialog(this)) != (javax.swing.JFileChooser.APPROVE_OPTION))
return ;
java.lang.String fileName = (dlg.getSelectedFile().getAbsolutePath()) + ".html";
java.lang.String shortName = (dlg.getSelectedFile().getName()) + ... | public void actionPerformed(java.awt.event.ActionEvent arg0) {
if ((dlg.showSaveDialog(this)) != (javax.swing.JFileChooser.APPROVE_OPTION))
return ;
java.lang.String fileName = dlg.getSelectedFile().getAbsolutePath();
java.lang.String shortName = dlg.getSelectedFile().getName();
saveReport(... |
public void onClick(android.view.View v) {
if (null != (_onNegativeButtonClicked)) {
_onNegativeButtonClicked.onNegativeButtonClicked(getDialog());
}else {
_listSelectedItems.clear();
_listSelectedItems.addAll(_mapSelectedItems.values());
_multiSelectCallback.onItemsSelected(_lis... | public void onClick(android.view.View v) {
_listSelectedItems.clear();
_listSelectedItems.addAll(_mapSelectedItems.values());
_multiSelectCallback.onItemsSelected(_listSelectedItems);
if (null != (_onNegativeButtonClicked)) {
_onNegativeButtonClicked.onNegativeButtonClicked(getDialog());
}el... |
public void searchKeyString(java.lang.String key) {
java.lang.String selectQuery = ((("SELECT * FROM " + (DBHelper.TABLE_NAME)) + " WHERE ") + (DBHelper.COLUMN_NAME)) + " LIKE ?";
android.database.sqlite.SQLiteDatabase dbRead = com.ateet.excel.MainActivity.db.getReadableDatabase();
com.ateet.excel.MainActi... | public void searchKeyString(java.lang.String key) {
java.lang.String selectQuery = ((("SELECT * FROM " + (DBHelper.TABLE_NAME)) + " WHERE ") + (DBHelper.COLUMN_NAME)) + " LIKE ?";
android.database.sqlite.SQLiteDatabase dbRead = com.ateet.excel.MainActivity.db.getReadableDatabase();
com.ateet.excel.MainActi... |
private java.util.Map<com.epam.freelancer.business.util.ValidationParametersBuilder.Parameters, java.lang.String> prepareData(java.util.Map<java.lang.String, java.lang.String[]> data) {
java.util.Map<com.epam.freelancer.business.util.ValidationParametersBuilder.Parameters, java.lang.String> map = new java.util.Hash... | private java.util.Map<com.epam.freelancer.business.util.ValidationParametersBuilder.Parameters, java.lang.String> prepareData(java.util.Map<java.lang.String, java.lang.String[]> data) {
java.util.Map<com.epam.freelancer.business.util.ValidationParametersBuilder.Parameters, java.lang.String> map = new java.util.Hash... |
public static void TestLogin() {
javax.ws.rs.client.Entity<java.lang.String> someEntity = javax.ws.rs.client.Entity.entity("login, pass", MediaType.APPLICATION_JSON);
javax.ws.rs.core.Response response = test.java.TestDirlididi.server.newRequest("/login").request().buildPost(someEntity).invoke();
org.junit.... | public void TestLogin() {
javax.ws.rs.client.Entity<java.lang.String> someEntity = javax.ws.rs.client.Entity.entity("login, pass", MediaType.APPLICATION_JSON);
javax.ws.rs.core.Response response = test.java.TestDirlididi.server.newRequest("/login").request().buildPost(someEntity).invoke();
org.junit.Assert.... |
public void onClick(android.view.View v) {
if (!(penaltyYdsEditText.getText().toString().equals(""))) {
globalPlay.setGnLs(java.lang.Integer.parseInt(penaltyYdsEditText.getText().toString()));
globalPlay.setDefensivePenalty(defenseCB.isChecked());
globalPlay.setYdLn(java.lang.Integer.parseIn... | public void onClick(android.view.View v) {
if (!(penaltyYdsEditText.getText().toString().equals(""))) {
globalPlay.setGnLs(java.lang.Integer.parseInt(penaltyYdsEditText.getText().toString()));
globalPlay.setDefensivePenalty(defenseCB.isChecked());
globalPlay.setYdLn(java.lang.Integer.parseIn... |
public int getDestEntrance(int currDepth, int currPos, int posExit, int posExit2) {
int num = currDepth % 5;
int mul = currDepth / 5;
switch (num) {
case 0 :
return this.entrance;
case 1 :
return this.entrance;
case 2 :
return this.entrance;
... | public int getDestEntrance(int currDepth, int currPos, int posExit, int posExit2) {
int num = currDepth % 5;
switch (num) {
case 0 :
return this.entrance;
case 1 :
return this.entrance;
case 2 :
return this.entrance;
case 3 :
return... |
public void onCreate(android.database.sqlite.SQLiteDatabase db) {
final java.lang.String SQL_CREATE_FAV_MOVIE_TABLE = (((((((((((((("CREATE TABLE " + (FavMovieContract.FavMovieEntry.TABLE_NAME)) + " (") + (FavMovieContract.FavMovieEntry._ID)) + " INTEGER PRIMARY KEY AUTOINCREMENT,") + (FavMovieContract.FavMovieEntr... | public void onCreate(android.database.sqlite.SQLiteDatabase db) {
final java.lang.String SQL_CREATE_FAV_MOVIE_TABLE = (((((((((((((("CREATE TABLE " + (FavMovieContract.FavMovieEntry.TABLE_NAME)) + " (") + (FavMovieContract.FavMovieEntry._ID)) + " INTEGER PRIMARY KEY AUTOINCREMENT,") + (FavMovieContract.FavMovieEntr... |
protected void onActionBarAutoShowOrHide(boolean shown) {
updateSwipeRefreshProgressBarTop();
for (android.view.View view : mHideableHeaderViews) {
if (shown) {
view.animate().translationY(0).setDuration(com.nadmm.airports.ActivityBase.HEADER_HIDE_ANIM_DURATION).setInterpolator(new android.v... | protected void onActionBarAutoShowOrHide(boolean shown) {
for (android.view.View view : mHideableHeaderViews) {
if (shown) {
view.animate().translationY(0).setDuration(com.nadmm.airports.ActivityBase.HEADER_HIDE_ANIM_DURATION).setInterpolator(new android.view.animation.DecelerateInterpolator());... |
public int update(android.net.Uri uri, android.content.ContentValues values, java.lang.String selection, java.lang.String[] selectionArgs) {
final android.database.sqlite.SQLiteDatabase db = new com.example.dylanbaker.green_glass_door.provider.ScoresDbHelper(getContext()).getWritableDatabase();
int rows = db.up... | public int update(android.net.Uri uri, android.content.ContentValues values, java.lang.String selection, java.lang.String[] selectionArgs) {
int rows = db.update(ScoresContract.ScoresEntry.TABLE_NAME, values, getSelection(uri, selection), selectionArgs);
if (rows > 0) {
getContext().getContentResolver()... |
public void setFilledBoard(int x, int y, int width, int height) {
if ((width != 0) && (height != 0)) {
this.location = new client.model.Location(0, 0);
this.location.setPanelLocation(x, y, width, height);
}else
this.location = null;
} | public void setFilledBoard(int x, int y, int width, int height) {
if ((x == (-1)) && (y == (-1))) {
this.location = null;
}else {
this.location = new client.model.Location(0, 0);
this.location.setPanelLocation(x, y, width, height);
}
} |
public static void main(java.lang.String[] args) {
Percolation percolation = new Percolation(4);
percolation.open(1, 1);
percolation.open(1, 2);
percolation.open(1, 3);
java.lang.System.out.println(percolation.percolates());
} | public static void main(java.lang.String[] args) {
Percolation percolation = new Percolation(4);
percolation.open(1, 1);
percolation.open(1, 2);
percolation.open(1, 3);
percolation.open(1, 4);
java.lang.System.out.println(percolation.percolates());
} |
public void untrustTest() throws be.maximvdw.spigotsite.api.user.exceptions.InvalidCredentialsException, be.maximvdw.spigotsite.api.user.exceptions.TwoFactorAuthenticationException {
be.maximvdw.spigotsite.api.user.User user = be.maximvdw.spigotsite.UserDebugging.getUser();
be.maximvdw.spigotsite.user.SpigotUse... | public void untrustTest() throws be.maximvdw.spigotsite.api.user.exceptions.InvalidCredentialsException, be.maximvdw.spigotsite.api.user.exceptions.TwoFactorAuthenticationException {
be.maximvdw.spigotsite.api.user.User user = be.maximvdw.spigotsite.UserDebugging.getUser();
be.maximvdw.spigotsite.user.SpigotUse... |
public boolean onCreateOptionsMenu(android.view.Menu menu) {
mOptionMenu = menu;
getMenuInflater().inflate(R.menu.configure_menu, menu);
menu.findItem(R.id.menu_item_redo).setVisible(false);
menu.findItem(R.id.menu_item_undo).setVisible(false);
return true;
} | public boolean onCreateOptionsMenu(android.view.Menu menu) {
mOptionMenu = menu;
getMenuInflater().inflate(R.menu.configure_menu, menu);
menu.findItem(R.id.menu_item_redo).setEnabled(false);
menu.findItem(R.id.menu_item_undo).setEnabled(false);
return true;
} |
public void loadPlugins() {
java.io.File pluginsFolder = new java.io.File(net.hybridhacker.visualslice.plugins.PluginManager.PLUGIN_FOLDER);
if (pluginsFolder.exists())
pluginsFolder.mkdir();
if ((pluginsFolder.listFiles()) != null) {
for (java.io.File file : pluginsFolder.listFiles()) ... | public void loadPlugins() {
java.io.File pluginsFolder = new java.io.File(net.hybridhacker.visualslice.plugins.PluginManager.PLUGIN_FOLDER);
if (!(pluginsFolder.exists()))
pluginsFolder.mkdir();
if ((pluginsFolder.listFiles()) != null) {
for (java.io.File file : pluginsFolder.listFiles(... |
public java.lang.String get(java.lang.String imp, double chance, java.lang.String end) throws java.io.FileNotFoundException {
if ((rand.nextFloat()) < chance) {
imp = (imp + (nthString(random(rand, 0, wordCount(list)), list))) + end;
return imp;
}
return "";
} | public java.lang.String get(java.lang.String imp, double chance, java.lang.String end) throws java.io.FileNotFoundException {
if ((rand.nextFloat()) < chance) {
imp = (imp + (nthString(random(rand, 0, num), list))) + end;
return imp;
}
return "";
} |
public org.springframework.http.ResponseEntity<org.openlmis.core.web.OpenLmisResponse> update(@org.springframework.web.bind.annotation.RequestBody
org.openlmis.core.domain.User user, @org.springframework.web.bind.annotation.PathVariable(value = "id")
java.lang.Long id, javax.servlet.http.HttpServletRequest request) {
... | public org.springframework.http.ResponseEntity<org.openlmis.core.web.OpenLmisResponse> update(@org.springframework.web.bind.annotation.RequestBody
org.openlmis.core.domain.User user, @org.springframework.web.bind.annotation.PathVariable(value = "id")
java.lang.Long id, javax.servlet.http.HttpServletRequest request) {
... |
public static org.osate.aadl2.instance.ComponentInstance getEnclosingProcessor(org.osate.aadl2.instance.ComponentInstance vpi) {
org.osate.aadl2.instance.ComponentInstance ci = vpi;
while (ci != null) {
ci = ci.getContainingComponentInstance();
if (ci.getCategory().equals(ComponentCategory.PROCE... | public static org.osate.aadl2.instance.ComponentInstance getEnclosingProcessor(org.osate.aadl2.instance.ComponentInstance vpi) {
org.osate.aadl2.instance.ComponentInstance ci = vpi.getContainingComponentInstance();
while (ci != null) {
if (ci.getCategory().equals(ComponentCategory.PROCESSOR)) {
... |
public dameo.move.Move selectMove(dameo.gametree.State s) {
dameo.players.HumanPlayer.MoveSelectFrame frame = new dameo.players.HumanPlayer.MoveSelectFrame();
frame.setSize(200, 200);
frame.setVisible(true);
frame.setDefaultCloseOperation(javax.swing.JFrame.EXIT_ON_CLOSE);
java.util.Set<dameo.move.M... | public dameo.move.Move selectMove(dameo.gametree.State s) {
dameo.players.HumanPlayer.MoveSelectFrame frame = new dameo.players.HumanPlayer.MoveSelectFrame();
frame.setDefaultCloseOperation(javax.swing.JFrame.EXIT_ON_CLOSE);
java.util.Set<dameo.move.Move> moves = dameo.DameoEngine.generateLegalMoves(s);
... |
private void filterSegmentList(@android.support.annotation.Nullable
java.util.List<ch.srg.mediaplayer.segment.model.Segment> segmentList) {
segments.clear();
if (segmentList != null) {
for (ch.srg.mediaplayer.segment.model.Segment s : segmentList) {
if (s.isDisplayable()) {
s... | public void filterSegmentList(@android.support.annotation.Nullable
java.util.List<ch.srg.mediaplayer.segment.model.Segment> segmentList) {
segments.clear();
if (segmentList != null) {
for (ch.srg.mediaplayer.segment.model.Segment s : segmentList) {
if (s.isDisplayable()) {
se... |
public boolean equals(client.Card otherCard) {
if (((this.Augenzahl) == (otherCard.getAugenzahl())) && (this.getType().equals(otherCard.getType()))) {
return true;
}else {
return false;
}
} | public boolean equals(client.Card otherCard) {
if (otherCard != null) {
if (((this.Augenzahl) == (otherCard.getAugenzahl())) && (this.getType().equals(otherCard.getType()))) {
return true;
}else {
return false;
}
}else {
return false;
}
} |
public static void writeDataPageHeader(int uncompressedSize, int compressedSize, int valueCount, org.apache.parquet.format.Encoding rlEncoding, org.apache.parquet.format.Encoding dlEncoding, org.apache.parquet.format.Encoding valuesEncoding, java.io.OutputStream to) throws java.io.IOException {
org.apache.parquet.f... | public void writeDataPageHeader(int uncompressedSize, int compressedSize, int valueCount, org.apache.parquet.format.Encoding rlEncoding, org.apache.parquet.format.Encoding dlEncoding, org.apache.parquet.format.Encoding valuesEncoding, java.io.OutputStream to) throws java.io.IOException {
org.apache.parquet.format.U... |
private void action() {
try {
java.lang.Thread.sleep(66);
frame.repaint();
main.java.org.usfirst.frc.team5431.SmarterDashboard.table.putString("AUTO-SELECTED", ((java.lang.String) (autochooser.getSelectedItem())));
main.java.org.usfirst.frc.team5431.SmarterDashboard.table.putNumber("... | private void action() {
try {
java.lang.Thread.sleep(66);
frame.repaint();
main.java.org.usfirst.frc.team5431.SmarterDashboard.table.putString("AUTO-SELECTED", ((java.lang.String) (autochooser.getSelectedItem())));
main.java.org.usfirst.frc.team5431.SmarterDashboard.table.putNumber("... |
public void zoom(final boolean zoomIn) {
if (zoomIn) {
viewBox.zoomIn();
}else {
viewBox.zoomOut();
}
isInEditZoomRange();
de.blau.android.resources.Profile.updateStrokes(strokeWidth(viewBox.getWidth()));
if (rotatingWay) {
showCrosshairsForCentroid();
}
map.postI... | public void zoom(final boolean zoomIn) {
if (zoomIn) {
viewBox.zoomIn();
}else {
viewBox.zoomOut();
}
de.blau.android.resources.Profile.updateStrokes(strokeWidth(viewBox.getWidth()));
if (rotatingWay) {
showCrosshairsForCentroid();
}
map.postInvalidate();
} |
public static void main(java.lang.String[] args) {
java.util.Scanner in = new java.util.Scanner(java.lang.System.in);
java.lang.System.out.println("Введіть кількість чисел(наприклад 1000):");
int input = in.nextInt();
for (int i = 1; i <= input; i++) {
if (((i % 3) == 0) && ((i % 9) == 0))
... | public static void main(java.lang.String[] args) {
java.util.Scanner in = new java.util.Scanner(java.lang.System.in);
java.lang.System.out.println("Введіть кількість чисел(наприклад 1000):");
int input = in.nextInt();
for (int i = 1; i <= input; i++) {
if (((i % 3) == 0) || ((i % 9) == 0))
... |
public void run() {
while ((countDown) >= 0) {
try {
java.lang.Thread.sleep(1000);
} catch (java.lang.InterruptedException e) {
e.printStackTrace();
}
(countDown)--;
if ((countDown) == 0) {
android.os.Message msg = new android.os.Message();... | public void run() {
while ((countDown) >= 0) {
if ((countDown) == 0) {
android.os.Message msg = new android.os.Message();
msg.what = com.usr.thermostat.MainActivity.TIMEUP;
CounterHandler.sendMessage(msg);
countDown = com.usr.thermostat.MainActivity.countDownT... |
private void checkGameInput() {
if (Gdx.input.isKeyJustPressed(Keys.B))
debug = !(debug);
if (Gdx.input.isKeyJustPressed(Keys.L))
Lifesystem.hearts = de.woody.game.Lifesystem.changeHearts(((Lifesystem.hearts) - 1));
if (Gdx.input.isKeyJustPressed(Keys.R)) {
if ((de.woody.ga... | private void checkGameInput() {
if (Gdx.input.isKeyJustPressed(Keys.B))
debug = !(debug);
if (Gdx.input.isKeyJustPressed(Keys.L))
Lifesystem.hearts = de.woody.game.Lifesystem.changeHearts(((Lifesystem.hearts) - 1));
if (Gdx.input.isKeyJustPressed(Keys.R)) {
if ((de.woody.ga... |
public void deveAtualizarPontosDoUsuario() throws java.lang.Exception, java.sql.SQLException {
com.coursera.forum.model.Usuario usuario = this.criaUsuario("user", "User", 10);
this.dao.inserir(usuario);
this.dao.adicionarPontos("user", 50);
org.dbunit.dataset.ITable currentTable = this.getCurrentTable()... | public void deveAtualizarPontosDoUsuario() throws java.lang.Exception, java.sql.SQLException {
com.coursera.forum.model.Usuario usuario = this.criaUsuario("user", "User", 0);
this.dao.inserir(usuario);
this.dao.adicionarPontos("user", 10);
org.dbunit.dataset.ITable currentTable = this.getCurrentTable();... |
com.github.ambry.protocol.GetRequest getRequest = ((com.github.ambry.protocol.GetRequest) (responseInfo.getRequest()));
com.github.ambry.router.GetOperation getOperation = correlationIdToGetOperation.get(getRequest.getCorrelationId());
if (getOperations.contains(getOperation)) {
getOperation.handleR... | com.github.ambry.protocol.GetRequest getRequest = ((com.github.ambry.protocol.GetRequest) (responseInfo.getRequest()));
com.github.ambry.router.GetOperation getOperation = correlationIdToGetOperation.remove(getRequest.getCorrelationId());
if (getOperations.contains(getOperation)) {
getOperation.hand... |
private void hideMainElements() {
findViewById(R.id.loading_logo_image_view).setVisibility(View.VISIBLE);
getSupportActionBar().hide();
findViewById(R.id.main_recycler_view_holder).setVisibility(View.GONE);
findViewById(R.id.message_edit_text).setVisibility(View.GONE);
findViewById(R.id.message_send... | private void hideMainElements() {
findViewById(R.id.loading_logo_image_view).setVisibility(View.VISIBLE);
getSupportActionBar().hide();
findViewById(R.id.main_recycler_view_holder).setVisibility(View.GONE);
((android.support.v4.widget.DrawerLayout) (findViewById(R.id.drawer_layout))).setDrawerLockMode(D... |
private java.lang.String getDefaultTenant() {
org.oscm.dataservice.bean.TypedQuery<org.oscm.dataservice.bean.ConfigurationSetting> query = em.createNamedQuery("ConfigurationSetting.findByInfoAndContext", org.oscm.dataservice.bean.ConfigurationSetting.class);
query.setParameter("informationId", ConfigurationKey.... | private java.lang.String getDefaultTenant() {
org.oscm.dataservice.bean.TypedQuery<org.oscm.dataservice.bean.ConfigurationSetting> query = em.createNamedQuery("ConfigurationSetting.findByInfoAndContext", org.oscm.dataservice.bean.ConfigurationSetting.class);
query.setParameter("informationId", ConfigurationKey.... |
public void onDestroy() {
super.onDestroy();
android.util.Log.e(TAG, "Stop timer task");
timerHandler.removeCallbacks(runPlayStatusCheck);
timerHandler.removeCallbacks(runAutoSetUserSelected);
timerHandler.removeCallbacks(runUpdateBackgroundImage);
progressDialog.dismiss();
android.util.Log.... | public void onDestroy() {
super.onDestroy();
android.util.Log.e(TAG, "Stop timer task");
timerHandler.removeCallbacks(runPlayStatusCheck);
timerHandler.removeCallbacks(runAutoSetUserSelected);
timerHandler.removeCallbacks(runUpdateBackgroundImage);
android.util.Log.e(TAG, "TrackPlayer Has been d... |
public void onResume() {
super.onResume();
boolean calendarSync = mSharedPrefs.getBoolean("calendarSync", false);
startAlarmButton.setEnabled((!calendarSync));
updateColor(mHourSeekBar.getProgress());
mHourHand.setRotation(((hourRotation) + ((mHourSeekBar.getProgress()) * 15)));
mMinuteHand.setR... | public void onResume() {
super.onResume();
if ((mSharedPrefs) != null) {
boolean calendarSync = mSharedPrefs.getBoolean("calendarSync", false);
startAlarmButton.setEnabled((!calendarSync));
}
updateColor(mHourSeekBar.getProgress());
mHourHand.setRotation(((hourRotation) + ((mHourSeek... |
public void dynamicMockFullyVerified_verifyAllRecordedExpectationsButNotAllOfTheReplayedOnes() {
final mockit.DynamicPartialMockingTest.Collaborator collaborator = new mockit.DynamicPartialMockingTest.Collaborator(0);
new mockit.Expectations(collaborator) {
{
collaborator.setValue(1);
... | public void dynamicMockFullyVerified_verifyAllRecordedExpectationsButNotAllOfTheReplayedOnes() {
final mockit.DynamicPartialMockingTest.Collaborator collaborator = new mockit.DynamicPartialMockingTest.Collaborator(0);
new mockit.Expectations(collaborator) {
{
collaborator.setValue(1);
... |
public void onPlayerJoin(org.bukkit.event.player.PlayerJoinEvent event) {
java.lang.String player = event.getPlayer().getUniqueId().toString();
if ((data.get(player)) == null) {
data.set((player + ".Smithing.Level"), 1);
data.set((player + ".Smithing.XP"), 0);
data.set((player + ".Mining... | public void onPlayerJoin(org.bukkit.event.player.PlayerJoinEvent event) {
java.lang.String player = event.getPlayer().getUniqueId().toString();
if (!(this.data.contains(player))) {
data.set((player + ".Smithing.Level"), 1);
data.set((player + ".Smithing.XP"), 0);
data.set((player + ".Min... |
public void shouldKeepPreconfiguredProjectionsAcrossRestart() throws java.lang.Exception {
org.modeshape.jcr.ModeshapePersistenceIT.RepositoryOperation checkPreconfiguredProjection = ( repository) -> {
javax.jcr.Session session = repository.login();
org.junit.Assert.assertNotNull(session.getNode("/p... | public void shouldKeepPreconfiguredProjectionsAcrossRestart() throws java.lang.Exception {
org.modeshape.jcr.ModeshapePersistenceIT.RepositoryOperation checkPreconfiguredProjection = ( repository) -> {
javax.jcr.Session session = repository.login();
org.junit.Assert.assertNotNull(session.getNode("/p... |
protected static void reportMessageHandlerProblem(java.lang.String name, java.lang.Class<?> cls, javax.ws.rs.core.MediaType ct, java.lang.Throwable ex) {
java.lang.String errorMessage = org.apache.cxf.jaxrs.utils.JAXRSUtils.logMessageHandlerProblem("NO_MSG_WRITER", cls, ct);
java.lang.Throwable actualEx = (ex i... | protected static void reportMessageHandlerProblem(java.lang.String name, java.lang.Class<?> cls, javax.ws.rs.core.MediaType ct, java.lang.Throwable ex) {
java.lang.String errorMessage = org.apache.cxf.jaxrs.utils.JAXRSUtils.logMessageHandlerProblem(name, cls, ct);
java.lang.Throwable actualEx = (ex instanceof o... |
public void removeAssociation(org.hibernate.ogm.model.key.spi.AssociationKey key, org.hibernate.ogm.dialect.spi.AssociationContext associationContext) {
org.infinispan.Cache<AK, java.util.Map<org.hibernate.ogm.model.key.spi.RowKey, java.util.Map<java.lang.String, java.lang.Object>>> cache = getCacheManager().getAss... | public void removeAssociation(org.hibernate.ogm.model.key.spi.AssociationKey key, org.hibernate.ogm.dialect.spi.AssociationContext associationContext) {
org.infinispan.Cache<AK, java.util.Map<org.hibernate.ogm.model.key.spi.RowKey, java.util.Map<java.lang.String, java.lang.Object>>> cache = getCacheManager().getAss... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.