buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public void robotInit() {
org.usfirst.frc.team3182.robot.Robot3182.listOfPossibilities();
org.usfirst.frc.team3182.robot.Robot3182.driveTrainVar = new org.usfirst.frc.team3182.robot.DriveTrain();
new java.lang.Thread(org.usfirst.frc.team3182.robot.Robot3182.driveTrainVar, "DriveTrain").start();
org.usfi... | public void robotInit() {
org.usfirst.frc.team3182.robot.Robot3182.listOfPossibilities();
org.usfirst.frc.team3182.robot.Robot3182.driveTrainVar = new org.usfirst.frc.team3182.robot.DriveTrain();
new java.lang.Thread(org.usfirst.frc.team3182.robot.Robot3182.driveTrainVar, "DriveTrain").start();
org.usfi... |
public void setDefaultRoomSize(int size) {
if ((size % (rasterSize)) != 0)
throw new java.lang.IllegalArgumentException(ZLocalization.loc.getString("ds.z.DefaultEvacuationFloor.RoomSizeRasterException"));
if ((size < (defaultRoomSize)) & (normalMode))
throw new java.lang.IllegalArgumentExce... | public void setDefaultRoomSize(int size) {
if ((size % (rasterSize)) != 0) {
throw new java.lang.IllegalArgumentException(ZLocalization.loc.getString("ds.z.DefaultEvacuationFloor.RoomSizeRasterException"));
}
if ((size < (defaultRoomSize)) && (normalMode)) {
throw new java.lang.IllegalArgume... |
public void update(float delta, com.episkleaves.bulletmadness2.state.GameState gameState) {
timer += delta;
setSpeed(((float) (java.lang.Math.abs(((java.lang.Math.sin(java.lang.Math.toRadians((((timer) * (period)) * 180)))) * (originalSpeed))))));
move(delta);
} | public void update(float delta, com.episkleaves.bulletmadness2.state.GameState gameState) {
timer += delta;
super.setSpeed(((float) (java.lang.Math.abs(((java.lang.Math.sin(java.lang.Math.toRadians((((timer) * (period)) * 180)))) * (originalSpeed))))));
move(delta);
} |
private boolean discovering() {
final eu.modelwriter.traceability.core.persistence.DocumentRoot documentRootDiscovering = getDocumentRoot();
final eu.modelwriter.traceability.core.persistence.DocumentRoot documentRootOriginal = eu.modelwriter.configuration.internal.AlloyUtilities.getDocumentRoot();
if (docu... | private boolean discovering() {
final eu.modelwriter.traceability.core.persistence.DocumentRoot documentRootDiscovering = getDocumentRoot();
final eu.modelwriter.traceability.core.persistence.DocumentRoot documentRootOriginal = eu.modelwriter.configuration.internal.AlloyUtilities.getDocumentRoot();
if (docu... |
public uk.gov.justice.digital.prisoneraccounts.jpa.entity.Transaction debitAccount(uk.gov.justice.digital.prisoneraccounts.jpa.entity.Account account, java.lang.Long amountPence, java.lang.String clientRef, java.lang.String description) throws uk.gov.justice.digital.prisoneraccounts.service.AccountClosedException, uk.g... | public uk.gov.justice.digital.prisoneraccounts.jpa.entity.Transaction debitAccount(uk.gov.justice.digital.prisoneraccounts.jpa.entity.Account account, java.lang.Long amountPence, java.lang.String description, java.lang.String clientRef) throws uk.gov.justice.digital.prisoneraccounts.service.AccountClosedException, uk.g... |
public int nextDestination() {
if (!(destinations.empty())) {
origin = currentDestination;
currentDestination = destinations.pop();
}else {
origin = -1;
currentDestination = -1;
}
wT += (tempwT) ^ 2;
tempwT = 0;
tT += (temptT) ^ 2;
temptT = 0;
reviseDouble... | public int nextDestination() {
if (!(destinations.empty())) {
origin = currentDestination;
currentDestination = destinations.pop();
}else {
origin = -1;
currentDestination = -1;
}
reviseDoubleDeckedTrip();
wT += (tempwT) * (tempwT);
tempwT = 0;
tT += (temptT) ... |
@retrofit2.http.Headers(value = "X-API-KEY:80w0g4o84wsc4gsc804c08scs00w8co4wscg848c")
@retrofit2.http.POST(value = "main/add_order/format/json")
retrofit2.Call<app.nutrimeat.meat.org.nutrimeat.Checkout.AddOrderItemResponse> addOrder(@retrofit2.http.Field(value = "order_no")
java.lang.String orderNo, @retrofit2.http.Fie... | @retrofit2.http.FormUrlEncoded
@retrofit2.http.Headers(value = "X-API-KEY:80w0g4o84wsc4gsc804c08scs00w8co4wscg848c")
@retrofit2.http.POST(value = "main/add_order/format/json")
retrofit2.Call<app.nutrimeat.meat.org.nutrimeat.Checkout.AddOrderItemResponse> addOrder(@retrofit2.http.Field(value = "order_no")
java.lang.Stri... |
public hudson.util.ListBoxModel doFillStoreIdItems() {
final java.util.List<org.jenkinsci.plugins.relution_publisher.configuration.global.Store> stores = this.globalConfiguration.getStores();
final hudson.util.ListBoxModel items = new hudson.util.ListBoxModel();
items.add("", null);
for (final org.jenki... | public hudson.util.ListBoxModel doFillStoreIdItems() {
final java.util.List<org.jenkinsci.plugins.relution_publisher.configuration.global.Store> stores = this.globalConfiguration.getStores();
final hudson.util.ListBoxModel items = new hudson.util.ListBoxModel();
items.add("", "");
for (final org.jenkins... |
public void updateMaxPageNumber() {
java.lang.Integer fullPage = (getResultSize()) / (getPageSize());
boolean isLastPageFull = ((getResultSize()) % (getPageSize())) == 0;
if ((!isLastPageFull) || (fullPage == 0))
fullPage += 1;
setMaxPageNumber(fullPage);
} | public void updateMaxPageNumber() {
if ((getResultSize()) == null) {
setMaxPageNumber(1);
return ;
}
java.lang.Integer fullPage = (getResultSize()) / (getPageSize());
boolean isLastPageFull = ((getResultSize()) % (getPageSize())) == 0;
if ((!isLastPageFull) || (fullPage == 0))
... |
public Model.GameObject.Item.Weapon addWeapon(Model.GameObject.Item.ItemEnum id, java.lang.String name, java.lang.String description, int x, int y, Model.GameObject.Item.Items.Takables.Quest requiredItem, Model.StatStruc modify) {
this.id = id;
location = new Model.Location(x, y, 0);
requirement = new Model... | public Model.GameObject.Item.Weapon addWeapon(Model.GameObject.Item.ItemEnum id, java.lang.String name, java.lang.String description, int x, int y, Model.GameObject.Item.Items.Takables.Quest requiredItem, Model.StatStruc modify) {
this.id = id;
location = new Model.Location(x, y);
requirement = new Model.Re... |
public void loadData(java.util.Properties prop) {
com.esgyn.dataloader.ISource source = new com.esgyn.dataloader.impl.SourceImpl();
java.util.List<java.lang.Object> list = null;
switch (direction) {
case "DB2DB" :
list = source.readFromDBToDB(prop);
com.esgyn.dataloader.ITarg... | public void loadData(java.util.Properties prop) {
com.esgyn.dataloader.ISource source = new com.esgyn.dataloader.impl.SourceImpl();
java.util.List<java.lang.Object> list = null;
switch (direction) {
case "DB2DB" :
list = source.readFromDBToDB(prop);
com.esgyn.dataloader.ITarg... |
private void startUserProfileFragment(samurai.geeft.android.geeft.models.User user, boolean isCurrentUser, boolean allowComunication) {
android.support.v4.app.FragmentTransaction transaction = getActivity().getSupportFragmentManager().beginTransaction();
transaction.addToBackStack(null);
android.support.v4.... | private void startUserProfileFragment(samurai.geeft.android.geeft.models.User user, boolean isCurrentUser, boolean allowComunication) {
android.support.v4.app.FragmentTransaction transaction = getActivity().getSupportFragmentManager().beginTransaction();
transaction.addToBackStack(null);
android.support.v4.... |
private void expandAndSelect(org.opentravel.schemas.node.Node node) {
java.util.LinkedList<org.opentravel.schemas.node.Node> parents = new java.util.LinkedList<org.opentravel.schemas.node.Node>();
while ((viewer.testFindItem(node)) == null) {
node = node.getParent();
if (node == null) {
... | private void expandAndSelect(org.opentravel.schemas.node.Node node) {
if (node != null) {
java.util.LinkedList<org.opentravel.schemas.node.Node> parents = new java.util.LinkedList<org.opentravel.schemas.node.Node>();
while ((viewer.testFindItem(node)) == null) {
node = node.getParent();
... |
public void addLibraryEntry(final com.charlesmadere.hummingbird.models.AnimeLibraryEntry libraryEntry) {
if ((mLibraryEntries) == null) {
mLibraryEntries = new java.util.ArrayList<>(1);
mLibraryEntries.add(libraryEntry);
}else
if (mLibraryEntries.contains(libraryEntry)) {
mLi... | public void addLibraryEntry(final com.charlesmadere.hummingbird.models.AnimeLibraryEntry libraryEntry) {
if ((mLibraryEntries) == null) {
mLibraryEntries = new java.util.ArrayList<>();
mLibraryEntries.add(libraryEntry);
}else
if (mLibraryEntries.contains(libraryEntry)) {
mLib... |
static boolean Expression9(com.intellij.lang.PsiBuilder b, int l) {
if (!(com.intellij.lang.parser.GeneratedParserUtilBase.recursion_guard_(b, l, "Expression9")))
return false;
boolean r;
com.intellij.lang.PsiBuilder.Marker m = com.intellij.lang.parser.GeneratedParserUtilBase.enter_section_(b);... | static boolean Expression9(com.intellij.lang.PsiBuilder b, int l) {
if (!(recursion_guard_(b, l, "Expression9")))
return false;
boolean r;
com.intellij.lang.PsiBuilder.Marker m = enter_section_(b);
r = com.neueda.jetbrains.plugin.graphdb.language.cypher.parser.CypherParser.Expression9_0(b, ... |
public static double leastOpponentMoves(hus.HusBoardState board, int player_id) {
double ret = 0;
int[][] pits = board.getPits();
int[] opponent_pits = pits[(1 - player_id)];
for (int i : opponent_pits) {
if (i > 1)
ret++;
}
return ret;
} | public static int leastOpponentMoves(hus.HusBoardState board, int player_id) {
int ret = 0;
int[][] pits = board.getPits();
int[] opponent_pits = pits[(1 - player_id)];
for (int i : opponent_pits) {
if (i > 1)
ret--;
}
return ret;
} |
public void getJokesWithChangedName(boolean isFilterNeeded, java.lang.String fullName) {
nameChangeView.showProgressRing(View.VISIBLE);
com.marton.tamas.funnychuck.api.model.Name name = getName(fullName);
if (!(fullName.equals(Constants.EMPTY_STRING))) {
if (isFilterNeeded) {
nameChangeI... | public void getJokesWithChangedName(boolean isFilterNeeded, java.lang.String fullName) {
if (!(fullName.equals(Constants.EMPTY_STRING))) {
nameChangeView.showProgressRing(View.VISIBLE);
com.marton.tamas.funnychuck.api.model.Name name = getName(fullName);
if (isFilterNeeded) {
nam... |
private java.lang.String getColumnName(java.lang.String table, int i) {
java.lang.String result = "";
java.lang.String querySql = java.lang.String.format("SELECT * FROM %s", table);
try (java.sql.PreparedStatement stmt = con.prepareStatement(querySql, java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE, java.sql.Res... | private java.lang.String getColumnName(java.lang.String table, int i) {
java.lang.String result = "";
java.lang.String querySql = java.lang.String.format("SELECT * FROM %s", table);
try (java.sql.PreparedStatement stmt = con.prepareStatement(querySql, java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE, java.sql.Res... |
public long deleteAccessToken(long userId) {
android.database.sqlite.SQLiteDatabase database = getWritableDatabase();
database.delete("AccountTokenList", "userId=?", new java.lang.String[]{ java.lang.String.valueOf(userId) });
long count = (android.database.DatabaseUtils.queryNumEntries(database, "AccountTo... | public long deleteAccessToken(long userId) {
android.database.sqlite.SQLiteDatabase database = getWritableDatabase();
database.delete("AccountTokenList", "userId=?", new java.lang.String[]{ java.lang.String.valueOf(userId) });
long count = android.database.DatabaseUtils.queryNumEntries(database, "AccountTok... |
private T dequeue() {
final java.lang.Object[] elements = this.elements;
if ((head) == (elements.length))
head = 0;
java.lang.Object object = elements[head];
elements[((head)++)] = null;
(count)--;
full.signalAll();
return ((T) (object));
} | private T dequeue() {
final java.lang.Object[] elements = this.elements;
java.lang.Object object = elements[head];
elements[((head)++)] = null;
if ((head) == (elements.length))
head = 0;
(count)--;
full.signalAll();
return ((T) (object));
} |
public void add(cque.INode e) {
assert e != null;
if ((tail) == null) {
assert (head) == null;
head = e;
tail = e;
}
tail.setNext(e);
tail = e;
} | public void add(cque.INode e) {
assert e != null;
if ((tail) == null) {
assert (head) == null;
head = e;
tail = e;
return ;
}
tail.setNext(e);
tail = e;
} |
public boolean isBarrierRight() {
for (int i = 0; i < (size); i++) {
int x = getBlockCoordinateX(i);
int y = getBlockCoordinateY(i);
if (x < 0)
continue;
if (y < 1)
continue;
if (x >= (Main.field.getColumns()))
return true... | public boolean isBarrierRight() {
for (int i = 0; i < (size); i++) {
int x = getBlockCoordinateX(i);
int y = getBlockCoordinateY(i);
if (x >= (Main.field.getColumns()))
return true;
if (y < 1)
continue;
if (Main.field.getIsFullBlock()... |
private void solicitarConexion() throws java.io.IOException {
PaqueteVecino paqueteParaEnviar = new PaqueteVecino(Paquete_t.SOLICITUD_DE_CONEXION, Router.ipLocal, Router.mascaraLocal, Router.numASLocal);
output.write(paqueteParaEnviar.getBytes());
s.setSoTimeout(5000);
byte[] respuesta = new byte[11];
... | private void solicitarConexion() throws java.io.IOException {
PaqueteVecino paqueteParaEnviar = new PaqueteVecino(Paquete_t.SOLICITUD_DE_CONEXION, Router.ipLocal, Router.mascaraLocal, Router.numASLocal);
output.write(paqueteParaEnviar.getBytes());
byte[] respuesta = new byte[11];
input.read(respuesta);
... |
public java.util.List<com.ctrip.platform.dal.daogen.entity.GenTaskBySqlBuilder> updateAndGetAllTasks(int projectId) throws java.sql.SQLException {
java.util.List<com.ctrip.platform.dal.daogen.entity.GenTaskBySqlBuilder> result = new java.util.ArrayList<>();
java.util.List<com.ctrip.platform.dal.daogen.entity.Ge... | public java.util.List<com.ctrip.platform.dal.daogen.entity.GenTaskBySqlBuilder> updateAndGetAllTasks(int projectId) throws java.sql.SQLException {
java.util.List<com.ctrip.platform.dal.daogen.entity.GenTaskBySqlBuilder> result = new java.util.ArrayList<>();
java.util.List<com.ctrip.platform.dal.daogen.entity.Ge... |
public void siteSelectpositiveClick(android.app.DialogFragment fragment, int which) {
java.lang.String[] sites = getResources().getStringArray(R.array.site_select_array);
searchsite = sites[which];
setSiteName();
adapter.setDisplaySiteName(sitename);
startProgressDialog();
getTags(tagcount, tags... | public void siteSelectpositiveClick(android.app.DialogFragment fragment, int which) {
java.lang.String[] sites = getResources().getStringArray(R.array.site_select_array);
searchsite = sites[which];
setSiteName();
if ((adapter) != null) {
adapter.setDisplaySiteName(sitename);
}
startProgr... |
public int getStartIndex(char col) {
int index = 0;
switch (col) {
case 'R' :
index = 0;
break;
case 'B' :
index = 7;
break;
case 'Y' :
index = 14;
break;
case 'G' :
index = 21;
break;... | public int getStartIndex(char col) {
int index = 0;
switch (col) {
case 'R' :
index = 0;
break;
case 'B' :
index = 14;
break;
case 'Y' :
index = 7;
break;
case 'G' :
index = 21;
break;... |
public void test_131_ACLRemoveAllFields(edu.umass.cs.gnsclient.client.util.GuidEntry westyEntry, edu.umass.cs.gnsclient.client.util.GuidEntry samEntry) {
try {
edu.umass.cs.gnsclient.client.integrationtests.ServerIntegrationTest.client.aclRemove(AclAccessType.READ_WHITELIST, westyEntry, GNSProtocol.ENTIRE_R... | public void test_131_ACLRemoveAllFields(edu.umass.cs.gnsclient.client.util.GuidEntry westyEntry, edu.umass.cs.gnsclient.client.util.GuidEntry samEntry) {
try {
edu.umass.cs.gnsclient.client.integrationtests.ServerIntegrationTest.client.aclRemove(AclAccessType.READ_WHITELIST, westyEntry, GNSProtocol.ENTIRE_R... |
public static boolean checkUserRelatedToPost(java.lang.Long id, com.nick.hateportal.entity.User user) {
java.util.List<com.nick.hateportal.entity.Post> list = user.getSentPosts();
for (com.nick.hateportal.entity.Post p : list) {
if ((p.getId()) == id) {
return true;
}
}
retur... | private boolean checkUserRelatedToPost(java.lang.Long id, com.nick.hateportal.entity.User user) {
java.util.List<com.nick.hateportal.entity.Post> list = user.getSentPosts();
for (com.nick.hateportal.entity.Post p : list) {
if ((p.getId()) == id) {
return true;
}
}
return fals... |
private void renderOutputBufferV21(android.media.MediaCodec codec, int bufferIndex, long releaseTimeNs) {
maybeNotifyVideoSizeChanged();
com.google.android.exoplayer2.util.TraceUtil.beginSection("releaseOutputBuffer");
codec.releaseOutputBuffer(bufferIndex, releaseTimeNs);
com.google.android.exoplayer2.... | private void renderOutputBufferV21(android.media.MediaCodec codec, int bufferIndex, long releaseTimeNs) {
maybeNotifyVideoSizeChanged();
com.google.android.exoplayer2.util.TraceUtil.beginSection("releaseOutputBuffer");
codec.releaseOutputBuffer(bufferIndex, releaseTimeNs);
com.google.android.exoplayer2.... |
public void onActivityResult(int requestCode, int resultCode, android.content.Intent data) {
if (requestCode == 1) {
if (data == null) {
java.lang.System.out.println("null");
}else {
java.lang.System.out.println("not null");
}
com.example.viral.vetogame.Game g... | public void onActivityResult(int requestCode, int resultCode, android.content.Intent data) {
if (requestCode == 1) {
if (data == null) {
java.lang.System.out.println("null");
}else {
java.lang.System.out.println("not null");
com.example.viral.vetogame.Game game = ... |
private static boolean isParenExpression(java.lang.String myInput, int myCurrentPosition) {
java.util.regex.Matcher expMatcher = expressions.ParenExpression.EXPRESSION_BEGIN_REGEX.matcher(myInput.substring(myCurrentPosition));
java.util.regex.Matcher overloadMatcher = expressions.ParenExpression.OVERLOADED_OPER... | private static boolean isParenExpression(java.lang.String myInput, int myCurrentPosition) {
java.util.regex.Matcher expMatcher = expressions.ParenExpression.EXPRESSION_BEGIN_REGEX.matcher(myInput.substring(myCurrentPosition));
java.util.regex.Matcher overloadMatcher = expressions.ParenExpression.OVERLOADED_OPER... |
private boolean testUnspec(java.util.List<eea.eprtr.model.Wastetransfer> elements, eea.eprtr.model.Wastetransfer testelement) {
for (eea.eprtr.model.Wastetransfer obj : elements) {
if (((obj.getIaActivityCode().equals(testelement.getIaActivityCode())) && ((obj.getIaSubActivityCode()) != null)) && ((obj.getI... | private boolean testUnspec(java.util.List<eea.eprtr.model.Wastetransfer> elements, eea.eprtr.model.Wastetransfer testelement) {
for (eea.eprtr.model.Wastetransfer obj : elements) {
if (((obj.getIaActivityCode().equals(testelement.getIaActivityCode())) && ((obj.getIaSubActivityCode()) != null)) && (!(obj.get... |
public void s2AddTotal(android.view.View view) {
double s2total = java.lang.Double.valueOf(newFormat.format((((double) (((s2j1) + (s2j2)) + (s2j3))) / 3)));
displayTotal2(s2total);
s2RoundEnd = true;
} | public void s2AddTotal(android.view.View view) {
s2total = java.lang.Double.valueOf(newFormat.format((((double) (((s2j1) + (s2j2)) + (s2j3))) / 3)));
displayTotal2(s2total);
s2RoundEnd = true;
} |
public java.awt.Color getBestAvailableColor() {
java.awt.Color nextColor = java.awt.Color.gray;
final java.util.ListIterator<org.diyefi.openlogviewer.coloring.MarkedColor> i = colorList.listIterator();
for (boolean found = false; (i.hasNext()) && (!found);) {
final org.diyefi.openlogviewer.coloring.... | public java.awt.Color getBestAvailableColor() {
java.awt.Color nextColor = java.awt.Color.gray;
final java.util.ListIterator<org.diyefi.openlogviewer.coloring.MarkedColor> i = colorList.listIterator();
boolean found = false;
while ((i.hasNext()) && (!found)) {
final org.diyefi.openlogviewer.colo... |
@dagger.Provides
com.david.todo.presenter.TodoListPresenter provideTodoListPresenter(com.david.todo.repository.DataRepository dataRepository) {
if ((_activity) instanceof com.david.todo.view.TodoListActivity) {
return new com.david.todo.presenter.TodoListPresenter(((com.david.todo.view.TodoListActivity) (_a... | @dagger.Provides
com.david.todo.presenter.TodoListPresenter provideTodoListPresenter(com.david.todo.repository.DataRepository dataRepository) {
if ((_activity) instanceof com.david.todo.view.TodoListActivity) {
return new com.david.todo.presenter.TodoListPresenter(((com.david.todo.view.TodoListActivity) (_a... |
private java.lang.Long parseInt() throws org.lorecraft.phparser.SerializedPhpParserException {
int delimiter = this.input.indexOf(';', this.index);
if (delimiter == (-1)) {
throw new org.lorecraft.phparser.SerializedPhpParserException("Unexpected end of serialized integer!", this.index);
}
check... | private java.lang.Long parseInt() throws org.lorecraft.phparser.SerializedPhpParserException {
int delimiter = input.indexOf(';', index);
if (delimiter == (-1)) {
throw new org.lorecraft.phparser.SerializedPhpParserException("Unexpected end of serialized integer!", index);
}
checkUnexpectedLengt... |
public void canWePlay() {
if (hasSameName) {
players.clear();
}
if (((players.size()) < 2) || (players.isEmpty())) {
warningLabel.setText("Det måste vara minst två spelare!");
players.clear();
}
if (hasSameName) {
warningLabel.setText("Alla spelare måste ha olika namn... | private void canWePlay() {
if (((players.size()) < 2) || (players.isEmpty())) {
warningLabel.setText("Det måste vara minst två spelare!");
players.clear();
}
if (hasSameName) {
warningLabel.setText("Alla spelare måste ha olika namn.");
players.clear();
}
} |
public void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.main);
tw.edu.ntu.fortour.ForTour.mDbHelper = new tw.edu.ntu.fortour.DbAdapter(this);
tw.edu.ntu.fortour.ForTour.mDbHelper.open... | public void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
tw.edu.ntu.fortour.ForTour.mDbHelper = new tw.edu.ntu.fortour.DbAdapter(this);
tw.edu.ntu.fortour.ForTour.mDbHelper.open();
checkWorkDirs();
findviews();
setCamera(... |
public void perspectivePreDeactivate(org.eclipse.ui.IWorkbenchPage page, org.eclipse.ui.IPerspectiveDescriptor perspective) {
org.eclipse.ui.internal.cheatsheets.views.CheatSheetView cheetSheet = org.talend.commons.ui.utils.CheatSheetUtils.getInstance().findCheetSheet("org.talend.datacleansing.core.ui.dqcheatsheet"... | public void perspectivePreDeactivate(org.eclipse.ui.IWorkbenchPage page, org.eclipse.ui.IPerspectiveDescriptor perspective) {
org.eclipse.ui.internal.cheatsheets.views.CheatSheetView cheetSheet = org.talend.commons.ui.utils.CheatSheetUtils.getInstance().findCheetSheet("org.talend.datacleansing.core.ui.dqcheatsheet"... |
public void handleMessage(android.os.Message msg) {
super.handleMessage(msg);
if (0 == (msg.what)) {
android.util.Log.i(com.example.percentlinearlayout.AudioActivity.TAG, "startSeekBar+");
if (null == (m_MusicPlayerService)) {
return ;
}
m_SeekBar.setMax(mediaPlayer.g... | public void handleMessage(android.os.Message msg) {
super.handleMessage(msg);
if (0 == (msg.what)) {
if (null == (m_MusicPlayerService)) {
return ;
}
m_SeekBar.setMax(mediaPlayer.getDuration());
android.util.Log.i(com.example.percentlinearlayout.AudioActivity.TAG, (((... |
public void mouseClicked(int x, int y) {
int posX = pos.getX();
int posY = pos.getY();
int h = 0;
java.util.Iterator<net.yawk.client.gui.Component> it = components.iterator();
while (it.hasNext()) {
net.yawk.client.gui.Component comp = it.next();
comp.mouseClicked(x, y, posX, (posY +... | public void mouseClicked(int x, int y) {
int posX = pos.getX();
int posY = pos.getY();
int h = 0;
for (net.yawk.client.gui.Component comp : components) {
comp.mouseClicked(x, y, posX, (posY + h));
h += comp.getHeight();
}
} |
public void createTSDRTables() {
java.lang.String cql = "CREATE TABLE MetricPath (keyPath text," + "PRIMARY KEY (KeyPath))";
this.session.execute(cql);
cql = "CREATE TABLE MetricVal (" + (((("KeyA bigint, " + "KeyB bigint, ") + "Time bigint, ") + "value double,") + "PRIMARY KEY (KeyA,KeyB,Time))");
this... | public void createTSDRTables() {
java.lang.String cql = "CREATE TABLE MetricVal (" + (((("KeyA bigint, " + "KeyB bigint, ") + "Time bigint, ") + "value double,") + "PRIMARY KEY (KeyA,KeyB,Time))");
this.session.execute(cql);
cql = "CREATE TABLE MetricLog (" + ((((("KeyA bigint, " + "KeyB bigint, ") + "Time ... |
public jbse.bc.ExceptionTableEntry getEntry(java.util.List<java.lang.String> excTypes, int PC) {
for (jbse.bc.ExceptionTableEntry tmpEntry : this.exTable) {
if (((excTypes.contains(tmpEntry.getType())) && (PC >= (tmpEntry.getStartPC()))) && (PC <= (tmpEntry.getEndPC()))) {
return tmpEntry;
... | public jbse.bc.ExceptionTableEntry getEntry(java.util.List<java.lang.String> excTypes, int PC) {
for (jbse.bc.ExceptionTableEntry tmpEntry : this.exTable) {
if (((excTypes.contains(tmpEntry.getType())) && (PC >= (tmpEntry.getStartPC()))) && (PC < (tmpEntry.getEndPC()))) {
return tmpEntry;
... |
public int getMDefenseFighter() {
return ((int) (((((getMdef()) + (m_equippedSword.getBonusMDef())) + (m_equippedShield.getBonusDef())) + (m_equippedHelmet.getBonusMDef())) * (getMdefModifier())));
} | public int getMDefenseFighter() {
if ((m_equippedSword) == null) {
return ((int) ((getMdef()) * (getMdefModifier())));
}else {
return ((int) (((((getMdef()) + (m_equippedSword.getBonusMDef())) + (m_equippedShield.getBonusDef())) + (m_equippedHelmet.getBonusMDef())) * (getMdefModifier())));
}... |
public void onFinish(java.util.List<com.dzy.done.bean.ListItem> items) {
if ((mView) == null)
return ;
if (items != null) {
mDatas.addAll(items);
mView.showDatas(mDatas);
(page)++;
android.util.Log.i("tag", (("presenter onFinish items:" + (items.size())) + ""));
... | public void onFinish(java.util.List<com.dzy.done.bean.ListItem> items) {
isLoading = false;
if ((mView) == null)
return ;
if (items != null) {
mDatas.addAll(items);
mView.showDatas(mDatas);
(page)++;
android.util.Log.i("tag", (("presenter onFinish items:" + (i... |
public java.lang.String getMask() {
java.lang.StringBuilder output = new java.lang.StringBuilder();
int unmaskedIndexCounter = 0;
for (int i = 0; i < (answer.length()); i++) {
if (i == (unmaskedLetters[unmaskedIndexCounter])) {
output.append(answer.charAt(unmaskedIndexCounter));
... | public java.lang.String getMask() {
java.lang.StringBuilder output = new java.lang.StringBuilder();
int unmaskedIndexCounter = 0;
for (int i = 0; i < (answer.length()); i++) {
if (i == (unmaskedLetters[unmaskedIndexCounter])) {
output.append(answer.charAt(unmaskedLetters[unmaskedIndexCou... |
private void setUpMapIfNeeded() {
if ((mMap) == null) {
mMap = ((com.google.android.gms.maps.SupportMapFragment) (getSupportFragmentManager().findFragmentById(R.id.map))).getMap();
}
if ((mMap) != null) {
setUpMap();
}
} | private void setUpMapIfNeeded() {
if ((mMap) == null) {
mMap = ((com.google.android.gms.maps.SupportMapFragment) (getSupportFragmentManager().findFragmentById(R.id.map))).getMap();
if ((mMap) != null) {
setUpMap();
}
}
} |
private void ipDialog() {
java.lang.String ip = javax.swing.JOptionPane.showInputDialog("IP des Hosts eingeben: ", get_ip());
try {
s = new java.net.Socket(ip, 44444);
} catch (java.io.IOException e) {
ipDialog();
jOptionPane.showMessageDialog(this, "Server antwortet nicht.", "Verbin... | private void ipDialog() {
java.lang.String ip = javax.swing.JOptionPane.showInputDialog("IP des Hosts eingeben: ", get_ip());
if (ip == null)
java.lang.System.exit(0);
try {
s = new java.net.Socket(ip, 44444);
} catch (java.io.IOException e) {
jOptionPane.showMessageDialog(t... |
public static void setUp() throws java.sql.SQLException {
char[] pass = "k^^pfp_^^s".toCharArray();
for (int i = 1; i < ((pass.length) - 1); i++) {
pass[i] += 3;
}
nl.tudelft.contextproject.saveLoad.ApplicationSettings.getInstance().setDatabaseInfo("159.253.0.125", 3306, "thomaaj84_test", "thoma... | public static void setUp() throws java.sql.SQLException {
char[] pass = "k^^pfp_^^s".toCharArray();
for (int i = 1; i < ((pass.length) - 1); i++) {
pass[i] += 3;
}
nl.tudelft.contextproject.saveLoad.ApplicationSettings.getInstance().setDatabaseInfo("159.253.0.125", 3306, "thomaaj84_test", "thoma... |
public void setCurrentGameState(final net.realrpg.common.GameModel.GameState gameState) {
if (stop()) {
if ((currentGameState) != null) {
currentGameState.getController().closeView();
}
currentGameState = gameState;
java.lang.System.out.println((("\n#### " + gameState) + ... | public void setCurrentGameState(final net.realrpg.common.GameModel.GameState gameState) {
if ((currentGameState) != null) {
currentGameState.getController().closeView();
}
currentGameState = gameState;
java.lang.System.out.println((("\n#### " + gameState) + " ####\n"));
if (currentGameState.... |
private void postMoveProcedure() {
if ((currentPlayer) == (players.get(0)))
currentPlayer = players.get(1);
else
currentPlayer = players.get(0);
if (hasWinner())
endGame();
if (isCatsGame())
endGame();
} | private void postMoveProcedure() {
if (hasWinner())
endGame();
if (isCatsGame())
endGame();
if ((currentPlayer) == (players.get(0)))
currentPlayer = players.get(1);
else
currentPlayer = players.get(0);
} |
public void refreshDatabaseRecord(canreg.common.database.DatabaseRecord record, boolean isSaveNeeded) {
setDatabaseRecord(record);
setSaveNeeded(isSaveNeeded);
buildPanel();
refreshCheckStatus(record);
refreshRecordStatus(record);
refreshUpdatedBy();
if ((this.patient) != null)
patie... | public void refreshDatabaseRecord(canreg.common.database.DatabaseRecord record, boolean isSaveNeeded) {
setDatabaseRecord(record);
setSaveNeeded(isSaveNeeded);
buildPanel();
if ((this.patient) != null)
patient.refreshDatabaseRecord(this.patient.getDatabaseRecord(), this.patient.isSaveNeeded());
... |
public void start() {
if (!(isSingleplayer)) {
listen();
openConnection(addressString);
}
loading.init();
slot = -1;
positionUpdatePoint = new java.awt.Point(0, 0);
worldEntity = null;
setLevel(null);
waitTimer = 0;
waitAttempts = 0;
running = true;
} | public void start() {
if (!(isSingleplayer)) {
openConnection(addressString);
listen();
}
loading.init();
slot = -1;
positionUpdatePoint = new java.awt.Point(0, 0);
worldEntity = null;
setLevel(null);
waitTimer = 0;
waitAttempts = 0;
running = true;
} |
public boolean computeDependencies(org.jahia.data.templates.JahiaTemplatesPackage pack) {
pack.resetDependencies();
if (computeDependencies(pack, pack)) {
computeResourceBundleHierarchy(pack);
for (org.jahia.data.templates.JahiaTemplatesPackage aPackage : packagesById.values()) {
if ... | public boolean computeDependencies(org.jahia.data.templates.JahiaTemplatesPackage pack) {
pack.resetDependencies();
computeResourceBundleHierarchy(pack);
for (org.jahia.data.templates.JahiaTemplatesPackage aPackage : packagesById.values()) {
if ((aPackage.getDepends().contains(pack.getId())) || (aPa... |
public static void initHibernate() throws org.hibernate.exception.JDBCConnectionException {
model.DBManager.lock.lock();
if (((model.DBManager.configuration) == null) && ((model.DBManager.sessionFactory) == null)) {
model.DBManager.configuration = new org.hibernate.cfg.Configuration();
model.DBM... | public static void initHibernate() throws org.hibernate.exception.JDBCConnectionException {
model.DBManager.lock.lock();
if ((model.DBManager.configuration) == null) {
model.DBManager.configuration = new org.hibernate.cfg.Configuration();
model.DBManager.configuration.configure();
}
mode... |
private void scheduleStopForegroundChecker(java.lang.String source) {
android.util.Log.i(LOG_TAG, ("scheduleStopForegroundChecker - source: " + source));
if ((stopForegroundRunnable) != null) {
handler.removeCallbacks(stopForegroundRunnable);
}
stopForegroundRunnable = new au.com.kbrsolutions.sp... | private void scheduleStopForegroundChecker(java.lang.String source) {
if ((stopForegroundRunnable) != null) {
handler.removeCallbacks(stopForegroundRunnable);
}
stopForegroundRunnable = new au.com.kbrsolutions.spotifystreamer.services.MusicPlayerService.StopForegroundRunnable((source + ".scheduleSto... |
public static void registerPanel() throws exceptions.DBException {
int registerClickResponse = gui.factory.FactoryDialog.registerGUIDialog();
if (registerClickResponse == 0) {
controller.ddbb.dto.UserDTO registerUser = controller.functions.LogFunctions.getUserInput(true);
if (registerUser != nul... | public static boolean registerPanel() throws exceptions.DBException {
int registerClickResponse = gui.factory.FactoryDialog.registerGUIDialog();
if (registerClickResponse == 0) {
controller.ddbb.dto.UserDTO registerUser = controller.functions.LogFunctions.getUserInput(true);
if (registerUser != ... |
private void chooseChat() {
java.lang.System.out.println("Choose chat");
javax.swing.DefaultListModel listModel = new javax.swing.DefaultListModel();
listModel = client.getListModel();
onlineTextPane.setText("test\n");
java.util.ArrayList<java.lang.String> online = client.getOnline();
for (int i... | private void chooseChat() {
java.lang.System.out.println("Choose chat");
javax.swing.DefaultListModel listModel = new javax.swing.DefaultListModel();
listModel = client.getListModel();
java.util.ArrayList<java.lang.String> online = client.getOnline();
for (int i = 0; i < (online.size()); i++) {
... |
public final java.util.Iterator<?> localEntriesIterator(java.util.Set bucketSet, final boolean primaryOnly, final boolean forUpdate, boolean includeValues, final com.gemstone.gemfire.internal.cache.TXState txState) {
if (bucketSet != null) {
return new com.gemstone.gemfire.internal.cache.PartitionedRegion.P... | public final java.util.Iterator<?> localEntriesIterator(java.util.Set bucketSet, final boolean primaryOnly, final boolean forUpdate, boolean includeValues, final com.gemstone.gemfire.internal.cache.TXState txState) {
if (bucketSet != null) {
return new com.gemstone.gemfire.internal.cache.PartitionedRegion.P... |
public com.taskadapter.redmineapi.bean.Attachment uploadAttachment(final java.lang.String fileName, final java.lang.String contentType, final byte[] content) throws com.taskadapter.redmineapi.RedmineException, java.io.IOException {
final java.io.InputStream is = new java.io.ByteArrayInputStream(content);
try {
... | public com.taskadapter.redmineapi.bean.Attachment uploadAttachment(final java.lang.String fileName, final java.lang.String contentType, final byte[] content) throws com.taskadapter.redmineapi.RedmineException, java.io.IOException {
final java.io.InputStream is = new java.io.ByteArrayInputStream(content);
try {
... |
public static test.klq.logic.controller.Question q2() {
test.klq.logic.controller.Id id = new test.klq.logic.controller.Id("question2");
java.util.List<com.klq.logic.expression.AExpression> dependencies = new java.util.ArrayList<com.klq.logic.expression.AExpression>();
com.klq.logic.expression.AExpression l... | public static test.klq.logic.controller.Question q2() {
test.klq.logic.controller.Id id = new test.klq.logic.controller.Id("question2");
java.util.List<com.klq.logic.expression.AExpression> dependencies = new java.util.ArrayList<com.klq.logic.expression.AExpression>();
com.klq.logic.expression.AExpression l... |
public static fi.muikku.schooldata.SchoolDataIdentifier fromId(java.lang.String id) {
java.lang.String[] idParts = org.apache.commons.lang3.StringUtils.split(id, '-');
if ((idParts.length) != 2) {
throw new java.lang.RuntimeException("Invalid school data identifier");
}
return new fi.muikku.scho... | public static fi.muikku.schooldata.SchoolDataIdentifier fromId(java.lang.String id) {
java.lang.String[] idParts = org.apache.commons.lang3.StringUtils.split(id, '-');
if ((idParts.length) != 2) {
return null;
}
return new fi.muikku.schooldata.SchoolDataIdentifier(idParts[1], idParts[0]);
} |
public synchronized void add(eu.antidotedb.fs.FsTree.FsElement p) {
if (p instanceof eu.antidotedb.fs.FsTree.File)
dirMapRef.register(p.name, ValueCoder.utf8String).set(eu.antidotedb.fs.FsTree.antidote.noTransaction(), new java.lang.String(((eu.antidotedb.fs.FsTree.File) (p)).contents.array()));
else
... | public synchronized void add(eu.antidotedb.fs.FsTree.FsElement p) {
if (p instanceof eu.antidotedb.fs.FsTree.File)
dirMapRef.register(p.name).set(eu.antidotedb.fs.FsTree.antidote.noTransaction(), new java.lang.String(((eu.antidotedb.fs.FsTree.File) (p)).contents.array()));
else
if (p instanceof ... |
public void focusLost(java.awt.event.FocusEvent e) {
for (int i = 0; i < (textFields.size()); i++) {
javax.swing.JTextField jText = textFields.get(i);
if ((e.getSource()) == jText) {
batchState.setValue(new client.gui.batchstate.Cell(recordList.getSelectedIndex(), i), jText.getText());
... | public void focusLost(java.awt.event.FocusEvent e) {
for (int i = 0; i < (textFields.size()); i++) {
javax.swing.JTextField jText = textFields.get(i);
if ((e.getSource()) == jText) {
batchState.setValue(new client.gui.batchstate.Cell(recordList.getSelectedIndex(), (i + 1)), jText.getText... |
private void setupMoving(java.awt.Point direction) {
movingDestination = new java.awt.Point(((game.getZeroPos().x) - (direction.x)), ((game.getZeroPos().y) - (direction.y)));
startTime = getTime();
movingDirection = direction;
} | private void setupMoving(java.awt.Point direction) {
movingDestination = new java.awt.Point(((game.getZeroPos().x) + (direction.x)), ((game.getZeroPos().y) + (direction.y)));
startTime = getTime();
movingDirection = direction;
} |
public Matrix timesEquals(double s) {
for (int i = 0; i < (matrix.length); i++) {
for (int j = 0; j < (matrix[i].length); j++) {
matrix[i][j] *= s;
}
}
return matrix;
} | public Matrix timesEquals(double s) {
for (int i = 0; i < (matrix.length); i++) {
for (int j = 0; j < (matrix[i].length); j++) {
matrix[i][j] *= s;
}
}
return new Matrix(matrix);
} |
public static float toCatroidAngle(float box2dAngle) {
float direction = ((float) ((java.lang.Math.toDegrees(box2dAngle)) + (org.catrobat.catroid.content.Look.getDegreeUserInterfaceOffset()))) % 360;
if (direction < 0) {
direction += 360.0F;
}
direction = 180.0F - direction;
return direction... | public static float toCatroidAngle(float box2dAngle) {
float direction = ((float) ((java.lang.Math.toDegrees(box2dAngle)) - (org.catrobat.catroid.content.Look.getDegreeUserInterfaceOffset()))) % 360;
if (direction < 0) {
direction += 360.0F;
}
direction = 180.0F - direction;
return direction... |
public static void putBoolean(android.content.Context context, java.lang.String key, boolean value, boolean commit) {
ds.framework.v4.Settings.ensurePreferencesEditor(context);
ds.framework.v4.Settings.sPreferencesEditor.putBoolean(key, value);
if (commit) {
ds.framework.v4.Settings.sPreferencesEdit... | public static synchronized void putBoolean(android.content.Context context, java.lang.String key, boolean value, boolean commit) {
ds.framework.v4.Settings.ensurePreferencesEditor(context);
ds.framework.v4.Settings.sPreferencesEditor.putBoolean(key, value);
if (commit) {
ds.framework.v4.Settings.sPr... |
public boolean equalStruct(Expression o, java.util.HashMap<java.lang.String, java.lang.String> d, boolean type) {
return (!((o == null) || ((o.instance) != (instance)))) && (neg.equalStruct(((Negate) (o)).neg, d, type));
} | public boolean equalStruct(Expression o, java.util.HashMap<java.lang.String, java.lang.String> d) {
return (!((o == null) || ((o.instance) != (instance)))) && (neg.equalStruct(((Negate) (o)).neg, d));
} |
static org.verapdf.processor.ItemProcessor newProcessor(final org.verapdf.processor.ProcessorConfig config, final org.verapdf.component.ComponentDetails details) {
org.verapdf.core.utils.FileOutputMapper mapper = org.verapdf.processor.ProcessorImpl.defautMdFixMapper;
if (org.verapdf.processor.ProcessorImpl.isMd... | static org.verapdf.processor.ItemProcessor newProcessor(final org.verapdf.processor.ProcessorConfig config, final org.verapdf.component.ComponentDetails details) {
org.verapdf.core.utils.FileOutputMapper mapper = org.verapdf.processor.ProcessorImpl.defautMdFixMapper;
if (org.verapdf.processor.ProcessorImpl.isMd... |
protected void onPostExecute(java.lang.String result) {
super.onPostExecute(result);
mLoadingDialog.dismiss();
switch (result) {
case FAV_SUCCESS :
isFavorite = true;
break;
case FAV_NONE :
isFavorite = false;
break;
default :
... | protected void onPostExecute(java.lang.String result) {
super.onPostExecute(result);
mLoadingDialog.dismiss();
switch (result) {
case FAV_SUCCESS :
isFavorite = true;
break;
case FAV_NONE :
isFavorite = false;
break;
default :
... |
public void actionPerformed(java.awt.event.ActionEvent e) {
try {
javax.swing.JDialog dialog = new com.net2plan.gui.utils.viewEditTopolTables.specificTables.AttributeEditor(networkViewer, networkElementType);
dialog.setVisible(true);
networkViewer.updateNetPlanView();
restoreColumnsP... | public void actionPerformed(java.awt.event.ActionEvent e) {
try {
javax.swing.JDialog dialog = new com.net2plan.gui.utils.viewEditTopolTables.specificTables.AttributeEditor(networkViewer, networkElementType);
dialog.setVisible(true);
networkViewer.updateNetPlanView();
} catch (java.lang.... |
public void onConfigChange(com.thoughtworks.go.config.CruiseConfig newCruiseConfig) {
com.thoughtworks.go.config.ServerConfig newServerConfig = newCruiseConfig.server();
com.thoughtworks.go.domain.ServerSiteUrlConfig newSecureSiteUrl = newServerConfig.getSecureSiteUrl();
com.thoughtworks.go.domain.ServerSit... | public void onConfigChange(com.thoughtworks.go.config.CruiseConfig newCruiseConfig) {
com.thoughtworks.go.config.ServerConfig newServerConfig = newCruiseConfig.server();
com.thoughtworks.go.domain.ServerSiteUrlConfig newSecureSiteUrl = newServerConfig.getSecureSiteUrl();
com.thoughtworks.go.domain.ServerSit... |
public static int getUserLevelCount(java.lang.String sender) {
int count = 0;
for (int i = 0; i < (mclama.com.SMMHandler.levels.size()); i++) {
mclama.com.LevelCode cur_lvl = mclama.com.SMMHandler.levels.get(i);
if (cur_lvl.getAuthor().equals(sender)) {
return count++;
}
... | public static int getUserLevelCount(java.lang.String sender) {
int count = 0;
for (int i = 0; i < (mclama.com.SMMHandler.levels.size()); i++) {
mclama.com.LevelCode cur_lvl = mclama.com.SMMHandler.levels.get(i);
if (cur_lvl.getAuthor().equals(sender)) {
count++;
}
}
r... |
public android.view.View onCreateView(android.view.LayoutInflater inflater, @android.support.annotation.Nullable
android.view.ViewGroup container, @android.support.annotation.Nullable
android.os.Bundle savedInstanceState) {
android.view.View rootView = inflater.inflate(R.layout.fragment_body_part, container, false)... | public android.view.View onCreateView(android.view.LayoutInflater inflater, @android.support.annotation.Nullable
android.view.ViewGroup container, @android.support.annotation.Nullable
android.os.Bundle savedInstanceState) {
android.view.View rootView = inflater.inflate(R.layout.fragment_body_part, container, false)... |
public void onCompletion(android.media.MediaPlayer mediaPlayer) {
android.os.CountDownTimer timer = new android.os.CountDownTimer(6000, 1000) {
@java.lang.Override
public void onTick(long l) {
}
@java.lang.Override
public void onFinish() {
(trialNum)++;
... | public void onCompletion(android.media.MediaPlayer mediaPlayer) {
timer = new android.os.CountDownTimer(6000, 1000) {
@java.lang.Override
public void onTick(long l) {
}
@java.lang.Override
public void onFinish() {
(trialNum)++;
startTrial();
}... |
private static NotificationCompat.Action ignoreReminder(android.content.Context context) {
android.content.Intent ignoreReminderIntent = new android.content.Intent(context, com.vribeiro.workout.services.GoToGymReminderIntentService.class);
ignoreReminderIntent.setAction(ReminderTasks.DISMISS_NOTIFICATION_ACTION... | private static NotificationCompat.Action ignoreReminder(android.content.Context context) {
android.content.Intent ignoreReminderIntent = new android.content.Intent(context, com.vribeiro.workout.services.GoToGymReminderIntentService.class);
ignoreReminderIntent.setAction(ReminderTasks.DISMISS_NOTIFICATION_ACTION... |
public double[] fire(double[] input) {
if (((layers.size()) < 1) || ((input.length) != (numInputs)))
return new double[]{ 0.0 };
double[] out = input;
for (opentenek.ann.net.NeuronLayer layer : layers) {
out = layer.fire(out);
}
return out;
} | public double[] fire(double[] input) {
if (((layers.size()) < 1) || ((input.length) != (numInputs)))
return null;
double[] out = input;
for (opentenek.ann.net.NeuronLayer layer : layers) {
out = layer.fire(out);
}
return out;
} |
public void finishAllActivityExcept(java.lang.Class<?> cls) {
for (int i = 0, size = activityStack.size(); i < size; i++) {
if ((null != (activityStack.get(i))) && (!(activityStack.get(i).getClass().equals(cls)))) {
finishActivity(activityStack.get(i));
break;
}
}
act... | public void finishAllActivityExcept(java.lang.Class<?> cls) {
for (int i = 0, size = activityStack.size(); i < size; i++) {
if ((null != (activityStack.get(i))) && (!(activityStack.get(i).getClass().equals(cls)))) {
finishActivity(activityStack.get(i));
}
}
} |
public void removeRareAttributes(boolean auto) {
int option = 0;
this.df = regroupDFJoint().getDFJoint();
java.util.List<datastructures.RareElement> rareAttrVector = findRareAttributes();
while ((rareAttrVector.size()) != 0) {
if (!auto) {
}
removeAttribute(rareAttrVector.get(opt... | public void removeRareAttributes(boolean auto) {
int option = 0;
this.df = regroupDFJoint().getDFJoint();
java.util.List<datastructures.RareElement> rareAttrVector = findRareAttributes();
while (!(rareAttrVector.isEmpty())) {
if (!auto) {
}
removeAttribute(rareAttrVector.get(opti... |
public void publish(java.lang.String destination, java.util.Map<java.lang.String, java.lang.String> notificationMessage) {
com.cisco.bitbucket.plugin.publisher.LogPublisher.log.info("Destination: {}", destination);
com.cisco.bitbucket.plugin.publisher.LogPublisher.log.info("Notification: \n");
for (java.uti... | public int publish(java.lang.String destination, java.util.Map<java.lang.String, java.lang.String> notificationMessage) {
com.cisco.bitbucket.plugin.publisher.LogPublisher.log.info("Destination: {}", destination);
com.cisco.bitbucket.plugin.publisher.LogPublisher.log.info("Notification: \n");
for (java.util... |
public void onBindViewHolder(com.thetidbitapp.adap.EventAdapter.EventViewHolder holder, int position) {
if (position == 0)
holder.ivCover.setImageBitmap(android.graphics.BitmapFactory.decodeResource(mContext.getResources(), R.drawable.test_picture_2));
holder.tvTitle.setText(mEvents.get(position).e... | public void onBindViewHolder(com.thetidbitapp.adap.EventAdapter.EventViewHolder holder, int position) {
holder.ivCover.setImageBitmap(android.graphics.BitmapFactory.decodeResource(mContext.getResources(), R.drawable.test_picture_2));
holder.tvTitle.setText(mEvents.get(position).eventName());
holder.tvLoc.se... |
private simulation.RouteTable build() {
simulation.RouteTable table = new simulation.RouteTable(destination, outLinks);
java.util.Iterator<simulation.Route> routeItr = routes.iterator();
for (network.Link outLink : outLinks) {
simulation.Route route = routeItr.next();
route.setDestination(de... | private simulation.RouteTable build() {
simulation.RouteTable table = new simulation.RouteTable(destination, outLinks);
if (!(routes.isEmpty())) {
java.util.Iterator<simulation.Route> routeItr = routes.iterator();
for (network.Link outLink : outLinks) {
simulation.Route route = route... |
public void testRepeatedExpiryProcessingOfLargeQueue() throws java.lang.Exception {
applyBrokerSpoolingPolicy();
final int expiryPeriod = 500;
applyExpiryDuration(expiryPeriod);
createProducerAndSendMessages(org.apache.activemq.broker.region.QueuePurgeTest.NUM_TO_SEND);
org.apache.activemq.broker.jm... | public void testRepeatedExpiryProcessingOfLargeQueue() throws java.lang.Exception {
applyBrokerSpoolingPolicy(false);
final int expiryPeriod = 500;
applyExpiryDuration(expiryPeriod);
createProducerAndSendMessages(org.apache.activemq.broker.region.QueuePurgeTest.NUM_TO_SEND);
org.apache.activemq.brok... |
public void setDefaults(org.eclipse.core.runtime.IProgressMonitor monitor) {
org.eclipse.wst.server.core.IRuntime rt = getServer().getRuntime();
if (rt != null) {
getServerWorkingCopy().setName(org.jboss.ide.eclipse.as.core.util.ServerNamingUtility.getDefaultServerName(rt));
}else {
getServe... | public void setDefaults(org.eclipse.core.runtime.IProgressMonitor monitor) {
setAttribute(IJBossToolingConstants.IGNORE_LAUNCH_COMMANDS, true);
getServerWorkingCopy().setHost("localhost");
org.eclipse.wst.server.core.IRuntime rt = getServer().getRuntime();
java.lang.String name = (rt != null) ? org.jbos... |
public java.util.Optional<sirius.biz.storage.vfs.VirtualFile> findChild(java.lang.String name) {
sirius.kernel.commons.ValueHolder<sirius.biz.storage.vfs.VirtualFile> childHolder = new sirius.kernel.commons.ValueHolder(null);
childProvider.accept(this, ( c) -> {
if (sirius.kernel.commons.Strings.areEqua... | public java.util.Optional<sirius.biz.storage.vfs.VirtualFile> findChild(java.lang.String name) {
sirius.kernel.commons.ValueHolder<sirius.biz.storage.vfs.VirtualFile> childHolder = new sirius.kernel.commons.ValueHolder(null);
if ((childProvider) != null) {
childProvider.accept(this, ( c) -> {
... |
protected void updateItem(java.lang.String item, boolean empty) {
super.updateItem(item, empty);
javafx.collections.ObservableList<javafx.scene.Node> flowPaneChildren = flowPane.getChildren();
flowPaneChildren.clear();
if (!empty) {
org.stt.text.ItemCategorizer.ItemCategory category = worktimeCa... | protected void updateItem(java.lang.String item, boolean empty) {
super.updateItem(item, empty);
java.lang.System.out.println();
javafx.collections.ObservableList<javafx.scene.Node> flowPaneChildren = flowPane.getChildren();
flowPaneChildren.clear();
if (!empty) {
org.stt.text.ItemCategorize... |
public void show() {
boolean canPaste = (mTextView.canPaste()) && ((mSelectionActionMode) == null);
boolean canSuggest = (mTextView.isSuggestionsEnabled()) && (isCursorInsideSuggestionSpan());
mPasteTextView.setVisibility((canPaste ? android.view.View.VISIBLE : android.view.View.GONE));
mReplaceTextView... | public void show() {
boolean canPaste = mTextView.canPaste();
boolean canSuggest = (mTextView.isSuggestionsEnabled()) && (isCursorInsideSuggestionSpan());
mPasteTextView.setVisibility((canPaste ? android.view.View.VISIBLE : android.view.View.GONE));
mReplaceTextView.setVisibility((canSuggest ? android.v... |
public java.util.Collection<com.fabiendem.defib68.models.defibrillator.DefibrillatorModel> deserialize(com.google.gson.JsonElement json, java.lang.reflect.Type typeOfT, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException {
java.util.ArrayList<com.fabiendem.defib68.models.de... | public java.util.Collection<com.fabiendem.defib68.models.defibrillator.DefibrillatorModel> deserialize(com.google.gson.JsonElement json, java.lang.reflect.Type typeOfT, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException {
java.util.ArrayList<com.fabiendem.defib68.models.de... |
public void run() {
java.lang.String status = nearPlaces.status;
if (status.equals("OK")) {
if ((nearPlaces.results) != null) {
if (!(near.equals(nearPlaces.results.get(0))))
near = nearPlaces.results.get(0);
}else
near = null;
}
... | public void run() {
java.lang.String status = nearPlaces.status;
if (status.equals("OK")) {
if ((nearPlaces.results.size()) > 0) {
if ((near) == null)
near = nearPlaces.results.get(0);
else
if (!(near.equals(nearPlaces.results.get(0))))
... |
public static void main(java.lang.String[] args) {
try {
java.io.BufferedReader in = new java.io.BufferedReader(new java.io.FileReader(args[0]));
java.lang.String boardstring = in.readLine();
SudokuBoard sb = new SudokuBoard(boardstring);
java.lang.System.out.println(sb.toPrettyStrin... | public static void main(java.lang.String[] args) {
try {
java.io.BufferedReader in = new java.io.BufferedReader(new java.io.FileReader(args[0]));
java.lang.String boardstring = in.readLine();
SudokuBoard sb = new SudokuBoard();
java.lang.System.out.println(sb.toPrettyString());
}... |
protected void onPostExecute(java.util.List<kaaes.spotify.webapi.android.models.Track> tracks) {
super.onPostExecute(tracks);
if (!(tracks.isEmpty())) {
for (kaaes.spotify.webapi.android.models.Track track : tracks) {
mTrackList.add(new com.example.gabrielmojica.spotify3.TrackActivityFragmen... | protected void onPostExecute(java.util.List<kaaes.spotify.webapi.android.models.Track> tracks) {
super.onPostExecute(tracks);
if (tracks != null) {
for (kaaes.spotify.webapi.android.models.Track track : tracks) {
mTrackList.add(new com.example.gabrielmojica.spotify3.TrackActivityFragment.Par... |
protected void process(org.moeaframework.core.Population population) {
org.moeaframework.core.NondominatedSortingPopulation ndspop = new org.moeaframework.core.NondominatedSortingPopulation();
ndspop.addAll(population);
int numGood = ((int) (java.lang.Math.floor(((population.size()) * (fraction)))));
nd... | protected void process(org.moeaframework.core.Population population) {
super.process(population);
org.moeaframework.core.NondominatedSortingPopulation ndspop = new org.moeaframework.core.NondominatedSortingPopulation();
ndspop.addAll(population);
int numGood = ((int) (java.lang.Math.floor(((population.s... |
public boolean is_available(int day, int hour, int course_length) {
if ((hour + course_length) > (HOURS))
return false;
for (int i = 0; i < course_length; i++) {
if ((schedule[day][(hour + i)]) == true)
return false;
}
return true;
} | public boolean is_available(int day, int hour, int course_length) {
if ((hour + course_length) >= (HOURS))
return false;
for (int i = 0; i < course_length; i++) {
if ((schedule[day][(hour + i)]) == true)
return false;
}
return true;
} |
public void calcularAngulo(float ptFuturoX, float ptFuturoY) {
printagemDbg("CALCULAR ANGULO INICIO");
this.anguloCalculado = ((float) (java.lang.Math.atan2((ptFuturoY - (this.corredor.getPosition().y)), (ptFuturoX - (this.corredor.getPosition().x))))) * (com.badlogic.gdx.math.MathUtils.radiansToDegrees);
t... | public void calcularAngulo(float ptFuturoX, float ptFuturoY) {
this.anguloCalculado = ((float) (java.lang.Math.atan2((ptFuturoY - (this.corredor.getPosition().y)), (ptFuturoX - (this.corredor.getPosition().x))))) * (com.badlogic.gdx.math.MathUtils.radiansToDegrees);
this.anguloCalculado = java.lang.Math.round(t... |
public java.util.Set<java.lang.String> createInstancesWithPublicKeyNameAndInitScript(java.lang.String infrastructureId, java.lang.String instanceTag, java.lang.String image, int numberOfInstances, int hardwareType, java.lang.String publicKeyName, java.util.List<java.lang.String> scripts) {
java.lang.String instance... | public java.util.Set<java.lang.String> createInstancesWithPublicKeyNameAndInitScript(java.lang.String infrastructureId, java.lang.String instanceTag, java.lang.String image, int numberOfInstances, int hardwareType, java.lang.String publicKeyName, java.util.List<java.lang.String> scripts) {
java.lang.String instance... |
public boolean touchDown(int screenX, int screenY, int height, int width) {
java.lang.System.out.println(screenX);
if (screenX < (width / 4)) {
moveLeft();
}else
if (screenX > ((3 * width) / 4)) {
moveRight();
}else
if (screenY > (height / 2)) {
... | public void touchDown(int screenX, int screenY, int width, int height) {
if (screenX < (width / 4)) {
moveLeft();
}else
if (screenX > ((3 * width) / 4)) {
moveRight();
}else
if (screenY > (height / 2)) {
moveDown();
}else {
... |
public java.util.Map<java.lang.Integer, java.lang.Double> getEdgeWeights() {
java.util.HashMap<java.lang.Integer, java.lang.Double> edgeWeights = new java.util.HashMap<>();
for (dat.POGraph.Edge next : current.getNextTransitions())
if ((next.getNext()) != (finalNode))
edgeWeights.put(next.ge... | public java.util.Map<java.lang.Integer, java.lang.Double> getEdgeWeights() {
java.util.HashMap<java.lang.Integer, java.lang.Double> edgeWeights = new java.util.HashMap<>();
for (dat.POGraph.Edge next : current.getNextTransitions())
edgeWeights.put(next.getNext().getID(), ((1.0 * (next.getSequences().siz... |
public boolean contains(E obj) {
if ((currentSize) != 0) {
for (int i = 0; i < (currentSize); i++) {
if ((((java.lang.Comparable<E>) (obj)).compareTo(array[i])) == 0) {
return true;
}
}
}
return false;
} | public boolean contains(E obj) {
if (!(isEmpty())) {
for (int i = 0; i < (currentSize); i++) {
if ((((java.lang.Comparable<E>) (obj)).compareTo(array[i])) == 0) {
return true;
}
}
}
return false;
} |
public static boolean isUnique(byte[] a, boolean omitCheck) {
if ((a.length) < 2)
return true;
if ((!omitCheck) && (!(com.github.methylene.sym.ArrayUtil.isSorted(a))))
a = com.github.methylene.sym.ArrayUtil.sortedCopy(a);
byte previous = a[0];
for (byte i : a)
if (i == ... | public static boolean isUnique(byte[] a, boolean omitCheck) {
if ((a.length) < 2)
return true;
if ((!omitCheck) && (!(com.github.methylene.sym.ArrayUtil.isSorted(a))))
a = com.github.methylene.sym.ArrayUtil.sortedCopy(a);
for (int i = 1; i < (a.length); i++)
if ((a[i]) == (... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.