buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public void onEnable() {
settingsManager.setup();
initiateManagers();
registerListeners();
saveDefaultConfig();
getCommand("shop").setExecutor(new pointshop.commands.ShopCmd(this));
org.bukkit.command.ConsoleCommandSender console = getServer().getConsoleSender();
console.sendMessage(((org.bu... | public void onEnable() {
initiateManagers();
registerListeners();
saveDefaultConfig();
getCommand("shop").setExecutor(new pointshop.commands.ShopCmd(this));
org.bukkit.command.ConsoleCommandSender console = getServer().getConsoleSender();
console.sendMessage(((org.bukkit.ChatColor.GREEN) + "GUI ... |
private void stopPlayService() {
if (getPlayerService().getPlayer().isPlaying()) {
getPlayerService().getPlayer().stopPlayback();
com.iyuba.music.entity.article.StudyRecordUtil.recordStop(com.iyuba.music.manager.StudyManager.getInstance().getLesson(), 0);
}
stopService(playServiceIntent);
} | private void stopPlayService() {
if (((getPlayerService().getPlayer()) != null) && (getPlayerService().getPlayer().isPlaying())) {
getPlayerService().getPlayer().stopPlayback();
com.iyuba.music.entity.article.StudyRecordUtil.recordStop(com.iyuba.music.manager.StudyManager.getInstance().getLesson(), ... |
public void runOrder() {
snake.Colors.pause(500);
java.util.Iterator<javax.swing.JButton> iterator = order.iterator();
setEnabledButtons(true);
javax.swing.JButton button;
while (iterator.hasNext()) {
button = iterator.next();
java.lang.System.out.println(button.getName());
s... | public void runOrder() {
snake.Colors.pause(500);
java.util.Iterator<javax.swing.JButton> iterator = order.iterator();
javax.swing.JButton button;
while (iterator.hasNext()) {
button = iterator.next();
java.lang.System.out.println(button.getName());
snake.Colors.changeColor(300, ... |
public boolean deleteUser(java.lang.String username) {
boolean result = false;
try {
java.sql.Connection conn = dataSource.getConnection();
if ((this.getUser(username)) != null) {
java.sql.PreparedStatement pstmt = conn.prepareStatement("DELETE FROM user WHERE username = ?");
... | public boolean deleteUser(java.lang.String username) {
boolean result = false;
try {
java.sql.Connection conn = dataSource.getConnection();
if ((this.getUser(username)) != null) {
java.sql.PreparedStatement pstmt = conn.prepareStatement("DELETE FROM user WHERE username = ?");
... |
private static java.lang.Double optOverlap(net.bytten.gameutil.algorithms.Vec2D a, net.bytten.gameutil.algorithms.Vec2D b) {
if ((a.x) <= (b.x)) {
if ((a.y) > (b.x)) {
return (a.y) - (b.x);
}
}else
if ((a.x) < (b.y)) {
return (b.y) - (a.x);
}
retu... | private static java.lang.Double optOverlap(net.bytten.gameutil.algorithms.Vec2D a, net.bytten.gameutil.algorithms.Vec2D b) {
if ((a.x) < (b.x)) {
if ((a.y) > (b.x)) {
return (a.y) - (b.x);
}
}else
if ((a.x) < (b.y)) {
return (b.y) - (a.x);
}
retur... |
private void nextStep(week4.Board b, week4.Board previous, edu.princeton.cs.algs4.MinPQ<week4.Solver.SearchNode> queue, int moves, boolean manhattan) {
for (week4.Board n : b.neighbors()) {
if (!(n.equals(previous))) {
queue.insert(week4.Solver.SearchNode.create(b, (moves + 1), manhattan));
... | private void nextStep(week4.Board b, week4.Board previous, edu.princeton.cs.algs4.MinPQ<week4.Solver.SearchNode> queue, int moves, boolean manhattan) {
for (week4.Board n : b.neighbors()) {
if (!(n.equals(previous))) {
queue.insert(week4.Solver.SearchNode.create(n, (moves + 1), manhattan));
... |
public de.knoobie.project.fuko.database.domain.Artist getORadd(de.knoobie.project.fuko.database.domain.Artist source) {
de.knoobie.project.fuko.database.domain.Artist realArtist = database.getArtistService().findBy(source.getVgmdbID());
if (realArtist == null) {
database.getArtistService().add(source);
... | public de.knoobie.project.fuko.database.domain.Artist getORadd(de.knoobie.project.fuko.database.domain.Artist source) {
de.knoobie.project.fuko.database.domain.Artist realArtist = findBy(source.getVgmdbID());
if (realArtist == null) {
database.update(source);
realArtist = findBy(source.getVgmdbI... |
public void testListLBReturnsEmptyArrayWhenEmptyProfilesCollectionIsRetrieved() throws org.dasein.cloud.CloudException, org.dasein.cloud.InternalException {
new org.dasein.cloud.azure.tests.network.NonStrictExpectations(lbSupport) {
{
mockit.Deencapsulation.invoke(lbSupport, "getProfiles");
... | public void testListLBReturnsEmptyArrayWhenEmptyProfilesCollectionIsRetrieved() throws org.dasein.cloud.CloudException, org.dasein.cloud.InternalException {
new org.dasein.cloud.azure.tests.network.NonStrictExpectations(lbSupport) {
{
mockit.Deencapsulation.invoke(lbSupport, "getProfiles");
... |
public final java.lang.String toString() {
try {
java.lang.StringBuilder result = new java.lang.StringBuilder();
com.squareup.javapoet.CodeWriter codeWriter = new com.squareup.javapoet.CodeWriter(result);
emitAnnotations(codeWriter);
emit(codeWriter);
return result.toString()... | public final java.lang.String toString() {
try {
java.lang.StringBuilder result = new java.lang.StringBuilder();
com.squareup.javapoet.CodeWriter codeWriter = new com.squareup.javapoet.CodeWriter(result);
toString(codeWriter);
return result.toString();
} catch (java.io.IOExceptio... |
public void initRequest(blade.route.RouteMatcher match) {
java.util.List<java.lang.String> requestList = blade.kit.PathKit.convertRouteToList(match.getRequestURI());
java.util.List<java.lang.String> pathList = blade.kit.PathKit.convertRouteToList(match.getPath());
this.pathParams = blade.servlet.Request.get... | public void initRequest(blade.route.RouteMatcher match) {
java.util.List<java.lang.String> requestList = blade.kit.PathKit.convertRouteToList(match.getPath());
java.util.List<java.lang.String> pathList = blade.kit.PathKit.convertRouteToList(match.getPath());
this.pathParams = blade.servlet.Request.getPathPa... |
private void _connect(boolean ackSystem, com.cronam.eedlecom.Logger l, com.cronam.eedlecom.RunnableMsgIn rmi, com.cronam.eedlecom.SocketCreator sc, java.lang.Runnable onError, com.cronam.eedlecom.executors.queueimpl.QueueImpl qq) {
com.cronam.eedlecom.SocketHolder shared = new com.cronam.eedlecom.SocketHolder();
... | private void _connect(com.cronam.eedlecom.Logger l, com.cronam.eedlecom.RunnableMsgIn rmi, com.cronam.eedlecom.SocketCreator sc, java.lang.Runnable onError, com.cronam.eedlecom.executors.queueimpl.QueueImpl qq) {
com.cronam.eedlecom.SocketHolder shared = new com.cronam.eedlecom.SocketHolder();
java.util.concurr... |
public synchronized void readList(java.lang.Iterable<NetEvent.messagecom.QuestionListMessage> listData) {
synchronized(mymodel) {
while ((mymodel.getSize()) != 0)
mymodel.removeElementAt(0);
listData.forEach((NetEvent.messagecom.QuestionListMessage msg) -> {
gui.List... | public void readList(java.lang.Iterable<NetEvent.messagecom.QuestionListMessage> listData) {
while ((mymodel.getSize()) != 0)
mymodel.removeElementAt(0);
listData.forEach((NetEvent.messagecom.QuestionListMessage msg) -> {
gui.ListElementData d = new gui.ListElementData(msg.getQuestionID(), ... |
public void checkFile_convertsRedPenErrorsIntoIDEAProblemDescriptors() throws java.lang.Exception {
cc.redpen.model.Document doc = redPen.parse(DocumentParser.PLAIN, "Hello");
org.mockito.Mockito.when(redPen.validate(doc)).thenReturn(java.util.Arrays.asList(errorGenerator.at(0, 3), errorGenerator.at(3, 5)));
... | public void checkFile_convertsRedPenErrorsIntoIDEAProblemDescriptors() throws java.lang.Exception {
cc.redpen.model.Document doc = redPen.parse(DocumentParser.PLAIN, "Hello");
when(redPen.validate(doc)).thenReturn(java.util.Arrays.asList(errorGenerator.at(0, 3), errorGenerator.at(3, 5)));
com.intellij.codeI... |
public int getEdgeWeight(cs455.overlay.dijkstra.Vertex source, cs455.overlay.dijkstra.Vertex step) {
for (cs455.overlay.dijkstra.Edge edge : edges) {
if ((edge.getSource().equals(source)) && (edge.getDestination().equals(step))) {
return edge.getWeight();
}
}
return -1;
} | public int getEdgeWeight(cs455.overlay.dijkstra.Vertex source, cs455.overlay.dijkstra.Vertex step) {
for (cs455.overlay.dijkstra.Edge edge : edges) {
if (((edge.getSource().equals(source)) && (edge.getDestination().equals(step))) || ((edge.getSource().equals(step)) && (edge.getDestination().equals(source)))... |
public int GetRandomInteger(int min, int max) {
if (min == max) {
return (this.m_random.nextInt((max + 1))) + min;
}else {
return (this.m_random.nextInt(((max - min) + 1))) + min;
}
} | public int GetRandomInteger(int min, int max) {
if (max < min) {
return 0;
}
if (min == max) {
return (this.m_random.nextInt((max + 1))) + min;
}else {
return (this.m_random.nextInt(((max - min) + 1))) + min;
}
} |
public void updateTimeIndicator() {
try {
if ((gameStart.getTime()) == 0)
com.brainicism.projectrito.MainActivity.gameProgression.setImageResource(R.drawable.grey_dot);
else
if ((com.brainicism.projectrito.MainActivity.currGameTime) < 900)
com.brainicism.proje... | public void updateTimeIndicator() {
if ((gameStart) != null) {
if ((gameStart.getTime()) == 0)
com.brainicism.projectrito.MainActivity.gameProgression.setImageResource(R.drawable.grey_dot);
else
if ((com.brainicism.projectrito.MainActivity.currGameTime) < 900)
... |
public static void saveProperties() {
if ((com.mailroom.mainclient.MainFrame.properties) != null) {
com.mailroom.common.utils.Logger.logEvent("Saving Properties", "SYSTEM");
try {
java.io.File propFile = new java.io.File("./configuration.properties");
if (!(propFile.exists())... | public static void saveProperties() {
if ((com.mailroom.mainclient.MainFrame.properties) != null) {
com.mailroom.common.utils.Logger.logEvent("Saving Properties", "SYSTEM");
try {
java.io.File propFile = new java.io.File("./configuration.properties");
if (!(propFile.exists())... |
public java.lang.String toString() {
return ((((((((((((((((("User{" + "id=") + (id)) + ", name='") + (name)) + '\'') + ", phone='") + (phone)) + '\'') + ", email='") + (email)) + '\'') + ", passwd='") + (passwd)) + '\'') + ", salt='") + (salt)) + '\'') + '}';
} | public java.lang.String toString() {
return ((((((((((("User{" + "id=") + (id)) + ", name='") + (name)) + '\'') + ", phone='") + (phone)) + '\'') + ", email='") + (email)) + '\'') + '}';
} |
public void onNeedFillSubmission(org.stepic.droid.model.Submission submission, int numberOfSubmissions) {
enableInternetMessage(false);
showActionButtonLoadState(false);
showAnswerField(true);
showActionButtonLoadState(false);
this.numberOfSubmissions = numberOfSubmissions;
this.submission = sub... | public void onNeedFillSubmission(org.stepic.droid.model.Submission submission, int numberOfSubmissions) {
enableInternetMessage(false);
showActionButtonLoadState(false);
showAnswerField(true);
showActionButtonLoadState(false);
this.numberOfSubmissions = numberOfSubmissions;
this.submission = sub... |
public value.BoolValue notEq(value.Value other) {
if ((isSet()) || (other.isSet())) {
return new value.BoolValue();
}
java.lang.System.out.println("TODO does this work?");
return new value.BoolValue((!(this.equals(other))));
} | public value.BoolValue notEq(value.Value other) {
if ((!(isSet())) || (!(other.isSet()))) {
return new value.BoolValue();
}
java.lang.System.out.println("TODO does this work?");
return new value.BoolValue((!(this.equals(other))));
} |
private void changeRotation(int orientation, int lastOrientation) {
switch (orientation) {
case com.kalei.fragments.CameraFragment.ORIENTATION_PORTRAIT_NORMAL :
rotateIcons(mCameraSwitch, 0);
break;
case com.kalei.fragments.CameraFragment.ORIENTATION_LANDSCAPE_NORMAL :
... | private void changeRotation(int orientation, int lastOrientation) {
switch (orientation) {
case com.kalei.fragments.CameraFragment.ORIENTATION_PORTRAIT_NORMAL :
rotateIcons(mCameraSwitch, 0);
break;
case com.kalei.fragments.CameraFragment.ORIENTATION_LANDSCAPE_NORMAL :
... |
public static void set(java.lang.String name, long v) {
java.util.concurrent.atomic.AtomicLong ref = solo.julian.zhu.engine.statistics.TSC.cm.get(name);
if (ref == null) {
synchronized(solo.julian.zhu.engine.statistics.TSC.cm) {
ref = new java.util.concurrent.atomic.AtomicLong(v);
... | public static void set(java.lang.String name, long v) {
java.util.concurrent.atomic.AtomicLong ref = solo.julian.zhu.engine.statistics.TSC.cm.get(name);
if (ref == null) {
synchronized(solo.julian.zhu.engine.statistics.TSC.cm) {
ref = new java.util.concurrent.atomic.AtomicLong(v);
... |
public void diskImagesExist() {
org.mockito.Mockito.doReturn(true).when(validator).isDiskExists(disk1.getId());
org.mockito.Mockito.doReturn(true).when(validator).isDiskExists(disk2.getId());
org.junit.Assert.assertEquals(validator.diskImagesNotExist(), ValidationResult.VALID);
} | public void diskImagesExist() {
org.mockito.Mockito.doReturn(true).when(validator).isDiskExists(disk1.getId());
org.mockito.Mockito.doReturn(true).when(validator).isDiskExists(disk2.getId());
org.junit.Assert.assertEquals(ValidationResult.VALID, validator.diskImagesNotExist());
} |
public long put(T object, int index) {
if ((serializer) == null)
throw new java.lang.NullPointerException("No serializer is set!");
if (!(hasObject(index)))
return -1;
buffer.setAtPosition(index, true);
return serializer.serialize(buffer, object, objectSize, index);
} | public long put(T object, long index) {
if ((serializer) == null)
throw new java.lang.NullPointerException("No serializer is set!");
if (hasObject(index))
return -1;
buffer.setAtPosition((index * (objectSize)), true);
return serializer.serialize(buffer, object, objectSize, inde... |
public long getEmployeeID(java.lang.String employeeName) {
for (int i = 0; i < (employees.size()); i++) {
if (employeeName.equals(employees.get(i).name)) {
return employees.get(i).id;
}
}
return null;
} | public long getEmployeeID(java.lang.String employeeName) {
for (int i = 0; i < (employees.size()); i++) {
if (employeeName.equals(employees.get(i).name)) {
return employees.get(i).id;
}
}
return -1;
} |
private boolean checkSellOrdersLimit(mt.comm.ServerSideMessage msg) {
int count = 0;
java.util.Set<mt.Order> userOrders = orderMap.get(msg.getOrder().getNickname());
for (mt.Order obj : userOrders) {
if (obj.isSellOrder()) {
count++;
}
}
if (count < (MAX_SELL_ORDERS)) {
... | private boolean checkSellOrdersLimit(mt.comm.ServerSideMessage msg) {
int count = 0;
java.util.Set<mt.Order> userOrders = orderMap.get(msg.getOrder().getNickname());
for (mt.Order obj : userOrders) {
if (obj.isSellOrder()) {
count++;
}
}
if (count < (MAX_SELL_ORDERS)) {
... |
public void on(java.lang.String cmd, java.lang.Object[] args) {
try {
org.rapidoid.pages.Pages.callCmdHandler(x, screen, new org.rapidoid.html.Cmd(cmd, args));
} catch (java.lang.Exception e) {
if ((org.rapidoid.util.U.rootCause(e)) instanceof org.rapidoid.http.HttpExchangeException) {
... | public void on(java.lang.String cmd, java.lang.Object[] args) {
try {
org.rapidoid.pages.Pages.callCmdHandler(x, screen, new org.rapidoid.html.Cmd(cmd, args));
} catch (java.lang.Exception e) {
if ((org.rapidoid.util.U.rootCause(e)) instanceof org.rapidoid.http.HttpExchangeException) {
... |
public void onResponse(retrofit2.Call<com.onehilltech.backbone.http.Resource> call, retrofit2.Response<com.onehilltech.backbone.http.Resource> response) {
if (response.isSuccessful()) {
long count = response.body().get("count");
completionCallback.done(count);
}else {
completionCallback.... | public void onResponse(retrofit2.Call<com.onehilltech.backbone.http.Resource> call, retrofit2.Response<com.onehilltech.backbone.http.Resource> response) {
if (response.isSuccessful()) {
int count = response.body().get("count");
completionCallback.done(count);
}else {
completionCallback.f... |
public void done(com.parse.ParseException e) {
mChatInput.setEnabled(true);
mSend.setEnabled(true);
if (e != null) {
e.printStackTrace();
return ;
}
mChatInput.setText("");
mAdapter.addItem(message);
mAdapter.notifyDataSetChanged();
mList.scrollToPosition(((mAdapter.getIt... | public void done(com.parse.ParseException e) {
mSend.setEnabled(true);
if (e != null) {
e.printStackTrace();
return ;
}
mChatInput.setText("");
mAdapter.addItem(message);
mAdapter.notifyDataSetChanged();
mList.scrollToPosition(((mAdapter.getItemCount()) - 1));
} |
public void countBlockCategoriesForStage() {
controlBlocksForStage = 0;
dataBlocksForStage = 0;
eventsBlocksForStage = 0;
looksBlocksForStage = 0;
moreBlocksBlocksForStage = 0;
motionBlocksForStage = 0;
operatorsBlocksForStage = 0;
penBlocksForStage = 0;
sensingBlocksForStage = 0;
... | public void countBlockCategoriesForStage() {
controlBlocksForStage = 0;
dataBlocksForStage = 0;
eventsBlocksForStage = 0;
looksBlocksForStage = 0;
moreBlocksBlocksForStage = 0;
motionBlocksForStage = 0;
operatorsBlocksForStage = 0;
penBlocksForStage = 0;
sensingBlocksForStage = 0;
... |
private java.lang.String speedsPrintOut() {
java.lang.String s = "";
int i = 0;
for (int[] l : carSpeeds) {
s += ("Race " + (java.lang.Integer.toString(i))) + ":\n";
for (int sp : l) {
s += ("Car Speed: " + (java.lang.Integer.toString(sp))) + " ";
}
i++;
... | public java.lang.String speedsPrintOut() {
java.lang.String s = "";
int i = 0;
for (int[] l : carSpeeds) {
s += ("Race " + (java.lang.Integer.toString(i))) + ":\n";
for (int sp : l) {
s += ("Car Speed: " + (java.lang.Integer.toString(sp))) + " ";
}
i++;
s... |
public static com.liferay.mobile.screens.ddl.model.Field.DataType valueOfString(java.lang.String name) {
com.liferay.mobile.screens.ddl.model.Field.DataType result = com.liferay.mobile.screens.ddl.model.Field.DataType.UNSUPPORTED;
if (name != null) {
for (com.liferay.mobile.screens.ddl.model.Field.DataT... | public static com.liferay.mobile.screens.ddl.model.Field.DataType valueOfString(java.lang.String name) {
if (name != null) {
for (com.liferay.mobile.screens.ddl.model.Field.DataType dataType : com.liferay.mobile.screens.ddl.model.Field.DataType.values()) {
if (name.equals(dataType._value)) {
... |
public void initStep(java.lang.String name, priv.bajdcc.LALR1.grammar.runtime.RuntimeCodePage page, java.util.List<priv.bajdcc.LALR1.grammar.runtime.RuntimeCodePage> refers, int pc, priv.bajdcc.LALR1.grammar.runtime.RuntimeObject obj) throws java.lang.Exception {
add(name, page);
currentPage = page;
stack.r... | public void initStep(java.lang.String name, priv.bajdcc.LALR1.grammar.runtime.RuntimeCodePage page, java.util.List<priv.bajdcc.LALR1.grammar.runtime.RuntimeCodePage> refers, int pc, priv.bajdcc.LALR1.grammar.runtime.RuntimeObject obj) throws java.lang.Exception {
add(name, page);
currentPage = page;
stack.r... |
public static java.util.List<Project466.IncomePerson> findKNN(java.util.ArrayList<Project466.IncomePerson> dataSet, Project466.IncomePerson key, int k) {
java.util.ArrayList<Project466.IncomePerson> ipsWithDist = new java.util.ArrayList<>();
for (Project466.IncomePerson ip : dataSet) {
ip.getDistance(ke... | public static java.util.List<Project466.IncomePerson> findKNN(java.util.ArrayList<Project466.IncomePerson> dataSet, Project466.IncomePerson key, int k) {
java.util.ArrayList<Project466.IncomePerson> ipsWithDist = new java.util.ArrayList<>();
for (Project466.IncomePerson ip : dataSet) {
ip.getDistance(ke... |
public boolean promptForGuess() {
java.lang.System.out.print("Enter new letter: ");
java.util.Scanner scan = new java.util.Scanner(java.lang.System.in);
boolean isHit = false;
boolean isValidGuess = false;
while (!isValidGuess) {
java.lang.String guessAsString = scan.nextLine();
char... | public boolean promptForGuess() {
java.lang.System.out.print("Enter new letter: ");
java.util.Scanner scan = new java.util.Scanner(java.lang.System.in);
boolean isHit = false;
boolean isValidGuess = false;
while (!isValidGuess) {
java.lang.String guessAsString = scan.nextLine();
try ... |
private java.lang.Object getValue(java.util.Properties attributes, java.lang.String attributeName) {
final java.lang.String type = getType(attributeName);
if ((type != null) && (type.equals("number"))) {
return new java.lang.Integer(((java.lang.String) (attributes.get(attributeName))));
}else {
... | private java.lang.Object getValue(java.util.Properties attributes, java.lang.String attributeName) {
final java.lang.String type = getType(attributeName);
final java.lang.String value = ((java.lang.String) (attributes.get(attributeName)));
if (((type != null) && (type.equals("number"))) && (!(value.isEmpty(... |
public static void shutdown(java.util.Collection<? extends com.spinn3r.artemis.threads.Shutdownable> shutdownableList) throws java.lang.Exception {
java.util.List<java.lang.Exception> exceptions = com.google.common.collect.Lists.newArrayList();
for (com.spinn3r.artemis.threads.Shutdownable shutdownable : shutdo... | public static void shutdown(java.util.Collection<? extends com.spinn3r.artemis.threads.Shutdownable> shutdownableList) throws java.lang.Exception {
java.util.List<java.lang.Exception> exceptions = com.google.common.collect.Lists.newArrayList();
for (com.spinn3r.artemis.threads.Shutdownable shutdownable : shutdo... |
public boolean AreaAdjacency(int area2) {
java.lang.String[] adjAreas = this.AdjArea.split(",");
for (java.lang.String s : adjAreas) {
if (s == (java.lang.Integer.toString(area2))) {
return true;
}
}
return false;
} | public boolean AreaAdjacency(int area2) {
java.lang.String[] adjAreas = this.AdjArea.split(",");
for (java.lang.String s : adjAreas) {
if ((java.lang.Integer.parseInt(s)) == area2) {
return true;
}
}
return false;
} |
private boolean isAppInstalled(java.lang.String id, android.content.Context ctx) {
if (id.equalsIgnoreCase(de.martinreinhardt.cordova.plugins.email.EmailComposerImpl.MAILTO_SCHEME)) {
android.content.Intent intent = de.martinreinhardt.cordova.plugins.email.EmailComposerImpl.getEmailIntent();
android... | private boolean isAppInstalled(java.lang.String id, android.content.Context ctx) {
if ((id == null) || (id.equalsIgnoreCase(de.martinreinhardt.cordova.plugins.email.EmailComposerImpl.MAILTO_SCHEME))) {
android.content.Intent intent = de.martinreinhardt.cordova.plugins.email.EmailComposerImpl.getEmailIntent(... |
public void call() {
int amountToBet = (table.getCurrentBet()) - (currentBet);
if (((money) - amountToBet) > 0) {
table.addToPot(totalBet, amountToBet);
totalBet += amountToBet;
currentBet += amountToBet;
addMoney((-amountToBet));
}else {
allIn();
}
} | public void call() {
int amountToBet = (table.getCurrentBet()) - (currentBet);
if (((money) - amountToBet) > 0) {
totalBet += amountToBet;
currentBet += amountToBet;
addMoney((-amountToBet));
table.addToPot(totalBet, amountToBet);
}else {
allIn();
}
} |
protected void onCreate(android.os.Bundle savedInstanceState) {
final java.lang.String HOST = "10.10.0.11";
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home_page);
final android.widget.EditText UserName = ((android.widget.EditText) (findViewById(R.id.username)));
final andro... | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home_page);
final android.widget.EditText UserName = ((android.widget.EditText) (findViewById(R.id.username)));
final android.widget.EditText Password = ((android.widget.E... |
private void reset() {
started = false;
lost = false;
won = false;
spawn.destruct();
backgroundMusic.stop();
defeatMusic.stop();
victoryMusic.stop();
coverMusic.loop();
p = new Player();
spawn = new SpawnTracker(p);
} | private void reset() {
started = false;
lost = false;
won = false;
backgroundMusic.stop();
defeatMusic.stop();
victoryMusic.stop();
coverMusic.loop();
spawn.destruct();
p.destruct();
p = new Player();
spawn = new SpawnTracker(p);
} |
public boolean hasTileAt(int x, int y) {
if ((((x >= 0) && (x < (tile.length))) && (y >= 0)) && (y < (tile[0].length))) {
return true;
}
return false;
} | public boolean hasTileAt(int x, int y) {
if ((((x >= 0) && (x < (tile[0].length))) && (y >= 0)) && (y < (tile.length))) {
return true;
}
return false;
} |
public void onCreate() {
super.onCreate();
com.vgomc.mchelper.base.AppApplication.appApplication = this;
com.vgomc.mchelper.utility.CrashHandler crashHandler = com.vgomc.mchelper.utility.CrashHandler.getInstance();
crashHandler.init(this);
try {
com.vgomc.mchelper.base.AppApplication.appVers... | public void onCreate() {
super.onCreate();
com.vgomc.mchelper.base.AppApplication.appApplication = this;
com.vgomc.mchelper.utility.CrashHandler crashHandler = com.vgomc.mchelper.utility.CrashHandler.getInstance();
crashHandler.init(this);
try {
com.vgomc.mchelper.base.AppApplication.appVers... |
public void onTimeout(long reqId, java.lang.String header, java.lang.String sequence) {
biospectra.classify.server.RabbitMQInputClient client = this.getClient();
client.reportTimeout();
if ((responseHandler) != null) {
synchronized(responseHandler) {
responseHandler.onTimeout(reqId, head... | public void onTimeout(long reqId, java.lang.String header, java.lang.String sequence) {
biospectra.classify.server.RabbitMQInputClient client = this.getClient();
client.reportTimeout();
if ((responseHandler) != null) {
responseHandler.onTimeout(reqId, header, sequence);
}else {
biospectr... |
public static android.location.Location randomLocation(com.jimandlisa.reportAircraftNoise.LocationUtils.LocationMode mode) {
android.location.Location location = new android.location.Location((mode == (com.jimandlisa.reportAircraftNoise.LocationUtils.LocationMode.HOME) ? android.location.LocationManager.NETWORK_PRO... | public static android.location.Location randomLocation() {
android.location.Location location = new android.location.Location(android.location.LocationManager.GPS_PROVIDER);
java.util.Random rand = new java.util.Random();
location.setLatitude(com.jimandlisa.reportAircraftNoise.LocationUtils.randomLat(rand))... |
public void actionPerformed(java.awt.event.ActionEvent e) {
repaint();
java.lang.System.out.println("action performed");
if ((RiseOfPoke.Inscriptor.currentState) == (MENU_STATE)) {
updateMenuState();
}else
if ((RiseOfPoke.Inscriptor.currentState) == (GAME_STATE)) {
updateGame... | public void actionPerformed(java.awt.event.ActionEvent e) {
repaint();
if ((RiseOfPoke.Inscriptor.currentState) == (MENU_STATE)) {
updateMenuState();
}else
if ((RiseOfPoke.Inscriptor.currentState) == (GAME_STATE)) {
updateGameState();
}else
if ((RiseOfPoke.Ins... |
public static boolean getUsageOfCmd(org.bukkit.command.CommandSender sender, java.lang.String cmd) {
try {
java.lang.String usage = org.bukkit.Bukkit.getPluginCommand(cmd).getUsage();
tk.rht0910.plugin_manager.Manager.getSender(sender).sendMessage(usage);
} catch (java.lang.Exception e) {
... | public static boolean getUsageOfCmd(org.bukkit.command.CommandSender sender, java.lang.String cmd) {
try {
java.lang.String usage = org.bukkit.Bukkit.getPluginCommand(cmd).getUsage();
sender.sendMessage(usage);
} catch (java.lang.Exception e) {
sender.sendMessage("Can't show usage of com... |
public int hashCode() {
final int prime = 31;
int result = 1;
result = (prime * result) + ((statementHandle) == null ? 0 : statementHandle.hashCode());
result = (prime * result) + ((parameterValues) == null ? 0 : parameterValues.hashCode());
result = (prime * result) + ((int) ((maxRowCount) ^ ((maxR... | public int hashCode() {
final int prime = 31;
int result = 1;
result = (prime * result) + ((statementHandle) == null ? 0 : statementHandle.hashCode());
result = (prime * result) + ((parameterValues) == null ? 0 : parameterValues.hashCode());
result = (prime * result) + ((int) ((maxRowCount) ^ ((maxR... |
private void recordAudio() {
synchronized(this) {
android.content.SharedPreferences sharedPref = getApplicationContext().getSharedPreferences(Common.EL_PREFS, 0);
boolean isCollecting = sharedPref.getBoolean("isCollecting", false);
if (isCollecting) {
audio = new com.iiitd.muc.en... | private void recordAudio() {
synchronized(this) {
android.content.SharedPreferences sharedPref = getApplicationContext().getSharedPreferences(Common.EL_PREFS, 0);
boolean isCollecting = sharedPref.getBoolean("isCollecting", false);
if (isCollecting) {
audio = new com.iiitd.muc.en... |
public ru.nemchinovsergey.javarush.model.User getUserById(int id) {
ru.nemchinovsergey.javarush.dao.UserDaoImpl.logger.debug("getUserById() id : {}", id);
ru.nemchinovsergey.javarush.dao.Session session = sessionFactory.getCurrentSession();
ru.nemchinovsergey.javarush.model.User user = ((ru.nemchinovsergey.... | public ru.nemchinovsergey.javarush.model.User getUserById(int id) {
ru.nemchinovsergey.javarush.dao.UserDaoImpl.logger.debug("getUserById() id : {}", id);
ru.nemchinovsergey.javarush.dao.Session session = sessionFactory.getCurrentSession();
ru.nemchinovsergey.javarush.model.User user = ((ru.nemchinovsergey.... |
double result = 0;
for (int i = 0; i < times; i++) {
result = result + 1;
if (num < (java.lang.Float.MAX_VALUE))
java.lang.System.out.println(result);
}
return result;
} | double result = 0;
for (int i = 0; i < times; i++) {
result = result + num;
if (num < (java.lang.Float.MAX_VALUE))
java.lang.System.out.println(result);
}
return result;
} |
private void bindBreweryToView(android.epsi.com.bebeer.bean.Brewery brewery) {
android.util.Log.d(TAG, ((("bindBreweryToView() called with: " + "brewery = [") + brewery) + "]"));
android.widget.TextView name = ((android.widget.TextView) (findViewById(R.id.brewery_profil_content_name)));
android.widget.TextV... | private void bindBreweryToView(android.epsi.com.bebeer.bean.Brewery brewery) {
android.widget.TextView name = ((android.widget.TextView) (findViewById(R.id.brewery_profil_content_name)));
android.widget.TextView country = ((android.widget.TextView) (findViewById(R.id.brewery_profil_content_country)));
name.... |
public graphicsHandler.GraphicObject.GraphicBuilder shadingElement(java.lang.String shadingColor, float offset) {
if (((graphicsHandler.GraphicObject.verifyColor(shadingColor)) && (offset >= 0)) && (offset <= 1)) {
java.lang.System.err.println(((shadingColor + " ") + offset));
shadingColors.add(shad... | public graphicsHandler.GraphicObject.GraphicBuilder shadingElement(java.lang.String shadingColor, float offset) {
if (((graphicsHandler.GraphicObject.verifyColor(shadingColor)) && (offset >= 0)) && (offset <= 1)) {
shadingColors.add(shadingColor);
offsets.add(offset);
}
return this;
} |
public boolean fire(int numberOfTorpedos) {
if ((numberOfTorpedos < 1) || (numberOfTorpedos > (this.torpedos))) {
throw new java.lang.IllegalArgumentException("numberOfTorpedos");
}
boolean success = false;
double r = generator.nextDouble();
if (r > 0.1) {
this.torpedos -= numberOfTo... | public boolean fire(int numberOfTorpedos) {
if ((numberOfTorpedos < 1) || (numberOfTorpedos > (this.torpedos))) {
throw new java.lang.IllegalArgumentException("numberOfTorpedos");
}
boolean success;
double r = generator.nextDouble();
if (r > 0.1) {
this.torpedos -= numberOfTorpedos;
... |
public void actionPerformed(java.awt.event.ActionEvent e) {
if (e.getActionCommand().equals("清除")) {
contentQ[lastClick.y][lastClick.x] = 0;
}else {
contentQ[lastClick.y][lastClick.x] = java.lang.Integer.parseInt(e.getActionCommand());
}
lastClick = null;
this.repaint();
} | public void actionPerformed(java.awt.event.ActionEvent e) {
if ((lastClick) == null)
return ;
if (e.getActionCommand().equals("清除")) {
contentQ[lastClick.y][lastClick.x] = 0;
}else {
contentQ[lastClick.y][lastClick.x] = java.lang.Integer.parseInt(e.getActionCommand());
}
... |
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
android.support.v7.widget.Toolbar menu = ((android.support.v7.widget.Toolbar) (findViewById(R.id.menu_bar)));
setSupportActionBar(menu);
findViewById(R.id.link_... | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
findViewById(R.id.link_connected_devices).setVisibility(View.VISIBLE);
findViewById(R.id.bt_icon_green).setVisibility(View.VISIBLE);
findViewById(R.id.link_disc... |
public static void printArray(double[] array, int left, int right) {
java.lang.System.out.print("[");
for (int i = left; i < (right + 1); i++) {
java.lang.System.out.print(((array[i]) + "; "));
}
java.lang.System.out.println("]");
} | public static void printArray(double[] array, int left, int right) {
java.lang.System.out.print("[");
int i = left;
for (; i < right; i++)
java.lang.System.out.print(((array[i]) + "; "));
java.lang.System.out.println(((array[i]) + "]"));
} |
public long addValue(long delta) {
return withLock(() -> {
long value = (bytes.parseLong(((offset) + (net.openhft.chronicle.wire.LongTextReference.VALUE)))) + delta;
bytes.append(((offset) + (net.openhft.chronicle.wire.LongTextReference.VALUE)), value, 20);
return value;
});
} | public long addValue(long delta) {
return withLock(() -> {
long value = (bytes.parseLong(((offset) + (net.openhft.chronicle.wire.LongTextReference.VALUE)))) + delta;
bytes.append(((offset) + (net.openhft.chronicle.wire.LongTextReference.VALUE)), value);
return value;
});
} |
public void onDestroy() {
super.onDestroy();
android.util.Log.i(TAG, "onDestroy");
stopPlayback();
if ((mExoPlayer) != null) {
releaseExoPlayer();
}
if ((connectivity) != null) {
connectivity.destroy();
connectivity = null;
}
if ((notifUpdate_Receiver) != null)
... | public void onDestroy() {
super.onDestroy();
stopPlayback();
if ((mExoPlayer) != null) {
releaseExoPlayer();
}
if ((connectivity) != null) {
connectivity.destroy();
connectivity = null;
}
if ((notifUpdate_Receiver) != null)
unregisterReceiver(notifUpdate_Recei... |
private boolean isNextAcronym(char c, char nc) {
return ((java.lang.Character.isLowerCase(c)) && (java.lang.Character.isUpperCase(nc))) || ((java.lang.Character.isLetter(c)) && (java.lang.Character.isLetter(nc)));
} | private boolean isNextAcronym(char c, char nc) {
return ((java.lang.Character.isLowerCase(c)) && (java.lang.Character.isUpperCase(nc))) || ((!(java.lang.Character.isLetter(c))) && (java.lang.Character.isLetter(nc)));
} |
public float reportRayFixture(net.net63.codearcade.LSD.systems.Fixture fixture, com.badlogic.gdx.math.Vector2 point, com.badlogic.gdx.math.Vector2 normal, float fraction) {
if (((fixture.getFilterData().categoryBits) & (Constants.MaskBits.LASER)) == 0) {
return -1;
}
laserHitPos.set(point);
lase... | public float reportRayFixture(net.net63.codearcade.LSD.systems.Fixture fixture, com.badlogic.gdx.math.Vector2 point, com.badlogic.gdx.math.Vector2 normal, float fraction) {
if (((fixture.getFilterData().categoryBits) & (Constants.MaskBits.LASER)) == 0) {
return -1;
}
laserHitPos.set(point);
lase... |
public void show500(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.Throwable e) throws java.io.IOException, javax.servlet.ServletException {
response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
request.setAttribute(com.lftechnology.batch7cr... | protected void show500(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.Throwable e) throws java.io.IOException, javax.servlet.ServletException {
response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
request.setAttribute(com.lftechnology.batch... |
public java.lang.String tag(final java.lang.String word, java.lang.String posTag) {
java.util.List<morfologik.stemming.WordData> wdList = dictLookup.lookup(word);
java.lang.String newPosTag = null;
for (morfologik.stemming.WordData wd : wdList) {
newPosTag = wd.getTag().toString();
}
if (new... | public java.lang.String tag(final java.lang.String word, java.lang.String posTag) {
java.util.List<morfologik.stemming.WordData> wdList = dictLookup.lookup(word.toLowerCase());
java.lang.String newPosTag = null;
for (morfologik.stemming.WordData wd : wdList) {
newPosTag = wd.getTag().toString();
... |
public java.sql.Timestamp getTargetTimestamp() {
if (((targetTimestamp) == null) || ((targetDate) != null)) {
java.text.DateFormat df = new java.text.SimpleDateFormat("MM/dd/yyyy");
try {
targetTimestamp = new java.sql.Timestamp(df.parse(targetDate).getTime());
} catch (java.text... | public java.sql.Timestamp getTargetTimestamp() {
if (((targetTimestamp) == null) && ((targetDate) != null)) {
java.text.DateFormat df = new java.text.SimpleDateFormat("MM/dd/yyyy");
try {
targetTimestamp = new java.sql.Timestamp(df.parse(targetDate).getTime());
} catch (java.text... |
protected void configure() {
map().setId(source.getId());
map().setExpert(source.getExpert());
map().setMetricators(source.getMetricators());
map().setGridName(source.getGridName());
map().setName(source.getName());
map().setQuestioners(source.getQuestioners());
map().setExtrauser(source.get... | protected void configure() {
map().setId(source.getId());
map().setGridName(source.getGridName());
map().setName(source.getName());
map().setExtrauser(source.getExtrauser());
} |
public boolean onEditorAction(android.widget.TextView v, int actionId, android.view.KeyEvent event) {
boolean handled = false;
if (actionId == (android.view.inputmethod.EditorInfo.IME_ACTION_SEND)) {
sendMessage(currChannel, editText.getText().toString());
handled = true;
editText.setTex... | public boolean onEditorAction(android.widget.TextView v, int actionId, android.view.KeyEvent event) {
boolean handled = false;
if (actionId == (android.view.inputmethod.EditorInfo.IME_ACTION_SEND)) {
sendMessage(editText.getText().toString());
handled = true;
editText.setText("");
... |
public void TestBodyString() {
com.upokecenter.test.Message msg = new com.upokecenter.test.Message().SetTextBody("Test");
java.lang.String mtype = "text/plain;charset=x-unknown";
msg.setContentType(com.upokecenter.test.MediaType.Parse(mtype));
try {
msg.getBodyString().toString();
org.ju... | public void TestBodyString() {
com.upokecenter.test.Message msg = new com.upokecenter.test.Message().SetTextBody("Test");
java.lang.String mtype = "text/plain;charset=x-unknown";
msg.setContentType(com.upokecenter.test.MediaType.Parse(mtype));
try {
msg.getBodyString().toString();
org.ju... |
public static packet parseUDPdata(byte[] UDPdata) throws java.lang.Exception {
java.nio.ByteBuffer buffer = java.nio.ByteBuffer.wrap(UDPdata);
int type = buffer.getInt();
int seqnum = buffer.getInt();
int sent = buffer.getInt();
int length = buffer.getInt();
byte[] data = new byte[length];
b... | public static packet parseUDPdata(byte[] UDPdata) throws java.lang.Exception {
java.nio.ByteBuffer buffer = java.nio.ByteBuffer.wrap(UDPdata);
int type = buffer.getInt();
int seqnum = buffer.getInt();
int length = buffer.getInt();
byte[] data = new byte[length];
buffer.get(data, 0, length);
... |
public static int fibonacci(int n) {
if (n == 0) {
return 1;
}
if (n == 1) {
return 1;
}
return (Aufgaben_Eisenbiegler.Rekursion_Fibonacci.fibonacci((n - 1))) + (Aufgaben_Eisenbiegler.Rekursion_Fibonacci.fibonacci((n - 2)));
} | public static int fibonacci(int n) {
if (n == 0) {
return 0;
}
if (n == 1) {
return 1;
}
return (Aufgaben_Eisenbiegler.Rekursion_Fibonacci.fibonacci((n - 1))) + (Aufgaben_Eisenbiegler.Rekursion_Fibonacci.fibonacci((n - 2)));
} |
private java.lang.String getAnyUrl() {
final java.util.List<java.lang.String> sources = new java.util.ArrayList<java.lang.String>(urls);
if (sources.isEmpty()) {
throw new java.lang.RuntimeException("Unable to get connection: there is no enabled urls");
}
final int idx = (rnd.nextInt()) % (sourc... | private java.lang.String getAnyUrl() {
final java.util.List<java.lang.String> sources = new java.util.ArrayList<java.lang.String>(urls);
if (sources.isEmpty()) {
throw new java.lang.RuntimeException("Unable to get connection: there is no enabled urls");
}
final int idx = rnd.nextInt(sources.size... |
public boolean runLogin() {
java.util.Scanner scanner = new java.util.Scanner(java.lang.System.in);
java.lang.System.out.print("User ID: ");
java.lang.String userId = scanner.nextLine();
java.lang.System.out.print("Password: ");
java.lang.String password = scanner.nextLine();
try {
retur... | public boolean runLogin() {
java.lang.System.out.print("User ID: ");
java.lang.String userId = scanner.nextLine();
java.lang.System.out.print("Password: ");
java.lang.String password = scanner.nextLine();
try {
return login(java.lang.Integer.parseInt(userId), password);
} catch (java.lan... |
public void onClick(android.view.View v) {
if (mAction.isRoot()) {
android.util.Log.e("DSLV", "Tried to remove root");
return ;
}
com.apps.quantum1.Action toDelete = mAction;
mAction = toDelete.getParent();
removeAction(toDelete);
updateListToShowCurrentAction();
updateFooter... | public void onClick(android.view.View v) {
if (mAction.isRoot()) {
android.util.Log.e("DSLV", "Tried to remove root");
return ;
}
com.apps.quantum1.Action toDelete = mAction;
mAction = toDelete.getParent();
removeAction(toDelete);
updateListToShowCurrentAction(true);
updateFo... |
public int getNodeCount() {
android.database.sqlite.SQLiteDatabase db = getReadableDatabase();
android.database.Cursor cursor = db.rawQuery(("SELECT * FROM " + (io.github.data4all.model.DataBaseHandler.TABLE_NODE)), null);
int count = cursor.getCount();
cursor.close();
db.close();
return count;
... | public int getNodeCount() {
android.database.sqlite.SQLiteDatabase db = getReadableDatabase();
android.database.Cursor cursor = db.rawQuery(("SELECT * FROM " + (io.github.data4all.model.DataBaseHandler.TABLE_NODE)), null);
int count = cursor.getCount();
cursor.close();
return count;
} |
public void onVote() {
super.onVote();
sendChat();
executeCommand();
sendPrivateChat();
final int offlineVoteTimes = java.lang.Integer.parseInt(this.data.getVote_offline());
if (offlineVoteTimes > 0) {
if (com.bebehp.mc.simpleforgevotelistener.ConfigurationHandler.offlineVoteEnable) {
... | public void onVote() {
super.onVote();
executeCommand();
sendChat();
sendPrivateChat();
final int offlineVoteTimes = java.lang.Integer.parseInt(this.data.getVote_offline());
if (offlineVoteTimes > 0) {
if (com.bebehp.mc.simpleforgevotelistener.ConfigurationHandler.offlineVoteEnable) {
... |
public boolean onKeyDown(int keyCode, android.view.KeyEvent event) {
android.widget.RelativeLayout rl = ((android.widget.RelativeLayout) (findViewById(R.id.layout)));
if (keyCode == (android.view.KeyEvent.KEYCODE_BACK)) {
rl.setBackgroundResource(R.drawable.flashlight1);
v1.setVisibility(View.VI... | public boolean onKeyDown(int keyCode, android.view.KeyEvent event) {
android.widget.RelativeLayout rl = ((android.widget.RelativeLayout) (findViewById(R.id.layout)));
if (keyCode == (android.view.KeyEvent.KEYCODE_BACK)) {
rl.setBackgroundResource(R.drawable.flashlight1);
v1.setVisibility(View.IN... |
protected void onPostExecute(com.QuarkLabs.BTCeClient.api.CallResult<com.QuarkLabs.BTCeClient.api.AccountInfo> result) {
java.lang.String notificationText;
if (result.isSuccess()) {
notificationText = getString(R.string.FundsInfoUpdatedtext);
if (isVisible()) {
refreshFundsView(resul... | protected void onPostExecute(com.QuarkLabs.BTCeClient.api.CallResult<com.QuarkLabs.BTCeClient.api.AccountInfo> result) {
java.lang.String notificationText;
if (!(isVisible())) {
return ;
}
if (result.isSuccess()) {
notificationText = getString(R.string.FundsInfoUpdatedtext);
refr... |
public void deleteItem(T bean) {
if ((mAllDatas) != null) {
int size = mAllDatas.size();
int indexOf = mAllDatas.indexOf(bean);
if (indexOf > (-1)) {
if (onDeleteItem(bean)) {
mAllDatas.remove(bean);
com.rsen.base.RBaseAdapter.notifyItemRemoved(ind... | public void deleteItem(T bean) {
if ((mAllDatas) != null) {
int size = mAllDatas.size();
int indexOf = mAllDatas.indexOf(bean);
if (indexOf > (-1)) {
if (onDeleteItem(bean)) {
mAllDatas.remove(bean);
com.rsen.base.RBaseAdapter.notifyItemRemoved(ind... |
public void start(javafx.stage.Stage primaryStage) throws java.lang.Exception {
javafx.scene.Scene scene = new javafx.scene.Scene(root, sceneWidth, sceneHeight, true);
scene.setFill(javafx.scene.paint.Color.GRAY);
javafx.scene.control.Label label = new javafx.scene.control.Label("Testing jenkins");
root... | public void start(javafx.stage.Stage primaryStage) throws java.lang.Exception {
javafx.scene.Scene scene = new javafx.scene.Scene(root, sceneWidth, sceneHeight, true);
scene.setFill(javafx.scene.paint.Color.GRAY);
javafx.scene.control.Label label = new javafx.scene.control.Label("Testing jenkins");
root... |
private void setConfigFile(java.lang.String filePath, java.lang.String configDirDest, java.lang.String configFileDestName) {
org.codehaus.cargo.container.configuration.LocalConfiguration config = getConfiguration();
org.codehaus.cargo.container.configuration.FileConfig configFile = new org.codehaus.cargo.contai... | private void setConfigFile(java.lang.String filePath, java.lang.String configDirDest, java.lang.String configFileDestName) {
org.codehaus.cargo.container.configuration.FileConfig configFile = new org.codehaus.cargo.container.configuration.FileConfig();
configFile.setFile(filePath);
configFile.setToDir(confi... |
public int computeScore(java.lang.String word) {
int scoreValue = 0;
for (int i = 0; i < (word.length()); i++) {
char c = word.charAt(i);
scoreValue += scores.get(c);
}
return scoreValue;
} | public int computeScore(java.lang.String word) {
int scoreValue = 0;
word = word.toLowerCase();
for (int i = 0; i < (word.length()); i++) {
char c = word.charAt(i);
scoreValue += scores.get(c);
}
return scoreValue;
} |
public void wearToday() {
this.lastWorn = new java.util.Date();
android.content.ContentValues newValues = new android.content.ContentValues();
newValues.put(ShirtsHelper.DATE, this.lastWorn.getSeconds());
com.ddsnowboard.tShirtPicker.Shirt.db.update(ShirtsHelper.DATABASE_NAME, newValues, "_id=?", new ja... | public void wearToday() {
this.lastWorn = new java.util.Date();
android.content.ContentValues newValues = new android.content.ContentValues();
newValues.put(ShirtsHelper.DATE, this.lastWorn.getTime());
com.ddsnowboard.tShirtPicker.Shirt.db.update(ShirtsHelper.DATABASE_NAME, newValues, "_id=?", new java.... |
public void testMatchingAlgorithmMVMsCGDCallable() throws java.lang.Exception {
java.util.Map institutionMap = new java.util.HashMap();
org.recap.executors.MatchingAlgorithmMVMsCGDCallable matchingAlgorithmMVMsCGDCallable = new org.recap.executors.MatchingAlgorithmMVMsCGDCallable(reportDataDetailsRepository, mo... | public void testMatchingAlgorithmMVMsCGDCallable() throws java.lang.Exception {
java.util.Map institutionMap = new java.util.HashMap();
org.recap.executors.MatchingAlgorithmMVMsCGDCallable matchingAlgorithmMVMsCGDCallable = new org.recap.executors.MatchingAlgorithmMVMsCGDCallable(reportDataDetailsRepository, mo... |
private void mirrorWaypoints() {
com.google.android.gms.maps.model.LatLng pointA = waypoints.get(0);
com.google.android.gms.maps.model.LatLng pointB = waypoints.get(1);
com.google.android.gms.maps.model.LatLng mirror = new com.google.android.gms.maps.model.LatLng(pointA.latitude, pointB.longitude);
wayp... | private void mirrorWaypoints() {
com.google.android.gms.maps.model.LatLng pointA = waypoints.get(0);
com.google.android.gms.maps.model.LatLng pointB = waypoints.get(1);
com.google.android.gms.maps.model.LatLng mirror = new com.google.android.gms.maps.model.LatLng(pointB.latitude, pointA.longitude);
wayp... |
public void abort() {
globalLock.lock();
try {
if ((this.threadPoolTaskHandler) != null) {
if (started) {
threadPoolTaskHandler.remove(this);
}
this.aborted = true;
this.executionComplete();
}
} finally {
globalLock.unlo... | public void abort() {
globalLock.lock();
try {
if ((threadPoolTaskHandler) != null) {
if (started) {
threadPoolTaskHandler.remove(this);
}
aborted = true;
executionComplete();
}
} finally {
globalLock.unlock();
}
} |
public static model.network.ServerSocketWorker setupSocketConnectionListener(int port, int listeningMode, model.listener.NetworkConnectionListener listener) {
model.network.ServerSocketWorker serverSocketWorker = new model.network.ServerSocketWorker(port, listeningMode, new model.listener.SocketConnectionListener()... | public static model.network.ServerSocketWorker setupSocketConnectionListener(int port, int listeningMode, model.listener.NetworkConnectionListener listener) {
model.network.ServerSocketWorker serverSocketWorker = new model.network.ServerSocketWorker(port, listeningMode, new model.listener.SocketConnectionListener()... |
public void paint(java.awt.Graphics g) {
super.paintComponent(g);
java.awt.Image img = createImage(viewport.getWidth(), viewport.getHeight());
java.awt.Graphics g2 = img.getGraphics();
draw(g2);
g.drawImage(img, 0, 0, viewport.getWidth(), viewport.getHeight(), null);
} | public void paint(java.awt.Graphics g) {
super.paintComponent(g);
java.awt.Image img = createImage(getWidth(), getHeight());
java.awt.Graphics g2 = img.getGraphics();
draw(g2);
g.drawImage(img, 0, 0, getWidth(), getHeight(), null);
} |
private com.googlecode.lanterna.terminal.Terminal createCygwinTerminal(java.io.OutputStream outputStream, java.io.InputStream inputStream, java.nio.charset.Charset charset) throws java.io.IOException {
com.googlecode.lanterna.terminal.ansi.CygwinTerminal cygTerminal = new com.googlecode.lanterna.terminal.ansi.Cygwi... | public com.googlecode.lanterna.terminal.Terminal createCygwinTerminal(java.io.OutputStream outputStream, java.io.InputStream inputStream, java.nio.charset.Charset charset) throws java.io.IOException {
com.googlecode.lanterna.terminal.ansi.CygwinTerminal cygTerminal = new com.googlecode.lanterna.terminal.ansi.Cygwin... |
private void updateImagePreview() {
if ((mUploadFileUri) != null) {
com.squareup.picasso.Picasso.with(getContext()).load(mUploadFileUri).into(mPicturePreview);
mPicturePreview.setVisibility(View.VISIBLE);
mRemovePictureBt.setVisibility(View.VISIBLE);
}else {
mPicturePreview.setVi... | private void updateImagePreview() {
if ((mUploadFileUri) != null) {
com.squareup.picasso.Picasso.with(getActivity()).load(mUploadFileUri).into(mPicturePreview);
mPicturePreview.setVisibility(View.VISIBLE);
mRemovePictureBt.setVisibility(View.VISIBLE);
}else {
mPicturePreview.setV... |
public void onItemClick(android.widget.AdapterView<?> parent, final android.view.View view, int position, long id) {
java.util.HashMap<java.lang.String, java.lang.String> hash = list.get(position);
hash.size();
int routeId = java.lang.Integer.parseInt(hash.get("1"));
viewRouteDetails(routeId);
} | public void onItemClick(android.widget.AdapterView<?> parent, final android.view.View view, int position, long id) {
if (position != 0) {
java.util.HashMap<java.lang.String, java.lang.String> hash = list.get(position);
hash.size();
int routeId = java.lang.Integer.parseInt(hash.get("1"));
... |
public datastructure.HashEntry get(java.lang.Object Key) {
int hash = getHash(Key.hashCode());
int bucketnumber = getBucketNumber(hash);
datastructure.HashEntry current = table[bucketnumber];
while ((current.next) != null) {
if (current.getKey().equals(Key)) {
return current;
... | public datastructure.HashEntry get(java.lang.Object Key) {
int hash = getHash(Key.hashCode());
int bucketnumber = getBucketNumber(hash);
datastructure.HashEntry current = table[bucketnumber];
while (current != null) {
if (current.getKey().equals(Key)) {
return current;
}
... |
public com.lerenard.bible.Ribbon getRibbon(int id) {
android.database.sqlite.SQLiteDatabase db = getReadableDatabase();
android.database.Cursor cursor = db.query(com.lerenard.bible.helper.DatabaseHandler.TABLE_RIBBONS, com.lerenard.bible.helper.DatabaseHandler.star, ((com.lerenard.bible.helper.DatabaseHandler._... | public com.lerenard.bible.Ribbon getRibbon(int id) {
android.database.sqlite.SQLiteDatabase db = getReadableDatabase();
android.database.Cursor cursor = db.query(com.lerenard.bible.helper.DatabaseHandler.TABLE_RIBBONS, com.lerenard.bible.helper.DatabaseHandler.star, ((com.lerenard.bible.helper.DatabaseHandler._... |
public void draw() {
sb.setProjectionMatrix(VimFight.cam.combined);
sb.begin();
font.draw(sb, hint, (((game.vim.VimFight.WIDTH) - (15 * (hint.length()))) / 2), 100);
java.lang.System.out.println(("hint.length() = " + (hint.length())));
sb.end();
} | public void draw() {
sb.setProjectionMatrix(VimFight.cam.combined);
sb.begin();
font.draw(sb, hint, (((game.vim.VimFight.WIDTH) - (15 * (hint.length()))) / 2), 100);
sb.end();
} |
public eis.iilang.Percept performAction(final eis.iilang.Action action) throws eis.eis2java.exception.TranslationException {
java.lang.System.out.println(action);
contextvh.actions.CustomAction customAction = customActions.get(action);
if (customAction != null) {
return customAction.call(this, actio... | public eis.iilang.Percept performAction(final eis.iilang.Action action) throws eis.eis2java.exception.TranslationException {
contextvh.actions.CustomAction customAction = customActions.get(action);
if (customAction != null) {
return customAction.call(this, action.getParameters());
}else {
re... |
public static void setActiveState(java.lang.String key) {
if (com.mpu.spinv.engine.StateMachine.states.containsKey(key)) {
if (((com.mpu.spinv.engine.StateMachine.activeState) != null) && (!(com.mpu.spinv.engine.StateMachine.activeState.isSaveResources()))) {
com.mpu.spinv.engine.StateMachine.ac... | public static void setActiveState(java.lang.String key) {
if (com.mpu.spinv.engine.StateMachine.states.containsKey(key)) {
if (((com.mpu.spinv.engine.StateMachine.activeState) != null) && (!(com.mpu.spinv.engine.StateMachine.activeState.isSaveResources()))) {
com.mpu.spinv.engine.StateMachine.ac... |
public void save(com.github.kamys.managerProduct.logic.layout.Layout layout) {
com.github.kamys.managerProduct.data.managers.ManagerLayout.LOGGER.info(("save: " + layout));
org.hibernate.Transaction tr = null;
try (org.hibernate.Session session = factory.openSession()) {
tr = session.beginTransactio... | public void save(com.github.kamys.managerProduct.logic.layout.Layout layout) {
com.github.kamys.managerProduct.data.managers.ManagerLayout.LOGGER.info(("save: " + layout));
org.hibernate.Transaction tr = null;
try (org.hibernate.Session session = factory.openSession()) {
tr = session.beginTransactio... |
public synchronized org.springframework.ide.eclipse.boot.dash.model.BootDashElement createOrGet(org.eclipse.core.resources.IProject p) {
if (org.springframework.ide.eclipse.boot.core.BootPropertyTester.isBootProject(p)) {
org.springframework.ide.eclipse.boot.dash.model.BootProjectDashElement el = cache.get(... | public synchronized org.springframework.ide.eclipse.boot.dash.model.BootDashElement createOrGet(org.eclipse.core.resources.IProject p) {
if (org.springframework.ide.eclipse.boot.core.BootPropertyTester.isBootProject(p)) {
org.springframework.ide.eclipse.boot.dash.model.BootProjectDashElement el = cache.get(... |
public void downloadTMD(long titleID, int version, java.lang.String path) throws java.io.IOException {
java.lang.String version_suf = "";
if (version > 0)
version_suf = "." + version;
java.lang.String URL = ((((de.mas.jnustool.util.Downloader.URL_BASE) + "/") + (java.lang.String.format("%016X",... | public void downloadTMD(long titleID, int version, java.lang.String path) throws java.io.IOException {
java.lang.String version_suf = "";
if (version > 0)
version_suf = "." + version;
java.lang.String URL = ((((de.mas.jnustool.util.Downloader.URL_BASE) + "/") + (java.lang.String.format("%016X",... |
public Result call(Http.Context ctx) throws java.lang.Throwable {
controllers.UserApp.initTokenUser();
controllers.UserApp.updatePreferredLanguage();
ctx.response().setHeader("Date", org.apache.http.impl.cookie.DateUtils.formatDate(new java.util.Date()));
ctx.response().setHeader("Cache-Control", "no-ca... | public Result call(Http.Context ctx) throws java.lang.Throwable {
controllers.UserApp.initTokenUser();
controllers.UserApp.updatePreferredLanguage();
ctx.response().setHeader("Date", org.apache.http.impl.cookie.DateUtils.formatDate(new java.util.Date()));
ctx.response().setHeader("Cache-Control", "no-ca... |
public int[] setStartPoint() {
int startX = (random.nextInt(((MainClass.mazeSizeWidth) - 2))) + 1;
int startY = (random.nextInt(((MainClass.mazeSizeHeight) - 2))) + 1;
MainClass.tilesArray[startX][startY].setState("start");
int[] returnList = new int[]{ startX , startY };
return returnList;
} | public int[] setStartPoint() {
int startY = (random.nextInt(((MainClass.mazeSizeHeight) - 2))) + 1;
int startX = (random.nextInt(((MainClass.mazeSizeWidth) - 2))) + 1;
MainClass.tilesArray[startY][startX].setState("start");
int[] returnList = new int[]{ startY , startX };
return returnList;
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.