buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
protected void createPropsControls(org.eclipse.swt.widgets.Composite parent, int cols) {
beanPropsTable = new org.fusesource.ide.camel.editor.globalconfiguration.beans.PropertyStyleChildTableControl(parent, org.eclipse.swt.SWT.NULL);
beanPropsTable.setLayoutData(org.eclipse.jface.layout.GridDataFactory.fillDefa... | protected void createPropsControls(org.eclipse.swt.widgets.Composite parent, int cols) {
beanPropsTable = new org.fusesource.ide.camel.editor.globalconfiguration.beans.PropertyStyleChildTableControl(parent, org.eclipse.swt.SWT.NULL);
beanPropsTable.setLayoutData(org.eclipse.jface.layout.GridDataFactory.fillDefa... |
public java.util.List<java.lang.Object[]> getDvObjectInfoForMyData(java.util.List<java.lang.Long> dvObjectIdList) {
java.lang.String dvObjectClause = getDvObjectIdListClause(dvObjectIdList);
if (dvObjectClause == null) {
return null;
}
java.lang.String qstr = "SELECT dv.id, dv.dtype, dv.owner_id... | public java.util.List<java.lang.Object[]> getDvObjectInfoForMyData(java.util.List<java.lang.Long> dvObjectIdList) {
java.lang.String dvObjectClause = getDvObjectIdListClause(dvObjectIdList);
if (dvObjectClause == null) {
return null;
}
java.lang.String qstr = "SELECT dv.id, dv.dtype, dv.owner_id... |
public void log() {
com.canoo.dolphin.server.config.Set<com.canoo.dolphin.server.config.Map.Entry<java.lang.Object, java.lang.Object>> properties = internalProperties.entrySet();
for (com.canoo.dolphin.server.config.Map.Entry property : properties) {
com.canoo.dolphin.server.config.DolphinPlatformConfig... | public void log() {
java.util.Set<java.util.Map.Entry<java.lang.Object, java.lang.Object>> properties = internalProperties.entrySet();
for (java.util.Map.Entry property : properties) {
com.canoo.dolphin.server.config.DolphinPlatformConfiguration.LOG.debug(((("Dolphin Platform starts with value for " + (... |
private void cubeReboot() {
logger.info("Rebooting MAX! Cube {}", org.openhab.binding.max.internal.handler.MaxCubeBridgeHandler.getThing().getThingTypeUID());
org.openhab.binding.max.config.MaxCubeBridgeConfiguration maxConfiguration = org.openhab.binding.max.internal.handler.MaxCubeBridgeHandler.getConfigAs(or... | private void cubeReboot() {
logger.info("Rebooting MAX! Cube {}", getThing().getThingTypeUID());
org.openhab.binding.max.config.MaxCubeBridgeConfiguration maxConfiguration = getConfigAs(org.openhab.binding.max.config.MaxCubeBridgeConfiguration.class);
org.openhab.binding.max.internal.command.UdpCubeCommand ... |
public void kShortestPathsTest() throws java.lang.Exception {
org.toradocu.testlib.TestCaseStats stats = test("org.jgrapht.alg.KShortestPaths");
org.junit.Assert.assertThat(org.toradocu.PRECISION_MESSAGE, stats.getPrecision(), org.hamcrest.CoreMatchers.is(1.0));
org.junit.Assert.assertThat(org.toradocu.RECA... | public void kShortestPathsTest() throws java.lang.Exception {
org.toradocu.testlib.TestCaseStats stats = test("org.jgrapht.alg.KShortestPaths");
org.junit.Assert.assertThat(org.toradocu.PRECISION_MESSAGE, stats.getPrecision(), org.hamcrest.number.IsCloseTo.closeTo(0.33, org.toradocu.PRECISION));
org.junit.A... |
public java.lang.String getName() {
java.lang.String fullName = "";
if ((prefixName) != null) {
fullName += (tickName ? com.raizlabs.android.dbflow.sql.QueryBuilder.quoteIfNeeded(prefixName) : prefixName) + ".";
}
fullName += (tickName) ? com.raizlabs.android.dbflow.sql.QueryBuilder.quote(name) ... | public java.lang.String getName() {
java.lang.String fullName = "";
if ((prefixName) != null) {
fullName += (tickName ? com.raizlabs.android.dbflow.sql.QueryBuilder.quoteIfNeeded(prefixName) : prefixName) + ".";
}
if ((name) != null) {
fullName += (tickName) ? com.raizlabs.android.dbflow... |
private void drawLayoutOutline(android.graphics.Canvas canvas) {
canvas.drawRect(getPaddingLeft(), (1 + (getPaddingTop())), (((getWidth()) - (getPaddingLeft())) - (getPaddingRight())), (((getHeight()) - (getPaddingTop())) - (getPaddingBottom())), outlinePaint);
} | private void drawLayoutOutline(android.graphics.Canvas canvas) {
canvas.drawRect(getPaddingLeft(), (1 + (getPaddingTop())), ((((getWidth()) - (getPaddingLeft())) - (getPaddingRight())) - 1), ((((getHeight()) - (getPaddingTop())) - (getPaddingBottom())) - 1), outlinePaint);
} |
public void onMapReady(com.mapzen.android.graphics.MapzenMap mapzenMap) {
mapzenMap.setCameraType(CameraType.FLAT);
mListener.mapIsReady();
if (permissionsvalid) {
mapzenMap.setMyLocationEnabled(true);
enableLocationOnResume = true;
}
if (!((searchedLocation) == null)) {
mapz... | public void onMapReady(com.mapzen.android.graphics.MapzenMap mapzenMap) {
mapzenMap.setCameraType(CameraType.FLAT);
mListener.mapIsReady();
if (permissionsvalid) {
mapzenMap.setMyLocationEnabled(true);
enableLocationOnResume = true;
}
if (!((searchedLocation) == null)) {
mapz... |
public void refreshMusic() {
org.xbmc.kore.host.HostInfo hostInfo = org.xbmc.kore.host.HostManager.getInstance(getActivity()).getHostInfo();
if (hostInfo != null) {
android.content.Intent syncIntent = new android.content.Intent(this.getActivity(), org.xbmc.kore.service.LibrarySyncService.class);
... | private void refreshMusic() {
org.xbmc.kore.host.HostInfo hostInfo = org.xbmc.kore.host.HostManager.getInstance(getActivity()).getHostInfo();
if (hostInfo != null) {
android.content.Intent syncIntent = new android.content.Intent(this.getActivity(), org.xbmc.kore.service.LibrarySyncService.class);
... |
public void testCalSundayFirst() {
java.lang.String[] args = new java.lang.String[0];
java.lang.String expected = " March 2017 \n" + ((((("Su Mo Tu We Th Fr Sa\n" + " 1 2 3 4 \n") + "5 6 7 8 9 10 11\n") + "12 13 14 15 16 17 18\n") + "19 20 21 22 23 24 25\n") + "26 27 28 29 30 31 ");
... | public void testCalSundayFirst() throws sg.edu.nus.comp.cs4218.exception.CalException {
java.lang.String[] args = new java.lang.String[0];
java.lang.String expected = " March 2017 \n" + ((((("Su Mo Tu We Th Fr Sa\n" + " 1 2 3 4 \n") + "5 6 7 8 9 10 11\n") + "12 13 14 15 16 17 18\n") + "1... |
public void actionPerformed(java.awt.event.ActionEvent e) {
if (inGame) {
timerTickCount += 1;
if ((((timerTickCount) % 200) == 0) && ((DELAY) > 87)) {
timer.stop();
this.DELAY -= 1;
timer = new javax.swing.Timer(DELAY, this);
timer.start();
}
... | public void actionPerformed(java.awt.event.ActionEvent e) {
if (inGame) {
timerTickCount += 1;
if ((((timerTickCount) % 200) == 0) && ((DELAY) > 87)) {
timer.stop();
this.DELAY -= 1;
timer = new javax.swing.Timer(DELAY, this);
timer.start();
}
... |
public void setPassword(java.lang.String password) {
if ((!(password.equals(person.getPassword()))) && (!(password.isEmpty()))) {
changedPassword = true;
person.setPassword(password);
}
} | public void setPassword(java.lang.String password) {
if ((person.getId()) == null) {
person.setPassword(password);
}else
if ((!(password.equals(person.getPassword()))) && (!(password.isEmpty()))) {
changedPassword = true;
person.setPassword(password);
}
} |
public void surfaceChanged(android.view.SurfaceHolder holder, int format, int width, int height) {
io.github.data4all.logger.Log.d(io.github.data4all.view.CameraPreview.TAG, "surfaceChanged is called");
mCamera.stopPreview();
if ((mCamera) == null) {
io.github.data4all.logger.Log.e(io.github.data4al... | public void surfaceChanged(android.view.SurfaceHolder holder, int format, int width, int height) {
io.github.data4all.logger.Log.d(io.github.data4all.view.CameraPreview.TAG, "surfaceChanged is called");
mCamera.stopPreview();
if ((mCamera) == null) {
io.github.data4all.logger.Log.e(io.github.data4al... |
public void onRequestPermissionsResult(int requestCode, @android.support.annotation.NonNull
java.lang.String[] permissions, @android.support.annotation.NonNull
int[] grantResults) {
if (requestCode == (im.dino.dbinspector.fragments.TableListFragment.REQUEST_PERMISSION_CODE)) {
if (Manifest.permission.WRITE_... | public void onRequestPermissionsResult(int requestCode, @android.support.annotation.NonNull
java.lang.String[] permissions, @android.support.annotation.NonNull
int[] grantResults) {
if ((requestCode == (im.dino.dbinspector.fragments.TableListFragment.REQUEST_PERMISSION_CODE)) && (Manifest.permission.WRITE_EXTERNAL_... |
public boolean shouldExecute() {
net.minecraft.entity.EntityLivingBase favoriteTarget = this.entityHost.getAttackTarget();
if (favoriteTarget == null) {
return false;
}
double distSquared = this.entityHost.getDistanceSq(favoriteTarget.posX, favoriteTarget.getEntityBoundingBox().minY, favoriteTar... | public boolean shouldExecute() {
net.minecraft.entity.EntityLivingBase favoriteTarget = this.entityHost.getAttackTarget();
if (favoriteTarget == null) {
return false;
}
double distSquared = this.entityHost.getDistanceSq(favoriteTarget.posX, favoriteTarget.getEntityBoundingBox().minY, favoriteTar... |
public bms.model.TimeLine getTimeLine(float section, int time) {
bms.model.TimeLine tl = timelines.get(section);
if (tl == null) {
tl = new bms.model.TimeLine(time);
tl.setSection(section);
timelines.put(section, tl);
}
return tl;
} | public bms.model.TimeLine getTimeLine(float section, int time) {
bms.model.TimeLine tl = timelines.get(section);
if (tl == null) {
tl = new bms.model.TimeLine(section, time);
timelines.put(section, tl);
}
return tl;
} |
protected java.lang.Object unsolvableProperty(org.apache.commons.jexl3.parser.JexlNode node, java.lang.String var, java.lang.Throwable cause) {
if (isStrictEngine()) {
if (isSilent()) {
logger.warn(org.apache.commons.jexl3.JexlException.propertyError(node, var), cause);
}else {
... | protected java.lang.Object unsolvableProperty(org.apache.commons.jexl3.parser.JexlNode node, java.lang.String var, java.lang.Throwable cause) {
if (isStrictEngine()) {
throw new org.apache.commons.jexl3.JexlException.Property(node, var, cause);
}else
if (logger.isDebugEnabled()) {
lo... |
private org.eclipse.californium.core.network.stack.Block1BlockwiseStatus getInboundBlock1Status(final org.eclipse.californium.core.network.stack.KeyUri key, final org.eclipse.californium.core.network.Exchange exchange, final org.eclipse.californium.core.coap.Request request) {
synchronized(block1Transfers) {
... | protected org.eclipse.californium.core.network.stack.Block1BlockwiseStatus getInboundBlock1Status(final org.eclipse.californium.core.network.stack.KeyUri key, final org.eclipse.californium.core.network.Exchange exchange, final org.eclipse.californium.core.coap.Request request) {
synchronized(block1Transfers) {
... |
public static java.lang.Boolean isTokenValid(com.zoho.oauth.OAuthParams params) {
if (params != null) {
if ((params.getAccessToken()) != null) {
if (((params.getExpiryTime()) - (java.lang.System.currentTimeMillis())) < 60000L) {
return java.lang.Boolean.TRUE;
}
... | public static java.lang.Boolean isTokenValid(com.zoho.oauth.OAuthParams params) {
if (params != null) {
if ((params.getAccessToken()) != null) {
if (((params.getExpiryTime()) - (java.lang.System.currentTimeMillis())) < 60000L) {
return java.lang.Boolean.FALSE;
}
... |
private void onDaysLoaded(java.util.List<org.threeten.bp.LocalDate> days) {
loadingIndicator.setVisibility(View.GONE);
if (days.isEmpty()) {
logger.warn("List of days was empty");
emptyView.setVisibility(View.VISIBLE);
}else {
logger.debug("Found %s days", days.size());
empty... | private void onDaysLoaded(java.util.List<org.threeten.bp.LocalDate> days) {
loadingIndicator.setVisibility(View.GONE);
if (days.isEmpty()) {
logger.warn("List of days was empty");
emptyView.setVisibility(View.VISIBLE);
}else {
logger.debug("Found %s days", days.size());
empty... |
public int getPortbyName(java.lang.String name) {
for (java.util.LinkedHashMap<java.lang.String, java.lang.Object> t : NodeInfo) {
if (name.equals(t.get("name"))) {
if ((t.get("port")) != null) {
return ((java.lang.Integer) (t.get("port"))).intValue();
}
}
... | public int getPortbyName(java.lang.String name) {
if (NodeInfo.isEmpty()) {
return -1;
}
for (java.util.LinkedHashMap<java.lang.String, java.lang.Object> t : NodeInfo) {
if (name.equals(t.get("name"))) {
if ((t.get("port")) != null) {
return ((java.lang.Integer) (... |
protected void writeObservedProperty(org.n52.shetland.ogc.sos.gda.GetDataAvailabilityResponse.DataAvailability da) throws javax.xml.stream.XMLStreamException {
empty(GetDataAvailabilityConstants.GDA_OBSERVED_PROPERTY);
attr(GetDataAvailabilityConstants.XLINK_HREF, da.getObservedProperty().getHref());
if (da... | protected void writeObservedProperty(org.n52.shetland.ogc.sos.gda.GetDataAvailabilityResponse.DataAvailability da) throws javax.xml.stream.XMLStreamException {
empty(GetDataAvailabilityConstants.GDA_OBSERVED_PROPERTY);
attr(GetDataAvailabilityConstants.XLINK_HREF, da.getObservedProperty().getHref());
if (da... |
private void unRegistHxListener() {
com.lib.base.log.KLog.i("MainService--->unRegistHxListener()");
com.lwk.familycontact.im.helper.HxSdkHelper.getInstance().removeConnectListener(mHxConnectListener);
com.lwk.familycontact.im.helper.HxSdkHelper.getInstance().removeContactListener(mHxContactListener);
co... | public void unRegistHxListener() {
com.lib.base.log.KLog.i("MainService--->unRegistHxListener()");
if ((mHxConnectListener) != null)
com.lwk.familycontact.im.helper.HxSdkHelper.getInstance().removeConnectListener(mHxConnectListener);
if ((mHxContactListener) != null)
com.lwk.familyconta... |
boolean noFilterSet(de.hk.wfh.rs.FilterContext filterContext) {
int sizeFilter = ((filterContext.getFilterList()) == null) ? 0 : filterContext.getFilterList().size();
int sizeIgnore = ((filterContext.getIgnoreList()) == null) ? 0 : filterContext.getFilterList().size();
return (sizeFilter == 0) && (sizeIgnor... | boolean noFilterSet(de.hk.wfh.rs.FilterContext filterContext) {
int sizeFilter = ((filterContext.getFilterList()) == null) ? 0 : filterContext.getFilterList().size();
int sizeIgnore = ((filterContext.getIgnoreList()) == null) ? 0 : filterContext.getIgnoreList().size();
return (sizeFilter == 0) && (sizeIgnor... |
public void clearPending() {
for (int i = 0; i < (data.size()); i++) {
if (((data.get(i).reqid) != (-1)) && ((data.get(i).color) == (colorScheme.timestampColor))) {
data.remove(i);
i--;
}
}
} | public void clearPending() {
synchronized(data) {
for (int i = 0; i < (data.size()); i++) {
if (((data.get(i).reqid) != (-1)) && ((data.get(i).color) == (colorScheme.timestampColor))) {
data.remove(i);
i--;
}
}
}
} |
private void generateMultiMethods(org.multij.model.Module module, java.io.PrintWriter writer) {
for (org.multij.model.MultiMethod multiMethod : module.getMultiMethods()) {
for (org.multij.model.EntryPoint entryPoint : multiMethod.getEntryPoints()) {
org.multij.codegen.CodeGenerator.MethodCodeGen... | private void generateMultiMethods(org.multij.model.Module module, java.io.PrintWriter writer) {
for (org.multij.model.MultiMethod multiMethod : module.getMultiMethods()) {
for (org.multij.model.EntryPoint entryPoint : multiMethod.getEntryPoints()) {
org.multij.codegen.CodeGenerator.MethodCodeGen... |
private java.lang.String getFormattedTitle(java.lang.String title, java.lang.String location) {
if (!(location.isEmpty())) {
return (((title + " ") + (context.getString(R.string.at))) + " ") + location;
}
return title;
} | private java.lang.String getFormattedTitle(java.lang.String title, java.lang.String location) {
if ((location != null) && (!(location.isEmpty()))) {
return (((title + " ") + (context.getString(R.string.at))) + " ") + location;
}
return title;
} |
public void apply(final org.bson.Document document) {
java.lang.String product_id = document.get("pid").toString();
java.lang.String numOfReviews = document.get("#reviews").toString();
java.lang.System.out.println(("Annotating reviews for product: " + product_id));
if ((java.lang.Integer.parseInt(numOfR... | public void apply(final org.bson.Document document) {
java.lang.String product_id = document.get("pid").toString();
java.lang.String numOfReviews = document.get("#reviews").toString();
try {
new SpamDetector(mongo, product_id).performSpamDetection();
} catch (java.lang.Exception e) {
e.p... |
public void apply(float[] data) {
int firstElement = (data.length) - (window);
if (firstElement < 0)
firstElement = 0;
double vals = window;
if ((data.length) < (window))
vals = data.length;
double sum = 0.0;
for (int i = data.length; i > firstElement; i++) {
su... | public void apply(float[] data) {
int firstElement = (data.length) - (window);
if (firstElement < 0)
firstElement = 0;
double vals = window;
if ((data.length) < (window))
vals = data.length;
double sum = 0.0;
for (int i = firstElement; i < (data.length); i++) {
... |
public java.lang.String updateQuestionnaire() {
model.Questionnaire ques = quesService.getQuestionnaireById(id);
ques.setEndTime(endTime);
ques.setIsPublic(isPublic);
ques.setReleaseTime(releaseTime);
ques.setStatus(status);
ques.setTitle(title);
model.QuestionnaireQuestions quescontent = qu... | public java.lang.String update() {
model.Questionnaire ques = quesService.getQuestionnaireById(id);
ques.setEndTime(endTime);
ques.setIsPublic(isPublic);
ques.setReleaseTime(releaseTime);
ques.setStatus(status);
ques.setTitle(title);
model.QuestionnaireQuestions quescontent = quesService.get... |
public java.lang.String login(@org.springframework.web.bind.annotation.RequestParam(value = "error", required = false)
java.lang.String error, @org.springframework.web.bind.annotation.RequestParam(value = "logout", required = false)
java.lang.String logout, java.util.Locale locale, org.springframework.ui.Model model) {... | public java.lang.String login(@org.springframework.web.bind.annotation.RequestParam(value = "error", required = false)
java.lang.String error, @org.springframework.web.bind.annotation.RequestParam(value = "logout", required = false)
java.lang.String logout, java.util.Locale locale, org.springframework.ui.Model model) {... |
public void testSetGridsize() {
bigBrother.setGridsize(666, 1337);
assertTrue(((bigBrother.survivalMatrix.length) == 666));
assertTrue(((bigBrother.survivalMatrix[0].length) == 1337));
bigBrother.setGridsize(1, 2);
assertTrue(((bigBrother.survivalMatrix.length) == 666));
assertTrue(((bigBrother.... | public void testSetGridsize() {
bigBrother.setGridsize(1337, 666);
assertTrue(((bigBrother.survivalMatrix.length) == 666));
assertTrue(((bigBrother.survivalMatrix[0].length) == 1337));
bigBrother.setGridsize(1, 2);
assertTrue(((bigBrother.survivalMatrix.length) == 666));
assertTrue(((bigBrother.... |
private java.lang.Double parseFloat() throws org.lorecraft.phparser.SerializedPhpParserException {
int delimiter = this.input.indexOf(';', this.index);
if (delimiter == (-1)) {
throw new org.lorecraft.phparser.SerializedPhpParserException("Unexpected end of serialized float!", this.index);
}
thi... | private java.lang.Double parseFloat() throws org.lorecraft.phparser.SerializedPhpParserException {
int delimiter = this.input.indexOf(';', this.index);
if (delimiter == (-1)) {
throw new org.lorecraft.phparser.SerializedPhpParserException("Unexpected end of serialized float!", this.index);
}
che... |
public void checkClientConnections() {
boolean spy = false;
for (players.Player player : players) {
if (!(player.getClient().isConnected())) {
disconnectPlayer(player);
spy = true;
}
}
if (spy)
notifyHiddenPlayersUpdated(players);
} | private void checkClientConnections() {
boolean spy = false;
for (players.Player player : players) {
if (!(player.getClient().isConnected())) {
disconnectPlayer(player);
spy = true;
}
}
if (spy)
notifyHiddenPlayersUpdated(players);
} |
public void onClick(android.view.View v) {
android.support.v4.app.FragmentManager fragmentManager = getSupportFragmentManager();
android.support.v4.app.FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
jajodia.aditya.com.bunkmanager2.ButtonFragment fragment = new jajodia.aditya.c... | public void onClick(android.view.View v) {
android.support.v4.app.FragmentManager fragmentManager = getSupportFragmentManager();
android.support.v4.app.FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
jajodia.aditya.com.bunkmanager2.ButtonFragment fragment = new jajodia.aditya.c... |
public boolean checkLocatore(java.lang.String email) {
java.util.List<entity.Locatore> listaLocatori = locatoreFacade.findAll();
locatore = null;
for (entity.Locatore l : listaLocatori)
if (l.getEmail().equalsIgnoreCase(email)) {
locatore = l;
}
return (locatore) != null... | public boolean checkLocatore(java.lang.String email) {
java.util.List<entity.Locatore> listaLocatori = locatoreFacade.findAll();
locatore = null;
for (entity.Locatore l : listaLocatori) {
if (l.getEmail().equalsIgnoreCase(email)) {
locatore = l;
break;
}
}
ret... |
public void enterRoomText() {
(counter2)--;
if (((counter2) < 0) && ((flag) == 0)) {
entranceText = new TextPanel("RoomEntranceText");
addObject(entranceText, ((getWidth()) / 2), ((getHeight()) / 2));
flag = 1;
}
if (Greenfoot.isKeyDown("enter")) {
counter2 = 50;
... | public void enterRoomText() {
(counter2)--;
if (((counter2) < 0) && ((flag) == 0)) {
entranceText = new TextPanel("RoomEntranceText");
addObject(entranceText, ((getWidth()) / 2), ((getHeight()) / 2));
flag = 1;
}
if (Greenfoot.isKeyDown("enter")) {
counter2 = 50;
... |
public static void close() {
if ((org.mycontroller.standalone.MapDbFactory.database) == null) {
_logger.info("Not initialized yet!");
}
if (org.mycontroller.standalone.MapDbFactory.database.isClosed()) {
_logger.debug("already closed");
return ;
}
org.mycontroller.standalone.... | public static void close() {
if ((org.mycontroller.standalone.MapDbFactory.database) == null) {
_logger.info("Not initialized yet!");
}
if (org.mycontroller.standalone.MapDbFactory.database.isClosed()) {
_logger.debug("already closed");
return ;
}
org.mycontroller.standalone.... |
public void setTuple(cascading.tuple.Tuple tuple) {
if ((!(isUnmodifiable)) && (tuple.isUnmodifiable()))
throw new java.lang.IllegalArgumentException("current entry is modifiable but given tuple is not modifiable, make copy of given Tuple first");
if ((tuple != null) && (isUnmodifiable))
th... | public void setTuple(cascading.tuple.Tuple tuple) {
if (((!(isUnmodifiable)) && (tuple != null)) && (tuple.isUnmodifiable()))
throw new java.lang.IllegalArgumentException("current entry is modifiable but given tuple is not modifiable, make copy of given Tuple first");
if ((tuple != null) && (isUnmo... |
public void passAgent(SystemY.Agent agent) {
refreshNeighbours();
SystemY.ClientToClientInterface ctci = makeCTCI(nextNode);
try {
ctci.startAgent(agent);
} catch (java.rmi.RemoteException e) {
failure(nextNode);
e.printStackTrace();
}
ctci = null;
} | public void passAgent() {
refreshNeighbours();
SystemY.ClientToClientInterface ctci = makeCTCI(nextNode);
try {
ctci.startAgent(agent);
} catch (java.rmi.RemoteException e) {
failure(nextNode);
e.printStackTrace();
}
ctci = null;
} |
public java.lang.String nextToken() {
int posToken;
java.lang.String response;
if (strToValidate.contains(delim)) {
posToken = scanToken(posTokens, strToValidate);
response = strToValidate.substring(0, posToken);
strToValidate = strToValidate.substring(posToken);
return respo... | public java.lang.String nextToken() {
int posToken;
java.lang.String response;
posToken = scanToken(posTokens, strToValidate);
response = strToValidate.substring(0, (posToken - (delim.length())));
strToValidate = strToValidate.substring(posToken);
return response;
} |
private double calcEuclideanDistance(double[] a, double[] b) {
assert (a.length) == (b.length);
double sum = 0;
for (int i = 0; i < (a.length); i++) {
sum += java.lang.Math.pow(((a[i]) - (b[i])), 2);
}
return java.lang.Math.sqrt(sum);
} | private double calcEuclideanDistance(double[] a, double[] b) {
double sum = 0;
for (int i = 0; i < (a.length); i++) {
if ((b.length) <= i)
break;
sum += java.lang.Math.pow(((a[i]) - (b[i])), 2);
}
return java.lang.Math.sqrt(sum);
} |
public static void main(java.lang.String[] args) {
org.junit.runner.Result result = org.junit.runner.JUnitCore.runClasses(test.uk.ac.kent.dover.FastGraphTest.class);
for (org.junit.runner.notification.Failure failure : result.getFailures()) {
java.lang.System.out.println(failure.toString());
}
j... | public static void main(java.lang.String[] args) {
org.junit.runner.Result result = org.junit.runner.JUnitCore.runClasses(test.uk.ac.kent.dover.FastGraphTest.class);
for (org.junit.runner.notification.Failure failure : result.getFailures()) {
java.lang.System.out.println(failure.toString());
}
j... |
public void calculateProbabilityOfUnseenWords(dissertation.UnigramModel unigram) {
java.lang.System.out.println(this.frequencyOfFrequencyCounts.get(1));
this.probabilityOfUnseenWord = this.frequencyOfFrequencyCounts.get(1);
this.probabilityOfUnseenWord = (this.probabilityOfUnseenWord) / (unigram.getTotalWor... | public void calculateProbabilityOfUnseenWords(dissertation.UnigramModel unigram) {
this.probabilityOfUnseenWord = this.frequencyOfFrequencyCounts.get(1);
this.probabilityOfUnseenWord = (this.probabilityOfUnseenWord) / (unigram.getTotalWordCount());
this.probabilityOfUnseenWord = (this.probabilityOfUnseenWor... |
private void loadAll(pathfinding.ChronoGameState chrono, robot.Cinematique start) throws exceptions.MemoryManagerException, java.lang.InterruptedException {
log.debug("Début du chargement des trajectoires…");
java.io.File f = new java.io.File("./paths/");
java.util.List<java.lang.String> names = new java.ut... | private void loadAll(pathfinding.ChronoGameState chrono, robot.Cinematique start) throws exceptions.MemoryManagerException, java.lang.InterruptedException {
log.debug("Début du chargement des trajectoires…");
java.io.File f = new java.io.File("./paths/");
java.util.List<java.lang.String> names = new java.ut... |
private void dealCards() {
print("Dealing cards...");
for (int i = 0; i < 2; i++) {
for (cardgames.blackjack.Player p : players) {
if ((p.getCurrentWager()) == 0) {
p.setStatus(Status.STAND);
}else {
p.getHand().addCard(dealCard());
}
... | private void dealCards() {
print("Dealing cards...");
for (int i = 0; i < 2; i++) {
for (cardgames.blackjack.Player p : players) {
if ((p.getCurrentWager()) == 0) {
p.setStatus(Status.STAND);
}else {
p.getHand().addCard(dealCard(p));
}
... |
public void run() {
org.bukkit.entity.Player p = server.getPlayer(uuid);
if ((p != null) && (p.isOnline())) {
manager.save(p, false);
}else {
int id = DataCompound.DEFAULT.task().remove(uuid);
server.getScheduler().cancelTask(id);
}
} | public void run() {
org.bukkit.entity.Player p = server.getPlayer(uuid);
if ((p != null) && (p.isOnline())) {
manager.save(p, false);
}else {
server.getScheduler().cancelTask(id);
}
} |
public void start(int port, java.lang.String resourceBase) {
server = new it.xpug.toolkit.http.Server(port);
try {
it.xpug.toolkit.http.HandlerList handlers = new it.xpug.toolkit.http.HandlerList();
handlers.setHandlers(new it.xpug.toolkit.http.Handler[]{ new it.xpug.toolkit.http.ReusableJettyAp... | public void start(int port, java.lang.String resourceBase) {
server = new it.xpug.toolkit.http.Server(port);
try {
it.xpug.toolkit.http.HandlerList handlers = new it.xpug.toolkit.http.HandlerList();
handlers.setHandlers(new it.xpug.toolkit.http.Handler[]{ new it.xpug.toolkit.http.ReusableJettyAp... |
protected void createComboColumn(org.miradi.objects.BaseObject[] content, int tableColumn, org.miradi.objects.BaseObject invalidObject) {
java.util.Arrays.sort(content, new org.miradi.dialogs.base.EditableBaseObjectTable.SorterByToString());
java.util.Vector<org.miradi.questions.ChoiceItem> comboContent = addEm... | protected org.miradi.dialogs.tablerenderers.ChoiceItemComboBoxRendererOrEditorFactory createComboColumn(org.miradi.objects.BaseObject[] content, int tableColumn, org.miradi.objects.BaseObject invalidObject) {
java.util.Arrays.sort(content, new org.miradi.dialogs.base.EditableBaseObjectTable.SorterByToString());
... |
private static com.palantir.docker.compose.connection.DockerMachine setupDockerMachineIfLocal() {
java.lang.System.out.println("============== setupDockerMachineIfLocal =====================");
if (cloud.benchflow.testmanager.DockerComposeIT.inLocal) {
return com.palantir.docker.compose.connection.Docke... | private static com.palantir.docker.compose.connection.DockerMachine setupDockerMachineIfLocal() {
if (cloud.benchflow.testmanager.DockerComposeIT.inLocal) {
java.lang.System.out.println("============== setupDockerMachineIfLocal =====================");
return com.palantir.docker.compose.connection.D... |
public boolean onLoadMore(int page, int totalItemsCount) {
if (actionFocus) {
fetchReports(5, page, complexQuery, false, false);
}else {
fetchReports(5, page, buildQuery(true, "report", null), false, false);
}
return true;
} | public boolean onLoadMore(int page, int totalItemsCount) {
if (actionFocus) {
fetchReports(5, page, complexQuery, false);
}else {
fetchReports(5, page, buildQuery(true, "report", null), false);
}
return true;
} |
public void actionPerformed(java.awt.event.ActionEvent e) {
if (jb.isEnabled()) {
imageFile = Chreator.UIModule.UIHandler.getInstance(null).getFileDirectoryByDialog(javax.swing.JFileChooser.FILES_ONLY);
if (!(graphicAreaPanel.setBoardImage(imageFile))) {
javax.swing.JOptionPane.showMessa... | public void actionPerformed(java.awt.event.ActionEvent e) {
if (jb.isEnabled()) {
imageFile = Chreator.UIModule.UIHandler.getInstance(null).getFileDirectoryByDialog(javax.swing.JFileChooser.FILES_ONLY);
if (((imageFile) != null) && (!(graphicAreaPanel.setBoardImage(imageFile)))) {
javax.... |
public boolean insert_address(java.lang.String address) {
final java.lang.String retrieveQuery = "SELECT * FROM " + (DbContract.AddressEntry.TABLE_NAME);
android.database.Cursor data = db.rawQuery(retrieveQuery, null);
if ((data.getCount()) <= 1) {
android.content.ContentValues values = new android.... | public boolean insert_address(java.lang.String address) {
db = this.getWritableDatabase();
final java.lang.String retrieveQuery = "SELECT * FROM " + (DbContract.AddressEntry.TABLE_NAME);
android.database.Cursor data = db.rawQuery(retrieveQuery, null);
if ((data.getCount()) <= 1) {
android.conten... |
public void onItemSelected(android.widget.AdapterView<?> parent, android.view.View view, int position, long id) {
label = parent.getItemAtPosition(position).toString();
pos = position;
android.widget.Toast.makeText(parent.getContext(), ((R.string.dialog_selection) + (label)), Toast.LENGTH_LONG).show();
} | public void onItemSelected(android.widget.AdapterView<?> parent, android.view.View view, int position, long id) {
label = parent.getItemAtPosition(position).toString();
pos = position;
android.widget.Toast.makeText(parent.getContext(), ((getString(R.string.dialog_selection)) + (label)), Toast.LENGTH_LONG).s... |
public static boolean deactivate(users.User user) throws controllers.UserNotAuthorizedException {
if (policy.PolicyHandler.canUserBeDeactivated(user)) {
if (user.deactivate()) {
return utils.HibernateUtils.save(user);
}
}
utils.ForumLogger.errorLog((("The user " + (user.getUserna... | public static boolean deactivate(users.User user) throws controllers.UserNotAuthorizedException {
if (policy.PolicyHandler.canUserBeDeactivated(user)) {
if (user.deactivate()) {
return utils.HibernateUtils.update(user);
}
}
utils.ForumLogger.errorLog((("The user " + (user.getUser... |
public void coinAdded(org.lsmr.vendingmachine.control.CoinReceptacleSimulator receptacle, org.lsmr.vendingmachine.control.Coin coin) {
if (!(hardware.getController().getOutOfOrder())) {
try {
hardware.getCoinReceptacle().returnCoins();
} catch (java.lang.Exception e) {
hardwa... | public void coinAdded(org.lsmr.vendingmachine.control.CoinReceptacleSimulator receptacle, org.lsmr.vendingmachine.control.Coin coin) {
if (hardware.getController().getOutOfOrder()) {
try {
hardware.getCoinReceptacle().returnCoins();
} catch (java.lang.Exception e) {
hardware.... |
public org.joda.time.DateTime getMaxResultTime(org.hibernate.Session session) {
org.hibernate.Criteria criteria = session.createCriteria(getObservationTimeClass()).setProjection(org.hibernate.criterion.Projections.max(AbstractObservation.RESULT_TIME)).add(org.hibernate.criterion.Restrictions.eq(AbstractObservation.... | public org.joda.time.DateTime getMaxResultTime(org.hibernate.Session session) {
org.hibernate.Criteria criteria = session.createCriteria(getObservationTimeClass()).setProjection(org.hibernate.criterion.Projections.max(AbstractObservation.RESULT_TIME)).add(org.hibernate.criterion.Restrictions.eq(AbstractObservation.... |
public java.util.List<de.opitzconsulting.orcas.ot.FieldData> getFiledDataList() {
java.util.Collections.sort(_filedDataList, new java.util.Comparator<de.opitzconsulting.orcas.ot.FieldData>() {
public int compare(de.opitzconsulting.orcas.ot.FieldData pO1, de.opitzconsulting.orcas.ot.FieldData pO2) {
... | public java.util.List<de.opitzconsulting.orcas.ot.FieldData> getFiledDataList() {
java.util.Collections.sort(_filedDataList, new java.util.Comparator<de.opitzconsulting.orcas.ot.FieldData>() {
public int compare(de.opitzconsulting.orcas.ot.FieldData pO1, de.opitzconsulting.orcas.ot.FieldData pO2) {
... |
public void findBest() {
main.arc.domain.Edge[] link = new main.arc.domain.Edge[edges(bestTree.getVertexMax())];
main.java.parnatalOnline.src.Network tree = new main.java.parnatalOnline.src.Network(bestTree.getVertexMax(), bestTree.getDegreeMax());
main.java.parnatalOnline.src.Chronometer.start();
initi... | public void findBest() {
main.arc.domain.Edge[] link = new main.arc.domain.Edge[edges(bestTree.getVertexMax())];
main.java.parnatalOnline.src.Network tree = new main.java.parnatalOnline.src.Network(bestTree.getVertexMax(), bestTree.getDegreeMax());
main.java.parnatalOnline.src.Chronometer.start();
initi... |
public org.arabeyes.itl.hijri.ConvertedDate hDate(java.util.Date date) {
java.util.GregorianCalendar cal = new java.util.GregorianCalendar();
cal.setTime(date);
if ((cal.get(java.util.Calendar.ERA)) != (java.util.GregorianCalendar.AD))
throw new java.lang.IllegalArgumentException("Era other than AD ... | public org.arabeyes.itl.hijri.ConvertedDate hDate(java.util.Date date) {
java.util.GregorianCalendar cal = new java.util.GregorianCalendar();
cal.setTime(date);
if ((cal.get(java.util.Calendar.ERA)) != (java.util.GregorianCalendar.AD))
throw new java.lang.IllegalArgumentException("Era other than AD ... |
protected void prepare() throws at.bitfire.ical4android.CalendarStorageException, at.bitfire.vcard4android.ContactsStorageException {
localCollection = new at.bitfire.davdroid.resource.LocalAddressBook(account, provider);
at.bitfire.davdroid.resource.LocalAddressBook localAddressBook = localAddressBook();
l... | protected boolean prepare() throws at.bitfire.ical4android.CalendarStorageException, at.bitfire.vcard4android.ContactsStorageException {
localCollection = new at.bitfire.davdroid.resource.LocalAddressBook(account, provider);
at.bitfire.davdroid.resource.LocalAddressBook localAddressBook = localAddressBook();
... |
public static void showCalendar(java.lang.String nickname, long id) {
models.User user = models.User.find("byNickname", nickname).first();
models.Calendar calendar = models.Calendar.findById(id);
java.util.List<models.Event> events = calendar.events;
controllers.Date aDate = new controllers.Date();
... | public static void showCalendar(java.lang.String nickname, long id) {
models.User user = models.User.find("byNickname", nickname).first();
models.Calendar calendar = models.Calendar.findById(id);
java.util.List<models.Event> events = calendar.events;
java.util.Date aDate = new java.util.Date();
java... |
public boolean cellUpdate(gol.Cell c) {
int countAliveAdjacent = countAliveAdjacent(c);
if (c.isAlive()) {
if (countAliveAdjacent < 2) {
return false;
}
if ((countAliveAdjacent == 2) || (countAliveAdjacent == 3)) {
return true;
}
if (countAliveAdja... | public boolean cellUpdate(gol.Cell c) {
int countAliveAdjacent = countAliveAdjacent(c);
if (c.isAlive()) {
if (countAliveAdjacent < 2) {
return false;
}
if ((countAliveAdjacent == 2) || (countAliveAdjacent == 3)) {
return true;
}
if (countAliveAdja... |
private void putEdge(org.opendaylight.controller.sal.core.Edge edge) {
int node1 = getNodeConnectorIndex(edge.getHeadNodeConnector());
int node2 = getNodeConnectorIndex(edge.getTailNodeConnector());
this.edgeMatrix[node1][node2] = edge;
ugr.cristian.routeApp.RouteHandler.log.trace(((("Put the edge in th... | private void putEdge(org.opendaylight.controller.sal.core.Edge edge) {
int node1 = getNodeConnectorIndex(edge.getTailNodeConnector());
int node2 = getNodeConnectorIndex(edge.getHeadNodeConnector());
this.edgeMatrix[node1][node2] = edge;
ugr.cristian.routeApp.RouteHandler.log.trace(((("Put the edge in th... |
public static boolean trialDivisionImp(int n) {
if (n == 1)
return false;
int sqrtN = ((int) (java.lang.Math.sqrt(n)));
for (int i = 2; i <= sqrtN; i++) {
if ((n % i) == 0)
return false;
}
return true;
} | public static boolean trialDivisionImp(long n) {
if (n == 1)
return false;
int sqrtN = ((int) (java.lang.Math.sqrt(n)));
for (int i = 2; i <= sqrtN; i++) {
if ((n % i) == 0)
return false;
}
return true;
} |
void handleDatagram(java.net.DatagramPacket datagram) {
this.lastReceivedPacket = java.lang.System.currentTimeMillis();
byte packetID = datagram.getData()[0];
switch (packetID) {
case OPEN_CONNECTION_REQUEST_1 :
this.handlePreConnectionRequest1(datagram);
break;
case ... | void handleDatagram(java.net.DatagramPacket datagram, long time) {
this.lastReceivedPacket = time;
byte packetID = datagram.getData()[0];
switch (packetID) {
case OPEN_CONNECTION_REQUEST_1 :
this.handlePreConnectionRequest1(datagram);
break;
case OPEN_CONNECTION_REQUE... |
public static ge.edu.freeuni.sdp.xo.rooms.data.Repository createInMemoryRepository() {
if ((ge.edu.freeuni.sdp.xo.rooms.data.FakeRepositoryFactory.repo) == null) {
ge.edu.freeuni.sdp.xo.rooms.data.FakeRepositoryFactory.repo = ge.edu.freeuni.sdp.xo.rooms.data.InMemoryRepository.getInstance();
ge.edu.... | public static ge.edu.freeuni.sdp.xo.rooms.data.Repository createInMemoryRepository() {
if ((ge.edu.freeuni.sdp.xo.rooms.data.FakeRepositoryFactory.repo) == null) {
ge.edu.freeuni.sdp.xo.rooms.data.FakeRepositoryFactory.repo = ge.edu.freeuni.sdp.xo.rooms.data.InMemoryRepository.getInstance();
ge.edu.... |
public boolean isAvroSchemaExist(com.ctrip.hermes.meta.entity.Topic topic, int avroid) throws org.unidal.dal.jdbc.DalException {
java.util.List<com.ctrip.hermes.metaservice.model.Schema> schemas = listSchemaMeta(topic);
if ((schemas == null) || ((schemas.size()) == 0)) {
return false;
}
for (com... | public boolean isAvroSchemaExist(com.ctrip.hermes.meta.entity.Topic topic, int avroid) throws org.unidal.dal.jdbc.DalException {
java.util.List<com.ctrip.hermes.metaservice.model.Schema> schemas = listSchemaMeta(topic);
if ((schemas == null) || ((schemas.size()) == 0)) {
return false;
}
for (com... |
public void addKey(java.lang.String key, float defaultValue, float min, float max, java.lang.String comment) {
this.config.load();
java.lang.String category = this.getCategory();
float value = config.getFloat(key, category, defaultValue, min, max, comment);
this.keys.put(key, new java.lang.Float(value))... | public void addKey(java.lang.String key, float defaultValue, float min, float max, java.lang.String comment) {
java.lang.String category = this.getCategory();
float value = config.getFloat(key, category, defaultValue, min, max, comment);
this.keys.put(key, new java.lang.Float(value));
} |
public org.springframework.http.HttpHeaders addTokenToHeaderCookie(java.lang.String token) {
org.springframework.http.HttpHeaders headers = new org.springframework.http.HttpHeaders();
headers.add("Set-Cookie", (((((((tokenHeader) + "=") + token) + "; Path=/") + "; Expires=") + (jwtTokenUtil.getExpirationDateFro... | public org.springframework.http.HttpHeaders addTokenToHeaderCookie(java.lang.String token) {
org.springframework.http.HttpHeaders headers = new org.springframework.http.HttpHeaders();
headers.add("Set-Cookie", ((((((tokenHeader) + "=") + token) + "; Path=/") + "; Expires=") + (jwtTokenUtil.getExpirationDateFrom... |
public void closeFiles() throws java.io.IOException {
if ((m_dataOut) != null) {
m_dataOut.flush();
m_dataOut.close();
}
if ((m_headerOut) != null) {
m_headerOut.flush();
m_headerOut.close();
}
} | public void closeFiles() throws java.io.IOException {
if ((m_dataOut) != null) {
m_dataOut.flush();
m_dataOut.close();
m_dataOut = null;
}
if ((m_headerOut) != null) {
m_headerOut.flush();
m_headerOut.close();
m_headerOut = null;
}
} |
@android.support.annotation.RequiresApi(api = Build.VERSION_CODES.O)
void stopAndroidOBackgroundScan() {
try {
final android.bluetooth.BluetoothManager bluetoothManager = ((android.bluetooth.BluetoothManager) (mContext.getApplicationContext().getSystemService(Context.BLUETOOTH_SERVICE)));
android.bl... | @android.support.annotation.RequiresApi(api = Build.VERSION_CODES.N)
void stopAndroidOBackgroundScan() {
try {
final android.bluetooth.BluetoothManager bluetoothManager = ((android.bluetooth.BluetoothManager) (mContext.getApplicationContext().getSystemService(Context.BLUETOOTH_SERVICE)));
android.bl... |
public void onBindViewHolder(com.example.android.bakingapp.Adapters.RecipeAdapter.RecipeViewHolder holder, int position) {
java.lang.String recipeName = mRecipeList.get(position).name;
int servingsNumber = mRecipeList.get(position).servings;
int stepsNumber = mRecipeList.get(position).stepsList.size();
... | public void onBindViewHolder(com.example.android.bakingapp.Adapters.RecipeAdapter.RecipeViewHolder holder, int position) {
java.lang.String recipeName = mRecipeList.get(position).name;
java.lang.String servingsNumber = java.lang.Integer.toString(mRecipeList.get(position).servings);
java.lang.String stepsNum... |
public boolean apply(fr.istic.iodeman.model.Unavailability a) {
fr.istic.iodeman.model.Person p = a.getPerson();
if (p.equals(participant.getStudent())) {
java.lang.System.out.println(("match found: " + (p.getId())));
}
return ((p.equals(participant.getStudent())) || (p.equals(participant.getFol... | public boolean apply(fr.istic.iodeman.model.Unavailability a) {
fr.istic.iodeman.model.Person p = a.getPerson();
return ((p.equals(participant.getStudent())) || (p.equals(participant.getFollowingTeacher()))) && ((p.getRole()) == (nextPriority.getRole()));
} |
private void requestBodySubTypeFieldAjaxUpdate(org.apache.wicket.ajax.AjaxRequestTarget target) {
if (TypeEnum.Map.getLiteral().equals(this.requestBodySubType)) {
this.requestBodyMapJsonField.setRequired(true);
}else {
this.requestBodyMapJsonField.setRequired(false);
}
if (TypeEnum.Enum.... | private void requestBodySubTypeFieldAjaxUpdate(org.apache.wicket.ajax.AjaxRequestTarget target) {
this.requestBodyMapJsonField.setRequired(false);
if (TypeEnum.Map.getLiteral().equals(this.requestBodySubType)) {
this.requestBodyMapJsonField.setRequired(true);
}
this.requestBodyEnumField.setRequi... |
public void mouseMoved(java.awt.event.MouseEvent e) {
java.lang.System.out.println(("MOUSE at " + (e.getPoint())));
utils.Event event = new utils.Event(utils.Event.MOUSEMOVE, e.getX(), e.getY(), Cfg.frame_width, Cfg.frame_height);
try {
postman.send(event);
} catch (java.io.IOException e1) {
... | public void mouseMoved(java.awt.event.MouseEvent e) {
utils.Event event = new utils.Event(utils.Event.MOUSEMOVE, e.getX(), e.getY(), Cfg.frame_width, Cfg.frame_height);
try {
postman.send(event);
} catch (java.io.IOException e1) {
java.lang.System.err.println(("Fail to send Event " + event))... |
public static boolean hasEntryEvent(org.yakindu.sct.model.sgraph.Vertex state) throws org.eclipse.incquery.runtime.exception.IncQueryException {
for (inc.StatesWithEntryEventMatch statesWithEntryEventMatch : inc.Helper.runOnceEngine.getAllMatches(inc.StatesWithEntryEventMatcher.querySpecification())) {
if (... | public static boolean hasEntryEvent(org.yakindu.sct.model.sgraph.Vertex state) throws org.eclipse.incquery.runtime.exception.IncQueryException {
for (inc.StatesWithEntryEventMatch statesWithEntryEventMatch : inc.Helper.runOnceEngine.getAllMatches(inc.StatesWithEntryEventMatcher.querySpecification())) {
if (... |
public void deregister(cardgame.TriggerAction a) {
for (int i = actions.size(); i >= 0; --i) {
if (a.equals(actions.get(i))) {
actions.remove(i);
}
}
} | public void deregister(cardgame.TriggerAction a) {
for (int i = actions.size(); i > 0;) {
i--;
if (a.equals(actions.get(i))) {
actions.remove(i);
}
}
} |
private int readWithToCharArray(char[] array, int offset, int length) {
int limitedLength = limitLength(length);
char[] chars = charSequence.subSequence(idx, ((idx) + limitedLength)).toString().toCharArray();
java.lang.System.arraycopy(chars, 0, array, offset, chars.length);
idx += chars.length;
ret... | private int readWithToCharArray(char[] array, int offset, int limitedLength) {
char[] chars = charSequence.subSequence(idx, ((idx) + limitedLength)).toString().toCharArray();
java.lang.System.arraycopy(chars, 0, array, offset, chars.length);
idx += chars.length;
return (chars.length) == 0 ? -1 : chars.l... |
private java.util.List<java.lang.String> getSortedDependentCategories(java.util.Set<java.lang.String> originalCategories, com.day.cq.widget.LibraryType type, java.util.List<java.lang.String> existingCategories) {
final java.util.Collection<com.day.cq.widget.ClientLibrary> libraries = htmlLibraryManager.getLibraries... | private java.util.List<java.lang.String> getSortedDependentCategories(java.util.Set<java.lang.String> originalCategories, com.day.cq.widget.LibraryType type, java.util.List<java.lang.String> existingCategories) {
final java.util.Collection<com.day.cq.widget.ClientLibrary> libraries = htmlLibraryManager.getLibraries... |
public void changed(javafx.beans.value.ObservableValue<? extends java.lang.String> observable, java.lang.String oldValue, java.lang.String newValue) {
cb1.editorProperty().get().textProperty().unbind();
cb1.getEditor().setText(newValue.toUpperCase());
liste_autocompletion = utils.AutoCompletion.autocomplete... | public void changed(javafx.beans.value.ObservableValue<? extends java.lang.String> observable, java.lang.String oldValue, java.lang.String newValue) {
cb1.editorProperty().get().textProperty().unbind();
cb1.getEditor().setText(newValue.toUpperCase());
liste_autocompletion = utils.AutoCompletion.autocomplete... |
private java.lang.String getFooter() {
if ((footer) == null) {
setFooter(((("End of " + (getName())) + " ") + (msi.gama.outputs.FileOutput.sdf.format(java.util.Calendar.getInstance().getTime()))));
}
return header;
} | private java.lang.String getFooter() {
if ((footer) == null) {
setFooter(((("End of " + (getName())) + " ") + (msi.gama.outputs.FileOutput.sdf.format(java.util.Calendar.getInstance().getTime()))));
}
return footer;
} |
public java.util.List<com.netbuilder.entities.Address> findByCustomerID(int customerID) {
java.util.ArrayList<com.netbuilder.entities.Address> address = dummyData.getEntityList(new com.netbuilder.entities.Address());
java.util.ArrayList<com.netbuilder.entities.Address> foundaddress = new java.util.ArrayList<com... | public com.netbuilder.entities.Address findByCustomerID(int customerID) {
java.util.ArrayList<com.netbuilder.entities.Address> address = dummyData.getEntityList(new com.netbuilder.entities.Address());
com.netbuilder.entities.Address foundaddress = new com.netbuilder.entities.Address();
for (int i = 0; i < (... |
public static void main(java.lang.String[] args) {
edu.wright.cs.jfiles.database.DatabaseController.resetDatabase();
edu.wright.cs.jfiles.database.DatabaseController.createTables();
int id1 = edu.wright.cs.jfiles.database.DatabaseController.createRole("NONE");
java.lang.System.out.println(("NONE: id=" +... | public static void main(java.lang.String[] args) {
edu.wright.cs.jfiles.database.DatabaseController.createTables();
int id1 = edu.wright.cs.jfiles.database.DatabaseController.createRole("NONE");
java.lang.System.out.println(("NONE: id=" + id1));
int id2 = edu.wright.cs.jfiles.database.DatabaseController... |
public void setLimitingResource(org.libreplan.web.resources.worker.WorkerCRUDController.LimitingResourceEnum option) {
org.libreplan.web.resources.worker.WorkerCRUDController.LOG.info(("WorkerCRUDController.setLimitingResource" + (getWorker())));
org.libreplan.business.resources.entities.Worker worker = getWork... | public void setLimitingResource(org.libreplan.web.resources.worker.WorkerCRUDController.LimitingResourceEnum option) {
org.libreplan.business.resources.entities.Worker worker = getWorker();
if (worker != null) {
worker.setResourceType(org.libreplan.web.resources.worker.WorkerCRUDController.LimitingResou... |
private void startAsyncTask(java.lang.String color, java.lang.String data) {
android.util.Log.d(com.example.anna.colorgame.TrafficGame.TAG, ("Create task.TrafficGame " + color));
com.example.anna.colorgame.ConnectToServer runner = new com.example.anna.colorgame.ConnectToServer(player.getChoosenIP(), delegate);
... | private void startAsyncTask(java.lang.String color, java.lang.String data) {
android.util.Log.d(com.example.anna.colorgame.TrafficGame.TAG, ("Create task.TrafficGame " + color));
com.example.anna.colorgame.ConnectToServer runner = new com.example.anna.colorgame.ConnectToServer(player.getChoosenIP(), delegate);
... |
public void editTrustBundle() {
org.nhind.config.common.Certificate cert = new org.nhind.config.common.Certificate();
if ((selectedTb.getSigningCertificateData()) != null) {
cert.setData(selectedTb.getSigningCertificateData());
}
directService.updateTrustBundle(selectedTb.getId(), selectedTb.get... | public void editTrustBundle() {
org.nhind.config.common.Certificate cert = null;
if ((selectedTb.getSigningCertificateData()) != null) {
cert = new org.nhind.config.common.Certificate();
cert.setData(selectedTb.getSigningCertificateData());
}
directService.updateTrustBundle(selectedTb.ge... |
protected static boolean isIntegratedKaraf(java.io.File location) {
java.io.File libFolder = new java.io.File(((location + (java.io.File.separator)) + "lib"));
java.io.File[] files = libFolder.listFiles((java.io.File dir,java.lang.String name) -> {
return name.toLowerCase().endsWith("-version.jar");
... | protected static boolean isIntegratedKaraf(java.io.File location) {
java.io.File libFolder = new java.io.File(((location + (java.io.File.separator)) + "lib"));
java.io.File[] files = libFolder.listFiles((java.io.File dir,java.lang.String name) -> name.toLowerCase().endsWith("-version.jar"));
return (files.l... |
public void keyReleased(java.awt.event.KeyEvent e) {
int keyCode = e.getKeyCode();
int location = keysPressed.indexOf(keyCode);
if (location >= 0) {
keysPressed.remove(location);
}
for (com.github.EnderCrypt.CLib.event.CLibKeylistener keyListener : keyListeners) {
keyListener.keyPres... | public void keyReleased(java.awt.event.KeyEvent e) {
int keyCode = e.getKeyCode();
int location = keysPressed.indexOf(keyCode);
if (location >= 0) {
keysPressed.remove(location);
}
for (com.github.EnderCrypt.CLib.event.CLibKeylistener keyListener : keyListeners) {
keyListener.keyRele... |
private static com.google.gson.JsonObject getJSONEntityAsJsonObject(com.cloudant.http.HttpConnection connection, java.net.URI uri) {
java.nio.charset.Charset charset = com.cloudant.tests.UnicodeTest.getPlainTextEntityCharset(connection, uri);
java.io.InputStream stream;
try {
stream = connection.res... | private static com.google.gson.JsonObject getJSONEntityAsJsonObject(com.cloudant.http.HttpConnection connection, java.net.URI uri) {
java.nio.charset.Charset charset = com.cloudant.tests.UnicodeTest.getPlainTextEntityCharset(connection);
java.io.InputStream stream;
try {
stream = connection.response... |
public javax.ws.rs.core.Response getWeatherInCity(@com.vlad.rest.PathParam(value = "city")
java.lang.String city) {
java.util.Map<java.lang.String, java.lang.Object> headers = new java.util.HashMap<java.lang.String, java.lang.Object>();
headers.put("q", city);
headers.put("appid", com.vlad.rest.WeatherEndpo... | public javax.ws.rs.core.Response getWeatherInCity(@com.vlad.rest.PathParam(value = "city")
java.lang.String city) {
java.util.Map<java.lang.String, java.lang.Object> headers = new java.util.HashMap<java.lang.String, java.lang.Object>();
headers.put("q", city);
headers.put("appid", com.vlad.rest.WeatherEndpo... |
public void onClick(android.view.View v) {
mViewPagerAdapter.removeItem(mVideoShowPager.getCurrentItem());
mViewPagerAdapter.notifyDataSetChanged();
if ((mViewPagerAdapter.getCount()) <= 0) {
return ;
}
if ((mVideoChangedListener) != null) {
mVideoChangedListener.onChanged(((com.v2te... | public void onClick(android.view.View v) {
if ((mViewPagerAdapter.getCount()) <= 1) {
return ;
}
mViewPagerAdapter.removeItem(mVideoShowPager.getCurrentItem());
mViewPagerAdapter.notifyDataSetChanged();
if ((mViewPagerAdapter.getCount()) <= 0) {
return ;
}
if ((mVideoChangedL... |
protected void setConfiguration(cz.cuni.mff.xrg.uv.boost.extensions.FaultTolerance.Configuration_V1 conf) throws eu.unifiedviews.dpu.config.DPUConfigException {
checkEnabled.setValue(conf.isEnabled());
txtRetryCount.setValue(java.lang.Integer.toString(conf.maxRetryCount));
final java.lang.StringBuilder exce... | protected void setConfiguration(cz.cuni.mff.xrg.uv.boost.extensions.FaultTolerance.Configuration_V1 conf) throws eu.unifiedviews.dpu.config.DPUConfigException {
checkEnabled.setValue(conf.isEnabled());
txtRetryCount.setValue(java.lang.Integer.toString(conf.maxRetryCount));
final java.lang.StringBuilder exce... |
public void execute(android.app.Activity activity, com.mediator.model.VideoEntry videoEntry) {
this.context = context;
this.videoEntry = videoEntry;
com.squareup.otto.Bus bus = new com.squareup.otto.Bus();
bus.register(this);
com.mediator.tasks.TaskBuildSubtitleFile taskBuildSubtitleFile = new com.m... | public void execute(android.app.Activity activity, com.mediator.model.VideoEntry videoEntry) {
this.context = activity;
this.videoEntry = videoEntry;
com.squareup.otto.Bus bus = new com.squareup.otto.Bus();
bus.register(this);
com.mediator.tasks.TaskBuildSubtitleFile taskBuildSubtitleFile = new com.... |
public void sendCoalition(ro.ieat.soso.core.coalitions.Coalition c, long time) {
if ((c.getCurrentETA()) == 0L) {
c.setCurrentETA(time);
}
if ((c.getId()) == 0)
c.setId(((ro.ieat.soso.reasoning.CoalitionReasoner.c_id)++));
coalitionClient.sendCoalition(c);
} | public void sendCoalition(ro.ieat.soso.core.coalitions.Coalition c, long time) {
if ((c.getCurrentETA()) == null) {
c.setCurrentETA(time);
}
if ((c.getId()) == 0)
c.setId(((ro.ieat.soso.reasoning.CoalitionReasoner.c_id)++));
coalitionClient.sendCoalition(c);
} |
public void onSuccess(java.lang.Boolean result) {
expenseLine.removeFromParent();
saleExpensesList.expenses.remove(expense);
((org.iabako.client.ui.form.business.sale.make.SaleMakeForm) (parentForm)).saleMakeProductServiceChoice.saleTotalTable.calculateAmounts();
org.iabako.client.ui.layout.widget.valid... | public void onSuccess(java.lang.Void result) {
expenseLine.removeFromParent();
saleExpensesList.expenses.remove(expense);
((org.iabako.client.ui.form.business.sale.make.SaleMakeForm) (parentForm)).saleMakeProductServiceChoice.saleTotalTable.calculateAmounts();
org.iabako.client.ui.layout.widget.validati... |
public void handle(javafx.event.ActionEvent e) {
java.lang.System.out.println((("Downloading " + (serverSelected)) + "..."));
sample.FileShareClient fsc = new sample.FileShareClient();
fsc.Download(localFolder.getAbsolutePath(), serverSelected);
java.lang.System.out.println(((("Uploaded successfully to ... | public void handle(javafx.event.ActionEvent e) {
if ((serverSelected) != null) {
java.lang.System.out.println((("Downloading " + (serverSelected)) + "..."));
sample.FileShareClient fsc = new sample.FileShareClient();
fsc.Download(localFolder.getAbsolutePath(), serverSelected);
refres... |
public org.ballerinalang.model.values.BValue[] execute(org.ballerinalang.bre.Context ctx) {
org.ballerinalang.model.values.BDataTable dataTable = ((org.ballerinalang.model.values.BDataTable) (getRefArgument(ctx, 0)));
java.lang.String rootWrapper = null;
java.lang.String rowWrapper = null;
rootWrapper =... | public org.ballerinalang.model.values.BValue[] execute(org.ballerinalang.bre.Context ctx) {
org.ballerinalang.model.values.BDataTable dataTable = ((org.ballerinalang.model.values.BDataTable) (getRefArgument(ctx, 0)));
java.lang.String rootWrapper = null;
java.lang.String rowWrapper = null;
rootWrapper =... |
public java.lang.Double getAvarageGrade() {
double avarageGrade = 0;
if ((subjects) != null) {
double allGrades = 0;
double numberOfGrades = 0;
for (ch.grademasters.model.Subject subject : subjects) {
allGrades = allGrades + (subject.getAvarageGrade());
numberOfGr... | public double getAvarageGrade() {
double avarageGrade = 0.0;
if ((subjects) != null) {
double allGrades = 0.0;
double numberOfGrades = 0.0;
for (ch.grademasters.model.Subject subject : subjects) {
allGrades = allGrades + (subject.getAvarageGrade());
numberOfGrades... |
public void run() throws java.lang.Exception {
com.gargoylesoftware.htmlunit.WebClient webClient = context.getWebClient();
if ((context) == null) {
java.lang.System.out.println("You have not logged in yet!");
}else {
webClient.close();
context.logout();
java.lang.System.out.p... | public void run() throws java.lang.Exception {
com.gargoylesoftware.htmlunit.WebClient webClient = context.getWebClient();
if (webClient == null) {
java.lang.System.out.println("You have not logged in yet!");
}else {
webClient.close();
context.logout();
java.lang.System.out.p... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.