buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public static java.util.List<org.wso2.carbon.analytics.datasource.commons.Record> getRecordsForTable(java.lang.String username, java.lang.String tableName, java.util.List<org.wso2.carbon.analytics.restapi.beans.RecordBean> recordBeans) throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException {
... | public static java.util.List<org.wso2.carbon.analytics.datasource.commons.Record> getRecordsForTable(java.lang.String username, java.lang.String tableName, java.util.List<org.wso2.carbon.analytics.restapi.beans.RecordBean> recordBeans) throws org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsException {
... |
private boolean isTouchWithinSlopOfOriginalTouch() {
float dx = (mCurrentViewPosition.x) - (mOriginalTouchPosition.x);
float dy = (mCurrentViewPosition.y) - (mOriginalTouchPosition.y);
double distance = java.lang.Math.sqrt(((java.lang.Math.pow(dx, 2)) + (java.lang.Math.pow(dy, 2))));
android.util.Log.d(... | private boolean isTouchWithinSlopOfOriginalTouch(float dx, float dy) {
double distance = java.lang.Math.sqrt(((java.lang.Math.pow(dx, 2)) + (java.lang.Math.pow(dy, 2))));
android.util.Log.d(io.mattcarroll.hover.window.InWindowDragger.TAG, ((("Drag distance " + distance) + " vs slop allowance ") + (mTapTouchSlop... |
private void showTaskbar() {
startButton.setVisibility(View.VISIBLE);
if (isShowingRecents) {
if ((taskbar.getVisibility()) == (android.view.View.GONE))
taskbar.setVisibility(View.INVISIBLE);
divider.setVisibility(View.VISIBLE);
space.setVisibility(View.VISIBLE);
... | private void showTaskbar() {
startButton.setVisibility(View.VISIBLE);
space.setVisibility(View.VISIBLE);
if (isShowingRecents) {
if ((taskbar.getVisibility()) == (android.view.View.GONE))
taskbar.setVisibility(View.INVISIBLE);
divider.setVisibility(View.VISIBLE);
}
... |
public boolean updateAfterSync(java.util.HashSet<T> tHashSet) {
java.util.LinkedHashSet<com.bano.goblin.database.ParamUpdate> paramUpdates = new java.util.LinkedHashSet<>();
for (T t : tHashSet) {
paramUpdates.add(new com.bano.goblin.database.ParamUpdate(com.bano.goblin.database.BaseSyncableDao.getTable... | public boolean updateAfterSync(java.util.HashSet<T> tHashSet) {
java.util.LinkedHashSet<com.bano.goblin.database.ParamUpdate> paramUpdates = new java.util.LinkedHashSet<>();
for (T t : tHashSet) {
paramUpdates.add(new com.bano.goblin.database.ParamUpdate(com.bano.goblin.database.BaseSyncableDao.getTable... |
private de.mediapool.server.entities.users.domain.UserNodeDTO createUser(@org.springframework.web.bind.annotation.RequestBody
de.mediapool.server.entities.users.domain.UserNodeDTO userNodeDTO) {
userNodeDTO.setId(java.util.UUID.randomUUID().toString());
{
de.mediapool.server.entities.users.domain.UserRo... | public de.mediapool.server.entities.users.domain.UserNodeDTO createUser(@org.springframework.web.bind.annotation.RequestBody
de.mediapool.server.entities.users.domain.UserNodeDTO userNodeDTO) {
userNodeDTO.setId(java.util.UUID.randomUUID().toString());
{
de.mediapool.server.entities.users.domain.UserRol... |
public static double[] concordia(double r207Pb_235U, double r207Pb_235U_1SigmaAbs, double r206Pb_238U, double r206Pb_238U_1SigmaAbs, double rho) {
double[] retVal = new double[]{ 0 , 0 , 0 , 0 };
double[] inputData;
if ((r207Pb_235U > 0.0) && (r206Pb_238U > 0.0)) {
inputData = new double[]{ r207Pb_2... | public static double[] concordia(double r207Pb_235U, double r207Pb_235U_1SigmaAbs, double r206Pb_238U, double r206Pb_238U_1SigmaAbs, double rho) {
double[] retVal = new double[]{ 0 , 0 , 0 };
double[] inputData;
if ((r207Pb_235U > 0.0) && (r206Pb_238U > 0.0)) {
inputData = new double[]{ r207Pb_235U ... |
private void updateShareIntent() {
if ((((currentWeather) != null) && (isMenuVisible())) && ((getActivity()) instanceof laurenyew.weatherapp.detail.WeatherDetailPagerActivity)) {
java.lang.String forecastData = currentWeather.getCurrentConditionsInSharingFormat();
((laurenyew.weatherapp.detail.Weath... | private void updateShareIntent() {
if ((isMenuVisible()) && ((getActivity()) instanceof laurenyew.weatherapp.detail.WeatherDetailPagerActivity)) {
java.lang.String forecastData = ((currentWeather) != null) ? currentWeather.getCurrentConditionsInSharingFormat() : null;
((laurenyew.weatherapp.detail.W... |
public static double[] concordia(double r207Pb_235U, double r207Pb_235U_1SigmaAbs, double r206Pb_238U, double r206Pb_238U_1SigmaAbs, double rho) {
double[] retVal = new double[]{ 0 , 0 , 0 };
double[] inputData;
if ((r207Pb_235U > 0.0) && (r206Pb_238U > 0.0)) {
inputData = new double[]{ r207Pb_235U ... | public static double[] concordia(double r207Pb_235U, double r207Pb_235U_1SigmaAbs, double r206Pb_238U, double r206Pb_238U_1SigmaAbs, double rho) {
double[] retVal = new double[]{ 0 , 0 , 0 , 0 };
double[] inputData;
if ((r207Pb_235U > 0.0) && (r206Pb_238U > 0.0)) {
inputData = new double[]{ r207Pb_2... |
public void onItemClick(android.widget.AdapterView<?> parent, android.view.View view, int position, long id) {
android.content.Intent intent = new android.content.Intent(this, com.example.setditjenp2mkt.adapterdemo.AddStudentActivity.class);
int student = searchList.get(position).getNo();
com.example.setdit... | public void onItemClick(android.widget.AdapterView<?> parent, android.view.View view, int position, long id) {
android.content.Intent intent = new android.content.Intent(this, com.example.setditjenp2mkt.adapterdemo.AddStudentActivity.class);
int student = java.lang.Integer.parseInt(searchList.get(position).getN... |
public void acquireLock(io.hops.transaction.lock.TransactionLocks locks) throws java.io.IOException {
io.hops.transaction.lock.LockFactory lf = io.hops.transaction.lock.LockFactory.getInstance();
locks.add(lf.getIndividualINodeLock(INodeLockType.WRITE, inodeIdentifier)).add(lf.getLeaseLock(LockType.READ)).add(l... | public void acquireLock(io.hops.transaction.lock.TransactionLocks locks) throws java.io.IOException {
io.hops.transaction.lock.LockFactory lf = io.hops.transaction.lock.LockFactory.getInstance();
locks.add(lf.getIndividualINodeLock(INodeLockType.WRITE, inodeIdentifier, true)).add(lf.getLeaseLock(LockType.READ))... |
public static void main(java.lang.String[] args) {
while (true) {
Console.init();
java.lang.System.out.println();
java.lang.System.out.println("> Si vous souhaitez rejouer, taper (1)");
java.util.Scanner sc = new java.util.Scanner(java.lang.System.in);
if ((Console.isNumber(s... | public static void main(java.lang.String[] args) {
while (true) {
Console.init();
java.lang.System.out.println();
java.lang.System.out.println("> Si vous souhaitez rejouer, taper (1)");
java.util.Scanner sc = new java.util.Scanner(java.lang.System.in);
if ((Console.isNumber(s... |
public void setRotationPower(double power) {
hoodPosition.set(hoodMotor.getEncoderPosition());
if ((hoodPosition.get()) > (hoodExtendPosition.get())) {
setRotationPower(0);
}
if ((hoodPosition.get()) < (hoodRetractPosition.get())) {
setRotationPower(0);
}
hoodMotor.set(power);
} | public void setRotationPower(double power) {
hoodPosition.set(hoodMotor.getEncoderPosition());
if (((hoodPosition.get()) > (hoodExtendPosition.get())) || ((hoodPosition.get()) < (hoodRetractPosition.get()))) {
setRotationPower(0);
return ;
}
hoodMotor.set(power);
} |
private void report(boolean force) {
long now = java.lang.System.currentTimeMillis();
elapsedInterval = now - (lastStatsTime);
if (((elapsedInterval) >= (interval)) || force) {
elapsedTotal += elapsedInterval;
report(now);
reset(now);
}
} | private void report() {
long now = java.lang.System.currentTimeMillis();
elapsedInterval = now - (lastStatsTime);
if ((elapsedInterval) >= (interval)) {
elapsedTotal += elapsedInterval;
report(now);
reset(now);
}
} |
public org.json.JSONObject getQuestion(com.door43.translationstudio.core.SourceTranslation translation, java.lang.String chapterId, java.lang.String frameId, java.lang.String questionId) {
java.lang.String md5hash = readQuestionsLink(translation);
if (md5hash == null) {
return null;
}
return rea... | public org.json.JSONObject getQuestion(com.door43.translationstudio.core.SourceTranslation translation, java.lang.String chapterId, java.lang.String frameId, java.lang.String questionId) {
java.lang.String md5hash = readQuestionsLink(translation);
if (md5hash == null) {
return null;
}
return rea... |
public void mouseDragged(java.awt.event.MouseEvent e) {
obj.drawIntersection = true;
java.lang.System.out.println("I am reactiong!");
mouse_coordinates[0] = e.getX();
java.lang.System.out.println(mouse_coordinates[0]);
mouse_coordinates[1] = e.getY();
obj.intersectionPoint = obj.dmo_calculate.ca... | public void mouseDragged(java.awt.event.MouseEvent e) {
obj.drawIntersection = true;
mouse_coordinates[0] = e.getX();
mouse_coordinates[1] = e.getY();
obj.intersectionPoint = obj.dmo_calculate.calculateIntersection(mouse_coordinates, BoardSize, StartPoint, distance);
obj.update();
} |
public int averageTimeOfBooking(java.lang.String hotel) {
int days = 0;
org.hibernate.Query query = sessionFactory.getCurrentSession().createSQLQuery(("SELECT AVG( DATEDIFF(br.end_date, br.start_date) ) " + (((("FROM booking br " + "JOIN client_tours ct ON br.client_tour_id=ct.client_tour_id ") + " JOIN hotel_r... | public int averageTimeOfBooking(java.lang.String hotel) {
int days = 0;
org.hibernate.Query query = sessionFactory.getCurrentSession().createSQLQuery(("SELECT AVG( DATEDIFF(br.end_date, br.start_date) ) " + (((("FROM booking br " + "JOIN client_tours ct ON br.client_tour_id=ct.client_tour_id ") + " JOIN hotel_r... |
public void reportUnwantedToken(org.antlr.v4.runtime.Parser parser) {
org.antlr.v4.runtime.Token token = parser.getCurrentToken();
int line = getMissingSymbol(parser).getLine();
int position = getMissingSymbol(parser).getCharPositionInLine();
java.lang.String msg = "unwanted token " + (getTokenErrorDisp... | public void reportUnwantedToken(org.antlr.v4.runtime.Parser parser) {
org.antlr.v4.runtime.Token token = parser.getCurrentToken();
int line = getMissingSymbol(parser).getLine();
int position = getMissingSymbol(parser).getCharPositionInLine();
java.lang.String msg = "unwanted token " + (getTokenErrorDisp... |
public static void dfs(Graph g, java.lang.String vertex) {
for (java.lang.String neighbor : g.getNeighbors(vertex)) {
Main.visited.put(neighbor, java.lang.Boolean.TRUE);
Main.dfs(g, neighbor);
}
Main.alphabet[Main.counter] = vertex;
(Main.counter)--;
} | public static void dfs(Graph g, java.lang.String vertex) {
if (((Main.visited.get(vertex)) == null) || (!(Main.visited.get(vertex)))) {
Main.visited.put(vertex, java.lang.Boolean.TRUE);
for (java.lang.String neighbor : g.getNeighbors(vertex)) {
Main.dfs(g, neighbor);
}
Ma... |
public java.lang.Boolean beforeMoveOut(java.lang.Integer piratId, java.util.List<ru.mail.park.mechanics.utils.results.Result> results, ru.mail.park.mechanics.game.CoordPair targetCell) {
if (isUnderShip) {
return gameBoard.isShipNeighbors((piratId / 3), targetCell);
}else
if (isNeighbors(targetC... | public java.lang.Boolean beforeMoveOut(java.lang.Integer piratId, java.util.List<ru.mail.park.mechanics.utils.results.Result> results, ru.mail.park.mechanics.game.CoordPair targetCell) {
if (isNeighbors(targetCell)) {
return true;
}else
if (isUnderShip) {
return gameBoard.isShipNeigh... |
public void update(com.intellij.openapi.actionSystem.AnActionEvent e) {
final com.intellij.openapi.vfs.VirtualFile[] files = e.getRequiredData(CommonDataKeys.VIRTUAL_FILE_ARRAY);
final com.intellij.openapi.project.Project project = e.getProject();
if ((project == null) || (((files.length) == 1) && (files[0]... | public void update(com.intellij.openapi.actionSystem.AnActionEvent e) {
final com.intellij.openapi.vfs.VirtualFile[] files = e.getData(CommonDataKeys.VIRTUAL_FILE_ARRAY);
final com.intellij.openapi.project.Project project = e.getProject();
if (((project == null) || (files == null)) || (((files.length) == 1)... |
public static final boolean isOnline(android.content.Context context) {
android.net.ConnectivityManager conMgr = ((android.net.ConnectivityManager) (context.getSystemService(Context.CONNECTIVITY_SERVICE)));
if ((((conMgr.getActiveNetworkInfo()) != null) && (conMgr.getActiveNetworkInfo().isAvailable())) && (conM... | public static final boolean isOnline(android.content.Context context) {
android.net.ConnectivityManager conMgr = ((android.net.ConnectivityManager) (context.getSystemService(Context.CONNECTIVITY_SERVICE)));
return (((conMgr.getActiveNetworkInfo()) != null) && (conMgr.getActiveNetworkInfo().isAvailable())) && (c... |
private void parseIntervalType() {
for (int i = dooyit.parser.DeleteParser.INDEX_SINGLE; i < (dooyit.parser.DeleteParser.splitInput.length); i++) {
if (dooyit.parser.DeleteParser.splitInput[i].equals("-")) {
if ((!(isNumber(dooyit.parser.DeleteParser.splitInput[(i - 1)]))) || (isNumber(dooyit.pa... | private void parseIntervalType() {
for (int i = dooyit.parser.DeleteParser.INDEX_SINGLE; i < (dooyit.parser.DeleteParser.splitInput.length); i++) {
if (dooyit.parser.DeleteParser.splitInput[i].equals("-")) {
if ((!(isNumber(dooyit.parser.DeleteParser.splitInput[(i - 1)]))) || (!(isNumber(dooyit.... |
private void sendEvents() {
try {
int size = eventBuffer.size();
switch (size) {
case 0 :
{
return ;
}
case 1 :
{
inputProcessor.send(eventBuffer.get(0), currentIndex);
... | private void sendEvents() {
int size = eventBuffer.size();
switch (size) {
case 0 :
{
return ;
}
case 1 :
{
inputProcessor.send(eventBuffer.get(0), currentIndex);
eventBuffer.clear();
return ;
... |
public static org.json.JSONObject stripJsonMetadata(org.json.JSONObject json) {
if (gov.nasa.jpl.mbee.util.Debug.isOn())
gov.nasa.jpl.view_repo.util.NodeUtil.logger.debug(("stripJsonMetadata -> " + json));
json.remove("jsonString");
json.remove("jsonString4");
if (gov.nasa.jpl.mbee.util.Deb... | public static org.json.JSONObject stripJsonMetadata(org.json.JSONObject json) {
if (json == null)
return null;
if (gov.nasa.jpl.mbee.util.Debug.isOn())
gov.nasa.jpl.view_repo.util.NodeUtil.logger.debug(("stripJsonMetadata -> " + json));
json.remove("jsonString");
json.remove("j... |
public void onConnectionFailed(@android.support.annotation.NonNull
com.google.android.gms.common.ConnectionResult result) {
mSignedIn = false;
mConnecting = false;
android.util.Log.w(com.sam.hex.Settings.TAG, java.lang.String.format("Connection failed: %s", com.sam.hex.BaseGameActivity.toString(result)));
... | public void onConnectionFailed(@android.support.annotation.NonNull
com.google.android.gms.common.ConnectionResult result) {
mSignedIn = false;
mConnecting = false;
android.util.Log.w(com.sam.hex.Settings.TAG, java.lang.String.format("Connection failed: %s", com.sam.hex.BaseGameActivity.toString(result)));
... |
public void myInitBinder(org.springframework.web.bind.WebDataBinder dataBinder) {
java.lang.Object target = dataBinder.getTarget();
if (target == null) {
return ;
}
java.lang.System.out.println(("Target=" + target));
if ((target.getClass()) == (io.github.cyxcode.freedom.model.ProductInfo.cla... | public void myInitBinder(org.springframework.web.bind.WebDataBinder dataBinder) {
java.lang.Object target = dataBinder.getTarget();
if (target == null) {
return ;
}
if ((target.getClass()) == (io.github.cyxcode.freedom.model.ProductInfo.class)) {
dataBinder.setValidator(productInfoValida... |
public static ba.unsa.etf.si.app.Inventura.Model.TipZaposlenika provjerUserPass(java.lang.String username, java.lang.String password) throws java.lang.Exception {
try {
ba.unsa.etf.si.app.Inventura.Model.TipZaposlenika zaposlenik = ba.unsa.etf.si.app.Inventura.Kontroleri.TipZaposlenikaKontroler.nadjiKorisni... | public static ba.unsa.etf.si.app.Inventura.Model.TipZaposlenika provjerUserPass(java.lang.String username, java.lang.String password) throws java.lang.Exception {
try {
ba.unsa.etf.si.app.Inventura.Model.TipZaposlenika zaposlenik = new ba.unsa.etf.si.app.Inventura.Model.TipZaposlenika();
zaposlenik ... |
public void handleHint() {
java.util.ArrayList<main.java.group37.bejeweled.board.Tile> hint = main.java.group37.bejeweled.model.GameLogic.getHint();
if (!(hint.isEmpty())) {
panel.main.setFocusHint(hint.get(0).getLoc(), hint.get(1).getLoc());
}
} | public void handleHint() {
java.util.ArrayList<main.java.group37.bejeweled.board.Tile> hint = main.java.group37.bejeweled.model.GameLogic.getHint();
if (!(hint == null)) {
panel.main.setFocusHint(hint.get(0).getLoc(), hint.get(1).getLoc());
}
} |
private java.lang.String getFixedAddress(java.net.InetSocketAddress fixAddress) {
java.lang.String s = fixAddress.getAddress().toString();
if (s.equals("localhost/127.0.0.1"))
s = "localhost";
if ((s.indexOf("/")) != (-1))
s = s.substring(((s.indexOf("/")) + 1));
return s;
} | private java.lang.String getFixedAddress(java.net.InetSocketAddress fixAddress) {
java.lang.String s = fixAddress.getAddress().toString();
if ((s.indexOf("/")) != (-1))
s = s.substring(((s.indexOf("/")) + 1));
return s;
} |
public java.util.List<java.lang.String> getMenuOptions(Project.State currentState) {
java.util.List<java.lang.String> options = new java.util.ArrayList<java.lang.String>();
if (currentState == (State.MAIN)) {
options.add("View all Jobs");
options.add("Search volunteers by Last Name");
op... | public java.util.List<java.lang.String> getMenuOptions(Project.State currentState) {
java.util.List<java.lang.String> options = new java.util.ArrayList<java.lang.String>();
if (currentState == (State.MAIN)) {
options.add("View all Jobs");
options.add("Search volunteers by Last Name");
op... |
public java.lang.String getNewSessionAlias(javax.servlet.http.HttpServletRequest request) {
java.util.Set<java.lang.String> sessionAliases = getSessionIds(request).keySet();
if (sessionAliases.isEmpty()) {
return org.egov.infra.config.session.CookieHttpSessionStrategy.DEFAULT_ALIAS;
}
long lastA... | public java.lang.String getNewSessionAlias(final javax.servlet.http.HttpServletRequest request) {
final java.util.Set<java.lang.String> sessionAliases = getSessionIds(request).keySet();
if (sessionAliases.isEmpty())
return org.egov.infra.config.session.CookieHttpSessionStrategy.DEFAULT_ALIAS;
l... |
public void checkShowHelpScreen() {
android.content.SharedPreferences preferences = activity.getSharedPreferences(activity.getString(R.string.shared_prefs_file_key), Context.MODE_PRIVATE);
boolean alreadyShown = preferences.getBoolean(com.mutisya.numbersone.widget.HelpScreenManager.HELP_SHOWN, false);
if (a... | public void checkShowHelpScreen() {
android.content.SharedPreferences preferences = activity.getSharedPreferences(activity.getString(R.string.shared_prefs_file_key), Context.MODE_PRIVATE);
alreadyShown = preferences.getBoolean(com.mutisya.numbersone.widget.HelpScreenManager.HELP_SHOWN, false);
if (alreadySh... |
public void dump(java.lang.String indent, java.io.PrintWriter out) {
if (!(indent.isEmpty())) {
out.write(indent);
}
out.write(type.name().toLowerCase());
out.write(' ');
super.dump(out);
} | public void dump(java.lang.String indent, java.io.PrintWriter out) {
if (!(indent.isEmpty())) {
out.write(indent);
}
out.write(type.name().toLowerCase());
out.write(' ');
super.dump(indent, out);
} |
sereprateList(data, notification_count);
com.sicco.erp.HomeActivity.NotifyBR notifyBR = new com.sicco.erp.HomeActivity.NotifyBR();
android.content.IntentFilter intentFilter = new android.content.IntentFilter("acb");
registerReceiver(notifyBR, intentFilter);
android.content.Intent i = new android.con... | sereprateList(data, notification_count, type);
com.sicco.erp.HomeActivity.NotifyBR notifyBR = new com.sicco.erp.HomeActivity.NotifyBR();
android.content.IntentFilter intentFilter = new android.content.IntentFilter("acb");
registerReceiver(notifyBR, intentFilter);
android.content.Intent i = new andro... |
private java.lang.String parseGitVersion(java.lang.String hgOut) {
java.lang.String[] lines = hgOut.split("\n");
java.lang.String firstLine = lines[0];
java.util.regex.Matcher m = com.thoughtworks.go.config.materials.git.GitMaterial.GIT_VERSION_PATTERN.matcher(firstLine);
if (m.matches()) {
retu... | private java.lang.String parseGitVersion(java.lang.String hgOut) {
java.lang.String[] lines = hgOut.split("\n");
java.lang.String firstLine = lines[0];
java.util.regex.Matcher m = com.thoughtworks.go.config.materials.git.GitMaterial.GIT_VERSION_PATTERN.matcher(firstLine);
if (m.matches()) {
retu... |
static de.metas.ui.web.window.model.DocumentInterfaceWrapper getWrapper(final java.lang.Object model) {
if (model == null) {
return null;
}
if (java.lang.reflect.Proxy.isProxyClass(model.getClass())) {
final java.lang.reflect.InvocationHandler ih = java.lang.reflect.Proxy.getInvocationHandle... | private static de.metas.ui.web.window.model.DocumentInterfaceWrapper getWrapper(final java.lang.Object model) {
if (model == null) {
return null;
}
if (java.lang.reflect.Proxy.isProxyClass(model.getClass())) {
final java.lang.reflect.InvocationHandler ih = java.lang.reflect.Proxy.getInvocati... |
public java.lang.String scrape(@org.springframework.web.bind.annotation.RequestParam(value = "url", required = true, defaultValue = "")
java.lang.String url, org.springframework.ui.Model model) {
try {
runScrape(url);
} catch (java.lang.Exception e) {
e.printStackTrace();
}
if ((context)... | public java.lang.String scrape(@org.springframework.web.bind.annotation.RequestParam(value = "url", required = true, defaultValue = "")
java.lang.String url, org.springframework.ui.Model model) {
try {
runScrape(url);
} catch (java.lang.Exception e) {
e.printStackTrace();
}
wk.app.models... |
private void downVote() {
this.product.setTrustScore(((this.product.getTrustScore()) - 1));
android.content.Intent intent = new android.content.Intent(activity, com.apps4better.recycle4better.model.ProductEditorService.class);
intent.putExtra(ProductEditorService.TAG_PRODUCT, this.product.getCloneWithoutEle... | private void downVote() {
this.product.setTrustScore(((this.product.getTrustScore()) - 1));
android.content.Intent intent = new android.content.Intent(activity, com.apps4better.recycle4better.model.ProductEditorService.class);
intent.putExtra(ProductEditorService.TAG_PRODUCT, this.product);
activity.sta... |
public java.lang.String getMessage() {
if ((traceback) != null)
return traceback;
java.lang.String m = super.getMessage();
if (m == null)
return null;
if ((fileline) != null)
return ((fileline) + " ") + m;
return m;
} | public java.lang.String getMessage() {
if ((traceback) != null)
return traceback;
java.lang.String m = super.getMessage();
if (m == null)
return null;
if ((fileline) != null)
return (fileline) + m;
return m;
} |
public static void main(java.lang.String[] args) throws java.lang.Exception {
SerialTest main = new SerialTest();
main.initialize();
java.lang.Thread t = new java.lang.Thread() {
public void run() {
try {
java.lang.Thread.sleep(1000000);
} catch (java.lang.Int... | public static void main(java.lang.String[] args) throws java.lang.Exception {
SerialTest main = new SerialTest();
main.initialize();
java.lang.Thread t = new java.lang.Thread() {
public void run() {
try {
java.lang.Thread.sleep(1000000);
} catch (java.lang.Int... |
public void afterTextChanged(android.text.Editable s) {
int mark = java.lang.Integer.parseInt(s.toString());
if ((mark > 0) && (mark <= 10)) {
ReviewActivity.floatingActionButton.setBackground(mContext.getResources().getDrawable(R.drawable.circle_red, null));
}
} | public void afterTextChanged(android.text.Editable s) {
if ((s.length()) > 0) {
int mark = java.lang.Integer.parseInt(s.toString());
if ((mark > 0) && (mark <= 10)) {
ReviewActivity.floatingActionButton.setBackground(mContext.getResources().getDrawable(R.drawable.circle_red, null));
... |
public void addTegenstander(java.lang.String tgn) {
speelgeschiedenis = ((speelgeschiedenis) + (tegenstanders[0])).substring(3);
tegenstanders[0] = tegenstanders[1];
tegenstanders[1] = tegenstanders[2];
tegenstanders[2] = tegenstanders[3];
tegenstanders[3] = tgn;
} | public void addTegenstander(java.lang.String tgn) {
speelgeschiedenis = (speelgeschiedenis) + (tegenstanders[0].substring(0, 2));
tegenstanders[0] = tegenstanders[1];
tegenstanders[1] = tegenstanders[2];
tegenstanders[2] = tegenstanders[3];
tegenstanders[3] = tgn;
} |
protected void result(java.lang.Object obj) {
if (obj == "CANCEL") {
this.remove();
}else {
fvs.taxe.dialog.TrainClicked clicker = new fvs.taxe.dialog.TrainClicked(context, ((gameLogic.resource.Train) (obj)));
clicker.clicked(null, 0, 0);
}
} | protected void result(java.lang.Object obj) {
if (obj == "CANCEL") {
this.remove();
}else {
fvs.taxe.dialog.TrainClicked clicker = new fvs.taxe.dialog.TrainClicked(context, ((gameLogic.resource.Train) (obj)));
clicker.clicked(null, (-1), 0);
}
} |
public void buildHeap() {
this.size = this.heap.length;
for (int i = ((this.size()) / 2) + 1; i > (-1); i--) {
this.heapify(i);
}
} | public void build() {
this.size = this.heap.length;
for (int i = ((this.size()) - 1) / 2; i > (-1); i--) {
this.heapify(i);
}
} |
private void setupViewPager() {
tabFragmentPagerAdapter = new com.sven.ou.module.lol.view.HomeFragment.TabFragmentPagerAdapter(getActivity().getSupportFragmentManager());
tabFragmentPagerAdapter.addFragment(new com.sven.ou.module.lol.view.AuthorInfoFragment(), getString(R.string.author_info));
tabFragmentPa... | private void setupViewPager() {
tabFragmentPagerAdapter = new com.sven.ou.module.lol.view.HomeFragment.TabFragmentPagerAdapter(getActivity().getSupportFragmentManager());
tabFragmentPagerAdapter.addFragment(new com.sven.ou.module.lol.view.NewestVideoFragment(), getString(R.string.newest_video));
tabFragment... |
public static void initCenters(double[][] ctr) {
java.util.Random rand = new java.util.Random(0);
for (int k = 0; k < (KMeans.K); k++) {
int r = rand.nextInt(KMeans.N);
for (int m = 0; m < (KMeans.M); m++)
ctr[k][m] = KMeans.data[r][m];
}
return ;
} | public static void initCenters(double[][] ctr) {
java.util.Random rand = new java.util.Random();
for (int k = 0; k < (KMeans.K); k++) {
int r = rand.nextInt(KMeans.N);
for (int m = 0; m < (KMeans.M); m++)
ctr[k][m] = KMeans.data[r][m];
}
return ;
} |
public void driveS() {
long millisecondsToRunS = 1000;
long initTime = edu.wpi.first.wpilibj.Utility.getFPGATime();
while (((edu.wpi.first.wpilibj.Utility.getFPGATime()) - initTime) <= millisecondsToRunS) {
leftTalon0.set(1);
leftTalon1.set(1);
rightTalon0.set(1);
rightTalon1... | public void driveS() {
long initTime = edu.wpi.first.wpilibj.Utility.getFPGATime();
while (((edu.wpi.first.wpilibj.Utility.getFPGATime()) - initTime) <= (millisecondsToRunS)) {
leftTalon0.set(1);
leftTalon1.set(1);
rightTalon0.set(1);
rightTalon1.set(1);
}
} |
private static double evaluate(player.Player.TronSimulator engine, player.Player.Spot startAt, player.Player.ActionsType[] actions) {
double score = 0;
for (player.Player.ActionsType action : actions) {
if (engine.perform(startAt, action)) {
break;
}
score += 1.0;
}
r... | private static double evaluate(player.Player.TronSimulator engine, player.Player.Spot startAt, player.Player.ActionsType[] actions) {
double score = 0.0;
for (player.Player.ActionsType action : actions) {
if (!(engine.perform(startAt, action))) {
break;
}
score += 1.0;
}
... |
private void push(java.util.List<net.abstractfactory.plum.integration.web.ViewChange> viewChanges) {
org.json.JSONArray jsonArray = new org.json.JSONArray();
for (net.abstractfactory.plum.integration.web.ViewChange vc : viewChanges) {
jsonArray.put(vc.toJson());
}
java.lang.String json = jsonArr... | private synchronized void push(java.util.List<net.abstractfactory.plum.integration.web.ViewChange> viewChanges) {
org.json.JSONArray jsonArray = new org.json.JSONArray();
for (net.abstractfactory.plum.integration.web.ViewChange vc : viewChanges) {
jsonArray.put(vc.toJson());
}
java.lang.String j... |
public void executePeptideOperations() {
piaModeller.setCreatePSMSets(getSettingBoolean(PIASettings.CREATE_PSMSETS));
piaModeller.setConsiderModifications(getSettingBoolean(PIASettings.CONSIDER_MODIFICATIONS));
piaModeller.getPeptideModeller().removeAllFilters();
java.lang.Long fileID = getSettingIntege... | public void executePeptideOperations() {
piaModeller.setConsiderModifications(getSettingBoolean(PIASettings.CONSIDER_MODIFICATIONS));
piaModeller.getPeptideModeller().removeAllFilters();
java.lang.Long fileID = getSettingInteger(PIASettings.PEPTIDE_ANALYSIS_FILE_ID).longValue();
java.lang.String[] seria... |
public void testTheHubLogin() {
PageObjects.TheHub theHub = new PageObjects.TheHub(PageObjects.General.driver);
General.driver.get(TheHub.theHubUrl);
General.driver.manage().window().maximize();
theHub.setLoginEmail(TheHub.userName);
theHub.setLoginPassword(TheHub.password);
theHub.clickOnLoginB... | public void testTheHubLogin() {
PageObjects.TheHub theHub = new PageObjects.TheHub(PageObjects.General.driver);
General.driver.get(TheHub.theHubUrl);
General.driver.manage().window().maximize();
theHub.setLoginEmail(TheHub.userName);
theHub.setLoginPassword(TheHub.password);
theHub.clickOnLoginB... |
public java.lang.String changePriority(java.security.Principal principal, @org.springframework.web.bind.annotation.RequestParam(value = "taskId")
java.lang.Long taskId, @org.springframework.web.bind.annotation.RequestParam(value = "priorityId")
java.lang.Long priority) {
java.lang.System.out.println(("priority=" + ... | public java.lang.String changePriority(java.security.Principal principal, @org.springframework.web.bind.annotation.RequestParam(value = "taskId")
java.lang.Long taskId, @org.springframework.web.bind.annotation.RequestParam(value = "priorityId")
java.lang.Long priority) {
if (principal == null) {
return "red... |
public void actionPerformed(java.awt.event.ActionEvent e) {
javax.swing.JFileChooser fileChooser = new javax.swing.JFileChooser();
int opt = fileChooser.showDialog(this, "Importieren");
if (opt == (javax.swing.JFileChooser.APPROVE_OPTION)) {
java.io.File file = fileChooser.getSelectedFile();
... | public void actionPerformed(java.awt.event.ActionEvent e) {
javax.swing.JFileChooser fileChooser = new javax.swing.JFileChooser();
int opt = fileChooser.showDialog(null, "Importieren");
if (opt == (javax.swing.JFileChooser.APPROVE_OPTION)) {
java.io.File file = fileChooser.getSelectedFile();
... |
public void adicionarPeoesTabuleiro() {
this.removeAll();
this.peaoPrincipal = controllerJogo.getJogador().getPeao();
this.add(peaoPrincipal);
this.peoes = controllerJogo.getPeoes();
for (pbl.model.jogo.Peao peao : peoes) {
this.add(peao);
}
validate();
repaint();
} | public void adicionarPeoesTabuleiro() {
if ((controllerJogo.getJogador()) != null) {
this.peaoPrincipal = controllerJogo.getJogador().getPeao();
this.removeAll();
this.add(peaoPrincipal);
this.peoes = controllerJogo.getPeoes();
for (pbl.model.jogo.Peao peao : peoes) {
... |
public void addTiles(int fromX, int fromY, int width, int height, int hCount, int vCount) {
for (int y = 0; y < vCount; y++)
for (int x = 0; x < hCount; x++)
addTile(((y * vCount) + x), (fromX + (x * width)), (fromY + (y * height)), width, height, false, false, false);
} | public void addTiles(int fromX, int fromY, int width, int height, int hCount, int vCount) {
for (int y = 0; y < vCount; y++)
for (int x = 0; x < hCount; x++)
addTile(((y * hCount) + x), (fromX + (x * width)), (fromY + (y * height)), width, height, false, false, false);
} |
public void run(int param) throws com.awprog.scroidv2.AlphaScript.ErrorDialog.ScriptException {
boolean left = ((com.awprog.scroidv2.AlphaScript.BooleanData) (getParams().inLeft)).getValue();
boolean right = ((com.awprog.scroidv2.AlphaScript.BooleanData) (getParams().inRight)).getValue();
getParams().setRet... | public void run(int param) throws com.awprog.scroidv2.AlphaScript.ErrorDialog.ScriptException {
getParams().setReturn((!((((com.awprog.scroidv2.AlphaScript.BooleanData) (getParams().inLeft)).getValue()) && (((com.awprog.scroidv2.AlphaScript.BooleanData) (getParams().inRight)).getValue()))));
} |
public void parseCause() {
com.telefonica.euro_iaas.sdc.rest.exception.ErrorCode errorCode = com.telefonica.euro_iaas.sdc.rest.exception.ErrorCode.find(cause.toString());
this.code = errorCode.getCode();
this.publicMessage = errorCode.getPublicMessage();
this.message = ((errorCode.toString()) + "#") + (... | public void parseCause() {
if ((cause) != null) {
com.telefonica.euro_iaas.sdc.rest.exception.ErrorCode errorCode = com.telefonica.euro_iaas.sdc.rest.exception.ErrorCode.find(cause.toString());
this.code = errorCode.getCode();
this.publicMessage = errorCode.getPublicMessage();
this.m... |
private org.spockframework.runtime.model.NameProvider<org.spockframework.runtime.model.IterationInfo> chooseNameProvider(spock.lang.Unroll unroll, org.spockframework.runtime.model.FeatureInfo feature) {
if ((unroll.value()) != (groovy.lang.Closure.class)) {
return new org.spockframework.runtime.extension.bu... | private org.spockframework.runtime.model.NameProvider<org.spockframework.runtime.model.IterationInfo> chooseNameProvider(spock.lang.Unroll unroll, org.spockframework.runtime.model.FeatureInfo feature) {
if ((unroll.value().length()) > 0) {
return new org.spockframework.runtime.extension.builtin.UnrollNamePr... |
public java.lang.String getClientIdFromAPIRequest() {
org.springframework.security.core.context.SecurityContext context = org.springframework.security.core.context.SecurityContextHolder.getContext();
org.springframework.security.core.Authentication authentication = context.getAuthentication();
if (org.sprin... | public java.lang.String getClientIdFromAPIRequest() {
org.springframework.security.core.context.SecurityContext context = org.springframework.security.core.context.SecurityContextHolder.getContext();
org.springframework.security.core.Authentication authentication = context.getAuthentication();
if ((authenti... |
public V get(java.lang.Object key) {
if ((size) == 0)
return null;
if ((size) < (maxListFill)) {
for (int i = 0; i < (maxListFill); i++) {
if (listKeys[i].equals(key))
return ((V) (listValues[i]));
}
return null;
}else {
r... | public V get(java.lang.Object key) {
if ((size) == 0)
return null;
if ((size) < (maxListFill)) {
for (int i = 0; i < (size); i++) {
if (listKeys[i].equals(key))
return ((V) (listValues[i]));
}
return null;
}else {
return i... |
public void actionPerformed(java.awt.event.ActionEvent e) {
log.info(("PosQueryProduct.actionPerformed - " + (e.getActionCommand())));
if (((((e.getSource()) == (f_Processed)) || ((e.getSource()) == (f_DocumentNo))) || ((e.getSource()) == (f_DateFrom))) || ((e.getSource()) == (f_DateTo))) {
refresh();
... | public void actionPerformed(java.awt.event.ActionEvent e) {
super.actionPerformed(e);
if (((((e.getSource()) == (f_Processed)) || ((e.getSource()) == (f_DocumentNo))) || ((e.getSource()) == (f_DateFrom))) || ((e.getSource()) == (f_DateTo))) {
refresh();
return ;
}
} |
private android.view.View createImageButton(int x, int y) {
android.widget.Button button = new android.widget.Button(context);
button.setBackground(backImage);
button.setId(((100 * x) + y));
wakeup.wakeupapp.Card card = new wakeup.wakeupapp.Card(button, x, y);
cardQueue.add(card);
return button;... | private android.view.View createImageButton(int x, int y) {
android.widget.Button button = new android.widget.Button(context);
button.setId(((100 * x) + y));
wakeup.wakeupapp.Card card = new wakeup.wakeupapp.Card(button, x, y);
cardQueue.add(card);
return button;
} |
private void addWorkerSymbol(org.ballerinalang.model.Worker worker) {
org.ballerinalang.model.SymbolName symbolName = worker.getSymbolName();
org.ballerinalang.model.symbols.BLangSymbol varSymbol = currentScope.resolve(symbolName);
if ((varSymbol != null) && ((varSymbol.getSymbolScope().getScopeName()) == (... | private void addWorkerSymbol(org.ballerinalang.model.Worker worker) {
org.ballerinalang.model.SymbolName symbolName = worker.getSymbolName();
org.ballerinalang.model.symbols.BLangSymbol varSymbol = currentScope.resolve(symbolName);
if (varSymbol != null) {
org.ballerinalang.util.exceptions.BLangExce... |
public int getCurrentChapter(long position) {
int ret = 0;
if (hasChapters()) {
for (com.monsterbutt.homeview.plex.media.Chapter chapter : mVideo.getChapters()) {
if ((chapter.getStartTimeOffset()) > position)
break;
++ret;
}
}
return ... | public int getCurrentChapter(long position) {
int ret = 0;
if (hasChapters()) {
for (com.monsterbutt.homeview.plex.media.Chapter chapter : mVideo.getChapters()) {
if ((chapter.getStartTimeOffset()) >= position)
break;
++ret;
}
}
return... |
private void reset() {
set(energyBar, 0, 0);
set(happyBar, 0, 0);
set(nerveBar, 0, 0);
set(lifeBar, 0, 0);
set(travelBar, 0, 0);
energyBarText.setText("0/0");
happyBarText.setText("0/0");
nerveBarText.setText("0/0");
lifeBarText.setText("0/0");
travelBarText.setText("0/0s");
} | private void reset() {
set(energyBar, 0, 0, true);
set(happyBar, 0, 0, true);
set(nerveBar, 0, 0, true);
set(lifeBar, 0, 0, true);
set(travelBar, 0, 0, true);
energyBarText.setText("0/0");
happyBarText.setText("0/0");
nerveBarText.setText("0/0");
lifeBarText.setText("0/0");
trave... |
public java.util.List<by.ostis.common.sctpclient.model.ScAddress> getAnswer(final byte[] bytes, final by.ostis.common.sctpclient.model.response.SctpResponseHeader responseHeader) {
final java.util.List<by.ostis.common.sctpclient.model.ScAddress> list = new java.util.ArrayList<by.ostis.common.sctpclient.model.ScAddr... | public by.ostis.common.sctpclient.model.ScAddress getAnswer(final byte[] bytes, final by.ostis.common.sctpclient.model.response.SctpResponseHeader responseHeader) {
final by.ostis.common.sctpclient.model.response.SctpResultType resultType = responseHeader.getResultType();
by.ostis.common.sctpclient.model.ScAddr... |
public java.lang.String processNewShipmentForm(edu.mum.domain.SingleOrder orderToBeUpdate, org.springframework.ui.Model model) {
java.lang.System.out.println(order.getQuantity());
java.lang.System.out.println(order.getStatus());
java.lang.System.out.println(order.getUserInfo());
order.setStatus(orderToB... | public java.lang.String processNewShipmentForm(edu.mum.domain.SingleOrder orderToBeUpdate, org.springframework.ui.Model model) {
java.lang.System.out.println(order.getQuantity());
java.lang.System.out.println(order.getStatus());
java.lang.System.out.println(order.getUserInfo());
order.setStatus(orderToB... |
public void jsonSpecificationCanBeMappedToPojoBackToJSON(java.lang.String resourcePath) throws java.lang.Exception {
try (java.io.InputStream is = getClass().getResourceAsStream(resourcePath)) {
java.lang.String read = io.herbert.codebase.openapimodel2.Utils.stringFromInputStream(is);
io.herbert.cod... | public void jsonSpecificationCanBeMappedToPojoBackToJSON(java.lang.String resourcePath) throws java.lang.Exception {
try (java.io.InputStream is = getClass().getResourceAsStream(resourcePath)) {
java.lang.String read = io.herbert.codebase.openapimodel2.Utils.stringFromInputStream(is);
io.herbert.cod... |
private void validateLeaveEarlyWomanA(java.lang.String checkoutTime) {
if (validateLeaveEarlyABase(checkoutTime)) {
return ;
}
float maxDuration = mUser.getMaxDurationLeave(mCurrentLeaveTypePosition, mCurrentBranchPosition);
if (!(com.framgia.wsm.utils.common.DateTimeUtils.checkHourOfDateLessTha... | private void validateLeaveEarlyWomanA(java.lang.String checkoutTime) {
if (validateLeaveEarlyABase(checkoutTime)) {
return ;
}
float maxDuration = mUser.getMaxDurationLeave(mCurrentLeaveTypePosition, mCurrentBranchPosition);
if (!(com.framgia.wsm.utils.common.DateTimeUtils.checkHourOfDateLessTha... |
public java.io.Serializable convert(java.lang.String value) {
try {
java.io.ObjectInputStream in = new java.io.ObjectInputStream(new java.io.ByteArrayInputStream(android.util.Base64.decode(value, Base64.DEFAULT)));
return ((java.io.Serializable) (in.readObject()));
} catch (java.io.IOException e... | public java.io.Serializable convert(java.lang.String value) {
if (value == null) {
return null;
}
try {
java.io.ObjectInputStream in = new java.io.ObjectInputStream(new java.io.ByteArrayInputStream(android.util.Base64.decode(value, Base64.DEFAULT)));
return ((java.io.Serializable) (i... |
private org.jitsi.impl.protocol.xmpp.ChatMemberImpl addMember(java.lang.String participant) {
org.jitsi.impl.protocol.xmpp.ChatMemberImpl newMember;
if (members.containsKey(participant)) {
org.jitsi.impl.protocol.xmpp.ChatRoomImpl.logger.error(((participant + " already in ") + (roomName)));
retu... | private org.jitsi.impl.protocol.xmpp.ChatMemberImpl addMember(java.lang.String participant) {
org.jitsi.impl.protocol.xmpp.ChatMemberImpl newMember;
if (members.containsKey(participant)) {
org.jitsi.impl.protocol.xmpp.ChatRoomImpl.logger.error(((participant + " already in ") + (roomName)));
retu... |
public boolean pickupCrate(ballmerpeak.stargate.Player player) {
boolean didPickUpCrate = super.pickupCrate(player);
if (didPickUpCrate) {
getDoor().close();
if ((player.getTile()) == (door)) {
player.kill();
}
return true;
}
return false;
} | public boolean pickupCrate(ballmerpeak.stargate.Player player) {
boolean didPickUpCrate = super.pickupCrate(player);
if (didPickUpCrate) {
door.close();
if ((player.getTile()) == (door)) {
player.kill();
}
return true;
}
return false;
} |
java.lang.String[] tempData = data;
if ((data == null) || ((data.length) == 0)) {
tempData = new java.lang.String[]{ "-" };
}
return tempData;
} | java.lang.String[] tempData = data;
if ((tempData == null) || ((tempData.length) == 0)) {
tempData = new java.lang.String[]{ "-" };
}
return tempData;
} |
private void addToPending(streamkv.types.KVOperation<K, V> op, long timestamp) throws java.io.IOException {
java.util.TreeMap<java.lang.Long, streamkv.types.KVOperation<K, V>> ops = pendingOperations.value();
ops.put(timestamp, op);
pendingOperations.update(ops);
} | private void addToPending(streamkv.types.KVOperation<K, V> op, long timestamp) throws java.io.IOException {
java.util.TreeMap<java.lang.Long, java.util.List<streamkv.types.KVOperation<K, V>>> ops = pendingOperations.value();
java.util.List<streamkv.types.KVOperation<K, V>> p = ops.get(timestamp);
if (p == n... |
public void onClick(android.view.View v) {
android.content.Intent intent = new android.content.Intent(context, zoom.city.android.main.pages.smallbaners.SmallBanersPreviewPage.class);
intent.putExtra("title", zoom.city.android.main.container.DataContainer.getInstance().getSmallBanerItemList().get(title).get(1).g... | public void onClick(android.view.View v) {
android.content.Intent intent = new android.content.Intent(context, zoom.city.android.main.pages.smallbaners.SmallBanersPreviewPage.class);
intent.putExtra("title", zoom.city.android.main.container.DataContainer.getInstance().getSmallBanerItemList().get(title).get(1).g... |
public java.lang.String userCurrentIp(java.lang.String user) {
java.lang.String currentIP = null;
for (int i = 0; i < (userInfo.size()); i++) {
if ((userInfo.get(i).username) == user)
currentIP = userInfo.get(i).ip;
}
return currentIP;
} | public java.lang.String userCurrentIp(java.lang.String user) {
java.lang.String currentIP = null;
for (int i = 0; i < (userInfo.size()); i++) {
if (userInfo.get(i).username.equals(user))
currentIP = userInfo.get(i).ip;
}
return currentIP;
} |
public java.util.List<org.apache.sqoop.model.MConnector> findConnectors(java.sql.Connection conn) {
java.sql.PreparedStatement stmt = null;
try {
stmt = conn.prepareStatement(crudQueries.getStmtSelectConfigurableAllForType());
stmt.setString(1, MConfigurableType.CONNECTOR.name());
return... | public java.util.List<org.apache.sqoop.model.MConnector> findConnectors(java.sql.Connection conn) {
try (java.sql.PreparedStatement stmt = conn.prepareStatement(crudQueries.getStmtSelectConfigurableAllForType())) {
stmt.setString(1, MConfigurableType.CONNECTOR.name());
return loadConnectors(stmt, co... |
public boolean generateIntegrityResults(final java.lang.String endpointId) throws java.lang.Exception {
try {
com.dotmarketing.common.db.DotConnect dc = new com.dotmarketing.common.db.DotConnect();
createContentletTemporaryTable(endpointId);
checkPages(endpointId, IntegrityType.HTMLPAGES);
... | public boolean generateIntegrityResults(final java.lang.String endpointId) throws java.lang.Exception {
try {
com.dotmarketing.common.db.DotConnect dc = new com.dotmarketing.common.db.DotConnect();
createContentletTemporaryTable(endpointId);
checkPages(endpointId, IntegrityType.HTMLPAGES);
... |
public void handleTouch(com.jadenball.grapheditor.GraphViewController c, android.view.MotionEvent event) {
switch (event.getAction()) {
case android.view.MotionEvent.ACTION_UP :
c.model.createVertex(event.getX(), event.getY());
c.notifySubscribers();
c.state = new com.jad... | public void handleTouch(com.jadenball.grapheditor.GraphViewController c, android.view.MotionEvent event) {
switch (event.getAction()) {
case android.view.MotionEvent.ACTION_UP :
c.model.createVertex(event.getX(), event.getY());
c.notifySubscribers();
c.state = new com.jad... |
public int takeDamage(int damageDone) {
health -= damageDone;
java.lang.System.out.println(((("Entity " + (this.getID())) + "has taken damage. New health: ") + (health)));
if ((health) <= 0) {
super.destroy();
}
return health;
} | public int takeDamage(int damageDone) {
super.health -= damageDone;
java.lang.System.out.println(((("Entity " + (this.getID())) + "has taken damage. New health: ") + (health)));
if ((super.health) <= 0) {
super.destroy();
}
return super.health;
} |
private de.neofonie.surlgen.processor.spring.JInvocation createMvcUriComponentsBuilderInvocation(de.neofonie.surlgen.processor.core.UrlMethod parameters, java.lang.String methodName, de.neofonie.surlgen.processor.spring.JMethod urlMethod) {
de.neofonie.surlgen.processor.spring.AbstractJClass mvcUriComponentsBuilder... | private de.neofonie.surlgen.processor.spring.JInvocation createMvcUriComponentsBuilderInvocation(de.neofonie.surlgen.processor.core.UrlMethod parameters, java.lang.String methodName, de.neofonie.surlgen.processor.spring.JMethod urlMethod) {
de.neofonie.surlgen.processor.spring.AbstractJClass mvcUriComponentsBuilder... |
public void addNodes(Node[] nodes, int width, int height) {
for (Node n : nodes) {
this.nodes.add(n);
node_map.put(coordString(n.getX(), n.getY()), n);
}
widthBound = width;
heightBound = height;
} | public void addNodes(Node[] nodes, int width, int height) {
for (Node n : nodes) {
this.nodes.add(n);
node_map.put(coordString(n.x, n.y), n);
}
widthBound = width;
heightBound = height;
} |
protected void onResume() {
super.onResume();
this.loadImageView();
this.setupRadioButtons();
android.widget.RadioGroup radioGroup = ((android.widget.RadioGroup) (this.findViewById(R.id.image_view_radio_group)));
android.widget.RadioButton cubicBtn = ((android.widget.RadioButton) (radioGroup.findVie... | protected void onResume() {
super.onResume();
this.loadImageView();
this.setupRadioButtons();
android.widget.RadioGroup radioGroup = ((android.widget.RadioGroup) (this.findViewById(R.id.image_view_radio_group)));
android.widget.RadioButton cubicBtn = ((android.widget.RadioButton) (radioGroup.findVie... |
public void deleteCompany(int cvr) {
javax.persistence.EntityManager em = getEntityManager();
try {
em.getTransaction().begin();
em.remove(getCompany(cvr));
em.getTransaction().commit();
} finally {
em.close();
}
} | public void deleteCompany(int id) {
javax.persistence.EntityManager em = getEntityManager();
try {
em.getTransaction().begin();
em.remove(getCompany(id));
em.getTransaction().commit();
} finally {
em.close();
}
} |
public int subMenu() {
java.lang.System.out.println("-----Operations for library director menu-----");
java.lang.System.out.println("What kinds of operation would you like to perform?");
java.lang.System.out.println("1. List all un-returned book copies which are checked-out within a period");
java.lang.... | public int subMenu() {
java.lang.System.out.println("-----Operations for library director menu-----");
java.lang.System.out.println("What kinds of operation would you like to perform?");
java.lang.System.out.println("1. List all un-returned book copies which are checked-out within a period");
java.lang.... |
public <T extends com.tascape.reactor.webui.driver.WebFragment> T show(org.openqa.selenium.WebElement element, java.lang.Class<T> fragmentClass) {
if (element != null) {
webBrowser.click(element);
}
com.tascape.reactor.webui.driver.WebFragment fragment = org.openqa.selenium.support.PageFactory.initE... | public <T extends com.tascape.reactor.webui.driver.WebFragment> T show(org.openqa.selenium.WebElement element, java.lang.Class<T> fragmentClass) {
if (element != null) {
webBrowser.click(element);
}
com.tascape.reactor.webui.driver.WebFragment fragment = org.openqa.selenium.support.PageFactory.initE... |
public void run() {
try {
in = new java.util.Scanner(client.getInputStream());
out = new java.io.PrintWriter(client.getOutputStream());
requestName();
doService();
client.close();
server.removeFromServices(this);
} catch (java.io.IOException e) {
e.printSt... | public void run() {
try {
in = new java.util.Scanner(client.getInputStream());
out = new java.io.PrintWriter(client.getOutputStream());
requestName();
doService();
client.close();
} catch (java.io.IOException e) {
e.printStackTrace();
}
} |
public <T extends uk.ac.bbsrc.tgac.miso.core.data.Poolable> void setPoolableElements(java.util.Collection<T> poolables) {
if (poolables == null) {
this.pooledElements = java.util.Collections.emptySet();
}else {
this.pooledElements = ((java.util.Collection<P>) (poolables));
}
} | public <T extends uk.ac.bbsrc.tgac.miso.core.data.Poolable> void setPoolableElements(java.util.Collection<T> poolables) {
if (poolables == null) {
if ((this.pooledElements) == null) {
this.pooledElements = java.util.Collections.emptySet();
}
}else {
this.pooledElements = ((ja... |
public java.util.List<com.qac.row5project.entities.Product> getProducts() {
java.util.List<com.qac.row5project.entities.Product> returnable = new java.util.ArrayList<com.qac.row5project.entities.Product>();
java.util.List<com.qac.row5project.entities.Product> stock = productManager.findAllProducts();
java.u... | public java.util.List<com.qac.row5project.entities.Product> getProducts() {
java.util.List<com.qac.row5project.entities.Product> returnable = new java.util.ArrayList<com.qac.row5project.entities.Product>();
java.util.List<com.qac.row5project.entities.Product> stock = productManager.findAllProducts();
java.u... |
public void checkForRemoteServer() {
if (((serverAdmin) == null) && ((((currentDatabase) == null) || (!((currentDatabase.getStorage()) instanceof com.orientechnologies.orient.client.remote.OStorageRemoteThread))) || (currentDatabase.isClosed())))
throw new com.orientechnologies.common.exception.OException("... | protected void checkForRemoteServer() {
if (((serverAdmin) == null) && ((((currentDatabase) == null) || (!((currentDatabase.getStorage()) instanceof com.orientechnologies.orient.client.remote.OStorageRemoteThread))) || (currentDatabase.isClosed())))
throw new com.orientechnologies.common.exception.OExceptio... |
public boolean connectedToWifi() {
if ((context) == null)
return false;
android.net.ConnectivityManager manager = ((android.net.ConnectivityManager) (context.getSystemService(Context.CONNECTIVITY_SERVICE)));
android.net.NetworkInfo info = manager.getActiveNetworkInfo();
if (((info.getType()... | public boolean connectedToWifi() {
if ((context) == null)
return false;
android.net.ConnectivityManager manager = ((android.net.ConnectivityManager) (context.getSystemService(Context.CONNECTIVITY_SERVICE)));
android.net.NetworkInfo info = manager.getActiveNetworkInfo();
if (info == null)
... |
protected void onFocusChanged(boolean focused, int direction, android.graphics.Rect previouslyFocusedRect) {
super.onFocusChanged(focused, direction, previouslyFocusedRect);
if (focused) {
performFiltering("", 0);
android.view.inputmethod.InputMethodManager imm = ((android.view.inputmethod.Input... | protected void onFocusChanged(boolean focused, int direction, android.graphics.Rect previouslyFocusedRect) {
super.onFocusChanged(focused, direction, previouslyFocusedRect);
if (focused) {
android.view.inputmethod.InputMethodManager imm = ((android.view.inputmethod.InputMethodManager) (getContext().getS... |
public java.util.Collection<spring.desai.common.model.User> findLockedOutUsers() throws spring.desai.common.repository.exception.RepositoryDataAccessException {
try {
return getJdbcTemplate().query(getFindBySql(getTableName(), spring.desai.common.utils.DataBaseConstants.ACCOUNT_NON_LOCKED), new java.lang.Ob... | public java.util.Collection<spring.desai.common.model.User> findLockedOutUsers() throws spring.desai.common.repository.exception.RepositoryDataAccessException {
try {
return getJdbcTemplate().query(getFindBySql(getTableName(), spring.desai.common.utils.DataBaseConstants.ACCOUNT_NON_LOCKED), new java.lang.Ob... |
protected void onPostExecute(android.learn.com.tripmanager.List list) {
super.onPostExecute(list);
windSpeed.setText(java.lang.String.valueOf(list.wind.getSpeed()));
press.setText(java.lang.String.valueOf(list.currentCondition.getPressure()));
hum.setText(java.lang.String.valueOf(list.currentCondition.g... | protected void onPostExecute(android.learn.com.tripmanager.List list) {
super.onPostExecute(list);
windSpeed.setText(java.lang.String.valueOf(list.wind.getSpeed()));
press.setText(java.lang.String.valueOf(list.currentCondition.getPressure()));
hum.setText(java.lang.String.valueOf(list.currentCondition.g... |
public void emptyTest() throws java.io.IOException {
com.spectralogic.ds3client.integration.LazyIterator_Test.HELPERS.ensureBucketExists(com.spectralogic.ds3client.integration.LazyIterator_Test.TEST_ENV_NAME, com.spectralogic.ds3client.integration.LazyIterator_Test.envDataPolicyId);
try {
final java.lan... | public void emptyTest() throws java.io.IOException {
com.spectralogic.ds3client.integration.LazyIterator_Test.HELPERS.ensureBucketExists(com.spectralogic.ds3client.integration.LazyIterator_Test.TEST_ENV_NAME, com.spectralogic.ds3client.integration.LazyIterator_Test.envDataPolicyId);
try {
final java.lan... |
private org.droidplanner.android.fragments.EditorToolsFragment.EditorTools getToolForView(int viewId) {
switch (viewId) {
case R.id.editor_tools_marker :
return org.droidplanner.android.fragments.EditorToolsFragment.EditorTools.MARKER;
case R.id.editor_tools_draw :
return org... | private org.droidplanner.android.fragments.EditorToolsFragment.EditorTools getToolForView(int viewId) {
switch (viewId) {
case R.id.editor_tools_marker :
return org.droidplanner.android.fragments.EditorToolsFragment.EditorTools.MARKER;
case R.id.editor_tools_draw :
return org... |
public java.lang.String getSwaggerType(com.a24group.codegen.Property p) {
java.lang.String swaggerType = super.getSwaggerType(p);
java.lang.String type = null;
if (typeMapping.containsKey(swaggerType)) {
type = typeMapping.get(swaggerType);
java.lang.System.out.println(("This be type: " + ty... | public java.lang.String getSwaggerType(com.a24group.codegen.Property p) {
java.lang.String swaggerType = super.getSwaggerType(p);
java.lang.String type = null;
if (typeMapping.containsKey(swaggerType)) {
type = typeMapping.get(swaggerType);
java.lang.System.out.println(("This be type: " + ty... |
public T take() {
T aJob = null;
lock.lock();
try {
while (((queue.size()) == 0) || ((aJob = queue.pop()) == null)) {
lock.unlock();
idle = true;
mutex.lock();
idle = false;
lock.lock();
}
} finally {
lock.unlock();
... | public T take() {
T aJob = null;
lock.lock();
try {
while (((queue.size()) == 0) || ((aJob = queue.pop()) == null)) {
idle = true;
lock.unlock();
mutex.lock();
lock.lock();
idle = false;
}
} finally {
lock.unlock();
... |
public boolean onLongPress(final android.view.MotionEvent e, final org.osmdroid.views.MapView mapView) {
final android.content.DialogInterface.OnClickListener dialogClickListener = new io.github.data4all.activity.AbstractMapActivity.MapPolygon.DialogClickListener();
final android.app.AlertDialog.Builder builder... | public boolean onLongPress(final android.view.MotionEvent e, final org.osmdroid.views.MapView mapView) {
final android.content.DialogInterface.OnClickListener listener = new io.github.data4all.activity.AbstractMapActivity.MapPolygon.DialogClickListener();
final android.app.AlertDialog.Builder builder = new andr... |
public static <T> java.lang.String join(final T[] s, final java.lang.String delimiter) {
if (s == null)
return "";
final java.lang.StringBuffer buffer = new java.lang.StringBuffer();
for (final T t : s) {
if (((buffer.length()) > 0) && (delimiter != null)) {
buffer.append(de... | public static <T> java.lang.String join(final T[] s, final java.lang.String delimiter) {
if (s == null)
return "";
final java.lang.StringBuilder buffer = new java.lang.StringBuilder();
for (final T t : s) {
if (((buffer.length()) > 0) && (delimiter != null)) {
buffer.append(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.