buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
private gg.main.SinglePageConverter.Image extractImage(org.jsoup.nodes.Element element) {
java.lang.String link = element.attr("abs:src");
java.lang.String fileName = gg.utils.Utils.latinize(gg.utils.Utils.getLastPart(link, "/"));
java.lang.String path = getRelativePath();
try {
gg.utils.Utils.d... | private gg.main.SinglePageConverter.Image extractImage(org.jsoup.nodes.Element element) {
java.lang.String link = element.attr("abs:src");
java.lang.String fileName = gg.utils.Utils.latinize(gg.utils.Utils.getLastPart(link, "/"));
if ((link == null) || (link.isEmpty())) {
return null;
}
java... |
public void dataChanged(org.openstreetmap.josm.data.osm.event.DataChangedEvent event) {
org.openstreetmap.josm.data.osm.OsmPrimitive primitive = event.getDataset().getPrimitiveById(history.getId(), history.getType());
org.openstreetmap.josm.data.osm.history.HistoryOsmPrimitive latest;
if (canShowAsLatest(pr... | public void dataChanged(org.openstreetmap.josm.data.osm.event.DataChangedEvent event) {
if ((history) == null)
return ;
org.openstreetmap.josm.data.osm.OsmPrimitive primitive = event.getDataset().getPrimitiveById(history.getId(), history.getType());
org.openstreetmap.josm.data.osm.history.Histo... |
public void drawHeader() {
java.lang.String headerString = "Fury Racers";
int stringLength = Fonts.header.getWidth(headerString);
float xPos = ((screenWidth) / 2) - (stringLength / 2);
Fonts.header.drawString(xPos, ((screenHeight) / 15), "Fury Racers", Fonts.headerColor);
} | private void drawHeader() {
java.lang.String headerString = "Fury Racers";
int stringLength = Fonts.header.getWidth(headerString);
float xPos = ((screenWidth) / 2) - (stringLength / 2);
Fonts.header.drawString(xPos, ((screenHeight) / 15), "Fury Racers", Fonts.headerColor);
} |
private boolean isPlayerTurn(com.fuentesj.tictactoe.data.Move move) {
if (((this.getTurnCount()) % 2) == 0) {
return move.getPlayer().getPlayerNumber().equals(PlayerNumber.TWO);
}else {
return move.getPlayer().getPlayerNumber().equals(PlayerNumber.ONE);
}
} | private boolean isPlayerTurn(com.fuentesj.tictactoe.data.Move move) {
if (((this.getTurnCount()) % 2) == 0) {
return move.getPlayer().getPlayerNumber().equals(PlayerNumber.ONE);
}else {
return move.getPlayer().getPlayerNumber().equals(PlayerNumber.TWO);
}
} |
public void discoverPeers() {
android.util.Log.d(com.seniordesign.wolfpack.quizinator.activities.HostGameActivity.TAG, "discoverPeers");
if (!(wifiDirectApp.isP2pEnabled())) {
android.widget.Toast.makeText(this, R.string.p2p_off_warning, Toast.LENGTH_LONG).show();
return ;
}
wifiDirectAp... | public void discoverPeers() {
android.util.Log.d(com.seniordesign.wolfpack.quizinator.activities.HostGameActivity.TAG, "discoverPeers");
if ((wifiDirectApp.mP2pChannel) == null) {
android.widget.Toast.makeText(this, R.string.p2p_off_warning, Toast.LENGTH_LONG).show();
return ;
}
wifiDire... |
public void testAllColumnsEmpty() {
jcsveditor.parser.CSVLineParser parser = new jcsveditor.parser.CSVLineParser(",,,");
java.util.List<java.lang.String> tokens = parser.parseLine();
java.lang.String[] actual = new java.lang.String[tokens.size()];
tokens.toArray(actual);
java.lang.String[] expected ... | public void testAllColumnsEmpty() {
jcsveditor.parser.CSVLineParser parser = new jcsveditor.parser.CSVLineParser(",,,");
java.util.List<java.lang.String> tokens = parser.parseLine();
java.lang.String[] actual = new java.lang.String[tokens.size()];
tokens.toArray(actual);
java.lang.String[] expected ... |
public static synchronized void init() throws java.io.IOException, java.lang.IllegalStateException, org.asteriskjava.manager.AuthenticationFailedException, org.asteriskjava.manager.TimeoutException {
if ((org.asteriskjava.pbx.internal.core.CoherentManagerConnection.self) != null)
org.asteriskjava.pbx.intern... | public static synchronized void init() throws java.io.IOException, java.lang.IllegalStateException, org.asteriskjava.manager.AuthenticationFailedException, org.asteriskjava.manager.TimeoutException {
if ((org.asteriskjava.pbx.internal.core.CoherentManagerConnection.self) != null)
org.asteriskjava.pbx.intern... |
private double meanPPM(int ppmValue) {
double result = 0;
for (ricocalculator.Line line : lines) {
if ((line.getPpmValues()[ppmValue]) != 0) {
result += line.getPpmValues()[ppmValue];
}
}
return result / (lines.size());
} | private double meanPPM(int ppmValue) {
double result = 0;
int counter = 0;
for (ricocalculator.Line line : lines) {
if ((line.getPpmValues()[ppmValue]) != 0) {
result += line.getPpmValues()[ppmValue];
counter++;
}
}
return result / counter;
} |
public void deleteAcccountTest() {
Wasserman.Zachary.Project2ATM.AccountManager accManager = new Wasserman.Zachary.Project2ATM.AccountManager();
Wasserman.Zachary.Project2ATM.Account acc1 = new Wasserman.Zachary.Project2ATM.Account("bob", 0.0);
Wasserman.Zachary.Project2ATM.Account acc2 = new Wasserman.Zach... | public void deleteAcccountTest() {
Wasserman.Zachary.Project2ATM.AccountManager accManager = new Wasserman.Zachary.Project2ATM.AccountManager();
Wasserman.Zachary.Project2ATM.Account acc1 = new Wasserman.Zachary.Project2ATM.Account("bob", 0.0);
Wasserman.Zachary.Project2ATM.Account acc2 = new Wasserman.Zach... |
private static java.util.ArrayList<java.lang.String> runPythonScript(java.lang.String scriptLocation, java.lang.String[] arguments) throws java.io.IOException, java.lang.InterruptedException {
java.lang.String[] strArr = new java.lang.String[(arguments.length) + 1];
strArr[0] = scriptLocation;
for (int i = ... | private static java.util.ArrayList<java.lang.String> runPythonScript(java.lang.String scriptLocation, java.lang.String[] arguments) throws java.io.IOException, java.lang.InterruptedException {
java.lang.String[] strArr = new java.lang.String[(arguments.length) + 1];
strArr[0] = scriptLocation;
for (int i = ... |
public void playCard(com.dyllongagnier.triad.card.UndeployedCard card, int row, int col) {
if ((this.nextTurn) != null)
throw new java.lang.IllegalArgumentException("This turn is already complete and can not be changed.");
if (this.moveValidator.apply(this.currentTurn, card, this.currentPlayer, row... | public void playCard(com.dyllongagnier.triad.card.UndeployedCard card, int row, int col) {
if ((this.nextTurn) != null)
throw new java.lang.IllegalArgumentException("This turn is already complete and can not be changed.");
if (!(this.moveValidator.apply(this.currentTurn, card, this.currentPlayer, r... |
public void dropADiscFromTop(int col, int currentplayer) {
Player.Printer.printToDebugFile("About to be dropping a disc.");
int firstEmptyCellRow = ((height) - (this.numOfDiscsInColumn[col])) - 1;
Player.Printer.printToDebugFile("About to be dropping a disc.3");
Player.Printer.printToDebugFile(((("First... | public void dropADiscFromTop(int col, int currentplayer) {
int firstEmptyCellRow = ((height) - (this.numOfDiscsInColumn[col])) - 1;
Player.Printer.printToDebugFile(((("First: " + firstEmptyCellRow) + "Col: ") + col));
board[firstEmptyCellRow][col] = currentplayer;
(this.numOfDiscsInColumn[col])++;
P... |
public void onResponse(com.example.vineetpatil.moviesearch.SearchResponse response) {
android.util.Log.d(com.example.vineetpatil.moviesearch.SearchFragment.TAG, ("SearchResultsListener - onResponse : " + (response.toString())));
if (((response.getTotalResults()) > 0) && ((response.getSearch()) != null)) {
... | public void onResponse(com.example.vineetpatil.moviesearch.SearchResponse response) {
if (((response.getTotalResults()) > 0) && ((response.getSearch()) != null)) {
for (com.example.vineetpatil.moviesearch.SearchResponse.SearchResult searchResult : response.getSearch()) {
getDetails(searchResult.... |
private void appendLuceneCoreFacilitiesIManage(java.lang.StringBuffer searchText) {
boolean firstTime = true;
for (hci.gnomex.model.CoreFacility cf : ((java.util.Set<hci.gnomex.model.CoreFacility>) (this.getCoreFacilitiesIManage()))) {
if (!firstTime) {
searchText.append(" ");
fi... | private void appendLuceneCoreFacilitiesIManage(java.lang.StringBuffer searchText) {
boolean firstTime = true;
for (hci.gnomex.model.CoreFacility cf : ((java.util.Set<hci.gnomex.model.CoreFacility>) (this.getCoreFacilitiesIManage()))) {
if (!firstTime) {
searchText.append(" ");
}
... |
public RecyclerView.ViewHolder onCreateViewHolder(android.view.ViewGroup parent, int viewType) {
if (viewType == (nammari.network.ui.EndlessMultiStateAbsListFragment.NetworkWrapperAdapter.VIEW_TYPE_LOADING)) {
return new nammari.network.ui.EndlessMultiStateAbsListFragment.ListLoadingViewHolder(inflater.infl... | public RecyclerView.ViewHolder onCreateViewHolder(android.view.ViewGroup parent, int viewType) {
if (viewType == (nammari.network.ui.EndlessMultiStateAbsListFragment.NetworkWrapperAdapter.VIEW_TYPE_LOADING)) {
return new nammari.network.ui.EndlessMultiStateAbsListFragment.ListLoadingViewHolder(inflater.infl... |
public void add(java.awt.Component comp, int w) {
if (((x) >= (width)) || (((x) + w) >= (width))) {
x = 0;
(y)++;
}
java.awt.Rectangle r = new java.awt.Rectangle(x, y, w, 1);
parent.add(comp, new com.smartg.swing.layout.NodeConstraints(gridName, r));
x += w;
} | public void add(java.awt.Component comp, int w) {
if (((x) >= (width)) || (((x) + w) > (width))) {
x = 0;
(y)++;
}
java.awt.Rectangle r = new java.awt.Rectangle(x, y, w, 1);
parent.add(comp, new com.smartg.swing.layout.NodeConstraints(gridName, r));
x += w;
} |
public void toggleFullScreen() {
if (isFullScreen_) {
forceClosed();
displayBus_.post(new org.micromanager.display.internal.events.FullScreenEvent(this, getScreenConfig(), false));
}else {
setVisible(false);
org.micromanager.display.DisplayWindow fullFrame = new org.micromanager.... | public void toggleFullScreen() {
if (isFullScreen_) {
forceClosed();
displayBus_.post(new org.micromanager.display.internal.events.FullScreenEvent(this, getScreenConfig(), false));
}else {
setVisible(false);
org.micromanager.display.DisplayWindow fullFrame = new org.micromanager.... |
private static java.lang.String hashString(java.lang.String input) throws java.io.UnsupportedEncodingException, java.security.InvalidKeyException, java.security.NoSuchAlgorithmException {
com.github.draylundy.iec61850lti.oauth.OAuthAuthorization.logger.debug(("Payload : " + input));
java.security.MessageDigest ... | private static java.lang.String hashString(java.lang.String input) throws java.io.UnsupportedEncodingException, java.security.NoSuchAlgorithmException {
com.github.draylundy.iec61850lti.oauth.OAuthAuthorization.logger.debug(("Payload : " + input));
java.security.MessageDigest digest = java.security.MessageDiges... |
public static org.eclipse.ecf.mgmt.scr.ComponentReferenceMTO[] createMTOs(org.apache.felix.scr.Reference[] references) {
java.util.List<org.eclipse.ecf.mgmt.scr.ComponentReferenceMTO> results = new java.util.ArrayList<org.eclipse.ecf.mgmt.scr.ComponentReferenceMTO>();
for (org.apache.felix.scr.Reference r : ref... | public static org.eclipse.ecf.mgmt.scr.ComponentReferenceMTO[] createMTOs(org.apache.felix.scr.Reference[] references) {
java.util.List<org.eclipse.ecf.mgmt.scr.ComponentReferenceMTO> results = new java.util.ArrayList<org.eclipse.ecf.mgmt.scr.ComponentReferenceMTO>();
if (references != null)
for (org.ap... |
public void onPodcastSelected(long podcastId) {
android.util.Log.d("ID", ("" + podcastId));
android.os.Bundle args = new android.os.Bundle();
args.putLong("ID", podcastId);
args.putString("TITLE", feedList.getFromId(podcastId).getTitle());
createNewFragment(me.bromen.podgo.activities.MainActivity.Ma... | public void onPodcastSelected(long podcastId) {
android.os.Bundle args = new android.os.Bundle();
args.putLong("ID", podcastId);
args.putString("TITLE", feedList.getFromId(podcastId).getTitle());
createNewFragment(me.bromen.podgo.activities.MainActivity.MainFragments.EpisodeList, args);
} |
public int indexOf(T element) {
java.util.Objects.requireNonNull(element, "element");
int index = 0;
for (T t : this) {
++index;
if (t.equals(element)) {
return index;
}
}
throw new java.util.NoSuchElementException(element.toString());
} | public int indexOf(T element) {
java.util.Objects.requireNonNull(element, "element");
int index = 0;
for (T t : this) {
if (t.equals(element)) {
return index;
}
++index;
}
throw new java.util.NoSuchElementException(element.toString());
} |
public com.orientechnologies.orient.core.index.OIndex<T> clear() {
checkForRebuild();
modificationLock.requestModificationLock();
try {
com.orientechnologies.orient.core.index.OIndexAbstract.acquireSharedLock();
try {
markStorageDirty();
indexEngine.clear();
... | public com.orientechnologies.orient.core.index.OIndex<T> clear() {
checkForRebuild();
modificationLock.requestModificationLock();
try {
acquireSharedLock();
try {
markStorageDirty();
indexEngine.clear();
return this;
} finally {
release... |
public float getDimensionValueRaw(java.lang.String key, float defaultValue) {
java.lang.String value = mArguments.get(key);
if (value == null) {
return defaultValue;
}
java.util.regex.Matcher matcher = com.actinarium.rhythm.config.LayerConfig.DIMEN_VALUE_PATTERN.matcher(value);
if (matcher.f... | public float getDimensionValueRaw(java.lang.String key, float defaultValue) {
java.lang.String value = getString(key);
if (value == null) {
return defaultValue;
}
java.util.regex.Matcher matcher = com.actinarium.rhythm.config.LayerConfig.DIMEN_VALUE_PATTERN.matcher(value);
if (matcher.find()... |
private void displayLoginScene(javafx.stage.Stage stage) throws java.io.IOException {
javafx.scene.Parent root = javafx.fxml.FXMLLoader.load(getClass().getResource("MainMenu/MainMenu.fxml"));
javafx.scene.Scene scene = new javafx.scene.Scene(root);
stage.setMaximized(true);
stage.setTitle("Critical Care... | private void displayLoginScene(javafx.stage.Stage stage) throws java.io.IOException {
javafx.scene.Parent root = javafx.fxml.FXMLLoader.load(getClass().getResource("MainMenu/MainMenu.fxml"));
javafx.scene.Scene scene = new javafx.scene.Scene(root);
stage.setTitle("Critical Care Audit Tool - CONFIDENTIAL");
... |
public android.support.v4.content.Loader<android.database.Cursor> onCreateLoader(int i, android.os.Bundle bundle) {
android.util.Log.d(LOG_TAG, ("onCreateLoader for loader_id " + i));
android.support.v4.content.CursorLoader cursor;
java.lang.String sortOrder = (LearnChineseContract.CustomLearning.COLUMN_NAM... | public android.support.v4.content.Loader<android.database.Cursor> onCreateLoader(int i, android.os.Bundle bundle) {
android.support.v4.content.CursorLoader cursor;
java.lang.String sortOrder = (LearnChineseContract.CustomLearning.COLUMN_NAME) + " ASC";
android.net.Uri uri = LearnChineseContract.Character.bu... |
private int[] calculateIndicesForPaginationMode(int recordsFrom, int recordsCount) {
switch (this.rdbmsQueryConfigurationEntry.getPaginationMode()) {
case MODE1 :
return new int[]{ recordsFrom , recordsCount };
case MODE2 :
return new int[]{ recordsFrom , recordsFrom + record... | private int[] calculateIndicesForPaginationMode(int recordsFrom, int recordsCount) {
switch (this.rdbmsQueryConfigurationEntry.getPaginationMode()) {
case MODE1 :
return new int[]{ recordsFrom , recordsCount };
case MODE2 :
return new int[]{ recordsFrom + recordsCount , recor... |
public com.hearthsim.util.tree.HearthTreeNode applyEffect(com.hearthsim.model.PlayerSide originSide, com.hearthsim.card.Card origin, com.hearthsim.model.PlayerSide targetSide, com.hearthsim.util.tree.HearthTreeNode boardState) {
com.hearthsim.card.weapon.WeaponCard newWeapon = this.weapon;
if (origin == null) {... | public com.hearthsim.util.tree.HearthTreeNode applyEffect(com.hearthsim.model.PlayerSide originSide, com.hearthsim.card.Card origin, com.hearthsim.model.PlayerSide targetSide, com.hearthsim.util.tree.HearthTreeNode boardState) {
com.hearthsim.card.weapon.WeaponCard newWeapon = this.weapon;
if (origin == null) {... |
public static java.lang.String getAcrobatPath() {
java.lang.String sRet = edu.clemson.lph.civet.prefs.CivetConfig.props.getProperty("acrobatPath");
if (sRet != null) {
java.io.File f = new java.io.File(sRet);
if ((!(f.exists())) || (!(f.isFile()))) {
sRet = null;
}
}
... | public static java.lang.String getAcrobatPath() {
java.lang.String sRet = edu.clemson.lph.civet.prefs.CivetConfig.props.getProperty("acrobatPath");
if (sRet != null) {
java.io.File f = new java.io.File(sRet);
if ((!(f.exists())) || (!(f.isFile()))) {
sRet = null;
}
}
... |
protected boolean validateAndSubmitRequest() {
if (!(isValid()))
return false;
mAnnouncement.setTitle(mAnnouncementTitle.getText().toString());
mAnnouncement.setBody(mAnnouncementBody.getText().toString());
setAnnouncement();
Requests.Announcements.with(getActivity()).makeCreateRequest(... | protected boolean validateAndSubmitRequest() {
setAnnouncement();
if (!(isValid()))
return false;
mAnnouncement.setTitle(mAnnouncementTitle.getText().toString());
mAnnouncement.setBody(mAnnouncementBody.getText().toString());
Requests.Announcements.with(getActivity()).makeCreateRequest(... |
private boolean loadAllCurrentReservations() {
ManagerPanel mp = view.getManagerPanel();
ViewCurrentReservationsManagerCard currentReservationsPanel = mp.getViewCurrentReservationsManagerCard();
try {
java.sql.ResultSet customerReservations = model.viewAllCurrentReservations();
HotelControll... | private boolean loadAllCurrentReservations() {
ManagerPanel mp = view.getManagerPanel();
ViewCurrentReservationsManagerCard currentReservationsPanel = mp.getViewCurrentReservationsManagerCard();
try {
java.sql.ResultSet customerReservations = model.viewAllCurrentReservations();
java.lang.Obj... |
protected void processResponse(org.springframework.http.ResponseEntity<?> entity, org.springframework.web.context.request.NativeWebRequest webRequest) throws java.lang.Exception {
org.springframework.core.MethodParameter methodParameter = new org.springframework.core.MethodParameter(returnTypeMethodParam);
org.... | protected void processResponse(org.springframework.http.ResponseEntity<?> entity, org.springframework.web.context.request.NativeWebRequest webRequest) throws java.lang.Exception {
org.springframework.core.MethodParameter methodParameter = new org.springframework.core.MethodParameter(returnTypeMethodParam);
org.... |
private android.content.Intent createShareActionIntent() {
android.content.Intent shareIntent = new android.content.Intent(android.content.Intent.ACTION_SEND);
shareIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
shareIntent.setType("text/plain");
shareIntent.putExtra(Intent.EXTRA_TEXT, ((r... | private android.content.Intent createShareActionIntent() {
if ((ru.guu.my.myguuruclient.DetailFragment.mClassDescriptionStr) == null)
return null;
android.content.Intent shareIntent = new android.content.Intent(android.content.Intent.ACTION_SEND);
shareIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR... |
public boolean isManaged(org.automagic.deps.doctor.TransitiveDependency dependency) {
if (((project.getDependencyManagement()) == null) || ((project.getDependencyManagement().getDependencies()) == null)) {
return false;
}
@java.lang.SuppressWarnings(value = "unchecked")
java.util.List<org.apache... | public boolean isManaged(org.automagic.deps.doctor.TransitiveDependency dependency) {
if (((project.getDependencyManagement()) == null) || ((project.getDependencyManagement().getDependencies()) == null)) {
return false;
}
return exists(project.getDependencyManagement().getDependencies(), dependency.... |
java.util.Map<java.lang.Integer, java.lang.Integer> newPartitioning = io.vntr.repartition.MetisRepartitioner.partition(gpmetisLocation, gpmetisTempdir, getFriendships(), getPartitionToUserMap().keySet());
for (int uid : newPartitioning.keySet()) {
int newPid = newPartitioning.get(uid);
if (newPi... | java.util.Map<java.lang.Integer, java.lang.Integer> newPartitioning = io.vntr.repartition.MetisRepartitioner.partition(gpmetisLocation, gpmetisTempdir, getFriendships(), getPartitionToUserMap().keySet());
for (int uid : newPartitioning.keySet()) {
int newPid = newPartitioning.get(uid);
if (newPi... |
public static java.lang.String firstPass(java.lang.String s) {
java.lang.String out = "";
java.util.Scanner reader = new java.util.Scanner(s);
int lineNumber = 1;
while (reader.hasNextLine()) {
java.lang.String next = reader.nextLine();
if (!(Program.removeLine(next, lineNumber))) {
... | public static java.lang.String firstPass(java.lang.String s) {
java.lang.String out = "";
java.util.Scanner reader = new java.util.Scanner(s);
int lineNumber = 0;
while (reader.hasNextLine()) {
java.lang.String next = reader.nextLine();
if (!(Program.removeLine(next, lineNumber))) {
... |
private boolean checkRequirements(at.oculus.teamf.domain.entity.Patient patient) {
if (((((patient.getSocialInsuranceNr()) == "") || ((patient.getLastName()) == "")) || ((patient.getFirstName()) == "")) || ((patient.getBirthDay()) == null)) {
return false;
}else {
return true;
}
} | private boolean checkRequirements(at.oculus.teamf.domain.entity.Patient patient) {
if ((((patient.getSocialInsuranceNr().equals("")) || (patient.getLastName().equals(""))) || (patient.getFirstName().equals(""))) || (patient.getBirthDay().equals(null))) {
return false;
}else {
return true;
}
... |
public polyglot.ast.Node typeCheckOverride(polyglot.ast.Node parent, polyglot.visit.TypeChecker tc) throws polyglot.types.SemanticException {
polyglot.ast.Case c = this.node();
polyglot.ast.Expr expr = c.expr();
if ((expr == null) || (expr instanceof polyglot.ast.Lit)) {
return null;
}
retur... | public polyglot.ast.Node typeCheckOverride(polyglot.ast.Node parent, polyglot.visit.TypeChecker tc) throws polyglot.types.SemanticException {
polyglot.ast.Case c = node();
polyglot.ast.Expr expr = c.expr();
if ((expr == null) || (expr instanceof polyglot.ast.Lit)) {
return null;
}
return c;
... |
public void onSelectedDayChange(android.widget.CalendarView view, int year, int month, int dayOfMonth) {
this.month = month + 1;
this.day = dayOfMonth;
java.lang.String today = (((month + 1) + "月") + dayOfMonth) + "日";
java.lang.String date = ((month + 1) + "/") + dayOfMonth;
fetchData(date);
di... | public void onSelectedDayChange(android.widget.CalendarView view, int year, int month, int dayOfMonth) {
this.month = month + 1;
this.day = dayOfMonth;
java.lang.String date = ((month + 1) + "/") + dayOfMonth;
fetchData(date);
dialog.dismiss();
} |
private void delete(@android.support.annotation.NonNull
final emreaktrk.edgecontact.ui.edge.contact.Contact contact) {
io.realm.Realm.getDefaultInstance().executeTransaction(new io.realm.Realm.Transaction() {
@java.lang.Override
public void execute(io.realm.Realm realm) {
contact.deleteF... | private void delete(@android.support.annotation.NonNull
final emreaktrk.edgecontact.ui.edge.contact.Contact contact) {
if ((android.os.Build.VERSION.SDK_INT) >= (android.os.Build.VERSION_CODES.N_MR1)) {
android.content.pm.ShortcutManager manager = getSystemService(android.content.pm.ShortcutManager.class);
... |
private void checkIdOrganizationsValid(java.lang.String req) throws com.fasterxml.jackson.core.JsonProcessingException, it.sinergis.datacatalogue.exception.DCException, java.io.IOException, java.lang.NumberFormatException {
com.fasterxml.jackson.databind.node.ArrayNode orgs = ((com.fasterxml.jackson.databind.node.A... | private void checkIdOrganizationsValid(java.lang.String req) throws com.fasterxml.jackson.core.JsonProcessingException, it.sinergis.datacatalogue.exception.DCException, java.io.IOException, java.lang.NumberFormatException {
com.fasterxml.jackson.databind.node.ArrayNode orgs = ((com.fasterxml.jackson.databind.node.A... |
public static void main(java.lang.String[] args) {
isLinkedListPalidrome.Main m = new isLinkedListPalidrome.Main();
isLinkedListPalidrome.Node node1 = new isLinkedListPalidrome.Node(1);
isLinkedListPalidrome.Node node2 = new isLinkedListPalidrome.Node(2);
isLinkedListPalidrome.Node node3 = new isLinkedL... | public static void main(java.lang.String[] args) {
isLinkedListPalidrome.Main m = new isLinkedListPalidrome.Main();
isLinkedListPalidrome.Node node1 = new isLinkedListPalidrome.Node(1);
isLinkedListPalidrome.Node node2 = new isLinkedListPalidrome.Node(1);
isLinkedListPalidrome.Node node3 = new isLinkedL... |
public void onAccountCreatorPhoneAccountRecovered(org.linphone.core.LinphoneAccountCreator accountCreator, org.linphone.core.LinphoneAccountCreator.Status status) {
if (status.equals(Status.Ok)) {
org.linphone.assistant.AssistantActivity.instance().displayAssistantCodeConfirm(getUsername(), dialCode.getText... | public void onAccountCreatorPhoneAccountRecovered(org.linphone.core.LinphoneAccountCreator accountCreator, org.linphone.core.LinphoneAccountCreator.Status status) {
if ((org.linphone.assistant.AssistantActivity.instance()) == null) {
return ;
}
if (status.equals(Status.Ok)) {
org.linphone.as... |
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_profile);
android.support.v7.widget.Toolbar toolbar = ((android.support.v7.widget.Toolbar) (findViewById(R.id.toolbar)));
setSupportActionBar(toolbar);
getSupportActio... | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_profile);
android.support.v7.widget.Toolbar toolbar = ((android.support.v7.widget.Toolbar) (findViewById(R.id.toolbar)));
setSupportActionBar(toolbar);
getSupportActio... |
public void drawShape(int x, int y) {
float smallThickness = (diameter) / (pixelitor.tools.brushes.WobbleBrush.SIZE_DIVIDING_FACTOR);
if ((diameter) != (lastDiameter)) {
lastStroke = new com.jhlabs.awt.WobbleStroke(0.5F, smallThickness, smallThickness);
}
targetG.setStroke(lastStroke);
java.... | public void drawShape(int x, int y) {
float smallThickness = (diameter) / (pixelitor.tools.brushes.WobbleBrush.SIZE_DIVIDING_FACTOR);
if ((diameter) != (lastDiameter)) {
lastStroke = new com.jhlabs.awt.WobbleStroke(0.5F, smallThickness, smallThickness);
}
targetG.setStroke(lastStroke);
java.... |
public void testRun() {
java.lang.System.out.println("run");
java.lang.String absolutePath = new java.io.File(this.getClass().getResource("testRegion.png").getPath()).getAbsolutePath();
segmentation.RegionGrowing rg = new segmentation.RegionGrowing(absolutePath, 0);
rg.run();
int size = rg.getRegion... | public void testRun() {
java.lang.System.out.println("run");
java.lang.String absolutePath = new java.io.File(this.getClass().getResource("testRegion.png").getPath()).getAbsolutePath();
segmentation.RegionGrowing rg = new segmentation.RegionGrowing(absolutePath, 0, true);
rg.run();
int size = rg.get... |
public java.util.List<com.sgkhmjaes.jdias.domain.Message> findAllByConversation(com.sgkhmjaes.jdias.domain.Conversation conversation) {
log.debug("Request to get all Messages");
if (conversation.getParticipants().contains(getCurrentPerson())) {
java.util.List<com.sgkhmjaes.jdias.domain.Message> messages... | public java.util.List<com.sgkhmjaes.jdias.domain.Message> findAllByConversation(com.sgkhmjaes.jdias.domain.Conversation conversation) {
log.debug("Request to get all Messages");
if (conversation.getParticipants().contains(getCurrentPerson())) {
java.util.List<com.sgkhmjaes.jdias.domain.Message> messages... |
public static android.content.Intent create(@android.support.annotation.NonNull
final android.content.Context context, @android.support.annotation.NonNull
final java.lang.String packageName) {
final android.content.Intent intent = new android.content.Intent(context, uk.co.alt236.resourcemirrorsampleapp.activities.r... | public static android.content.Intent create(@android.support.annotation.NonNull
final android.content.Context context, @android.support.annotation.NonNull
final java.lang.String packageName) {
final android.content.Intent intent = new android.content.Intent(context, uk.co.alt236.resourcemirrorsampleapp.activities.r... |
public boolean isFull(int i, int j) {
int idx = computeIdx(i, j);
if (idx == (-1))
throw new java.lang.IndexOutOfBoundsException("Index out of bound!");
int root = unionFind.find(idx);
return (Percolation.isOpen(state[root])) && (Percolation.isConnectedToTop(state[root]));
} | public boolean isFull(int i, int j) {
int idx = computeIdx(i, j);
if (idx == (-1))
throw new java.lang.IndexOutOfBoundsException("Index out of bound!");
int root = unionFind.find(idx);
return (Percolation.isOpen(state[idx])) && (Percolation.isConnectedToTop(state[root]));
} |
public void updateUI() {
for (int i = 0; i < (boardSize); i++) {
for (int j = 0; j < (boardSize); j++) {
squares[i][j].setBackground(board.getPiece(i, j));
java.lang.System.out.println(board.getPiece(i, j));
}
}
java.lang.System.out.println("Updated!");
} | public void updateUI() {
for (int i = 0; i < (boardSize); i++) {
for (int j = 0; j < (boardSize); j++) {
squares[j][i].setBackground(board.getPiece(j, i));
}
}
java.lang.System.out.println("Updated!");
} |
public float floatToDecibel(float sample) {
float db;
sample = java.lang.Math.abs(sample);
if (sample != 0.0F) {
db = ((float) (20.0F * (java.lang.Math.log10(sample))));
}else {
db = -144.0F;
}
return db;
} | private float floatToDecibel(float sample) {
float db;
sample = java.lang.Math.abs(sample);
if (sample != 0.0F) {
db = ((float) (20.0F * (java.lang.Math.log10(sample))));
}else {
db = -144.0F;
}
return db;
} |
public void tearDown() throws java.lang.Exception {
org.elasticsearch.cluster.settings.DynamicSettings dynamicSettings = ((org.elasticsearch.node.internal.InternalNode) (node())).injector().getInstance(org.elasticsearch.common.inject.Key.get(org.elasticsearch.cluster.settings.DynamicSettings.class, org.elasticsearc... | public void tearDown() throws java.lang.Exception {
org.elasticsearch.cluster.settings.DynamicSettings dynamicSettings = node().injector().getInstance(org.elasticsearch.common.inject.Key.get(org.elasticsearch.cluster.settings.DynamicSettings.class, org.elasticsearch.cluster.settings.ClusterDynamicSettings.class));
... |
private void process(java.io.File file, java.net.URL dest, boolean expectContinue) throws java.lang.Exception {
log(((((("putting " + file) + " to ") + dest) + " with expectContinue=") + expectContinue), Project.MSG_VERBOSE);
getSardine().put(dest.toString(), new java.io.FileInputStream(file), fContentType, exp... | private void process(java.io.File file, java.net.URL dest, boolean expectContinue) throws java.lang.Exception {
log(((((("putting " + file) + " to ") + dest) + " with expectContinue=") + expectContinue), Project.MSG_VERBOSE);
getSardine().put(dest.toString(), file, fContentType, expectContinue);
} |
public void onClick(android.content.DialogInterface dialog, int id) {
org.openobservatory.ooniprobe.data.TestStorage.removeAllTests(this);
org.openobservatory.ooniprobe.fragment.PastTestsFragment pastTestsFragment = ((org.openobservatory.ooniprobe.fragment.PastTestsFragment) (getSupportFragmentManager().findFra... | public void onClick(android.content.DialogInterface dialog, int id) {
org.openobservatory.ooniprobe.data.TestStorage.removeAllTests(this, this);
org.openobservatory.ooniprobe.fragment.PastTestsFragment pastTestsFragment = ((org.openobservatory.ooniprobe.fragment.PastTestsFragment) (getSupportFragmentManager().f... |
public java.lang.Short getShort(java.lang.String key) {
java.lang.String value = getString(key);
if (value == null)
return notFound();
try {
return java.lang.Short.parseShort(value);
} catch (java.lang.NumberFormatException e) {
return parseError(e);
}
} | public java.lang.Short getShort(java.lang.String key) {
java.lang.String value = getString(key);
if (value == null)
return notFound();
try {
return java.lang.Short.parseShort(value);
} catch (java.lang.NumberFormatException e) {
return parseError(key, value, e);
}
} |
public java.lang.Object get(be.nabu.glue.core.api.CollectionIterable collection, java.lang.Integer index) {
if ((collection == null) || (index >= (be.nabu.glue.core.impl.methods.ScriptMethods.size(collection)))) {
return null;
}
java.lang.Iterable<?> start = be.nabu.glue.core.impl.methods.v2.SeriesM... | public java.lang.Object get(be.nabu.glue.core.api.CollectionIterable collection, java.lang.Integer index) {
if ((collection == null) || (index >= (be.nabu.glue.core.impl.methods.ScriptMethods.size(collection)))) {
return null;
}
java.lang.Iterable<?> start = be.nabu.glue.core.impl.methods.v2.SeriesM... |
public void update() {
if (((lastCode) != (-1)) && ((nextChar) < (java.lang.System.currentTimeMillis()))) {
keyTyped(lastChar, lastCode);
nextChar = (java.lang.System.currentTimeMillis()) + (com.besuikerd.autologistics.client.lib.gui.element.Element.THRESHOLD_NEXT_KEY_TYPED);
java.lang.Syste... | public void update() {
if (((lastCode) != (-1)) && ((nextChar) < (java.lang.System.currentTimeMillis()))) {
keyTyped(lastChar, lastCode);
nextChar = (java.lang.System.currentTimeMillis()) + (com.besuikerd.autologistics.client.lib.gui.element.Element.THRESHOLD_NEXT_KEY_TYPED);
}
doTrigger(Tri... |
public void getTask(android.view.View listItem) {
com.example.natashaford.todolist.Task task = ((com.example.natashaford.todolist.Task) (listItem.getTag()));
android.util.Log.d("Task title: ", task.getTitle());
android.content.Intent intent = new android.content.Intent(this, com.example.natashaford.todolist... | public void getTask(android.view.View listItem) {
com.example.natashaford.todolist.Task task = ((com.example.natashaford.todolist.Task) (listItem.getTag()));
android.util.Log.d("Task title: ", task.getTitle());
android.content.Intent intent = new android.content.Intent(this, com.example.natashaford.todolist... |
public org.springframework.http.ResponseEntity create(@com.adswizz.controller.RequestBody
com.adswizz.domain.dto.ScoreDTO score) {
try {
com.adswizz.controller.ScoreController.LOGGER.debug(((("insert score: " + (score.getId())) + " ") + (score.getScore())));
return new org.springframework.http.Respo... | public org.springframework.http.ResponseEntity create(@com.adswizz.controller.RequestBody
com.adswizz.domain.dto.ScoreDTO score) throws com.adswizz.service.exception.ServiceException {
com.adswizz.controller.ScoreController.LOGGER.debug(((("insert score: " + (score.getId())) + " ") + (score.getScore())));
retur... |
public void onModuleLoad() {
com.google.gwt.core.client.GWT.setUncaughtExceptionHandler(new com.google.gwt.core.client.GWT.UncaughtExceptionHandler() {
@java.lang.Override
public void onUncaughtException(java.lang.Throwable e) {
rosa.pageturner.client.util.Console.log(("An unexpected err... | public void onModuleLoad() {
com.google.gwt.core.client.GWT.setUncaughtExceptionHandler(new com.google.gwt.core.client.GWT.UncaughtExceptionHandler() {
@java.lang.Override
public void onUncaughtException(java.lang.Throwable e) {
rosa.pageturner.client.util.Console.log(("An unexpected err... |
public boolean workCycle() {
forestry.core.fluids.FluidHelper.FillStatus status;
if (currentRecipe.fillRecipe) {
status = forestry.core.fluids.FluidHelper.fillContainers(tankManager, this, InventoryBottler.SLOT_RIGHT_PROCESSING, InventoryBottler.SLOT_OUTPUT_FULL_CONTAINER, currentRecipe.fluid.getFluid()... | public boolean workCycle() {
forestry.core.fluids.FluidHelper.FillStatus status;
if (currentRecipe.fillRecipe) {
status = forestry.core.fluids.FluidHelper.fillContainers(tankManager, this, InventoryBottler.SLOT_RIGHT_PROCESSING, InventoryBottler.SLOT_OUTPUT_FULL_CONTAINER, currentRecipe.fluid.getFluid()... |
private void stopSensors(final org.deviceconnect.android.deviceplugin.linking.linking.LinkingDevice device) {
if ((((containsBattery(device)) || (containsHumidity(device))) || (containsOrientation(device))) || (containsTemperature(device))) {
return ;
}
int count = countDownSensor(device.getBdAddres... | private void stopSensors(final org.deviceconnect.android.deviceplugin.linking.linking.LinkingDevice device) {
if (((((device == null) || (containsBattery(device))) || (containsHumidity(device))) || (containsOrientation(device))) || (containsTemperature(device))) {
return ;
}
int count = countDownSen... |
private void addSpeedBuff(net.minecraft.entity.EntityLivingBase entityLivingBase, int enchantmentLevel) {
net.minecraft.entity.ai.attributes.IAttributeInstance speedAttribute = entityLivingBase.getAttributeMap().getAttributeInstance(SharedMonsterAttributes.movementSpeed);
if ((speedAttribute.getModifier(io.gith... | private void addSpeedBuff(net.minecraft.entity.EntityLivingBase entityLivingBase, int enchantmentLevel) {
net.minecraft.entity.ai.attributes.IAttributeInstance speedAttribute = entityLivingBase.getAttributeMap().getAttributeInstance(SharedMonsterAttributes.movementSpeed);
if ((speedAttribute.getModifier(io.gith... |
private void doCreateMediaShareInLocalMediaShareMapFunction() {
android.content.Intent operationIntent = new android.content.Intent(com.winsun.fruitmix.util.Util.OPERATION);
operationIntent.putExtra(Util.OPERATION_TYPE_NAME, OperationType.CREATE.name());
operationIntent.putExtra(Util.OPERATION_TARGET_TYPE_N... | private void doCreateMediaShareInLocalMediaShareMapFunction() {
for (com.winsun.fruitmix.model.MediaShare mediaShare : LocalCache.LocalMediaShareMapKeyIsUUID.values()) {
android.content.Intent operationIntent = new android.content.Intent(com.winsun.fruitmix.util.Util.OPERATION);
operationIntent.putE... |
protected void endRender() {
int start = 5;
int numElements = (4 * 2) + 1;
for (int i = 0; i < numElements; i++) {
glDisableVertexAttribArray((start + i));
}
super.endRender();
} | protected void endRender() {
int start = 5;
int numElements = (4 * 2) + 2;
for (int i = 0; i < numElements; i++) {
glDisableVertexAttribArray((start + i));
}
super.endRender();
} |
public static void main(java.lang.String[] args) {
int number;
int remainder;
java.util.Scanner input = new java.util.Scanner(java.lang.System.in);
java.lang.System.out.println("Please enter a number>>> ");
number = input.nextInt();
if ((number % 2) == 0) {
java.lang.System.out.println("... | public static void main(java.lang.String[] args) {
int number;
java.util.Scanner input = new java.util.Scanner(java.lang.System.in);
java.lang.System.out.println("Please enter a number>>> ");
number = input.nextInt();
if ((number % 2) == 0) {
java.lang.System.out.println("Your number was eve... |
protected static void addConstructorUses(java.util.Set<com.github.juanmf.java2plant.structure.Relation> relations, java.lang.Class<?> fromType, java.lang.reflect.Constructor<?> c) {
java.lang.Class<?>[] parameterTypes = c.getParameterTypes();
java.lang.reflect.Type[] genericParameterTypes = c.getGenericParamete... | protected static void addConstructorUses(java.util.Set<com.github.juanmf.java2plant.structure.Relation> relations, java.lang.Class<?> fromType, java.lang.reflect.Constructor<?> c) {
java.lang.reflect.Type[] genericParameterTypes = c.getGenericParameterTypes();
for (int i = 0; i < (genericParameterTypes.length);... |
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
displayLayout();
android.util.Log.d(TAG, "Created me");
info = "";
if ((getIntent()) != null) {
info = getIntent().getStringExtra(TvInputInfo.EXTRA_INPUT_ID);
android.util.Log.d(TAG, i... | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
displayLayout();
android.util.Log.d(TAG, "Created me");
info = "";
if ((getIntent()) != null) {
info = getIntent().getStringExtra(TvInputInfo.EXTRA_INPUT_ID);
android.util.Log.d(TAG, (... |
private void btnCadastroAeroActionPerformed(java.awt.event.ActionEvent evt) {
try {
java.sql.PreparedStatement pst = conexao.conn.prepareStatement("insert into cliente(nome,cpf) values(?,?)");
pst.setString(1, txtNome.getText());
pst.setString(2, txtCPF.getText());
pst.executeUpdate(... | private void btnCadastroAeroActionPerformed(java.awt.event.ActionEvent evt) {
try {
java.sql.PreparedStatement pst = conexao.conn.prepareStatement("insert into cliente(nome,cpf) values(?,?)");
pst.executeUpdate();
javax.swing.JOptionPane.showMessageDialog(rootPane, "Cliente Cadastrado");
... |
private void suppressMultipleLogs(boolean isState, java.util.concurrent.atomic.AtomicBoolean wasState, java.lang.String positive, java.lang.String negative) {
if (isState)
if (isState) {
if (!(wasState.get()))
android.util.Log.d(de.fuberlin.service.NetworkService.LOG_TAG, positiv... | private void suppressMultipleLogs(boolean isState, java.util.concurrent.atomic.AtomicBoolean wasState, java.lang.String positive, java.lang.String negative) {
if (isState) {
if (!(wasState.get()))
android.util.Log.d(de.fuberlin.service.NetworkService.LOG_TAG, positive);
wasState... |
private static com.googlecode.paradox.metadata.ParadoxTable getTable(final com.googlecode.paradox.ParadoxConnection conn, final java.lang.String tableName) throws java.sql.SQLException {
final java.util.ArrayList<com.googlecode.paradox.metadata.ParadoxTable> tables = com.googlecode.paradox.data.TableData.listTables... | private static com.googlecode.paradox.metadata.ParadoxTable getTable(final com.googlecode.paradox.ParadoxConnection conn, final java.lang.String tableName) throws java.sql.SQLException {
final java.util.ArrayList<com.googlecode.paradox.metadata.ParadoxTable> tables = com.googlecode.paradox.data.TableData.listTables... |
public com.flashphoner.sdk.softphone.ISoftphoneCall call(final java.lang.String caller, final java.lang.String callee, final java.lang.String visibleName, final java.lang.Boolean isVideoCall, java.util.Map<java.lang.String, java.lang.String> inviteParameters) throws com.flashphoner.sdk.softphone.exception.LicenseRestic... | public com.flashphoner.sdk.softphone.ISoftphoneCall call(final java.lang.String caller, final java.lang.String callee, final java.lang.String visibleName, final java.lang.Boolean isVideoCall, java.util.Map<java.lang.String, java.lang.String> inviteParameters) throws com.flashphoner.sdk.softphone.exception.LicenseRestic... |
public void StartTurn() {
turnData = ((org.json.simple.JSONObject) (gameData.get(java.lang.String.valueOf(this.turnCount))));
addNewTrains();
buyNewStations();
playerTurn.lineBonuses();
playerTurn.stationRewards();
addStationFaults();
addStationLocks();
updatePlayerScores();
updatePl... | public void StartTurn() {
turnData = ((org.json.simple.JSONObject) (gameData.get(java.lang.String.valueOf(this.turnCount))));
playerTurn.lineBonuses();
playerTurn.stationRewards();
addStationFaults();
addStationLocks();
updatePlayerScores();
updatePlayerCards();
updateGoals();
for (c... |
public void apply(int frame) {
com.jme3.math.Transform targetTransform = ((targetOMA) != null) ? constraintHelper.getTransform(targetOMA, subtargetName, targetSpace) : null;
constraintDefinition.bake(ownerSpace, targetSpace, targetTransform, ipo.calculateValue(frame));
} | public void apply(int frame) {
com.jme3.math.Transform targetTransform = ((targetOMA) != null) ? constraintHelper.getTransform(targetOMA, subtargetName, targetSpace) : null;
constraintDefinition.bake(ownerSpace, targetSpace, targetTransform, ((float) (ipo.calculateValue(frame))));
} |
public static havabol.ResultValue logicalNot(havabol.ResultValue op1, havabol.Parser parser) {
havabol.ResultValue res = new havabol.ResultValue();
res.setType(Token.BOOLEAN);
res.setStructure(STIdentifier.PRIMITIVE);
if (op1.getValue().equals("T")) {
res.setValue("F");
}
if (op1.getValu... | public static havabol.ResultValue logicalNot(havabol.ResultValue op1, havabol.Parser parser) {
havabol.ResultValue res = new havabol.ResultValue();
res.setType(Token.BOOLEAN);
res.setStructure(STIdentifier.PRIMITIVE);
if (op1.getValue().equals("T")) {
res.setValue("F");
}
if (op1.getValu... |
public void filter(java.util.List<event.Event> list) {
java.util.List<event.Event> decoratedList = decoratedFilterWork(list);
for (event.Event entry : decoratedList) {
try {
if (entry.containsKeyword(entry.get("title"), myKeyword)) {
myFilteredList.add(entry);
}
... | public void filter(java.util.List<event.Event> list) {
java.util.List<event.Event> decoratedList = decoratedFilterWork(list);
for (event.Event entry : decoratedList) {
try {
if (entry.containsKeyword("title", myKeyword)) {
myFilteredList.add(entry);
}
} ca... |
public void intelligence() {
accelerate(((player.getPose().x) - (getPose().x)), ((player.getPose().y) - (getPose().y)));
java.lang.System.out.println((((xVelocity) + " ") + (yVelocity)));
move();
} | public void intelligence() {
accelerate(((player.getPose().x) - (getPose().x)), ((player.getPose().y) - (getPose().y)));
move();
} |
private void createReportMailingJobRunHistroryAfterJobExecution(final org.mifosplatform.infrastructure.reportmailingjob.domain.ReportMailingJob reportMailingJob, final java.lang.StringBuilder errorLog, final org.joda.time.DateTime jobStartDateTime, final java.lang.String jobRunStatus) {
final org.joda.time.DateTime... | private void createReportMailingJobRunHistroryAfterJobExecution(final org.mifosplatform.infrastructure.reportmailingjob.domain.ReportMailingJob reportMailingJob, final java.lang.StringBuilder errorLog, final org.joda.time.DateTime jobStartDateTime, final java.lang.String jobRunStatus) {
final org.joda.time.DateTime... |
public void testConnectRemoteBrokerFacade() throws java.lang.Exception {
java.lang.String jmxUri = getJmxUri();
java.lang.System.setProperty("webconsole.jmx.url", jmxUri);
org.apache.activemq.web.RemoteJMXBrokerFacade brokerFacade = new org.apache.activemq.web.RemoteJMXBrokerFacade();
org.apache.activem... | public void testConnectRemoteBrokerFacade() throws java.lang.Exception {
brokerFacade = new org.apache.activemq.web.RemoteJMXBrokerFacade();
org.apache.activemq.web.config.SystemPropertiesConfiguration configuration = new org.apache.activemq.web.config.SystemPropertiesConfiguration();
brokerFacade.setConfig... |
public void onClick(android.view.View v) {
enginek.dreamspace.Dream dream = new enginek.dreamspace.Dream();
dream.setId(args.getInt("id"));
db.deleteDream(dream);
dialog.dismiss();
enginek.dreamspace.MainActivity.unhideButtons();
getFragmentManager().popBackStack();
} | public void onClick(android.view.View v) {
enginek.dreamspace.Dream dream = new enginek.dreamspace.Dream();
dream.setId(args.getInt("id"));
db.deleteDream(dream);
dialog.dismiss();
getFragmentManager().popBackStack();
} |
private boolean isCanSetOnDestination(int locationIndex, org.moshe.arad.game.instrument.BackgammonPawn backgammonPawn) {
return ((!((board.get(locationIndex).size()) > 0)) && ((board.get(locationIndex).peek()) != null)) && (!(board.get(locationIndex).peek().equals(backgammonPawn)));
} | private boolean isCanSetOnDestination(int locationIndex, org.moshe.arad.game.instrument.BackgammonPawn backgammonPawn) {
return (((board.get(locationIndex).size()) > 0) && ((board.get(locationIndex).peek()) != null)) && (!(board.get(locationIndex).peek().equals(backgammonPawn))) ? false : true;
} |
public static pe.util.math.Vec2f[] giveBorderEdgeIDs(pe.util.math.Vec2f[] polygon) {
pe.util.math.Vec2f[] borderIDs = new pe.util.math.Vec2f[polygon.length];
pe.util.math.Vec2f id0 = new pe.util.math.Vec2f(0, ((polygon.length) - 1));
borderIDs[0] = id0;
for (int i = 0; i < (polygon.length); i++) {
... | public static pe.util.math.Vec2f[] giveBorderEdgeIDs(pe.util.math.Vec2f[] polygon) {
pe.util.math.Vec2f[] borderIDs = new pe.util.math.Vec2f[polygon.length];
pe.util.math.Vec2f id0 = new pe.util.math.Vec2f(0, ((polygon.length) - 1));
borderIDs[0] = id0;
for (int i = 1; i < (polygon.length); i++) {
... |
public void resumeSubmittedHpcJobInfos() {
for (int status = 0; status <= 2; status++) {
java.lang.System.out.println((("resumeSubmittedHpcJobInfos: " + "looping status: ") + status));
java.util.List<edu.pitt.dbmi.tetrad.db.entity.HpcJobInfo> submittedHpcJobInfo = hpcJobInfoService.findByStatus(stat... | public void resumeSubmittedHpcJobInfos() {
for (int status = 0; status <= 2; status++) {
java.util.List<edu.pitt.dbmi.tetrad.db.entity.HpcJobInfo> submittedHpcJobInfo = hpcJobInfoService.findByStatus(status);
if (submittedHpcJobInfo != null) {
for (edu.pitt.dbmi.tetrad.db.entity.HpcJobIn... |
public void handleMessage(com.ubirouting.instantmsg.msgservice.Message msg) {
switch (msg.what) {
case com.ubirouting.instantmsg.msgservice.MsgService.MSG_SEND_MESSAGE :
if (((msg.obj) != null) && ((msg.obj) instanceof com.ubirouting.instantmsg.msgservice.Transaction)) {
int find... | public void handleMessage(com.ubirouting.instantmsg.msgservice.Message msg) {
switch (msg.what) {
case com.ubirouting.instantmsg.msgservice.MsgService.MSG_SEND_MESSAGE :
int findableId = msg.arg1;
msgDispatcher.register(msg.replyTo, findableId);
addToSendPendingQueue(com.... |
public void createCbButtons() {
java.lang.String[] theType = editor.getTypes();
filterMenu.removeAll();
filterList.clear();
for (int i = 0; i < (theType.length); i++) {
final java.lang.String typeName = theType[i];
javax.swing.JCheckBoxMenuItem button = new javax.swing.JCheckBoxMenuItem(... | public void createCbButtons() {
java.lang.String[] theType = editor.getTypes();
filterMenu.removeAll();
filterList.clear();
for (int i = 0; i < (theType.length); i++) {
final java.lang.String typeName = theType[i];
javax.swing.JCheckBoxMenuItem button = new javax.swing.JCheckBoxMenuItem(... |
private long indexUsages(com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx db) {
final long oldIndexUsage;
try {
oldIndexUsage = getProfilerInstance().getCounter((("db." + (com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelectTest.DB_NAME)) + ".query.indexUsed"));
retur... | private long indexUsages(com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx db) {
final long oldIndexUsage;
try {
oldIndexUsage = getProfilerInstance().getCounter((("db." + (com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelectTest.DB_NAME)) + ".query.indexUsed"));
retur... |
public void run() {
if ((count) > 0) {
count -= 50;
onSlide(count, zeus.minhquan.lifemanager.RecordActivity.TypeSlide.DOWN);
android.util.Log.d(zeus.minhquan.lifemanager.RecordActivity.TAG, ("FkingCount" + (count)));
}else {
ivSave.setImageResource(R.drawable.ic_pre_black_24dp);
... | public void run() {
if ((count) > 0) {
count -= 50;
onSlide(count, zeus.minhquan.lifemanager.RecordActivity.TypeSlide.DOWN);
}else {
ivSave.setImageResource(R.drawable.ic_pre_black_24dp);
isSave = true;
timerShow.cancel();
timerShow.purge();
ivShowRecord.s... |
protected void computeMetadata(com.pervasive.datarush.operators.StreamingMetadataContext context) {
context.parallelize(ParallelismStrategy.NON_PARALLELIZABLE);
output.setType(context, com.pervasive.datarush.types.TokenTypeConstant.record(com.pervasive.datarush.types.TokenTypeConstant.OBJECT(com.actian.ilabs.da... | protected void computeMetadata(com.pervasive.datarush.operators.StreamingMetadataContext context) {
context.parallelize(ParallelismStrategy.NON_PARALLELIZABLE);
output.setType(context, com.pervasive.datarush.types.TokenTypeConstant.record(com.pervasive.datarush.types.TokenTypeConstant.OBJECT(com.actian.ilabs.da... |
private void processStatus(com.fasterxml.jackson.databind.JsonNode input) {
com.fasterxml.jackson.databind.node.ObjectNode statusNode = ((com.fasterxml.jackson.databind.node.ObjectNode) (input.path(org.symphonyoss.integration.webhook.jira.JiraParserConstants.ISSUE_PATH).path(org.symphonyoss.integration.webhook.jira... | private void processStatus(com.fasterxml.jackson.databind.JsonNode input) {
com.fasterxml.jackson.databind.JsonNode statusNode = input.path(org.symphonyoss.integration.webhook.jira.JiraParserConstants.ISSUE_PATH).path(org.symphonyoss.integration.webhook.jira.JiraParserConstants.FIELDS_PATH).path(org.symphonyoss.int... |
public void onClick(android.view.View view) {
int position = rvMovies.getChildLayoutPosition(view);
com.udacity.mauricio.popularmovies.models.MovieDTO movie = adapter.getMovies().get(position);
movie.isFavorite = localRepository.hasMovie(movie);
android.support.v4.app.ActivityOptionsCompat options = and... | public void onClick(android.view.View view) {
int position = rvMovies.getChildLayoutPosition(view);
com.udacity.mauricio.popularmovies.models.MovieDTO movie = adapter.getMovies().get(position);
movie.isFavorite = localRepository.hasMovie(movie);
android.support.v4.app.ActivityOptionsCompat options = and... |
private int getPrefixIndexMinLength() {
int length = com.emc.storageos.db.client.model.DataObject.DEFAULT_MIN_LABEL_LENGTH;
try {
java.lang.reflect.Method method = com.emc.storageos.db.client.model.DataObject.class.getDeclaredMethod(com.emc.storageos.db.client.model.DataObject.READ_LABEL_METHOD_NAME, ne... | private int getPrefixIndexMinLength() {
int length = com.emc.storageos.db.client.model.DataObject.DEFAULT_MIN_LABEL_LENGTH;
try {
java.lang.reflect.Method method = com.emc.storageos.db.client.model.DataObject.class.getDeclaredMethod(com.emc.storageos.db.client.model.DataObject.READ_LABEL_METHOD_NAME, nu... |
public com.google.common.collect.Multimap<com.palantir.atlasdb.keyvalue.api.Cell, java.lang.Long> getAllTimestamps(java.lang.String tableName, java.util.Set<com.palantir.atlasdb.keyvalue.api.Cell> cells, long ts) {
com.palantir.atlasdb.keyvalue.cassandra.CQLKeyValueServices.AllTimestampsCollector collector = new co... | public com.google.common.collect.Multimap<com.palantir.atlasdb.keyvalue.api.Cell, java.lang.Long> getAllTimestamps(java.lang.String tableName, java.util.Set<com.palantir.atlasdb.keyvalue.api.Cell> cells, long ts) {
com.palantir.atlasdb.keyvalue.cassandra.CQLKeyValueServices.AllTimestampsCollector collector = new co... |
private void explore(java.io.File file, int depth) {
if (depth != 0) {
if (file.isDirectory()) {
java.io.File[] files = file.listFiles();
if (files != null) {
for (java.io.File subFile : files) {
explore(subFile, (depth - 1));
}
... | private void explore(java.io.File file, int depth) {
if (depth != (-1)) {
if (file.isDirectory()) {
java.io.File[] files = file.listFiles();
if (files != null)
for (java.io.File subFile : files) {
explore(subFile, (depth - 1));
}
... |
public void add(K key, V value) {
java.util.ArrayList<V> list = this.get(key);
if (list == null) {
list = new java.util.ArrayList<V>();
this.put(key, list);
}
list.add(value);
} | public java.util.ArrayList<V> add(K key) {
java.util.ArrayList<V> list = this.get(key);
if (list == null) {
list = new java.util.ArrayList<V>();
this.put(key, list);
}
return list;
} |
public void insertIntoTable(java.lang.String strTableName, java.util.Hashtable<java.lang.String, java.lang.String> htblColNameValue) throws exceptions.DBAppException {
for (Arcookies.Table table : tables) {
if ((table.getName()) == strTableName) {
try {
Arcookies.Page tempPage = ... | public void insertIntoTable(java.lang.String strTableName, java.util.Hashtable<java.lang.String, java.lang.String> htblColNameValue) throws exceptions.DBAppException {
for (Arcookies.Table table : tables) {
if ((table.getName()) == strTableName) {
try {
Arcookies.Page tempPage = ... |
public int compare(java.util.HashMap<java.lang.Integer, java.lang.Double> lhs, java.util.HashMap<java.lang.Integer, java.lang.Double> rhs) {
double result = (-1) * ((lhs.values().toArray(new java.lang.Double[1])[0]) - (lhs.values().toArray(new java.lang.Double[1])[0]));
if (result == 0) {
}
return ((int... | public int compare(java.util.ArrayList<java.lang.Object> lhs, java.util.ArrayList<java.lang.Object> rhs) {
double result;
result = ((double) (rhs.get(1))) - ((double) (lhs.get(1)));
if (result > 0) {
return 1;
}else
if (result < 0) {
return -1;
}
return 0;
} |
private void handleUpAction() {
switch (currentLibraryState) {
case BROWSING :
this.finish();
break;
case ENCRYPT_SELECTING :
case DECRYPT_SELECTING :
if (avoidBrowsingMode) {
this.finish();
}else {
setMenuVisibl... | private void handleUpAction() {
switch (currentLibraryState) {
case BROWSING :
this.finish();
break;
case ENCRYPT_SELECTING :
case DECRYPT_SELECTING :
if (avoidBrowsingMode) {
this.finish();
}else {
getSupportAct... |
public java.util.List<java.net.URI> getLicensesList(boolean relative) {
java.util.List<java.net.URI> URIs = eu.asterics.mw.services.ComponentUtils.findFiles(toAbsolute(eu.asterics.mw.services.ResourceRegistry.LICENSES_FOLDER), relative, 1, new java.io.FilenameFilter() {
@java.lang.Override
public bo... | public java.util.List<java.net.URI> getLicensesList(boolean relative) {
java.util.List<java.net.URI> URIs = getLicensesList(new java.io.FilenameFilter() {
@java.lang.Override
public boolean accept(java.io.File dir, java.lang.String name) {
return name.endsWith(".txt");
}
}, r... |
protected java.lang.String getRefreshNoItemContainerJavaScript(java.lang.String id, java.lang.String parentId, java.lang.Boolean isVisible) {
if (isVisible()) {
java.lang.String cssClass = "list-group-item";
java.lang.String javaScript = java.lang.String.format(("jQuery(\"#%s\").remove(); " + (("var... | protected java.lang.String getRefreshNoItemContainerJavaScript(java.lang.String id, java.lang.String parentId, java.lang.Boolean isVisible) {
if (isVisible()) {
java.lang.String cssClass = "list-group-item";
return java.lang.String.format(("jQuery(\"#%s\").remove(); " + (("var item = jQuery(\"<div><... |
private static java.lang.String parseHGid(java.lang.String layer, java.lang.String id) {
java.lang.CharSequence delimiter = "/";
if ((org.waag.histograph.queue.InputReader.isNumeric(id)) || (!(id.contains(delimiter)))) {
return (layer + "/") + id;
}else {
return id;
}
} | private static java.lang.String parseHGid(java.lang.String source, java.lang.String id) {
java.lang.CharSequence delimiter = "/";
if ((org.waag.histograph.queue.InputReader.isNumeric(id)) || (!(id.contains(delimiter)))) {
return (source + "/") + id;
}else {
return id;
}
} |
public void removeAssetFactory(java.lang.String publicKey) throws com.bitdubai.fermat_dap_api.layer.dap_middleware.dap_asset_factory.exceptions.CantDeleteAsserFactoryException {
try {
com.bitdubai.fermat_dap_api.layer.dap_middleware.dap_asset_factory.interfaces.AssetFactory assetFactory = getAssetFactoryByA... | public void removeAssetFactory(java.lang.String publicKey) throws com.bitdubai.fermat_dap_api.layer.dap_middleware.dap_asset_factory.exceptions.CantDeleteAsserFactoryException {
try {
com.bitdubai.fermat_dap_api.layer.dap_middleware.dap_asset_factory.interfaces.AssetFactory assetFactory = getAssetFactoryByA... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.