buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public static void requestLock() {
if ((application.Locker.state) == (application.Locker.State.hold)) {
java.lang.System.out.println("Currently in CS");
return ;
}
application.Locker.state = application.Locker.State.want;
application.Log.verbose("Locker", ("sending request to all in grou... | public static void requestLock() {
if ((application.Locker.state) == (application.Locker.State.hold)) {
java.lang.System.out.println("Currently in CS");
return ;
}
application.Locker.state = application.Locker.State.want;
application.Log.verbose("Locker", ("sending request to all in grou... |
public void endTransition(android.animation.LayoutTransition transition, android.view.ViewGroup container, android.view.View view, int transitionType) {
if (NavbarEditor.NAVBAR_BACK.equals(view.getTag())) {
mBackTransitioning = false;
}else
if ((NavbarEditor.NAVBAR_HOME.equals(view.getTag())) &&... | public void endTransition(android.animation.LayoutTransition transition, android.view.ViewGroup container, android.view.View view, int transitionType) {
if (NavbarEditor.NAVBAR_BACK.equals(view.getTag())) {
mBackTransitioning = false;
}else
if ((NavbarEditor.NAVBAR_HOME.equals(view.getTag())) &&... |
public int compare(final soot.SootClass a, final soot.SootClass b) {
if (a == b)
return 0;
hierarchy = soot.Scene.v().getActiveHierarchy();
if (hierarchy.isClassSubclassOf(a, b))
return -1;
if (hierarchy.isClassSuperclassOf(a, b))
return 1;
return 0;
} | public int compare(final soot.SootClass a, final soot.SootClass b) {
if (a == b)
return 0;
hierarchy = soot.Scene.v().getActiveHierarchy();
if (hierarchy.isClassSubclassOf(a, b))
return 1;
if (hierarchy.isClassSuperclassOf(a, b))
return -1;
return 0;
} |
public void testGetBoard() throws java.lang.Exception {
com.uno.dbbc.checkers.Board board = new com.uno.dbbc.checkers.Board();
board.initialBoardSetup();
com.uno.dbbc.checkers.Player player1 = new com.uno.dbbc.checkers.Player("Dark");
com.uno.dbbc.checkers.Player player2 = new com.uno.dbbc.checkers.Play... | public void testGetBoard() throws java.lang.Exception {
com.uno.dbbc.checkers.Board board = new com.uno.dbbc.checkers.Board();
board.initialBoardSetup();
com.uno.dbbc.checkers.Player player1 = new com.uno.dbbc.checkers.Player("Dark");
com.uno.dbbc.checkers.Player player2 = new com.uno.dbbc.checkers.Play... |
public java.util.List<org.wso2.carbon.apimgt.core.models.Application> getApplications(java.lang.String subscriber, java.lang.String groupId) throws org.wso2.carbon.apimgt.core.exception.APIManagementException {
java.util.List<org.wso2.carbon.apimgt.core.models.Application> applicationList = null;
try {
... | public java.util.List<org.wso2.carbon.apimgt.core.models.Application> getApplications(java.lang.String subscriber, java.lang.String groupId) throws org.wso2.carbon.apimgt.core.exception.APIManagementException {
java.util.List<org.wso2.carbon.apimgt.core.models.Application> applicationList = null;
try {
... |
public boolean onTouch(android.view.View v, android.view.MotionEvent event) {
if ((videoControlsView) != null) {
if ((videoControlsView.getVisibility()) == (android.view.View.VISIBLE))
hideControls();
else
showControls();
}
if ((touchListener) != null) {
... | public boolean onTouch(android.view.View v, android.view.MotionEvent event) {
if ((videoControlsView) != null) {
if ((videoControlsView.getVisibility()) == (android.view.View.VISIBLE))
hideControls();
else
showControls();
}
if ((touchListener) != null) {
... |
public void changeDestination(double probability) {
if (!(waiting)) {
if ((rand.nextDouble()) < probability) {
currentDestination = (rand.nextInt(this.halfFloorFormula())) + (this.halfFloorFormula());
if ((this.currentDestination) != (this.currentFloor)) {
this.call()... | public void changeDestination(double probability) {
if (!(waiting)) {
if ((rand.nextDouble()) < probability) {
currentDestination = ((rand.nextInt(this.halfFloorFormula())) + (this.halfFloorFormula())) - 1;
if ((this.currentDestination) != (this.currentFloor)) {
this.... |
public java.lang.String getHostKey() {
final java.lang.String hostKey = sessionPO.getHostKey();
if (org.adempiere.ad.session.MFSession.HOSTKEY_NOT_YET_DETERMINED.equals(hostKey)) {
final de.metas.hostkey.api.IHostKeyBL hostKeyBL = org.adempiere.util.Services.get(de.metas.hostkey.api.IHostKeyBL.class);
... | public java.lang.String getHostKey() {
final java.lang.String hostKey = sessionPO.getHostKey();
if (!(org.adempiere.ad.session.MFSession.HOSTKEY_NOT_YET_DETERMINED.equals(hostKey))) {
return hostKey;
}
final de.metas.hostkey.api.IHostKeyBL hostKeyBL = org.adempiere.util.Services.get(de.metas.hos... |
public void onClick(android.content.DialogInterface dialogInterface, int i) {
com.example.downloaderdemo.fragment.ArticleListFragment.sRecentSuggestions.clearHistory();
com.example.downloaderdemo.fragment.ArticleListFragment.sRecentSuggestions = null;
com.example.downloaderdemo.util.Utils.showSnackbar(getAc... | public void onClick(android.content.DialogInterface dialogInterface, int i) {
com.example.downloaderdemo.fragment.ArticleListFragment.sRecentSuggestions.clearHistory();
com.example.downloaderdemo.fragment.ArticleListFragment.sRecentSuggestions = null;
com.example.downloaderdemo.util.QueryPreferences.setSave... |
public void onSurfaceChanged(javax.microedition.khronos.opengles.GL10 glUnused, int width, int height) {
android.opengl.GLES20.glViewport(0, 0, width, height);
com.example.akiwiksten.quaki.util.MatrixHelper.perspectiveM(projectionMatrix, 45, (((float) (width)) / ((float) (height))), 0.0F, 100.0F);
android.o... | public void onSurfaceChanged(javax.microedition.khronos.opengles.GL10 glUnused, int width, int height) {
android.opengl.GLES20.glViewport(0, 0, width, height);
com.example.akiwiksten.quaki.util.MatrixHelper.perspectiveM(projectionMatrix, 45, (((float) (width)) / ((float) (height))), 1.0F, 100.0F);
android.o... |
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.basic);
if ((sharedPrefs) == null) {
sharedPrefs = getSharedPreferences(Keys.PREFS_NAME, Context.MODE_PRIVATE);
}
android.support.v7.widget.Toolbar toolbar = ((android.... | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.basic);
if ((sharedPrefs) == null) {
sharedPrefs = getSharedPreferences(Keys.PREFS_NAME, Context.MODE_PRIVATE);
}
android.support.v7.widget.Toolbar toolbar = ((android.... |
public void deleteSchedule(co.cask.cdap.proto.Id.Program programId, co.cask.cdap.api.schedule.SchedulableProgramType programType, java.lang.String scheduleName) {
co.cask.cdap.internal.app.runtime.schedule.StreamSizeScheduler.StreamSubscriber subscriber = scheduleSubscribers.remove(getScheduleId(programId, programT... | public void deleteSchedule(co.cask.cdap.proto.Id.Program programId, co.cask.cdap.api.schedule.SchedulableProgramType programType, java.lang.String scheduleName) {
co.cask.cdap.internal.app.runtime.schedule.StreamSizeScheduler.StreamSubscriber subscriber = scheduleSubscribers.remove(getScheduleId(programId, programT... |
private void checkControllerStateShouldNotEqual(controller.UIController notExpected, controller.UIController actual) {
assertFalse((notExpected == actual));
assertEquals(notExpected.getCurrentPlayer(), actual.getCurrentPlayer());
assertNotEquals(notExpected.getAllStacks(), actual.getAllStacks());
assert... | private void checkControllerStateShouldNotEqual(controller.UIController notExpected, controller.UIController actual) {
assertFalse((notExpected == actual));
assertEquals(notExpected.getCurrentPlayer(), actual.getCurrentPlayer());
assertNotEquals(notExpected.getAllStacks(), actual.getAllStacks());
assert... |
public void testLookupPropertyTypeByFqn() {
org.apache.commons.lang3.tuple.Pair<java.util.UUID, com.dataloom.edm.internal.PropertyType> propertyTypePair = createPropertyType();
com.dataloom.edm.internal.PropertyType propertyType = edm.getPropertyType(propertyTypePair.getLeft());
org.junit.Assert.assertNotNu... | public void testLookupPropertyTypeByFqn() {
com.dataloom.edm.internal.PropertyType propertyType = createPropertyType();
java.util.UUID maybePropertyTypeId = edm.getPropertyTypeId(propertyType.getType().getNamespace(), propertyType.getType().getName());
org.junit.Assert.assertNotNull(maybePropertyTypeId);
... |
public java.util.List<com.isolutions4u.onlineshopping.model.Product> findProductByCategoryId(java.lang.Integer categoryId) {
java.util.List<com.isolutions4u.onlineshopping.model.Product> products = new java.util.ArrayList<>();
java.util.List<com.isolutions4u.onlineshopping.model.Product> productsCopy = new java... | public java.util.List<com.isolutions4u.onlineshopping.model.Product> findProductByCategoryId(java.lang.Integer categoryId) {
java.util.List<com.isolutions4u.onlineshopping.model.Product> products = new java.util.ArrayList<>();
java.util.List<com.isolutions4u.onlineshopping.model.Product> productsCopy = new java... |
protected com.google.common.base.Optional<java.util.Map<java.lang.String, java.util.Map<org.zanata.common.LocaleId, org.zanata.client.commands.PushPullCommand.TranslatedPercent>>> prepareStatsIfApplicable(boolean pullTarget, org.zanata.client.config.LocaleList locales) {
com.google.common.base.Optional<java.util.Ma... | protected com.google.common.base.Optional<java.util.Map<java.lang.String, java.util.Map<org.zanata.common.LocaleId, org.zanata.client.commands.PushPullCommand.TranslatedPercent>>> prepareStatsIfApplicable(boolean pullTarget, org.zanata.client.config.LocaleList locales) {
com.google.common.base.Optional<java.util.Ma... |
protected void onHandleIntent(android.content.Intent intent) {
android.util.Log.d(com.ishan1608.googlefittest.GoogleFitService.TAG, "onHandleIntent called");
if (intent != null) {
final java.lang.String action = intent.getAction();
switch (action) {
case com.ishan1608.googlefittest.G... | protected void onHandleIntent(android.content.Intent intent) {
android.util.Log.d(com.ishan1608.googlefittest.GoogleFitService.TAG, "onHandleIntent called");
if (intent != null) {
final java.lang.String action = intent.getAction();
if (action != null) {
switch (action) {
... |
public ReturnObject add(java.lang.Object item) {
ReturnObject ro;
if (item == null) {
ro = new ReturnObjectImpl(ErrorMessage.INVALID_ARGUMENT);
}else
if ((this.next) == null) {
(this.size)++;
this.next = new LinkedList(item);
ro = new ReturnObjectImpl(item... | public ReturnObject add(java.lang.Object item) {
ReturnObject ro;
if (item == null) {
return new ReturnObjectImpl(ErrorMessage.INVALID_ARGUMENT);
}else
if ((this.next) == null) {
(this.size)++;
this.next = new LinkedList(item);
ro = new ReturnObjectImpl(it... |
public java.lang.String setPupilShape(com.base.game.character.GameCharacter owner, com.base.game.character.body.valueEnums.EyeShape pupilShape) {
if ((owner.getPupilShape()) == pupilShape) {
return "<p style='text-align:center;'>[style.colourDisabled(Nothing happens...)]</p>";
}
this.pupilShape = pu... | public java.lang.String setPupilShape(com.base.game.character.GameCharacter owner, com.base.game.character.body.valueEnums.EyeShape pupilShape) {
if ((owner.getPupilShape()) == pupilShape) {
return "<p style='text-align:center;'>[style.colourDisabled(Nothing happens...)]</p>";
}
this.pupilShape = pu... |
public void addLast(Item item) {
if (item == null)
throw new java.lang.NullPointerException();
Deque<Item>.Node oldLast = last;
last.item = item;
last.next = null;
last.preview = oldLast;
if (oldLast != null)
oldLast.next = last;
if ((n) == 0)
first = last;
... | public void addLast(Item item) {
if (item == null)
throw new java.lang.NullPointerException();
Deque<Item>.Node oldLast = last;
last = new Node();
last.item = item;
last.next = null;
last.preview = oldLast;
if (oldLast != null)
oldLast.next = last;
if ((n) == 0)... |
public void mouseDragged(java.awt.event.MouseEvent e) {
currNode.setX(((e.getX()) - ((currNode.getDiameter()) / 2)));
currNode.setY(((e.getY()) - ((currNode.getDiameter()) / 2)));
} | public void mouseDragged(java.awt.event.MouseEvent e) {
if ((currNode) != null) {
currNode.setX(((e.getX()) - ((currNode.getDiameter()) / 2)));
currNode.setY(((e.getY()) - ((currNode.getDiameter()) / 2)));
}
} |
public boolean equals(java.lang.Object obj) {
if ((this) == obj)
return true;
if (obj == null)
return false;
if ((getClass()) != (obj.getClass()))
return false;
org.uibk.iis.robotprojectapp.OdometryManager.Position other = ((org.uibk.iis.robotprojectapp.OdometryMan... | public boolean equals(java.lang.Object obj) {
if ((this) == obj)
return true;
if (obj == null)
return false;
if ((getClass()) != (obj.getClass()))
return false;
org.uibk.iis.robotprojectapp.OdometryManager.Position other = ((org.uibk.iis.robotprojectapp.OdometryMan... |
private org.apache.activemq.artemis.core.persistence.StorageManager createStorageManager() {
if (configuration.isPersistenceEnabled()) {
if (((configuration.getStoreConfiguration()) != null) && ((configuration.getStoreConfiguration().getStoreType()) == (StoreConfiguration.StoreType.DATABASE))) {
... | protected org.apache.activemq.artemis.core.persistence.StorageManager createStorageManager() {
if (configuration.isPersistenceEnabled()) {
if (((configuration.getStoreConfiguration()) != null) && ((configuration.getStoreConfiguration().getStoreType()) == (StoreConfiguration.StoreType.DATABASE))) {
... |
public com.rachit.bookstore.service.book.entity.Book createBook(@org.springframework.web.bind.annotation.RequestBody
com.rachit.bookstore.service.book.entity.Book book) {
com.rachit.bookstore.service.book.entity.Book b = repository.findByTitle(book.getTitle());
if (b != null) {
throw new java.lang.Runti... | public com.rachit.bookstore.service.book.entity.Book createBook(@org.springframework.web.bind.annotation.RequestBody
com.rachit.bookstore.service.book.entity.Book book) {
com.rachit.bookstore.service.book.entity.Book b = repository.findByTitle(book.getTitle());
if ((b != null) && ((book.getId()) == null)) {
... |
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
initLayouts();
populateAutoComplete();
mEmailSignInButton.setOnClickListener(new android.view.View.OnClickListener() {
@java.lang.Override
publ... | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
initLayouts();
mEmailSignInButton.setOnClickListener(new android.view.View.OnClickListener() {
@java.lang.Override
public void onClick(android.view... |
private void init(android.util.AttributeSet attrs, int defStyleAttr, int defStyleRes) {
setBackgroundColor(android.graphics.Color.parseColor("#efefef"));
setOrientation(la.juju.android.ftil.widgets.VERTICAL);
android.view.View.inflate(getContext(), R.layout.layout_face_text_input, this);
mViewPager = ((... | private void init(android.util.AttributeSet attrs, int defStyleAttr, int defStyleRes) {
setBackgroundColor(android.graphics.Color.parseColor("#efefef"));
setOrientation(la.juju.android.ftil.widgets.VERTICAL);
android.view.View.inflate(getContext(), R.layout.layout_face_text_input, this);
mViewPager = ((... |
public static boolean uploadFile(java.util.List<java.io.File> fileList) throws java.io.IOException {
com.mmall.util.FTPutil ftputil = new com.mmall.util.FTPutil(com.mmall.util.FTPutil.ftpIp, 21, com.mmall.util.FTPutil.ftpUser, com.mmall.util.FTPutil.ftpPass);
java.lang.System.out.println(com.mmall.util.FTPutil.... | public static boolean uploadFile(java.util.List<java.io.File> fileList) throws java.io.IOException {
com.mmall.util.FTPutil ftputil = new com.mmall.util.FTPutil(com.mmall.util.FTPutil.ftpIp, 21, com.mmall.util.FTPutil.ftpUser, com.mmall.util.FTPutil.ftpPass);
com.mmall.util.FTPutil.logger.info("开始连接FTP服务器");
... |
public void initState(dna_epigenetics.LAMMPSIO lammps) {
for (int i = 0; i < (n); i++) {
int s = (lammps.getAtomType(i)) - 1;
dna[i] = s;
(numInState[s])++;
java.lang.System.out.printf("%d ", s);
}
java.lang.System.out.printf("\n");
} | public void initState(dna_epigenetics.LAMMPSIO lammps) {
for (int i = 0; i < (n); i++) {
int s = (lammps.getAtomType(i)) - 1;
dna[i] = s;
(numInState[s])++;
}
} |
public boolean canMoveTo(int x, int y) {
java.lang.System.out.println("ROOK::CANMOVETO()");
if (((super.canMoveTo(x, y)) == true) && ((rookMove(x, y)) == true)) {
return true;
}
java.lang.System.out.println(("Super:Can move to " + (super.canMoveTo(x, y))));
return false;
} | public boolean canMoveTo(int x, int y) {
if (((super.canMoveTo(x, y)) == true) && ((rookMove(x, y)) == true)) {
return true;
}else {
return false;
}
} |
private void drawPolyLines() {
if ((this.mousePositionOnMap.size()) > 1) {
final gov.nasa.worldwind.render.Polyline polyline = new gov.nasa.worldwind.render.Polyline(this.mousePositionOnMap);
polyline.setColor(java.awt.Color.RED);
polyline.setLineWidth(2);
layer.addRenderable(polylin... | private void drawPolyLines() {
synchronized(this.mousePositionOnMap) {
if ((this.mousePositionOnMap.size()) > 1) {
final gov.nasa.worldwind.render.Polyline polyline = new gov.nasa.worldwind.render.Polyline(this.mousePositionOnMap);
polyline.setColor(java.awt.Color.RED);
p... |
private void emitChangeDate(int level, org.gedcom4j.writer.ChangeDate cd) throws org.gedcom4j.writer.GedcomWriterException {
if (cd != null) {
emitTag(level, "CHAN");
emitTagWithRequiredValue((level + 1), "DATE", cd.date);
emitTagIfValueNotNull((level + 2), "TIME", cd.time);
emitNote... | private void emitChangeDate(int level, org.gedcom4j.writer.ChangeDate cd) throws org.gedcom4j.writer.GedcomWriterException {
if (cd != null) {
emitTag(level, "CHAN");
emitTagWithRequiredValue((level + 1), "DATE", cd.date);
emitTagIfValueNotNull((level + 2), "TIME", cd.time);
emitNote... |
public void onLocationChanged(android.location.Location location) {
lastLocation = location;
if ((org.redcross.openmapkit.LocationXMLParser.getProximityCheck()) == true) {
if ((location.getAccuracy()) <= (org.redcross.openmapkit.LocationXMLParser.getGpsProximityAccuracy())) {
if ((org.redcro... | public void onLocationChanged(android.location.Location location) {
lastLocation = location;
if (org.redcross.openmapkit.LocationXMLParser.getProximityCheck()) {
if ((location.getAccuracy()) <= (org.redcross.openmapkit.LocationXMLParser.getGpsProximityAccuracy())) {
if (!(org.redcross.openma... |
private static void checkCannon(java.lang.String input, java.lang.String output) {
com.himamis.retex.editor.share.model.MathFormula mf = null;
try {
mf = org.geogebra.io.latex.SerializeLaTeX.parser.parse(input);
java.lang.System.out.println(mf.getRootComponent());
} catch (org.geogebra.commo... | private static void checkCannon(java.lang.String input, java.lang.String output) {
com.himamis.retex.editor.share.model.MathFormula mf = null;
try {
mf = org.geogebra.io.latex.SerializeLaTeX.parser.parse(input);
} catch (org.geogebra.common.io.latex.ParseException e) {
org.junit.Assert.asser... |
public void afterInsert(db.NameValuePairs name_value_pairs, int row_id, db.Request request) {
if ((name_value_pairs.getBoolean("active")) && (name_value_pairs.getBoolean("calendar")))
addModule(name_value_pairs.getString("name"), java.lang.Integer.toString(row_id), request);
super.afterInsert(name_... | public void afterInsert(db.NameValuePairs name_value_pairs, int row_id, db.Request request) {
if ((name_value_pairs.getBoolean("active")) && (name_value_pairs.getBoolean("calendar")))
addModule(name_value_pairs.getString("name"), row_id, request);
super.afterInsert(name_value_pairs, row_id, request... |
private void rgbChangedInernal(eu.geekhome.asymptote.model.RGBValue rgbValue, java.util.ArrayList<eu.geekhome.asymptote.model.SyncUpdate> updates) {
eu.geekhome.asymptote.model.RGBSyncUpdate pwmUpdate = findRGBUpdate(rgbValue, updates);
if (pwmUpdate == null) {
updates.add(new eu.geekhome.asymptote.mode... | private void rgbChangedInernal(eu.geekhome.asymptote.model.RGBValue rgbValue, java.util.List<eu.geekhome.asymptote.model.SyncUpdate> updates) {
eu.geekhome.asymptote.model.RGBSyncUpdate pwmUpdate = findRGBUpdate(rgbValue, updates);
if (pwmUpdate == null) {
updates.add(new eu.geekhome.asymptote.model.RGB... |
private void processCancelCallMessage(org.wgs.wamp.WampSocket clientSocket, org.wgs.wamp.type.WampList request) throws java.lang.Exception {
java.lang.Long callID = request.getLong(1);
org.wgs.wamp.type.WampDict cancelOptions = ((org.wgs.wamp.type.WampDict) (request.get(2)));
org.wgs.wamp.rpc.WampCallContro... | private void processCancelCallMessage(org.wgs.wamp.WampSocket clientSocket, org.wgs.wamp.type.WampList request) throws java.lang.Exception {
java.lang.Long callID = request.getLong(1);
org.wgs.wamp.type.WampDict cancelOptions = ((org.wgs.wamp.type.WampDict) (request.get(2)));
org.wgs.wamp.rpc.WampCallContro... |
public boolean onCreateOptionsMenu(android.view.Menu menu) {
if (!(isP2P())) {
android.view.MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.main, menu);
}
selectedMenuItem = menu.findItem(R.id.action_meeting_room_hall);
selectedMenuItem.setEnabled(false);
return su... | public boolean onCreateOptionsMenu(android.view.Menu menu) {
if (!(isP2P())) {
android.view.MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.main, menu);
selectedMenuItem = menu.findItem(R.id.action_meeting_room_hall);
selectedMenuItem.setEnabled(false);
}
r... |
public com.week3.solution.geo.Geometry encapsulate(final com.week3.solution.geo.Geometry paramGeometry) {
if ((this.dimensions()) != (paramGeometry.dimensions())) {
return null;
}
if (!(paramGeometry instanceof com.week3.solution.geo.Point)) {
throw new java.lang.RuntimeException("Only two P... | public com.week3.solution.geo.Geometry encapsulate(final com.week3.solution.geo.Geometry paramGeometry) {
if ((this.dimensions()) != (paramGeometry.dimensions())) {
return null;
}
if (paramGeometry instanceof com.week3.solution.geo.Point) {
final com.week3.solution.geo.Point point = ((com.we... |
public void goToLinkedPage() {
org.wikipedia.history.HistoryEntry historyEntry = new org.wikipedia.history.HistoryEntry(pageTitle, org.wikipedia.history.HistoryEntry.SOURCE_INTERNAL_LINK);
navigateSuccess = true;
funnel.logNavigate();
getDialog().dismiss();
((org.wikipedia.page.PageActivity) (getAct... | public void goToLinkedPage() {
org.wikipedia.history.HistoryEntry historyEntry = new org.wikipedia.history.HistoryEntry(pageTitle, org.wikipedia.history.HistoryEntry.SOURCE_INTERNAL_LINK);
navigateSuccess = true;
funnel.logNavigate();
if ((getDialog()) != null) {
getDialog().dismiss();
}
... |
public void execute_add_successful() throws java.lang.Exception {
seedu.typed.logic.LogicManagerTest.TestDataHelper helper = new seedu.typed.logic.LogicManagerTest.TestDataHelper();
seedu.typed.model.task.Task toBeAdded = helper.adam();
seedu.typed.model.TaskManager expectedTM = new seedu.typed.model.TaskMa... | public void execute_add_successful() throws java.lang.Exception {
seedu.typed.logic.LogicManagerTest.TestDataHelper helper = new seedu.typed.logic.LogicManagerTest.TestDataHelper();
seedu.typed.model.task.Task toBeAdded = helper.adam();
seedu.typed.model.TaskManager expectedTM = new seedu.typed.model.TaskMa... |
private void initCookie(final javax.servlet.http.Cookie cookie, final javax.servlet.http.HttpServletRequest req) {
final java.lang.String context = req.getContextPath();
cookie.setPath((null == context ? "/" : context));
if ((maxAge) != null) {
cookie.setMaxAge(java.lang.Integer.parseInt(maxAge));
... | private void initCookie(final javax.servlet.http.Cookie cookie, final javax.servlet.http.HttpServletRequest req) {
final java.lang.String context = req.getContextPath();
cookie.setPath((context.isEmpty() ? "/" : context));
if ((maxAge) != null) {
cookie.setMaxAge(java.lang.Integer.parseInt(maxAge));... |
public void removeDriver(long driverId) throws java.sql.SQLException {
dataManager.removeAttribute(driverId);
if (drivers.containsKey(driverId)) {
java.lang.String driverUniqueId = drivers.get(driverId).getUniqueId();
drivers.remove(driverId);
driversByUniqueId.remove(driverUniqueId);
... | public void removeDriver(long driverId) throws java.sql.SQLException {
dataManager.removeDriver(driverId);
if (drivers.containsKey(driverId)) {
java.lang.String driverUniqueId = drivers.get(driverId).getUniqueId();
drivers.remove(driverId);
driversByUniqueId.remove(driverUniqueId);
}... |
private boolean channelIsOutputChannel(java.lang.String id) {
switch (id) {
case CHANNEL_GENERAL_DIMM :
case CHANNEL_GENERAL_SWITCH :
case CHANNEL_GENERAL_SHADE :
case CHANNEL_BRIGHTNESS :
case CHANNEL_LIGHT_SWITCH :
case CHANNEL_SHADE :
case CHANNEL_GENERAL_C... | private boolean channelIsOutputChannel(java.lang.String id) {
switch (id) {
case CHANNEL_GENERAL_DIMM :
case CHANNEL_GENERAL_SWITCH :
case CHANNEL_BRIGHTNESS :
case CHANNEL_LIGHT_SWITCH :
case CHANNEL_SHADE :
case CHANNEL_GENERAL_COMBINED_2_STAGE_SWITCH :
case... |
public int sectionedPositionToPosition(int sectionedPosition) {
if (isSectionHeaderPosition(sectionedPosition)) {
return android.support.v7.widget.RecyclerView.NO_POSITION;
}
int offset = 0;
for (int i = 0; i < (mSections.size()); i++) {
if ((mSections.valueAt(i).firstPosition) > section... | public int sectionedPositionToPosition(int sectionedPosition) {
if (isSectionHeaderPosition(sectionedPosition)) {
return android.support.v7.widget.RecyclerView.NO_POSITION;
}
int offset = 0;
for (int i = 0; i < (mSections.size()); i++) {
if ((mSections.valueAt(i).sectionedPosition) > sec... |
public boolean isMinify() {
java.lang.String minifyString = ((java.lang.String) (this.container.getRequest().getProperty("minify")));
if (minifyString == null) {
return java.lang.Boolean.valueOf(minifyString);
}
return this.properties.getProperty("debug.minify", true);
} | public boolean isMinify() {
java.lang.String minifyString = ((java.lang.String) (this.container.getRequest().getProperty("minify")));
if (minifyString != null) {
return java.lang.Boolean.valueOf(minifyString);
}
return this.properties.getProperty("debug.minify", true);
} |
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
rvSong = ((android.support.v7.widget.RecyclerView) (findViewById(R.id.rView)));
rvSong.setLayoutManager(new android.support.v7.widget.LinearLayoutManager(this));
... | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
rvSong = ((android.support.v7.widget.RecyclerView) (findViewById(R.id.rView)));
rvSong.setLayoutManager(new android.support.v7.widget.LinearLayoutManager(this));
... |
public java.lang.String getConditionsAsString() {
java.lang.StringBuilder result = new java.lang.StringBuilder();
for (pt.uc.dei.nobugssnackbar.model.mission.Condition c : conditions) {
result.append(c.getConditionString());
result.append(" ");
}
conditionsAsString = result.toString().tr... | public java.lang.String getConditionsAsString() {
java.lang.StringBuilder result = new java.lang.StringBuilder();
for (pt.uc.dei.nobugssnackbar.model.mission.Condition c : conditions) {
result.append(c.getConditionString());
result.append(" ");
}
if ((result.length()) > 0)
condit... |
public void processPacket(org.jivesoftware.smack.packet.Stanza packet) {
org.jivesoftware.smack.packet.Message message = ((org.jivesoftware.smack.packet.Message) (packet));
org.jivesoftware.smack.chat.Chat chat;
if ((message.getThread()) == null) {
chat = getUserChat(message.getFrom());
}else {
... | public void processPacket(org.jivesoftware.smack.packet.Stanza packet) {
org.jivesoftware.smack.packet.Message message = ((org.jivesoftware.smack.packet.Message) (packet));
org.jivesoftware.smack.chat.Chat chat = null;
if ((message.getThread()) != null) {
chat = getThreadChat(message.getThread());
... |
private <T> void pA(T[] a) {
java.lang.String out = "{" + (a[0]);
for (int i = 1; i < (a.length); i++) {
out += ", " + (a[i]);
}
out += "}";
java.lang.System.out.println(out);
} | private <T> java.lang.String pA(java.util.List<T> a) {
java.lang.String out = "{" + (a.get(0));
for (int i = 1; i < (a.size()); i++) {
out += ", " + (a.get(i));
}
out += "}";
return out;
} |
public Coordinate findSoda(Soda soda) {
for (short ctZ = 0; ctZ < 2; ctZ++)
for (short ctY = 0; ctY < (COLUMNS); ctY++)
for (short ctX = 0; ctX < (ROWS); ctX++)
if ((inv[ctX][ctY][ctZ]) == soda)
return new Coordinate(ctX, ctY, ctZ);
... | public Coordinate findSoda(Soda soda) {
for (short ctZ = 0; ctZ < 2; ctZ++)
for (short ctY = 0; ctY < (ROWS); ctY++)
for (short ctX = 0; ctX < (COLUMNS); ctX++)
if ((inv[ctX][ctY][ctZ]) == soda)
return new Coordinate(ctX, ctY, ctZ);
... |
public void fusionContent(Bdd.Bdd.content cont) {
for (int i = 0; i < (CircularCounter.imax); i++) {
for (int w1 = 0; w1 < 4; w1++) {
for (int w2 = 0; w2 < 4; w2++) {
oiw1w2[i][w1][w2] += cont.oiw1w2[i][w1][w2];
}
}
}
nb_CDS += cont.nb_CDS;
nb_CDS_... | public void fusionContent(Bdd.Bdd.content cont) {
for (int i = 0; i <= (CircularCounter.imax); i++) {
for (int w1 = 0; w1 < 4; w1++) {
for (int w2 = 0; w2 < 4; w2++) {
oiw1w2[i][w1][w2] += cont.oiw1w2[i][w1][w2];
}
}
}
nb_CDS += cont.nb_CDS;
nb_CDS... |
public void onPresenterRequest(cbstudios.coffeebreak.eventbus.RequestPresenterEvent event) {
if ((event.view) == (mContext)) {
java.lang.System.out.println("Request Recieved");
cbstudios.coffeebreak.controller.IPresenter mainPresenter = factory.createMainPresenter(((cbstudios.coffeebreak.view.activi... | public void onPresenterRequest(cbstudios.coffeebreak.eventbus.RequestPresenterEvent event) {
if ((event.view) == (mContext)) {
java.lang.System.out.println("Request Recieved");
cbstudios.coffeebreak.controller.IPresenter mainPresenter = factory.createMainPresenter(((cbstudios.coffeebreak.view.activi... |
public boolean onOptionsItemSelected(android.view.MenuItem item) {
int id = item.getItemId();
android.util.Log.v(LOG_TAG, "\nonOptionsItemSelected\n");
if (id == (R.id.action_settings)) {
return true;
}
if (id == (R.id.choose_location)) {
android.content.Intent intent = new android.c... | public boolean onOptionsItemSelected(android.view.MenuItem item) {
int id = item.getItemId();
android.util.Log.v(LOG_TAG, "\nonOptionsItemSelected\n");
if (id == (R.id.choose_location)) {
android.content.Intent intent = new android.content.Intent(this, ranathome.mapshow.MapActivity.class);
i... |
public com.SIMRacingApps.Data getVolume() {
double volume = 0.0;
synchronized(m_clips) {
if ((m_clips.size()) > 0)
volume = m_clips.get(0).getVolume();
}
return new com.SIMRacingApps.Data("", (volume * 100.0), "%", Data.State.NORMAL);
} | public com.SIMRacingApps.Data getVolume() {
double volume = 0.0;
synchronized(m_clips) {
if ((m_clips.size()) > 0)
volume = m_clips.get(0).getVolume();
}
return new com.SIMRacingApps.Data("", volume, "%", Data.State.NORMAL);
} |
private void onBreakpointActivated(org.eclipse.che.api.debug.shared.dto.LocationDto locationDto) {
for (org.eclipse.che.ide.debug.DebuggerObserver observer : observers) {
java.lang.String filePath = fqnToPath(locationDto);
if (filePath != null) {
observer.onBreakpointActivated(fqnToPath(... | private void onBreakpointActivated(org.eclipse.che.api.debug.shared.dto.LocationDto locationDto) {
for (org.eclipse.che.ide.debug.DebuggerObserver observer : observers) {
java.lang.String filePath = fqnToPath(locationDto);
if (filePath != null) {
observer.onBreakpointActivated(filePath, ... |
public static void write(java.lang.String text, java.io.File file) {
java.io.FileWriter fileWriter = null;
try {
fileWriter = new java.io.FileWriter(file, true);
fileWriter.write(text);
fileWriter.close();
} catch (java.io.IOException ex) {
java.util.logging.Logger.getLogger(... | public static void write(java.lang.String text, java.io.File file) {
java.io.FileWriter fileWriter = null;
try {
fileWriter = new java.io.FileWriter(file, false);
fileWriter.write(text);
fileWriter.close();
} catch (java.io.IOException ex) {
java.util.logging.Logger.getLogger... |
private void configureRetweetsForTweet(com.codepath.apps.squawker.Models.Tweet tweet) {
com.codepath.apps.squawker.UserStorage userStorage = new com.codepath.apps.squawker.UserStorage(getApplicationContext());
if ((userStorage.getUserId()) == (tweet.getUser().getuId())) {
ibDetailRetweet.setEnabled(fals... | private void configureRetweetsForTweet(com.codepath.apps.squawker.Models.Tweet tweet) {
com.codepath.apps.squawker.UserStorage userStorage = new com.codepath.apps.squawker.UserStorage(getApplicationContext());
if ((userStorage.getUserId()) == (tweet.getUser().getuId())) {
ibDetailRetweet.setEnabled(fals... |
public void markFix() {
for (int r = 0; r < (com.example.yabinc.sudogame.GameModel.BOARD_ROWS); ++r) {
for (int c = 0; c < (com.example.yabinc.sudogame.GameModel.BOARD_COLS); ++c) {
if ((mBoard[r][c].isUserInput) && (mBoard[r][c].isFilled)) {
if (!(mBoard[r][c].isConflictWithOthe... | public void markFix() {
for (int r = 0; r < (com.example.yabinc.sudogame.GameModel.BOARD_ROWS); ++r) {
for (int c = 0; c < (com.example.yabinc.sudogame.GameModel.BOARD_COLS); ++c) {
if (mBoard[r][c].isUserInput) {
if (!(mBoard[r][c].isConflictWithOthers)) {
mB... |
public com.tetris.saar.tetris.Blocks moveRight(com.tetris.saar.tetris.Blocks block, int[][] board) {
com.tetris.saar.tetris.Blocks temp = block.getNextBlock();
temp.setPlace(((block.getPlace()[0]) + 1), block.getPlace()[1]);
setEmptySpaceBlockPos(temp, board);
return temp;
} | public com.tetris.saar.tetris.Blocks moveRight(com.tetris.saar.tetris.Blocks block, int[][] board) {
com.tetris.saar.tetris.Blocks temp = block.getNextBlock();
temp.setPlace(block.getPlace()[0], block.getPlace()[1]);
setEmptySpaceBlockPos(temp, board);
return temp;
} |
public void onDataChange(com.google.firebase.database.DataSnapshot dataSnapshot) {
java.lang.String statusText = ("Successfully retrieved " + (dataSnapshot.getChildrenCount())) + " references to my lists.";
statusTextView.setText(statusText);
android.util.Log.d(getClass().getName(), statusText);
findVie... | public void onDataChange(com.google.firebase.database.DataSnapshot dataSnapshot) {
java.lang.String statusText = ("Successfully retrieved " + (dataSnapshot.getChildrenCount())) + " references to my lists.";
statusTextView.setText(statusText);
android.util.Log.d(getClass().getName(), statusText);
findVie... |
public gov.healthit.chpl.auth.user.UserImpl getByName(java.lang.String uname) throws gov.healthit.chpl.auth.user.UserRetrievalException {
gov.healthit.chpl.auth.user.UserImpl user = null;
javax.persistence.Query query = entityManager.createQuery("from UserImpl where user_name = :uname", gov.healthit.chpl.auth.u... | public gov.healthit.chpl.auth.user.UserImpl getByName(java.lang.String uname) throws gov.healthit.chpl.auth.user.UserRetrievalException {
gov.healthit.chpl.auth.user.UserImpl user = null;
javax.persistence.Query query = entityManager.createQuery("from UserImpl where user_name = :uname", gov.healthit.chpl.auth.u... |
public void removeAllChildUI() {
if ((mChildUIMap.size()) > 0) {
java.util.Collection<com.android.pigknight.UI> children = mChildUIMap.values();
for (com.android.pigknight.UI child : children) {
if ((child != null) && (child instanceof com.android.pigknight.UI)) {
child.d... | public void removeAllChildUI() {
if ((mChildUIMap.size()) > 0) {
java.util.Collection<com.android.pigknight.UI> children = mChildUIMap.values();
for (com.android.pigknight.UI child : children) {
if ((child != null) && (child instanceof com.android.pigknight.UI)) {
child.d... |
private void scheduleReducer(java.util.ArrayList<java.util.HashMap<java.lang.String, java.util.ArrayList<java.lang.String>>> listSmallerHashmaps) throws java.io.IOException {
boolean isCompleted = false;
while (!isCompleted) {
if (!(listSmallerHashmaps.isEmpty())) {
allocateReduceTask(listSm... | private void scheduleReducer(java.util.ArrayList<java.util.HashMap<java.lang.String, java.util.ArrayList<java.lang.String>>> listSmallerHashmaps) throws java.io.IOException {
boolean isCompleted = false;
while (!isCompleted) {
if (!(listSmallerHashmaps.isEmpty())) {
allocateReduceTask(listSm... |
public void modify(io.github.xeyez.domain.BoardVO vo) throws java.lang.Exception {
dao.update(vo);
long bno = vo.getBno();
dao.deleteAllAttach(bno);
java.lang.String[] files = vo.getFiles();
if (files != null) {
for (java.lang.String fullName : files) {
dao.replaceAttach(fullName... | public void modify(io.github.xeyez.domain.BoardVO vo) throws java.lang.Exception {
dao.update(vo);
long bno = vo.getBno();
dao.deleteAllAttach(bno);
java.lang.String[] files = vo.getFiles();
if (files != null) {
for (java.lang.String fullName : files) {
dao.replaceAttach(fullName... |
public void registerReadyEvent(com.kaltura.playersdk.PlayerViewController.ReadyEventListener listener) {
if (mIsJsCallReadyRegistration) {
listener.handler();
}else {
if (((mCallBackReadyRegistrations) == null) && (listener != null)) {
mCallBackReadyRegistrations = new java.util.Arra... | public void registerReadyEvent(com.kaltura.playersdk.PlayerViewController.ReadyEventListener listener) {
if (mIsJsCallReadyRegistration) {
listener.handler();
}else {
if (((mCallBackReadyRegistrations) == null) && (listener != null)) {
mCallBackReadyRegistrations = new java.util.Arra... |
public void reactivateMutedUsers() throws java.lang.Exception {
za.org.grassroot.messaging.service.mqtt.GroupChatServiceImpl.logger.info("Reactivating muted group users ...");
java.util.List<za.org.grassroot.core.domain.GroupChatSettings> groupChatSettingses = groupChatSettingsRepository.findByActiveFalseAndUse... | public void reactivateMutedUsers() {
za.org.grassroot.messaging.service.mqtt.GroupChatServiceImpl.logger.info("Reactivating muted group users ...");
java.util.List<za.org.grassroot.core.domain.GroupChatSettings> groupChatSettingses = groupChatSettingsRepository.findByActiveFalseAndUserInitiatedFalseAndReactivat... |
public void decreaseQty(int quantity, int decrease, java.lang.String name) {
quantity = quantity - decrease;
if (quantity >= 0) {
android.database.sqlite.SQLiteDatabase db = this.getWritableDatabase();
android.content.ContentValues values = new android.content.ContentValues();
values.put... | public int decreaseQty(int quantity, int decrease, java.lang.String name) {
if ((quantity - decrease) >= 0) {
quantity = quantity - decrease;
android.database.sqlite.SQLiteDatabase db = this.getWritableDatabase();
android.content.ContentValues values = new android.content.ContentValues();
... |
public void run() {
lock.lock();
if (runningTask.isCancelled()) {
return ;
}
try {
this.runOneIteration();
} catch (java.lang.Throwable t) {
try {
shutDown();
} catch (java.lang.Exception ignored) {
com.google.common.util.concurrent.AbstractSch... | public void run() {
lock.lock();
try {
if (runningTask.isCancelled()) {
return ;
}
this.runOneIteration();
} catch (java.lang.Throwable t) {
try {
shutDown();
} catch (java.lang.Exception ignored) {
com.google.common.util.concurrent... |
public void testClickNhifButton() throws java.lang.InterruptedException {
driver = generic.LoginGeneral.callClerkLoginAction();
java.lang.Thread.sleep(2000);
java.lang.System.out.println("about to click the ID Cards link\n");
pages.MenuBarToggle clicknid = org.openqa.selenium.support.PageFactory.initEle... | public void testClickNhifButton() throws java.lang.InterruptedException {
driver = generic.LoginGeneral.callClerkLoginAction();
java.lang.Thread.sleep(2000);
java.lang.System.out.println("about to click the ID Cards link\n");
pages.MenuBarToggle clicknid = org.openqa.selenium.support.PageFactory.initEle... |
public void testfindAllConstructor() throws java.io.IOException, org.eclipse.core.runtime.CoreException {
org.eclipse.core.resources.IProject project = org.springsource.ide.eclipse.commons.tests.util.StsTestUtil.createPredefinedProject("validation", "org.springframework.ide.eclipse.beans.core.tests");
org.eclip... | public void testfindAllConstructor() throws java.io.IOException, org.eclipse.core.runtime.CoreException {
project = org.springsource.ide.eclipse.commons.tests.util.StsTestUtil.createPredefinedProject("validation", "org.springframework.ide.eclipse.beans.core.tests");
org.eclipse.jdt.core.IType foo = org.springfr... |
private static java.lang.String findLevelName(int level) {
java.util.TreeSet<java.lang.Integer> allLevels = new java.util.TreeSet<java.lang.Integer>(com.baalam.mobile.exercisebooster.util.UserLevel.levelsNames.keySet());
for (java.lang.Integer iLevel : allLevels) {
if (level <= iLevel)
retur... | private static java.lang.String findLevelName(int level) {
java.util.List<java.lang.Integer> allLevels = new java.util.ArrayList<java.lang.Integer>(com.baalam.mobile.exercisebooster.util.UserLevel.levelsNames.keySet());
java.util.Collections.sort(allLevels);
for (java.lang.Integer iLevel : allLevels) {
... |
public static double getTotalDueForCurrentStatus(java.util.Set<com.propmgr.resource.UnitPaymentScheduleResource> scheduleList, double bookingAmount, com.propmgr.dao.Unitbooking unitbooking, int currentStatus) {
double totalDueForCurrentStatus = bookingAmount;
for (com.propmgr.resource.UnitPaymentScheduleResourc... | public static double getTotalDueForCurrentStatus(java.util.Set<com.propmgr.resource.UnitPaymentScheduleResource> scheduleList, double bookingAmount, com.propmgr.dao.Unitbooking unitbooking, int currentStatus) {
double totalDueForCurrentStatus = 0;
for (com.propmgr.resource.UnitPaymentScheduleResource paymentSch... |
public static int getGradleLevel(int num) {
int result = 1;
com.semc.aqi.model.GradeInfo gradeInfo = com.semc.aqi.config.Global.getGradeInfo();
for (int i = 0; i < (gradeInfo.size()); i++) {
if (num < (gradeInfo.get(i).getAQIMax())) {
result = i + 1;
break;
}else {
... | public static int getGradleLevel(int num) {
int result = 1;
com.semc.aqi.model.GradeInfo gradeInfo = com.semc.aqi.config.Global.getGradeInfo();
for (int i = 0; i < (gradeInfo.size()); i++) {
if (num <= (gradeInfo.get(i).getAQIMax())) {
result = i + 1;
break;
}else {
... |
public void test() {
org.junit.Assert.assertTrue(verifyPreorder(new int[]{ 4 , 1 , 3 , 2 , 9 , 6 , 5 , 8 , 7 , 10 , 11 }));
org.junit.Assert.assertFalse(verifyPreorder(new int[]{ 4 , 5 , 3 , 2 , 9 , 6 , 1 , 8 , 7 , 10 , 11 }));
} | public void test() {
org.junit.Assert.assertTrue(verifyPreorder(new int[]{ 4 , 2 , 3 , 6 , 5 }));
org.junit.Assert.assertFalse(verifyPreorder(new int[]{ 4 , 2 , 6 , 5 , 3 }));
org.junit.Assert.assertFalse(verifyPreorder(new int[]{ 4 , 5 , 3 , 2 , 9 , 6 , 1 , 8 , 7 , 10 , 11 }));
} |
private void validateRange(org.terasology.math.IntegerRange range, java.lang.Integer... numbers) {
java.util.Iterator<java.lang.Integer> iterator = range.createIterator();
for (java.lang.Integer number : numbers) {
org.junit.Assert.assertTrue(iterator.hasNext());
org.junit.Assert.assertEquals(nu... | private void validateRange(org.terasology.math.IntegerRange range, java.lang.Integer... numbers) {
java.util.Iterator<java.lang.Integer> iterator = range.iterator();
for (java.lang.Integer number : numbers) {
org.junit.Assert.assertTrue(iterator.hasNext());
org.junit.Assert.assertEquals(number, ... |
public void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.other_sound_settings);
mContext = getActivity();
for (com.android.settings.notification.SettingPref pref : com.android.settings.notification.OtherSoundSettings.PREFS) {
... | public void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.other_sound_settings);
mContext = getActivity();
for (com.android.settings.notification.SettingPref pref : com.android.settings.notification.OtherSoundSettings.PREFS) {
... |
public void insertFreeListEntry(bufmgr.Pair entry) throws bufmgr.LIRSFailureException {
bufmgr.LIRS.LIRS_Pair tempEntry = new bufmgr.LIRS.LIRS_Pair(entry);
java.lang.Boolean status = candidateList.remove(tempEntry);
status &= freeList.add(entry);
if (!status)
throw new bufmgr.LIRSFailureExceptio... | public void insertFreeListEntry(bufmgr.Pair entry) throws bufmgr.LIRSFailureException {
bufmgr.LIRS.LIRS_Pair tempEntry = new bufmgr.LIRS.LIRS_Pair(entry);
candidateList.remove(tempEntry);
java.lang.Boolean status = freeList.add(entry);
if (!status)
throw new bufmgr.LIRSFailureException(null, "L... |
public int getBlockDataAt(int x, int y, int z) {
return this.getChunk((x >> 4), (z >> 4), true).getBlockData((x & 15), (y & 255), (z & 15));
} | public int getBlockDataAt(int x, int y, int z) {
return this.getChunk((x >> 4), (z >> 4), true).getBlockData((x & 15), y, (z & 15));
} |
private java.util.Optional<org.synyx.urlaubsverwaltung.restapi.availability.TimedAbsence> checkForFreeTime(org.joda.time.DateMidnight currentDay, org.synyx.urlaubsverwaltung.core.person.Person person) {
org.synyx.urlaubsverwaltung.core.period.DayLength expectedWorktime = getExpectedWorktimeFor(person, currentDay);
... | private java.util.Optional<org.synyx.urlaubsverwaltung.restapi.availability.TimedAbsence> checkForFreeTime(org.joda.time.DateMidnight currentDay, org.synyx.urlaubsverwaltung.core.person.Person person) {
org.synyx.urlaubsverwaltung.core.period.DayLength expectedWorktime = getExpectedWorktimeFor(person, currentDay);
... |
public void configuresMultipleCuriesWithDefaultCorrectly() {
org.springframework.hateoas.hal.DefaultCurieProvider provider = new org.springframework.hateoas.hal.DefaultCurieProvider(org.springframework.hateoas.hal.DefaultCurieProviderUnitTest.getCuries(), "foo");
org.junit.Assert.assertThat(provider.getCurieInf... | public void configuresMultipleCuriesWithDefaultCorrectly() {
org.springframework.hateoas.hal.DefaultCurieProvider provider = new org.springframework.hateoas.hal.DefaultCurieProvider(org.springframework.hateoas.hal.DefaultCurieProviderUnitTest.getCuries(), "foo", null);
assertThat(provider.getCurieInformation(ne... |
private void addFromResource(scala.collection.Iterator<java.lang.String> sr) {
synchronized(this) {
java.lang.String inp = sr.next();
java.lang.String uri = inp.substring(0, inp.indexOf(" - "));
java.lang.String id = inp.substring(((inp.indexOf(" - ")) + 3));
map.put(uri, id);
}
... | private synchronized void addFromResource(scala.collection.Iterator<java.lang.String> sr) {
java.lang.String inp = sr.next();
java.lang.String uri = inp.substring(0, inp.indexOf(" - "));
java.lang.String id = inp.substring(((inp.indexOf(" - ")) + 3));
map.put(uri, id);
} |
public int findNearestPoint(float mid) {
int i;
int return_index = 0;
float diff;
if (mid >= (selectivity[((OfflinePB.resolution) - 1)]))
return (OfflinePB.resolution) - 1;
for (i = 0; i < (OfflinePB.resolution); i++) {
diff = mid - (selectivity[i]);
if (diff <= 0) {
... | public int findNearestPoint(float mid) {
int i;
int return_index = 0;
float diff;
if (mid >= (selectivity[((OfflinePB.resolution) - 1)]))
return (OfflinePB.resolution) - 1;
for (i = 0; i < (OfflinePB.resolution); i++) {
diff = mid - (selectivity[i]);
if (diff <= 0.0F) {
... |
public java.lang.String login(java.lang.String username, java.lang.String password, javax.servlet.http.HttpSession session) throws java.lang.Exception {
com.theironyard.User user = users.findByName(username);
if (user == null) {
user = new com.theironyard.User(username, com.theironyard.PasswordStorage.c... | public java.lang.String login(java.lang.String username, java.lang.String password, javax.servlet.http.HttpSession session) throws java.lang.Exception {
com.theironyard.User user = users.findByName(username);
if (user == null) {
user = new com.theironyard.User(username, com.theironyard.PasswordStorage.c... |
public void calcular() {
int res;
for (int i = 0; i < (n.length); i++) {
res = Truncar(n[i], n.length);
suit.acomodar(n[i], res);
java.lang.System.out.println(((("id: " + res) + " valor: ") + (n[i])));
}
} | public void calcular() {
int res;
for (int i = 0; i < (n.length); i++) {
res = Truncar(n[i]);
suit.acomodar(n[i], res);
java.lang.System.out.println(((("id: " + res) + " valor: ") + (n[i])));
}
} |
public com.Vshkole.fragments.BookAdditionalInfoFragment getAdditInfoFragment(int index) {
com.Vshkole.entities.Entity currBook = (isBook) ? entity : opposite;
com.Vshkole.entities.Entity currAnswerBook = (isBook) ? opposite : entity;
if ((entity) == null)
return null;
return index == 0 ? cr... | public com.Vshkole.fragments.BookAdditionalInfoFragment getAdditInfoFragment(int index) {
com.Vshkole.entities.Entity currBook = (isBook) ? entity : opposite;
com.Vshkole.entities.Entity currAnswerBook = (isBook) ? opposite : entity;
if ((entity) == null)
return null;
if ((index == 0) && (c... |
public static final void error() throws wci.frontend.ParseException {
wci.frontend.TypeScriptParser.trace_call("error");
try {
wci.frontend.ASTerror jjtn000 = new wci.frontend.ASTerror(JJTERROR);
boolean jjtc000 = true;
wci.frontend.TypeScriptParser.jjtree.openNodeScope(jjtn000);
... | public static final void error() throws wci.frontend.ParseException {
wci.frontend.ASTerror jjtn000 = new wci.frontend.ASTerror(JJTERROR);
boolean jjtc000 = true;
wci.frontend.TypeScriptParser.jjtree.openNodeScope(jjtn000);
try {
wci.frontend.TypeScriptParser.jj_consume_token(wci.frontend.ERROR)... |
public void clear() {
while (!(poolBusy.compareAndSet(false, true)));
final java.util.concurrent.atomic.AtomicLong[] cts = new java.util.concurrent.atomic.AtomicLong[counters.length];
for (int i = 0; i < (counters.length); i++) {
cts[i] = new java.util.concurrent.atomic.AtomicLong();
}
count... | public void clear() {
while (!(poolBusy.compareAndSet(false, true)));
final java.util.concurrent.atomic.AtomicLong[] cts = new java.util.concurrent.atomic.AtomicLong[counters.length];
for (int i = 0; i < (counters.length); i++) {
cts[i] = new java.util.concurrent.atomic.AtomicLong();
}
count... |
public synchronized void allocate(com.cloudera.director.vsphere.compute.VSphereComputeInstanceTemplate template, java.util.Collection<java.lang.String> instanceIds, int minCount) throws java.lang.InterruptedException {
com.cloudera.director.spi.v1.model.LocalizationContext providerLocalizationContext = getLocalizat... | public synchronized void allocate(com.cloudera.director.vsphere.compute.VSphereComputeInstanceTemplate template, java.util.Collection<java.lang.String> instanceIds, int minCount) throws java.lang.InterruptedException {
com.cloudera.director.spi.v1.model.LocalizationContext providerLocalizationContext = getLocalizat... |
public void onResult(com.google.android.gms.nearby.connection.Connections.StartAdvertisingResult result) {
if (result.getStatus().isSuccess()) {
android.util.Log.i(name.chadschultz.nearbyapidemo.MainActivity.TAG, "Successfully advertising");
showMessage("Successfully advertising");
changeCur... | public void onResult(@android.support.annotation.NonNull
com.google.android.gms.nearby.connection.Connections.StartAdvertisingResult result) {
if (result.getStatus().isSuccess()) {
android.util.Log.i(name.chadschultz.nearbyapidemo.MainActivity.TAG, "Successfully advertising");
advertising = true;
... |
java.util.Iterator<com.google.gwt.user.client.ui.Widget> it = fields.iterator();
while (it.hasNext()) {
com.google.gwt.user.client.ui.Widget w = it.next();
if (w instanceof org.gwtbootstrap3.client.ui.FormGroup) {
org.gwtbootstrap3.client.ui.FormGroup fg = ((org.gwtbootstrap3.client.... | final java.util.Iterator<com.google.gwt.user.client.ui.Widget> it = this.fields.iterator();
while (it.hasNext()) {
final com.google.gwt.user.client.ui.Widget w = it.next();
if (w instanceof org.gwtbootstrap3.client.ui.FormGroup) {
final org.gwtbootstrap3.client.ui.FormGroup fg = ((or... |
private void setPlayerColor(int player) {
for (int i = 0; i < 3; i++) {
if (player == i)
playerTextViews[i].setBackgroundColor(android.graphics.Color.parseColor("#8866FF7A"));
else
playerTextViews[i].setBackgroundColor(android.graphics.Color.parseColor("#0066FF7A"));
... | private void setPlayerColor(int player) {
for (int i = 0; i <= 3; i++) {
if (player == i)
playerTextViews[i].setBackgroundColor(android.graphics.Color.parseColor("#8866FF7A"));
else
playerTextViews[i].setBackgroundColor(android.graphics.Color.parseColor("#0066FF7A"));
... |
public static <ResultType> ResultType fromReader(java.io.Reader reader, java.util.function.Function<java.io.Reader, ResultType> inputStreamReader) {
if (reader == null) {
return null;
}
try (com.asprotunity.queryiteasy.scope.AutoCloseableScope scope = new com.asprotunity.queryiteasy.scope.AutoClosea... | public static <ResultType> ResultType fromReader(java.io.Reader reader, java.util.function.Function<java.io.Reader, ResultType> inputStreamReader) {
if (reader == null) {
return inputStreamReader.apply(null);
}
try (com.asprotunity.queryiteasy.scope.AutoCloseableScope scope = new com.asprotunity.que... |
public void updateRoot(int[][] opponentMove) {
root = new PlayerNode(1, 1, opponentMove);
for (MonteCarloTreeNode child : chosenChild.getChildren()) {
if (java.util.Arrays.deepEquals(child.getMove(), opponentMove)) {
root = ((PlayerNode) (child));
}
}
root.populate(board);
} | public void updateRoot(int[][] opponentMove) {
root = new PlayerNode(1, 1, opponentMove);
for (MonteCarloTreeNode child : chosenChild.getChildren()) {
if (java.util.Arrays.deepEquals(child.getMove(), opponentMove)) {
root = ((PlayerNode) (child));
break;
}
}
root.... |
void fillMetaData(test.tvdb.dev.com.tvdb_test.MetaEpisode metaData, java.util.ArrayList<test.tvdb.dev.com.tvdb_test.Season> tmpSeasons) {
test.tvdb.dev.com.tvdb_test.ShowDate.ShowIndex toBeSeen = getNextIndexShowDate();
if ((toBeSeen.episode) == (-1))
metaData.full = true;
else
metaData.full... | void fillMetaData(test.tvdb.dev.com.tvdb_test.MetaEpisode metaData, java.util.ArrayList<test.tvdb.dev.com.tvdb_test.Season> tmpSeasons) {
test.tvdb.dev.com.tvdb_test.ShowDate.ShowIndex toBeSeen = getNextIndexShowDate();
if ((toBeSeen.episode) == (-1))
metaData.full = true;
else
metaData.full... |
public void onClick(android.content.DialogInterface dialog, int whichButton) {
com.piuucseditor.MainActivity.fileName = editView.getText().toString();
if ((mainActivity.getSupportActionBar()) != null) {
android.widget.TextView textView = ((android.widget.TextView) (mainActivity.findViewById(R.id.actionB... | public void onClick(android.content.DialogInterface dialog, int whichButton) {
com.piuucseditor.MainActivity.fileName = editView.getText().toString();
if ((mainActivity.getSupportActionBar()) != null) {
android.widget.TextView textView = ((android.widget.TextView) (mainActivity.findViewById(R.id.actionB... |
private long nextJobTime() {
assert _lock.isLocked();
org.wso2.carbon.bpmn.people.substitution.scheduler.ScheduledTask job = _todo.peek();
if (job == null)
return java.lang.Long.MAX_VALUE;
return java.lang.Math.max(0, ((job.schedDate) - (java.lang.System.currentTimeMillis())));
} | protected long nextJobTime() {
assert _lock.isLocked();
org.wso2.carbon.bpmn.people.substitution.scheduler.ScheduledTask job = _todo.peek();
if (job == null)
return java.lang.Long.MAX_VALUE;
return java.lang.Math.max(0, ((job.schedDate) - (java.lang.System.currentTimeMillis())));
} |
private void onRetainOwnershipCommand(io.tetrapod.core.storage.RetainOwnershipCommand command) {
final io.tetrapod.core.storage.Message msg = new io.tetrapod.core.storage.RetainOwnershipMessage(command.getOwnerId(), command.getPrefix(), command.getExpiry());
synchronized(ownersToTopics) {
final java.uti... | private void onRetainOwnershipCommand(io.tetrapod.core.storage.RetainOwnershipCommand command) {
final io.tetrapod.core.storage.Message msg = new io.tetrapod.core.storage.RetainOwnershipMessage(command.getOwnerId(), command.getPrefix(), command.getExpiry());
synchronized(topicsToOwners) {
final java.uti... |
public static void main(java.lang.String[] args) throws java.io.IOException {
char nodeName = args[0].charAt(0);
int portNum = java.lang.Integer.parseInt(args[1]);
java.lang.String fileName = args[2];
java.lang.System.out.println(((((nodeName + " ") + portNum) + " ") + fileName));
Dvr node = new Dvr... | public static void main(java.lang.String[] args) throws java.io.IOException {
char nodeName = args[0].charAt(0);
int portNum = java.lang.Integer.parseInt(args[1]);
java.lang.String fileName = args[2];
Dvr node = new Dvr(nodeName, portNum, fileName);
node.runDvr();
} |
public int compare(trafficsimulator.core.Road o1, trafficsimulator.core.Road o2) {
java.util.List<trafficsimulator.utils.Point> cPoints1 = junction.getPointsForRoad(o1);
java.util.List<trafficsimulator.utils.Point> cPoints2 = junction.getPointsForRoad(o1);
trafficsimulator.utils.Point cPoint1 = trafficsimul... | public int compare(trafficsimulator.core.Road o1, trafficsimulator.core.Road o2) {
java.util.List<trafficsimulator.utils.Point> cPoints1 = junction.getPointsForRoad(o1);
java.util.List<trafficsimulator.utils.Point> cPoints2 = junction.getPointsForRoad(o2);
trafficsimulator.utils.Point cPoint1 = trafficsimul... |
public void onScrolled(android.support.v7.widget.RecyclerView recyclerView, int dx, int dy) {
super.onScrolled(recyclerView, dx, dy);
if ((mHeader) != null) {
if ((mHeader) != null) {
translateHeader(((mRecyclerView.getLayoutManager().getChildAt(0)) == (mHeader) ? mRecyclerView.computeVertic... | public void onScrolled(android.support.v7.widget.RecyclerView recyclerView, int dx, int dy) {
super.onScrolled(recyclerView, dx, dy);
if ((mHeader) != null) {
translateHeader(((mRecyclerView.getLayoutManager().getChildAt(0)) == (mHeader) ? mRecyclerView.computeVerticalScrollOffset() : mHeader.getHeight(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.