buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public void onSuccess(io.hypertrack.lib.transmitter.model.HTShift htShift) {
try {
com.google.gson.Gson gson = new com.google.gson.Gson();
java.lang.String shiftJson = gson.toJson(htShift);
com.facebook.react.bridge.WritableMap result = com.facebook.react.bridge.Arguments.createMap();
... | public void onSuccess(io.hypertrack.lib.transmitter.model.HTShift htShift) {
try {
com.google.gson.Gson gson = new com.google.gson.Gson();
java.lang.String shiftJson = gson.toJson(htShift);
com.facebook.react.bridge.WritableMap result = com.facebook.react.bridge.Arguments.createMap();
... |
public boolean isActive(final module.mission.domain.MissionProcess missionProcess, final org.fenixedu.bennu.core.domain.User user) {
return ((((super.isActive(missionProcess, user)) && (!(missionProcess.getIsCanceled()))) && (missionProcess.canRemoveAuthorization(user))) && (!(missionProcess.areAllParticipantsAutho... | public boolean isActive(final module.mission.domain.MissionProcess missionProcess, final org.fenixedu.bennu.core.domain.User user) {
return (((super.isActive(missionProcess, user)) && (!(missionProcess.getIsCanceled()))) && (missionProcess.canRemoveAuthorization(user))) && (!(missionProcess.hasAnyActivePaymentProce... |
private void menuItemHybridGeneticActionPerformed(java.awt.event.ActionEvent evt) {
if (((((puzzleFile) == null) || ((puzzleFileName) == null)) || ((c) == null)) || ((gui) == null)) {
javax.swing.JOptionPane.showMessageDialog(null, "Puzzle file not loaded.", "Error", javax.swing.JOptionPane.ERROR_MESSAGE);
... | private void menuItemHybridGeneticActionPerformed(java.awt.event.ActionEvent evt) {
if (((c) == null) || ((gui) == null)) {
javax.swing.JOptionPane.showMessageDialog(null, "Puzzle file not loaded.", "Error", javax.swing.JOptionPane.ERROR_MESSAGE);
throw new java.lang.IllegalStateException("Puzzle fi... |
public void testSendReportedPropertiesWithX509() throws com.microsoft.azure.sdk.iot.service.exceptions.IotHubException, java.io.IOException, java.lang.InterruptedException, java.net.URISyntaxException {
setUpX509Device();
tests.integration.com.microsoft.azure.sdk.iot.iothubservices.DeviceTwinIT.x509DeviceUnderT... | public void testSendReportedPropertiesWithX509() throws com.microsoft.azure.sdk.iot.service.exceptions.IotHubException, java.io.IOException, java.lang.InterruptedException, java.net.URISyntaxException {
setUpX509Device();
setUpX509Device();
tests.integration.com.microsoft.azure.sdk.iot.iothubservices.Device... |
public org.apache.ignite.igfs.IgfsPathSummary call() throws java.lang.Exception {
if (log.isDebugEnabled())
log.debug(("Calculating path summary: " + path));
org.apache.ignite.lang.IgniteUuid fileId = meta.fileId(path);
if (fileId == null)
throw new org.apache.ignite.igfs.IgfsPathNotFou... | public org.apache.ignite.igfs.IgfsPathSummary call() throws java.lang.Exception {
if (log.isDebugEnabled())
log.debug(("Calculating path summary: " + path));
org.apache.ignite.lang.IgniteUuid fileId = meta.fileId(path);
if (fileId == null)
throw new org.apache.ignite.igfs.IgfsPathNotFou... |
public void testResetD() {
nl.group37.bejeweled.main.model.Tile t1 = new nl.group37.bejeweled.main.model.Tile(1, 1);
t1.updateTranslation(2, 2);
java.awt.Point p1 = new java.awt.Point(2, 2);
org.junit.Assert.assertEquals(t1.getTranslation(), p1);
java.awt.Point q1 = new java.awt.Point(0, 0);
t1.... | public void testResetD() {
nl.group37.bejeweled.main.model.Tile t1 = new nl.group37.bejeweled.main.model.Tile(1, 1);
t1.updateTranslation(2, 2);
java.awt.Point p1 = new java.awt.Point(2, 2);
assertEquals(t1.getTranslation(), p1);
java.awt.Point q1 = new java.awt.Point(0, 0);
t1.resetD();
ass... |
public java.util.Set<hillbillies.model.Cube> getDirectlyAdjacentCubes(java.util.Vector cubeCoordinates) {
java.util.Set<hillbillies.model.Cube> adjacentCubes = new java.util.HashSet<>(6);
for (int i = 0; i < 6; i++) {
java.util.Vector pos = cubeCoordinates.add(getNextAdjacentDirection(i));
if (i... | public java.util.Set<hillbillies.model.Cube> getDirectlyAdjacentCubes(java.util.Vector cubeCoordinates) {
java.util.Set<hillbillies.model.Cube> adjacentCubes = new java.util.HashSet<>();
for (int i = 0; i < 6; i++) {
java.util.Vector pos = cubeCoordinates.add(getNextAdjacentDirection(i));
if (is... |
public com.dotcms.vanityurl.model.CachedVanityUrl get(final java.lang.String key) {
com.dotcms.vanityurl.model.CachedVanityUrl cachedVanityUrl = null;
try {
cachedVanityUrl = ((com.dotcms.vanityurl.model.CachedVanityUrl) (com.dotcms.cache.VanityUrlCacheImpl.cache.get(((getPrimaryGroup()) + key), getPrim... | public com.dotcms.vanityurl.model.CachedVanityUrl get(final java.lang.String key) {
com.dotcms.vanityurl.model.CachedVanityUrl cachedVanityUrl = null;
try {
cachedVanityUrl = ((com.dotcms.vanityurl.model.CachedVanityUrl) (com.dotcms.cache.VanityUrlCacheImpl.cache.get(key, getPrimaryGroup())));
} cat... |
private static void addPrefix(final java.lang.StringBuilder builder, final org.apache.log4j.Logger logger, final java.lang.String method) {
final java.lang.String name = logger.getName();
final int index = name.lastIndexOf('.');
builder.append((index >= 0 ? name.substring((index + 1)) : name)).append('.').a... | static void addPrefix(final java.lang.StringBuilder builder, final org.apache.log4j.Logger logger, final java.lang.String method) {
java.lang.String name = logger.getName();
if (name == null) {
name = com.xavax.logger.XLogger.UNKNOWN;
}
final int index = name.lastIndexOf('.');
builder.append... |
protected void onDialogCreated(android.app.Dialog dialog) {
super.onDialogCreated(dialog);
dialog.create();
android.widget.CheckBox view = ((android.widget.CheckBox) (dialog.findViewById(R.id.lockscreen_remote_input)));
view.setChecked(mAllowRemoteInput);
view.setOnCheckedChangeListener(mListener);
... | protected void onDialogCreated(android.app.Dialog dialog) {
super.onDialogCreated(dialog);
dialog.create();
android.widget.CheckBox view = ((android.widget.CheckBox) (dialog.findViewById(R.id.lockscreen_remote_input)));
view.setChecked((!(mAllowRemoteInput)));
view.setOnCheckedChangeListener(mListen... |
public boolean onBlockActivated(net.minecraft.world.World worldIn, net.minecraft.util.math.BlockPos pos, net.minecraft.block.state.IBlockState state, net.minecraft.entity.player.EntityPlayer playerIn, net.minecraft.util.EnumHand hand, net.minecraft.util.EnumFacing facing, float hitX, float hitY, float hitZ) {
if (w... | public boolean onBlockActivated(net.minecraft.world.World worldIn, net.minecraft.util.math.BlockPos pos, net.minecraft.block.state.IBlockState state, net.minecraft.entity.player.EntityPlayer playerIn, net.minecraft.util.EnumHand hand, net.minecraft.util.EnumFacing facing, float hitX, float hitY, float hitZ) {
if (!... |
public void run() {
android.content.Context context = getReactApplicationContext();
android.content.ContentResolver cr = context.getContentResolver();
com.rt2zz.reactnativecontacts.ContactsProvider contactsProvider = new com.rt2zz.reactnativecontacts.ContactsProvider(cr, context);
com.facebook.react.bri... | public void run() {
android.content.Context context = getReactApplicationContext();
android.content.ContentResolver cr = context.getContentResolver();
com.rt2zz.reactnativecontacts.ContactsProvider contactsProvider = new com.rt2zz.reactnativecontacts.ContactsProvider(cr);
com.facebook.react.bridge.Writa... |
public void testConnectClosedConnection() throws java.lang.Exception {
java.sql.Connection connectionMock = org.mockito.Mockito.mock(java.sql.Connection.class);
org.mockito.Mockito.when(connectionMock.isClosed()).thenReturn(true);
org.mockito.Mockito.when(runtimeContainerMock.getComponentData(org.mockito.Ma... | public void testConnectClosedConnection() throws java.lang.Exception {
java.sql.Connection connectionMock = org.mockito.Mockito.mock(java.sql.Connection.class);
org.mockito.Mockito.when(connectionMock.isClosed()).thenReturn(true);
org.mockito.Mockito.when(runtimeContainerMock.getComponentData(org.mockito.Ma... |
public boolean simplEquals(java.lang.Object obj) {
if (!(obj instanceof edu.hit.yh.gitdata.mine.module.SimpleBehavior)) {
return false;
}
edu.hit.yh.gitdata.mine.module.SimpleBehavior simpleBehavior = ((edu.hit.yh.gitdata.mine.module.SimpleBehavior) (obj));
if (((this.actor.equals(simpleBehavior... | public boolean simplEquals(java.lang.Object obj) {
if (!(obj instanceof edu.hit.yh.gitdata.mine.module.SimpleBehavior)) {
return false;
}
edu.hit.yh.gitdata.mine.module.SimpleBehavior simpleBehavior = ((edu.hit.yh.gitdata.mine.module.SimpleBehavior) (obj));
if ((this.actor.equals(simpleBehavior.... |
private void handleReceivedMessage(android.content.Intent intent) {
byte[] encodedMessage = intent.getByteArrayExtra(ChronoChatService.EXTRA_MESSAGE);
edu.ucla.cs.chronochat.ChronoChatMessage message = new edu.ucla.cs.chronochat.ChronoChatMessage(encodedMessage);
android.util.Log.d(edu.ucla.cs.chronochat.Ma... | private void handleReceivedMessage(android.content.Intent intent) {
byte[] encodedMessage = intent.getByteArrayExtra(ChronoChatService.EXTRA_MESSAGE);
edu.ucla.cs.chronochat.ChronoChatMessage message = new edu.ucla.cs.chronochat.ChronoChatMessage(encodedMessage);
android.util.Log.d(edu.ucla.cs.chronochat.Ma... |
private static boolean isRelated(org.neo4j.graphdb.Node from, org.neo4j.graphdb.Node to) {
java.lang.Iterable<org.neo4j.graphdb.Relationship> rels = from.getRelationships();
for (org.neo4j.graphdb.Relationship rel : rels)
if ((rel.getOtherNode(from).getId()) == (to.getId()))
return true;
... | private static boolean isRelated(org.neo4j.graphdb.Node from, org.neo4j.graphdb.Node to) {
if ((from.getId()) == (to.getId()))
return true;
java.lang.Iterable<org.neo4j.graphdb.Relationship> rels = from.getRelationships();
for (org.neo4j.graphdb.Relationship rel : rels)
if ((rel.getOthe... |
public boolean equals(java.lang.Object obj) {
if ((this) == obj) {
return true;
}
if (obj == null) {
return false;
}
if ((this.getClass()) != (obj.getClass())) {
return false;
}
try {
wyvern.target.corewyvernIL.expression.StringLiteral other = ((wyvern.target.... | public boolean equals(java.lang.Object obj) {
if ((this) == obj) {
return true;
}
if (obj == null) {
return false;
}
if ((this.getClass()) != (obj.getClass())) {
return false;
}
try {
wyvern.target.corewyvernIL.expression.StringLiteral other = ((wyvern.target.... |
public ReturnObject add(int index, java.lang.Object item) {
if ((validateIndex(index)) == false) {
return new ReturnObjectImpl(ErrorMessage.INDEX_OUT_OF_BOUNDS);
}
if (item == null) {
return new ReturnObjectImpl(ErrorMessage.INVALID_ARGUMENT);
}
if ((size) >= (items.length)) {
... | public ReturnObject add(int index, java.lang.Object item) {
if ((validateIndex(index)) == false) {
return new ReturnObjectImpl(ErrorMessage.INDEX_OUT_OF_BOUNDS);
}
if (item == null) {
return new ReturnObjectImpl(ErrorMessage.INVALID_ARGUMENT);
}
if ((size) >= (items.length)) {
... |
private java.lang.Boolean checkNewEmployeeTextFields() {
try {
int bsn = java.lang.Integer.parseInt(EmployeeAddBasic_BsnTextfield.getText());
java.lang.String name = EmployeeAddBasic_NameTextfield.getText();
java.lang.String surname = EmployeeAddBasic_SurnameTextfield.getText();
if (... | private java.lang.Boolean checkNewEmployeeTextFields() {
try {
java.lang.String name = EmployeeAddBasic_NameTextfield.getText();
java.lang.String surname = EmployeeAddBasic_SurnameTextfield.getText();
if ((name.isEmpty()) || (surname.isEmpty())) {
return false;
}else {
... |
private void initializeLayout(javafx.stage.Stage primaryStage) throws java.io.IOException {
javafx.fxml.FXMLLoader loader = new javafx.fxml.FXMLLoader(this.getClass().getResource(com.gmail.terechsama.autoclicker.AutoClickerApp.LAYOUT_LOCATION));
javafx.scene.Parent parent = loader.load();
javafx.scene.Scene... | private void initializeLayout(javafx.stage.Stage primaryStage) throws java.io.IOException {
javafx.fxml.FXMLLoader loader = new javafx.fxml.FXMLLoader(getClass().getResource(com.gmail.terechsama.autoclicker.AutoClickerApp.LAYOUT_LOCATION));
javafx.scene.Parent parent = loader.load();
javafx.scene.Scene scen... |
public void displayTopScore() {
print(topScore);
java.lang.String s = str(topScore);
fill(28, 28, 28);
textFont(loadFont("BebasNeue-100.vlw"));
text(s, (((screenWidth) - (textWidth(s))) / 2), (((screenHeight) / 4) + 50));
} | public void displayTopScore() {
java.lang.String s = str(topScore);
fill(28, 28, 28);
textFont(loadFont("BebasNeue-100.vlw"));
text(s, (((screenWidth) - (textWidth(s))) / 2), (((screenHeight) / 4) + 50));
} |
public long searchTermSize(java.lang.String term) throws org.apache.solr.client.solrj.SolrServerException {
java.lang.String queryTerm = ("\"" + term) + "\"";
org.apache.solr.client.solrj.SolrQuery query = new org.apache.solr.client.solrj.SolrQuery();
query.setQuery(term);
org.apache.solr.client.solrj.r... | public long searchTermSize(java.lang.String term) throws org.apache.solr.client.solrj.SolrServerException {
java.lang.String queryTerm = ("\"" + term) + "\"";
org.apache.solr.client.solrj.SolrQuery query = new org.apache.solr.client.solrj.SolrQuery();
query.setQuery(queryTerm);
org.apache.solr.client.so... |
private boolean isBuildable(javax.lang.model.element.TypeElement typeElement) {
if (typeElement != null) {
for (javax.lang.model.element.Element el : typeElement.getEnclosedElements()) {
if ((el.getAnnotation(io.sundr.builder.annotations.Buildable.class)) != null) {
return true;
... | private boolean isBuildable(javax.lang.model.element.TypeElement typeElement) {
if (typeElement != null) {
if ((typeElement.getAnnotation(io.sundr.builder.annotations.Buildable.class)) != null) {
return true;
}
for (javax.lang.model.element.Element el : typeElement.getEnclosedEle... |
private static java.lang.String getPrefix(org.apache.poi.ss.usermodel.Cell input) {
if (input == null) {
return "";
}
java.lang.String cellValue = input.getStringCellValue();
int indexOfUnderscore = cellValue.indexOf("_");
if (indexOfUnderscore > (-1)) {
return cellValue.substring(0,... | private static java.lang.String getPrefix(org.apache.poi.ss.usermodel.Cell input) {
if (input == null) {
return "";
}
java.lang.String cellValue = input.getStringCellValue();
if ((cellValue == null) || (cellValue.isEmpty())) {
return "";
}
return cellValue.split("_")[0];
} |
private void resizePresentationPanel() {
SlideshowPresenter.PresentationImagePanel.setBounds(0, 10, MainPanel.getWidth(), (((MainPanel.getHeight()) - (2 * (menuBar.getHeight()))) - (btnPrevious.getHeight())));
} | private void resizePresentationPanel() {
SlideshowPresenter.PresentationImagePanel.setBounds(0, menuBar.getHeight(), MainPanel.getWidth(), (((MainPanel.getHeight()) - (2 * (menuBar.getHeight()))) - (btnPrevious.getHeight())));
} |
public void testGraphNotNull() {
try {
Main.GraphTest.G = new Main.Graph(((java.lang.System.getProperty("user.dir")) + "/src/tinyEWG.txt"), 0.3, false);
} catch (java.io.IOException e) {
e.printStackTrace();
}
assertNull(Main.GraphTest.G);
} | public void testGraphNotNull() {
try {
Main.GraphTest.G = new Main.Graph(((java.lang.System.getProperty("user.dir")) + "/src/tinyEWG.txt"), 0.3, false);
assertNotNull(Main.GraphTest.G);
} catch (java.io.IOException e) {
e.printStackTrace();
}
} |
public java.lang.String visitIncrementExpr(kalang.compiler.IncrementExpr node) {
java.lang.String op = (node.isIsDesc()) ? "--" : "++";
java.lang.String vn = visit(node.getExpr());
if (node.isIsPrefix()) {
return (("(" + op) + vn) + ")";
}else {
return (("(" + vn) + op) + ")";
}
} | public java.lang.String visitIncrementExpr(kalang.compiler.IncrementExpr node) {
java.lang.String op = (node.isIsDesc()) ? "--" : "++";
java.lang.String vn = visit(node.getExpr());
if (node.isIsPrefix()) {
return op + vn;
}else {
return vn + op;
}
} |
public void checkRule12(java.lang.String platform, final com.order.databean.RulesCallback.RulesCallback callback) {
if (((orderType) != 4) || ((java.lang.Integer.parseInt(platform)) == 6)) {
return ;
}
if ((bookReadPv.size(lastUpdateTime)) == 0) {
callback.hanleData(msisdnId, sessionId, last... | public void checkRule12(java.lang.String platform, final com.order.databean.RulesCallback.RulesCallback callback) {
if (((orderType) == 4) && ((java.lang.Integer.parseInt(platform)) != 6)) {
if ((bookReadPv.size(lastUpdateTime)) == 0) {
callback.hanleData(msisdnId, sessionId, lastUpdateTime, rea... |
public void onResponse(retrofit2.Call<com.codingblocks.shortlr.models.Result> call, retrofit2.Response<com.codingblocks.shortlr.models.Result> response) {
java.lang.String shortUrl = "cb.lk/" + (response.body().getShortcode());
com.codingblocks.shortlr.Utils.saveToClipboard(shortUrl, this);
manager.removeVi... | public void onResponse(retrofit2.Call<com.codingblocks.shortlr.models.Result> call, retrofit2.Response<com.codingblocks.shortlr.models.Result> response) {
java.lang.String shortUrl = "cb.lk/" + (response.body().getShortcode());
com.codingblocks.shortlr.Utils.saveToClipboard(shortUrl, this);
manager.removeVi... |
private boolean isUnchecked(spoon.reflect.reference.CtTypeReference<?> throwable) {
java.lang.Class<?> throwableClass = throwable.getActualClass();
if ((java.lang.RuntimeException.class.isAssignableFrom(throwableClass)) | (java.lang.Error.class.isAssignableFrom(throwableClass))) {
return true;
}
... | private boolean isUnchecked(spoon.reflect.reference.CtTypeReference<?> throwable) {
java.lang.Class<?> throwableClass = throwable.getActualClass();
if ((java.lang.RuntimeException.class.isAssignableFrom(throwableClass)) || (java.lang.Error.class.isAssignableFrom(throwableClass))) {
return true;
}
... |
void flipOrientation() {
org.sbolstandard.core2.OrientationType orientation = seqAnn.getLocations().iterator().next().getOrientation();
for (org.sbolstandard.core2.Location loc : seqAnn.getLocations()) {
loc.setOrientation((orientation == (org.sbolstandard.core2.OrientationType.INLINE) ? org.sbolstandar... | void flipOrientation() {
org.sbolstandard.core2.OrientationType orientation = seqAnn.getLocations().iterator().next().getOrientation();
if (orientation == null) {
orientation = org.sbolstandard.core2.OrientationType.INLINE;
}
for (org.sbolstandard.core2.Location loc : seqAnn.getLocations()) {
... |
public se.skl.tp.vp.vagvalagent.VagvalAgentProcessingLog init(boolean forceReset) {
se.skl.tp.vp.vagvalagent.VagvalAgentProcessingLog processingLog = new se.skl.tp.vp.vagvalagent.VagvalAgentProcessingLog();
if (!forceReset) {
init(processingLog);
}else {
boolean isRefreshSuccessful = refresh... | public se.skl.tp.vp.vagvalagent.VagvalAgentProcessingLog init(boolean forceReset) {
se.skl.tp.vp.vagvalagent.VagvalAgentProcessingLog processingLog = new se.skl.tp.vp.vagvalagent.VagvalAgentProcessingLog();
if (!forceReset) {
init(processingLog);
}else {
boolean isRefreshSuccessful = refresh... |
@java.lang.Override
Responses.ExecuteResponse serialize() {
org.apache.calcite.avatica.proto.Responses.ExecuteResponse.Builder builder = Responses.ExecuteResponse.newBuilder();
for (org.apache.calcite.avatica.remote.Service.ResultSetResponse result : results) {
builder.addResults(result.serialize());
... | @java.lang.Override
Responses.ExecuteResponse serialize() {
org.apache.calcite.avatica.proto.Responses.ExecuteResponse.Builder builder = Responses.ExecuteResponse.newBuilder();
if (null != (results)) {
for (org.apache.calcite.avatica.remote.Service.ResultSetResponse result : results) {
build... |
private org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider getCredentialsProvider(com.sillelien.github.GHMyself myself) throws java.io.IOException {
java.util.Properties props = new java.util.Properties();
java.io.File homeDir = new java.io.File(java.lang.System.getProperty("user.home"));
try (j... | private org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider getCredentialsProvider() throws java.io.IOException {
java.util.Properties props = new java.util.Properties();
java.io.File homeDir = new java.io.File(java.lang.System.getProperty("user.home"));
try (java.io.FileInputStream in = new java... |
public de.fuberlin.winfo.project.model.network.solution.Solution search(de.fuberlin.winfo.project.model.network.solution.Solution solution, de.fuberlin.winfo.project.algorithm.impl.sven.vns.CostFunction f) {
this.centralSol = solution;
while (hasNext()) {
de.fuberlin.winfo.project.model.network.solution... | public de.fuberlin.winfo.project.model.network.solution.Solution search(de.fuberlin.winfo.project.model.network.solution.Solution solution, de.fuberlin.winfo.project.algorithm.impl.sven.vns.CostFunction f) {
this.centralSol = solution;
init();
while (hasNext()) {
de.fuberlin.winfo.project.model.netw... |
public void resized() {
run.Game.tileSize = ((int) ((run.Game.frameArea) / (run.Game.tileSizePixelRatio)));
run.Game.tileSizeVector = new objects.utility.Vector(((run.Game.frameArea) / (run.Game.tileSizePixelRatio)), ((run.Game.frameArea) / (run.Game.tileSizePixelRatio)));
java.lang.System.out.println((((ru... | public void resized() {
run.Game.tileSize = ((int) ((run.Game.frameArea) / (run.Game.tileSizePixelRatio)));
run.Game.tileSizeVector = new objects.utility.Vector(((run.Game.frameArea) / (run.Game.tileSizePixelRatio)), ((run.Game.frameArea) / (run.Game.tileSizePixelRatio)));
player.resized(this);
hotbar.r... |
public void onMInOutSet(final org.compiere.model.de.metas.request.model.I_R_Request request) {
final de.metas.inout.model.I_M_InOut inout = org.adempiere.model.InterfaceWrapperHelper.create(request.getM_InOut(), de.metas.inout.model.I_M_InOut.class);
if (inout == null) {
request.setDateDelivered(null);
... | public void onMInOutSet(final org.compiere.model.de.metas.request.model.I_R_Request request) {
final de.metas.inout.model.I_M_InOut inout = org.adempiere.model.InterfaceWrapperHelper.create(request.getM_InOut(), de.metas.inout.model.I_M_InOut.class);
if (inout == null) {
request.setDateDelivered(null);
... |
private void togglePause() {
synchronized(stream) {
if ((pausedTimestamp) == 0) {
pausedTimestamp = java.lang.System.currentTimeMillis();
}else {
pausedOffset += (java.lang.System.currentTimeMillis()) - (pausedTimestamp);
pausedTimestamp = 0;
}
str... | private void togglePause() {
synchronized(this) {
if ((pausedTimestamp) == 0) {
pausedTimestamp = java.lang.System.currentTimeMillis();
}else {
pausedOffset += (java.lang.System.currentTimeMillis()) - (pausedTimestamp);
pausedTimestamp = 0;
}
notif... |
private static boolean cancelPotentialWork(java.lang.String url, android.widget.ImageView view) {
final edu.chs.achievement.controller.BitmapWorkerTask bitmapWorkerTask = edu.chs.achievement.controller.BitmapWorkerTask.getBitmapWorkerTask(view);
if (bitmapWorkerTask != null) {
final java.lang.String bit... | private static boolean cancelPotentialWork(java.lang.String url, android.widget.ImageView view) {
final edu.chs.achievement.controller.BitmapWorkerTask bitmapWorkerTask = edu.chs.achievement.controller.BitmapWorkerTask.getBitmapWorkerTask(view);
if (bitmapWorkerTask != null) {
final java.lang.String bit... |
public boolean setColour(me.tqvj24.michaelcroall.Piece colour) throws me.tqvj24.michaelcroall.ColourAlreadySetException, me.tqvj24.michaelcroall.InvalidColourException {
if ((this.colour) != (Piece.UNSET))
throw new me.tqvj24.michaelcroall.ColourAlreadySetException();
if (colour == (Piece.UNSET))
... | public boolean setColour(me.tqvj24.michaelcroall.Piece colour) throws me.tqvj24.michaelcroall.ColourAlreadySetException, me.tqvj24.michaelcroall.InvalidColourException {
if ((this.colour) != (Piece.UNSET)) {
{
throw new me.tqvj24.michaelcroall.ColourAlreadySetException();
}
}
if ... |
public void testProp() {
final org.springframework.context.support.ClassPathXmlApplicationContext context = new org.springframework.context.support.ClassPathXmlApplicationContext(new java.lang.String[]{ "classpath*:core-context.xml" });
context.registerShutdownHook();
context.start();
java.lang.System.o... | public void testProp() {
final org.springframework.context.support.ClassPathXmlApplicationContext context = new org.springframework.context.support.ClassPathXmlApplicationContext(new java.lang.String[]{ "classpath*:core-context.xml" });
context.registerShutdownHook();
context.start();
java.lang.System.o... |
private java.lang.String[][] deleteAll() {
for (int i = searchResult.size(); i > 0; i--)
delete(i);
java.lang.String feedback = new java.lang.String("All deleted");
undoStack.clear();
redoStack.clear();
return display(new java.util.ArrayList<fancy4.taskie.model.TaskieTask>(), feedback);... | private java.lang.String[][] deleteAll() {
for (int i = searchResult.size(); i > 0; i--)
delete(null, i);
java.lang.String feedback = new java.lang.String("All deleted");
undoStack.clear();
redoStack.clear();
return display(new java.util.ArrayList<fancy4.taskie.model.TaskieTask>(), feed... |
private byte[] longToByteArray(long value) {
byte[] result = new byte[8];
for (int i = 7; i >= 0; --i) {
result[i] = ((byte) ((int) (value & 255L)));
value >>= 8;
}
return result;
} | private byte[] longToByteArray(long value, byte[] result) {
for (int i = 7; i >= 0; --i) {
result[i] = ((byte) ((int) (value & 255L)));
value >>= 8;
}
return result;
} |
public void printOccupied() {
java.util.Iterator it = occupied.entrySet().iterator();
while (it.hasNext()) {
java.util.Map.Entry<clue.Helpers.Location, java.lang.Boolean> pair = ((java.util.Map.Entry) (it.next()));
java.lang.System.out.println(((("LENDER -- VALUES -- " + (pair.getKey().toString(... | public void printOccupied() {
java.util.Iterator it = occupied.entrySet().iterator();
while (it.hasNext()) {
java.util.Map.Entry<clue.Helpers.Location, java.lang.Boolean> pair = ((java.util.Map.Entry) (it.next()));
}
} |
private java.util.Set<fr.solsid.model.AccessRight> extractAccessRights(org.apache.poi.ss.usermodel.Row row) {
java.util.Set<fr.solsid.model.AccessRight> accessRights = new java.util.HashSet<>();
for (int i = 2; i <= 7; i++) {
int accessRight = getNumericValueOf(row, i);
if (hasRight(accessRight)... | private java.util.Set<fr.solsid.model.AccessRight> extractAccessRights(org.apache.poi.ss.usermodel.Row row) {
java.util.Set<fr.solsid.model.AccessRight> accessRights = new java.util.HashSet<>();
for (int i = 2; i <= 7; i++) {
java.lang.Integer accessRight = getNumericValueOf(row, i);
if (hasRigh... |
public static java.util.List<org.talend.cwm.relational.TdTable> getTables(java.sql.Connection sqlConnection, org.talend.core.model.metadata.builder.connection.Connection dataProvider, orgomg.cwm.resource.relational.Catalog catalog, java.lang.String tablePattern, boolean loadFromDB, boolean isPersist2Con) throws java.la... | public static java.util.List<org.talend.cwm.relational.TdTable> getTables(java.sql.Connection sqlConnection, org.talend.core.model.metadata.builder.connection.Connection dataProvider, orgomg.cwm.resource.relational.Catalog catalog, java.lang.String tablePattern, boolean loadFromDB, boolean isPersist2Con) throws java.la... |
public void test_158_ACLReadDeeperFieldOtherFail(edu.umass.cs.gnsclient.client.util.GuidEntry westyEntry, edu.umass.cs.gnsclient.client.util.GuidEntry samEntry) {
try {
try {
org.junit.Assert.assertEquals("fieldValue", edu.umass.cs.gnsclient.client.integrationtests.ServerIntegrationTest.client.f... | public void test_158_ACLReadDeeperFieldOtherFail(edu.umass.cs.gnsclient.client.util.GuidEntry westyEntry, edu.umass.cs.gnsclient.client.util.GuidEntry samEntry) {
try {
try {
org.junit.Assert.assertEquals("fieldValue", edu.umass.cs.gnsclient.client.integrationtests.ServerIntegrationTest.client.f... |
public void createCloudAddressBookFile(java.lang.String addressBookName) throws address.exceptions.DataConversionException, java.io.IOException {
java.io.File cloudFile = getCloudDataFilePath(addressBookName);
if (cloudFile.exists()) {
throw new java.lang.IllegalArgumentException((("AddressBook '" + add... | public void createCloudAddressBookFile(java.lang.String addressBookName) throws address.exceptions.DataConversionException, java.io.IOException {
java.io.File cloudFile = getCloudDataFilePath(addressBookName);
if ((cloudFile.exists()) || (!(cloudFile.createNewFile()))) {
throw new java.lang.IllegalArgum... |
private void confirmButtonPress(android.view.View view) {
if (!(service_and_storage.Service.getInstance().getCheersFriends().contains(friend))) {
addFriend(friendName, friendNum);
cheersText.setText("Friend Added! Press restart to add another friend!");
}else {
cheersText.setText("Friend... | public void confirmButtonPress(android.view.View view) {
if (!(service_and_storage.Service.getInstance().getCheersFriends().contains(friend))) {
addFriend(friendName, friendNum);
cheersText.setText("Friend Added! Press restart to add another friend!");
}else {
cheersText.setText("Friend ... |
public boolean continueExecuting() {
boolean continueExecuting = ((!(petPathfinder.noPath())) && ((thePet.getDistanceSqToEntity(theOwner)) > ((maxDist) * (maxDist)))) && (!(thePet.isSitting()));
java.lang.System.out.println(("Continue executing = " + continueExecuting));
return continueExecuting;
} | public boolean continueExecuting() {
boolean continueExecuting = ((!(petPathfinder.noPath())) && ((thePet.getDistanceSqToEntity(theOwner)) > ((maxDist) * (maxDist)))) && (!(thePet.isSitting()));
if (!continueExecuting)
java.lang.System.out.println(("Continue executing = " + continueExecuting));
... |
public int getLowestScore(android.database.sqlite.SQLiteDatabase db) {
android.database.Cursor c = db.query(TimelineTables.HighScore.TABLE_NAME, new java.lang.String[]{ ("min(" + (TimelineTables.HighScore.COL_SCORE)) + ")" }, null, null, null, null, null);
c.moveToFirst();
int lowestScore = c.getInt(0);
... | public int getLowestScore(android.database.sqlite.SQLiteDatabase db) {
android.database.Cursor c = db.query(TimelineTables.HighScore.TABLE_NAME, new java.lang.String[]{ ("min(" + (TimelineTables.HighScore.COL_SCORE)) + ")" }, null, null, null, null, null);
if (!(c.moveToFirst())) {
return 0;
}else {... |
private void restoreFromFullCheckPoint(com.orientechnologies.orient.core.storage.impl.local.OFullCheckpointStartRecord checkPointRecord) throws java.io.IOException {
com.orientechnologies.common.log.OLogManager.instance().info(this, "Data restore procedure from full checkpoint is started. Restore is performed from ... | private boolean restoreFromFullCheckPoint(com.orientechnologies.orient.core.storage.impl.local.OFullCheckpointStartRecord checkPointRecord) throws java.io.IOException {
com.orientechnologies.common.log.OLogManager.instance().info(this, "Data restore procedure from full checkpoint is started. Restore is performed fr... |
public void rebind() {
super.rebind();
dockerHost = ((brooklyn.entity.container.docker.DockerHost) (getConfig(brooklyn.location.docker.OWNER)));
machine = ((org.apache.brooklyn.location.ssh.SshMachineLocation) (getConfig(brooklyn.location.docker.DockerHostLocation.MACHINE)));
portForwarder = ((brooklyn.... | public void rebind() {
super.rebind();
dockerHost = ((brooklyn.entity.container.docker.DockerHost) (getConfig(brooklyn.location.docker.OWNER)));
machine = ((org.apache.brooklyn.location.ssh.SshMachineLocation) (getConfig(brooklyn.location.docker.DockerHostLocation.MACHINE)));
portForwarder = ((brooklyn.... |
protected java.lang.String[] parseStringList(java.lang.String value) {
java.lang.String[] values;
if ((value.indexOf(stringsDelimiter)) < 0) {
values = new java.lang.String[]{ value };
}else {
values = value.split(stringsDelimiter);
}
return values;
} | protected java.lang.String[] parseStringList(java.lang.String value) {
java.lang.String[] values;
if (((stringsDelimiter.length()) == 0) || ((value.indexOf(stringsDelimiter)) < 0)) {
values = new java.lang.String[]{ value };
}else {
values = value.split(stringsDelimiter);
}
return va... |
private void enterEdit() {
if ((mAlbumView.getChildCount()) > 0) {
mAlbumView.setEditable(true, this);
}
if ((mAlbumView_right.getChildCount()) > 0) {
mAlbumView_right.setEditable(true, this);
}
left_count_tv.setVisibility(View.VISIBLE);
right_count_tv.setVisibility(View.VISIBLE)... | private void enterEdit() {
if ((mAlbumView.getChildCount()) > 0) {
mAlbumView.setEditable(true, this, true);
}
if ((mAlbumView_right.getChildCount()) > 0) {
mAlbumView_right.setEditable(true, this, true);
}
left_count_tv.setVisibility(View.VISIBLE);
right_count_tv.setVisibility(V... |
public void windowClosing(java.awt.event.WindowEvent windowEvent) {
try {
project.BankingSystem.dbaccess.open();
project.BankingSystem.dbaccess.runUpdate((("delete from Sessions where sessionID=" + (project.BankingSystem.sessionID)) + ";"));
project.BankingSystem.dbaccess.close();
} catc... | public void windowClosing(java.awt.event.WindowEvent windowEvent) {
try {
project.BankingSystem.dbaccess.open();
project.BankingSystem.dbaccess.runUpdate((("delete from Sessions where sessionID=" + (project.BankingSystem.sessionID)) + ";"));
project.BankingSystem.dbaccess.close();
} catc... |
public void addFirst(T value) {
if (((size) + 1) > (d.length)) {
grow();
}
if ((d[head]) != null) {
if ((head) == 0) {
head = (d.length) - 1;
}else {
(head)--;
}
}
d[head] = value;
(size)++;
} | public void addFirst(T value) {
if ((size) == (d.length)) {
grow();
}
(head)--;
if ((head) == (-1)) {
head = (d.length) - 1;
}
d[head] = value;
(size)++;
} |
public void choixCouleurFusion(java.util.ArrayList<application.model.Chaine> listeChainePlateau, java.util.ArrayList<application.model.Chaine> listeChaineAModif, application.model.Chaine c, application.model.Case case1) throws java.rmi.RemoteException {
java.util.ArrayList<application.model.Chaine> listeChaineDiffe... | public void choixCouleurFusion(java.util.ArrayList<application.model.Chaine> listeChainePlateau, java.util.ArrayList<application.model.Chaine> listeChaineAModif, application.model.Chaine c, application.model.Case case1) throws java.rmi.RemoteException {
java.util.ArrayList<application.model.Chaine> listeChaineDiffe... |
public void testCommandsExecution() {
game.executeCommand(new GameCommands.ChangeSnakeVelocityCommand(Utils.VelocityVector.down));
org.junit.Assert.assertEquals(VelocityVector.down, game.snake.head.getVelocity());
game.executeCommand(new GameCommands.ChangeSnakeVelocityCommand(Utils.VelocityVector.left));
... | public void testCommandsExecution() {
game.executeCommand(new GameCommands.ChangeSnakeVelocityCommand(Utils.VelocityVector.down));
assertEquals(VelocityVector.down, game.snake.head.getVelocity());
game.executeCommand(new GameCommands.ChangeSnakeVelocityCommand(Utils.VelocityVector.left));
assertEquals(V... |
public void onReceiveHangUpFromUser(com.quickblox.videochat.webrtcnew.QBRTCSession session, java.lang.Integer userID) {
com.quickblox.sample.videochatwebrtcnew.fragments.IncomeCallFragment incomeCallFragment = ((com.quickblox.sample.videochatwebrtcnew.fragments.IncomeCallFragment) (getFragmentManager().findFragment... | public void onReceiveHangUpFromUser(com.quickblox.videochat.webrtcnew.QBRTCSession session, java.lang.Integer userID) {
if ((session.getState().ordinal()) < (QBRTCSession.QBRTCSessionState.QB_RTC_SESSION_REJECTED.ordinal())) {
addOpponentsFragment();
}else {
android.util.Log.d(com.quickblox.samp... |
public static java.util.ArrayList<java.lang.String> getAllProfiles(android.content.Context context) {
java.util.LinkedHashSet<java.lang.String> hashSet = new java.util.LinkedHashSet<>();
for (com.pokescanner.objects.NotificationItem notificationItem : com.pokescanner.helper.PokemonListLoader.getNotificationList... | public static java.util.ArrayList<java.lang.String> getAllProfiles(android.content.Context context) {
java.util.LinkedHashSet<java.lang.String> hashSet = new java.util.LinkedHashSet<>();
for (com.pokescanner.objects.NotificationItem notificationItem : com.pokescanner.helper.PokemonListLoader.getNotificationList... |
public void onReceive(android.content.Context context, android.content.Intent intent) {
android.content.Intent serviceIntent = new android.content.Intent(context, org.jboss.aerogear.android.sync.SyncService.class);
serviceIntent.putExtra(SyncService.MESSAGE_INTENT, intent);
context.startService(intent);
... | public void onReceive(android.content.Context context, android.content.Intent intent) {
android.content.Intent serviceIntent = new android.content.Intent(context, org.jboss.aerogear.android.sync.SyncService.class);
serviceIntent.putExtra(SyncService.MESSAGE_INTENT, intent);
context.startService(serviceInten... |
protected void onStart() {
super.onStart();
if (!(hasInternetConnection())) {
android.content.Intent noInternetIntent = new android.content.Intent(this, com.example.visvikis.f1story.NoConnectionActivity.class);
startActivity(noInternetIntent);
finish();
}else
if (!(searchedFo... | protected void onStart() {
super.onStart();
if (!(hasInternetConnection())) {
android.content.Intent noInternetIntent = new android.content.Intent(this, com.example.visvikis.f1story.NoConnectionActivity.class);
startActivity(noInternetIntent);
finish();
}else
if (!(searchedFo... |
public void testInvalidEventType() throws com.notronix.newrelic.events.APIViolationException {
com.notronix.newrelic.events.NewRelicEvent event = new com.notronix.newrelic.events.NewRelicEvent() {
@java.lang.Override
public java.lang.String getEventType() {
return "Bad.Event";
}
... | public void testInvalidEventType() throws com.notronix.newrelic.events.APIViolationException {
com.notronix.newrelic.events.NewRelicEvent event = new com.notronix.newrelic.events.NewRelicEvent() {
@java.lang.Override
public java.lang.String getEventType() {
return "Bad.Event";
}
... |
public void testGetErrorMessage_commitErrorsAreShown() {
java.util.List<com.isroot.stash.plugin.errors.YaccError> errors = new java.util.ArrayList<>();
errors.add(new com.isroot.stash.plugin.errors.YaccError("commit error"));
java.lang.String message = yaccErrorBuilder.getErrorMessage(errors);
org.asser... | public void testGetErrorMessage_commitErrorsAreShown() {
java.util.List<com.isroot.stash.plugin.errors.YaccError> errors = new java.util.ArrayList<>();
errors.add(new com.isroot.stash.plugin.errors.YaccError("commit error"));
java.lang.String message = yaccErrorBuilder.getErrorMessage(errors);
org.asser... |
public java.lang.Integer get(int index) {
if ((index < (size())) && (index >= 0))
return super.get(index);
else
if ((((com.apps.philipps.source.BreathData.LimitedList.saveData) != null) && ((size()) == (com.apps.philipps.source.BreathData.ramSize))) && (index >= (com.apps.philipps.source.BreathD... | public java.lang.Integer get(int index) {
if ((index < (size())) && (index >= 0))
return super.get(index);
else
if ((((com.apps.philipps.source.BreathData.LimitedList.saveData) != null) && ((size()) == (com.apps.philipps.source.BreathData.ramSize))) && (index >= (com.apps.philipps.source.BreathD... |
public void execute(hmi.flipper.informationstate.Record is) throws hmi.flipper.exceptions.TemplateRunException {
java.util.ArrayList<java.lang.String> values = new java.util.ArrayList<java.lang.String>();
for (hmi.flipper.behaviourselection.template.value.AbstractValue av : argValues) {
hmi.flipper.beha... | public void execute(hmi.flipper.informationstate.Record is) throws hmi.flipper.exceptions.TemplateRunException {
java.lang.System.out.println(argValues.size());
java.util.ArrayList<java.lang.String> values = new java.util.ArrayList<java.lang.String>();
for (hmi.flipper.behaviourselection.template.value.Abst... |
public void register() {
java.lang.System.out.print("Hostname of the server you want to connect to:");
java.util.Scanner console = new java.util.Scanner(java.lang.System.in);
host = console.next();
java.lang.System.out.print("Port of the server to connect to:");
serverPort = console.nextInt();
c... | public void register() {
java.lang.System.out.print("Hostname of the server you want to connect to:");
java.util.Scanner console = new java.util.Scanner(java.lang.System.in);
host = console.next();
java.lang.System.out.print("Port of the server to connect to:");
serverPort = console.nextInt();
c... |
public java.lang.String writePTN(java.lang.String in, int turn) {
java.lang.String out = "";
if (first) {
out += ((turn + 1) + ". ") + in;
}else {
out += (" " + in) + "%n";
}
first = (first) ? false : true;
return out;
} | public java.lang.String writePTN(java.lang.String in, int turn) {
java.lang.String out = "";
if (first) {
out += (("%n" + (turn + 1)) + ". ") + in;
}else {
out += " " + in;
}
first = (first) ? false : true;
return out;
} |
public com.espirit.moddev.cli.results.SimpleResult<java.lang.Boolean> call() {
try (de.espirit.firstspirit.access.Connection connection = create()) {
connection.connect();
new com.espirit.moddev.moduleuninstaller.ModuleUninstaller().uninstall(connection, connection.getProjectByName(projectName).getI... | public com.espirit.moddev.cli.results.SimpleResult<java.lang.Boolean> call() {
try (de.espirit.firstspirit.access.Connection connection = create()) {
connection.connect();
new com.espirit.moddev.moduleuninstaller.ModuleUninstaller().uninstall(connection, moduleName);
return new com.espirit.m... |
private apps.ExecID genExecID(quickfix.fix42.NewOrderSingle order) throws apps.FieldNotFound {
int ret = this.execId;
(this.execId)++;
return new apps.ExecID((((order.getClOrdID().getValue()) + " ") + (java.lang.String.valueOf(ret))));
} | private apps.ExecID genExecID(quickfix.fix42.NewOrderSingle order) throws apps.FieldNotFound {
int ret = this.execId;
(this.execId)++;
return new apps.ExecID(((order.getClOrdID().getValue()) + (java.lang.String.valueOf(ret))));
} |
public void storeAwsFile(java.io.File fileToUpload, java.lang.String fileKey) {
java.lang.String fullFileKey = ((com.iiitd.userstudyframework.CustomPrefManager.shared().getS3FolderName()) + "/") + fileKey;
android.util.Log.v("dks", ("fullFileKey: " + fullFileKey));
com.amazonaws.mobileconnectors.s3.transfer... | public void storeAwsFile(java.io.File fileToUpload, java.lang.String fileKey) {
java.lang.String fullFileKey = ((com.iiitd.userstudyframework.CustomPrefManager.shared().getS3FolderName(this.context)) + "/") + fileKey;
android.util.Log.v("dks", ("fullFileKey: " + fullFileKey));
com.amazonaws.mobileconnectors... |
public de.caluga.morphium.query.MorphiumIterator<T> asIterable(int windowSize, java.lang.Class<? extends de.caluga.morphium.query.MorphiumIterator<T>> it) {
try {
de.caluga.morphium.query.MorphiumIterator<T> ret = it.newInstance();
ret.setQuery(this);
ret.setWindowSize(windowSize);
r... | public de.caluga.morphium.query.MorphiumIterator<T> asIterable(int windowSize, java.lang.Class<? extends de.caluga.morphium.query.MorphiumIterator<T>> it) {
try {
de.caluga.morphium.query.MorphiumIterator<T> ret = it.newInstance();
return asIterable(windowSize, ret);
} catch (java.lang.Exception... |
private static boolean isEmptyState(java.lang.String sqlState) {
int len = sqlState.length();
int idx = 0;
for (idx = 0; (idx < len) && ((sqlState.charAt(idx)) == ' '); ++idx);
return idx == len;
} | private static boolean isEmptyState(java.lang.String sqlState) {
if (sqlState == null)
return true;
int len = sqlState.length();
int idx = 0;
for (idx = 0; (idx < len) && ((sqlState.charAt(idx)) == ' '); ++idx);
return idx == len;
} |
public org.apache.axis2.jaxws.message.Block getHeaderBlock(java.lang.String namespace, java.lang.String localPart, java.lang.Object context, org.apache.axis2.jaxws.message.factory.BlockFactory blockFactory) throws javax.xml.ws.WebServiceException {
org.apache.axiom.om.OMElement om = org.apache.axis2.jaxws.message.i... | public org.apache.axis2.jaxws.message.Block getHeaderBlock(java.lang.String namespace, java.lang.String localPart, java.lang.Object context, org.apache.axis2.jaxws.message.factory.BlockFactory blockFactory) throws javax.xml.ws.WebServiceException {
org.apache.axiom.om.OMElement om = org.apache.axis2.jaxws.message.i... |
public boolean isPriest(java.util.UUID believerId) {
if (believerId == null) {
return false;
}
java.util.Set<java.lang.String> gods = getAllGods();
for (java.lang.String godName : gods) {
java.util.List<java.util.UUID> list = getPriestsForGod(godName);
if (list.contains(believerI... | public boolean isPriest(java.util.UUID believerId) {
if (believerId == null) {
return false;
}
java.util.Set<java.lang.String> gods = getAllGods();
for (java.lang.String godName : gods) {
java.util.List<java.util.UUID> list = getPriestsForGod(godName);
if ((list != null) && (list... |
private static com.aaronpmaus.jProt.io.Atom constructAtom(com.aaronpmaus.jProt.io.PDBFileIO.AtomRecord rec) {
return new com.aaronpmaus.jProt.io.Atom(rec.getAtomName(), rec.getElement(), rec.getSerial(), rec.getOccupancy(), rec.getTempFactor(), rec.getCharge(), rec.getX(), rec.getY(), rec.getZ());
} | private static com.aaronpmaus.jProt.io.Atom constructAtom(com.aaronpmaus.jProt.io.PDBFileIO.AtomRecord rec) {
return new com.aaronpmaus.jProt.io.Atom(rec.getAtomName(), rec.getSerial(), rec.getOccupancy(), rec.getTempFactor(), rec.getCharge(), rec.getX(), rec.getY(), rec.getZ());
} |
private void removeAllGraphs() {
for (int i = 0; (this.getComponentCount()) > 2;) {
if ((this.getComponent(i)) instanceof org.diyefi.openlogviewer.graphing.SingleGraphPanel) {
this.removeHierarchyBoundsListener(((org.diyefi.openlogviewer.graphing.SingleGraphPanel) (getComponent(i))));
... | private void removeAllGraphs() {
for (int i = 0; (this.getComponentCount()) > 1;) {
if ((this.getComponent(i)) instanceof org.diyefi.openlogviewer.graphing.SingleGraphPanel) {
this.removeHierarchyBoundsListener(((org.diyefi.openlogviewer.graphing.SingleGraphPanel) (getComponent(i))));
... |
public java.lang.String toString() {
return java.lang.String.format("[path: %s, ptime: %s, ctime: %s, hashstr: %s, x/y: %s/%s, size: %s, roatate: %s, isDel: %s, filetype: %s]", path, ((photoTime) + ""), ((cTime) + ""), hash256, ((width) + ""), ((height) + ""), ((size) + ""), ((roatateDegree) + ""), ((isDel) + ""), ... | public java.lang.String toString() {
return java.lang.String.format("[path: %s, ptime: %s, ctime: %s, hashstr: %s, x/y: %s/%s, size: %s, roatate: %s, isDel: %s, filetype: %s]", path, ((photoTime) + ""), ((cTime) + ""), hash256, ((width) + ""), ((height) + ""), ((size) + ""), ((roatateDegree) + ""), ((isDel) + ""), ... |
protected java.util.Map<java.lang.Integer, java.lang.Double> represent(plusone.utils.PaperIF doc) {
java.util.Map<java.lang.Integer, java.lang.Double> ret = new java.util.HashMap<java.lang.Integer, java.lang.Double>();
for (java.lang.Integer w : doc.getTrainingWords()) {
double tf = doc.getTrainingTf(w)... | protected java.util.Map<java.lang.Integer, java.lang.Double> represent(plusone.utils.PaperIF doc) {
java.util.Map<java.lang.Integer, java.lang.Double> ret = new java.util.HashMap<java.lang.Integer, java.lang.Double>();
for (java.lang.Integer w : doc.getTrainingWords()) {
double tf = doc.getTrainingTf(w)... |
public org.springframework.http.ResponseEntity<org.openbox.sf5.model.Settings> getSettingById(@org.springframework.web.bind.annotation.PathVariable(value = "settingId")
long settingId) throws org.openbox.sf5.json.exceptions.NotAuthenticatedException {
org.openbox.sf5.model.Users currentUser = securityContext.getCur... | public org.springframework.http.ResponseEntity<org.openbox.sf5.model.Settings> getSettingById(@org.springframework.web.bind.annotation.PathVariable(value = "settingId")
long settingId) throws org.openbox.sf5.json.exceptions.NotAuthenticatedException {
org.openbox.sf5.model.Users currentUser = securityContext.getCur... |
private synchronized java.util.List<java.lang.String> getEchoMessagesFromReturnValue() {
java.util.List<java.lang.String> returnListing = new java.util.ArrayList();
for (T returnVal : this.returnValue) {
if ((returnVal.getEcho()) == null) {
continue;
}
returnListing.add(retur... | private synchronized java.util.List<java.lang.String> getEchoMessagesFromReturnValue() {
java.util.List<java.lang.String> returnListing = new java.util.ArrayList();
if (((this.returnValue) == null) || (this.returnValue.isEmpty())) {
return returnListing;
}
for (T returnVal : this.returnValue) {
... |
public long consumingWindowSpan() {
if (window.isEmpty()) {
return 0;
}
lock.readLock().lock();
try {
return (window.last()) - (window.first());
} finally {
lock.readLock().unlock();
}
} | public long consumingWindowSpan() {
if (window.isEmpty()) {
return 0;
}
lock.readLock().lock();
try {
if (window.isEmpty()) {
return 0;
}else {
return (window.last()) - (window.first());
}
} finally {
lock.readLock().unlock();
}
} |
private void updateProgress() {
(this.completedPhases)++;
java.lang.System.out.println(completedPhases);
setProgress(completedPhases);
firePropertyChange("progress", completedPhases, completedPhases);
if ((jpb) != null) {
jpb.setValue(completedPhases);
jpb.setString(this.currentPhase... | private void updateProgress() {
java.lang.System.out.println(completedPhases);
setProgress(completedPhases);
firePropertyChange("progress", completedPhases, completedPhases);
if ((jpb) != null) {
jpb.setValue(completedPhases);
jpb.setString(this.currentPhase);
}
} |
private java.lang.Boolean checkForAuthority(org.roysez.app.enums.Role roleToCheck) {
org.springframework.security.core.Authentication auth = org.springframework.security.core.context.SecurityContextHolder.getContext().getAuthentication();
if (auth == null) {
return false;
}
java.util.Collection<... | public static java.lang.Boolean checkForAuthority(org.roysez.app.enums.Role roleToCheck) {
org.springframework.security.core.Authentication auth = org.springframework.security.core.context.SecurityContextHolder.getContext().getAuthentication();
if (auth == null) {
return false;
}
java.util.Colle... |
void reCompute() {
mRecomputing = true;
try {
while ((mInvalidated) && (!(mStopped))) {
try {
compute();
} catch (java.lang.Exception e) {
e.printStackTrace();
}
}
} finally {
mRecomputing = false;
}
} | void reCompute() {
mRecomputing = true;
try {
while ((mInvalidated) && (!(mStopped))) {
try {
compute();
} catch (java.lang.Exception e) {
throw e;
}
}
} finally {
mRecomputing = false;
}
} |
private void addContentRules(java.util.List<org.matrix.androidsdk.rest.model.bingrules.ContentRule> rules) {
for (org.matrix.androidsdk.rest.model.bingrules.ContentRule rule : rules) {
org.matrix.androidsdk.rest.model.bingrules.EventMatchCondition condition = new org.matrix.androidsdk.rest.model.bingrules.E... | private void addContentRules(java.util.List<org.matrix.androidsdk.rest.model.bingrules.ContentRule> rules) {
if (null != rules) {
for (org.matrix.androidsdk.rest.model.bingrules.ContentRule rule : rules) {
org.matrix.androidsdk.rest.model.bingrules.EventMatchCondition condition = new org.matrix.... |
public void ga() {
for (int i = 0; i < (numberGenerations); i++) {
rnd.setSeed(((long) (i)));
generatePopulation();
fitness();
crossover();
mutation();
if (isFoundSolution()) {
java.lang.System.out.println(i);
break;
}
survivers... | public void ga() {
for (int i = 0; i < (numberGenerations); i++) {
generatePopulation();
fitness();
crossover();
mutation();
if (isFoundSolution()) {
java.lang.System.out.println(i);
break;
}
survivers();
}
} |
private void findSpecFilesInJar(java.io.File specJar) throws java.lang.Exception {
try (java.util.jar.JarFile jar = new java.util.jar.JarFile(specJar)) {
for (java.util.Enumeration<java.util.jar.JarEntry> e = jar.entries(); e.hasMoreElements(); e.nextElement()) {
java.util.jar.JarEntry entry = e... | private void findSpecFilesInJar(java.io.File specJar) throws java.lang.Exception {
try (java.util.jar.JarFile jar = new java.util.jar.JarFile(specJar)) {
for (java.util.Enumeration<java.util.jar.JarEntry> e = jar.entries(); e.hasMoreElements();) {
java.util.jar.JarEntry entry = e.nextElement();
... |
public org.terasology.cities.BlockTheme.Builder register(org.terasology.cities.BlockTypes blockType, org.terasology.world.block.BlockUri blockUri) {
org.terasology.world.block.Block block = blockManager.getBlock(blockUri);
if ((block == null) || (block.equals(blockManager.getBlock(BlockManager.AIR_ID)))) {
... | public org.terasology.cities.BlockTheme.Builder register(org.terasology.cities.BlockTypes blockType, org.terasology.world.block.BlockUri blockUri) {
org.terasology.world.block.Block block = blockManager.getBlock(blockUri);
if (!(BlockManager.AIR_ID.equals(blockUri))) {
if ((block == null) || (block.equa... |
public void validarManobra(model.entity.Cliente cliente, java.lang.String motivo) {
try {
model.facade.ValidaClienteManobraFacade f = new model.facade.ValidaClienteManobraFacade(cliente, model.Motivos.valueOf(motivo));
f.validar();
this.result.use(br.com.caelum.vraptor.view.Results.json()).f... | public void validarManobra(model.entity.Cliente cliente, java.lang.String motivo) {
try {
model.facade.ValidaClienteManobraFacade f = new model.facade.ValidaClienteManobraFacade(cliente, model.Motivos.valueOf(motivo));
f.validar();
includeSerializer(f);
} catch (java.lang.Exception e) {
... |
private void fillListView(@android.support.annotation.NonNull
java.io.File file) {
com.kleshchin.danil.filemanager.ListViewFragment.OnToolbarTextChangeListener listener = ((com.kleshchin.danil.filemanager.ListViewFragment.OnToolbarTextChangeListener) (currentActivity_));
listAdapter_ = new com.kleshchin.danil.f... | private void fillListView(@android.support.annotation.NonNull
java.io.File file) {
listAdapter_ = new com.kleshchin.danil.filemanager.ListAdapter(file);
java.lang.String path = file.getPath();
listView_.setAdapter(listAdapter_);
com.kleshchin.danil.filemanager.ListViewFragment.OnToolbarTextChangeListene... |
public com.emc.storageos.isilon.restapi.IsilonNFSACL getNFSACL(java.lang.String fspath) throws com.emc.storageos.isilon.restapi.IsilonException {
java.lang.String aclUrl = fspath.concat("?acl").substring(1);
try {
aclUrl = java.net.URLEncoder.encode(aclUrl, "UTF-8");
} catch (java.io.UnsupportedEnco... | public com.emc.storageos.isilon.restapi.IsilonNFSACL getNFSACL(java.lang.String fspath) throws com.emc.storageos.isilon.restapi.IsilonException {
try {
fspath = fspath.substring(1);
fspath = java.net.URLEncoder.encode(fspath, "UTF-8");
fspath = fspath.concat("?acl");
} catch (java.io.Uns... |
public static java.lang.String getVenderCommand(java.lang.String cmd) {
java.lang.String cmdString = cmd.replaceAll("\\s*", "");
return ((("AA" + cmdString) + (java.lang.Integer.toHexString(com.seekersoftvendingapp.serialport.VendingSerialPort.getBCC(cmdString)))) + "AC").toUpperCase();
} | private static java.lang.String getVenderCommand(java.lang.String cmd) {
java.lang.String cmdString = cmd.replaceAll("\\s*", "");
return ((("AA" + cmdString) + (java.lang.Integer.toHexString(com.seekersoftvendingapp.serialport.VendingSerialPort.getBCC(cmdString)))) + "AC").toUpperCase();
} |
long nextKeynum() {
long keynum;
if ((keychooser) instanceof com.yahoo.ycsb.generator.ExponentialGenerator) {
do {
keynum = (transactioninsertkeysequence.lastValue()) - (keychooser.nextValue().longValue());
} while (keynum < 0 );
}else {
do {
keynum = keychoos... | long nextKeynum() {
long keynum;
if ((keychooser) instanceof com.yahoo.ycsb.generator.ExponentialGenerator) {
do {
keynum = (transactioninsertkeysequence.lastValue()) - (keychooser.nextValue().longValue());
} while (keynum < 0 );
}else {
do {
keynum = keychoos... |
@java.lang.Override
boolean isItemEnabled(android.database.Cursor cursor) {
if ((cursor.getPosition()) == 0) {
return true;
}
if ((cursor.getInt(KeyAdapter.INDEX_IS_REVOKED)) != 0) {
return false;
}
if ((cursor.getInt(KeyAdapter.INDEX_IS_EXPIRED)) != 0) {
return false;
}
... | @java.lang.Override
boolean isItemEnabled(android.database.Cursor cursor) {
if ((cursor.getInt(KeyAdapter.INDEX_IS_REVOKED)) != 0) {
return false;
}
if ((cursor.getInt(KeyAdapter.INDEX_IS_EXPIRED)) != 0) {
return false;
}
if (cursor.isNull(mIndexHasSign)) {
return false;
... |
public int doStartTag() throws javax.servlet.jsp.JspException {
try {
_assetCategories = com.liferay.portlet.asset.service.AssetCategoryServiceUtil.getCategories(_className, _classPK);
if (_assetCategories.isEmpty()) {
return EVAL_BODY_INCLUDE;
}
return SKIP_BODY;
} c... | public int doStartTag() throws javax.servlet.jsp.JspException {
try {
_assetCategories = com.liferay.portlet.asset.service.AssetCategoryServiceUtil.getCategories(_className, _classPK);
if (!(_assetCategories.isEmpty())) {
return EVAL_BODY_INCLUDE;
}
return SKIP_BODY;
... |
private void readyLabel() {
float fontSize = (stage.getHeight()) * (com.mygdx.osc.CurrentScore.fontScaleConst);
setFontScale(fontSize);
setY(((stage.getHeight()) * 0.95F));
setX(((stage.getWidth()) * 0.01F));
setText(java.lang.Integer.toString(currentScore));
} | private void readyLabel() {
float fontSize = (stage.getHeight()) * (com.mygdx.osc.CurrentScore.fontScaleConst);
setFontScale(fontSize);
setX(((stage.getWidth()) * 0.01F));
setY(((stage.getHeight()) * 0.95F));
setText(java.lang.Integer.toString(currentScore));
} |
public int stopTimer() {
t.cancel();
solvedTime = ((minutes) * 60) + (seconds);
int points = 600 - (((minutes) * 60) + (seconds));
com.laquysoft.motivetto.MediaPlayerService.setTrackProgressTo(getActivity(), 0);
com.laquysoft.motivetto.MediaPlayerService.playTrackWin(getActivity(), 0);
return po... | public int stopTimer() {
t.cancel();
solvedTime = ((minutes) * 60) + (seconds);
com.laquysoft.motivetto.MediaPlayerService.setTrackProgressTo(getActivity(), 0);
com.laquysoft.motivetto.MediaPlayerService.playTrackWin(getActivity(), 0);
return solvedTime;
} |
public android.view.View getView(int position, android.view.View convertView, android.view.ViewGroup parent) {
final android.view.View view = (convertView != null) ? convertView : createView(parent);
final adapters.RepositoryAdapter.GitHubRepoViewHolder viewHolder = ((adapters.RepositoryAdapter.GitHubRepoViewHo... | public android.view.View getView(int position, android.view.View convertView, android.view.ViewGroup parent) {
final android.view.View view = createView(parent);
final adapters.RepositoryAdapter.GitHubRepoViewHolder viewHolder = ((adapters.RepositoryAdapter.GitHubRepoViewHolder) (view.getTag()));
viewHolder... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.