buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public void updateProvisionedDiskSpaceValue() {
com.bitwisekaizen.sdss.agent.config.AgentDiskSpaceHealthIndicator.LOGGER.info("Running disk space checker");
java.lang.Iterable<com.bitwisekaizen.sdss.agent.entity.IscsiTargetEntity> targetEntities = iscsiTargetEntityRepository.findAll();
long diskSpaceInMb = ... | public void updateProvisionedDiskSpaceValue() {
java.lang.Iterable<com.bitwisekaizen.sdss.agent.entity.IscsiTargetEntity> targetEntities = iscsiTargetEntityRepository.findAll();
long diskSpaceInMb = 0;
for (com.bitwisekaizen.sdss.agent.entity.IscsiTargetEntity iscsiTargetEntity : targetEntities) {
d... |
public void close() {
int n = (pages.size()) - 1;
if (n > (-1)) {
for (int i = 0; i < n; i++) {
release(pages.getQuick(i));
}
releaseLast(pages.getQuick(n));
}
pages.clear();
appendPointer = java.lang.Long.MIN_VALUE;
pageHi = java.lang.Long.MIN_VALUE;
base... | public void close() {
int n = (pages.size()) - 1;
if (n > (-1)) {
for (int i = 0; i < n; i++) {
release(pages.getQuick(i));
}
releaseLast(pages.getQuick(n));
}
pages.clear();
appendPointer = -1;
pageHi = -1;
baseOffset = 1;
clearHotPage();
} |
public void mouseReleased(java.awt.event.MouseEvent me) {
if (isSelected) {
isSelected = false;
}else {
shapes.get(((shapes.size()) - 1)).x2 = me.getX();
shapes.get(((shapes.size()) - 1)).y2 = me.getY();
repaint();
createNewitem();
}
} | public void mouseReleased(java.awt.event.MouseEvent me) {
if (isSelected) {
}else {
shapes.get(((shapes.size()) - 1)).x2 = me.getX();
shapes.get(((shapes.size()) - 1)).y2 = me.getY();
repaint();
createNewitem();
}
} |
public boolean checkBST(CheckIfBST.TreeNode root, int maxValue, int minValue) {
if (root == null)
return true;
if (((root.key) > maxValue) || ((root.key) < minValue))
return false;
if ((!(checkBST(root.left, root.key, minValue))) || (checkBST(root.right, maxValue, root.key)))
... | public boolean checkBST(CheckIfBST.TreeNode root, int maxValue, int minValue) {
if (root == null)
return true;
if (((root.key) > maxValue) || ((root.key) < minValue))
return false;
if ((!(checkBST(root.left, root.key, minValue))) || (!(checkBST(root.right, maxValue, root.key))))
... |
ggTillVaraIMetod() {
kassa.Kvitto k = skapaTomtK();
kassa.Vara v = skapaTomV();
k.l = ggTillVara(skapaTomV(), 1);
assert k.varaFinns(v);
for (int i = 0; i < 7; i++) {
k.l = ggTillVara(skapaTomV());
}
assert k.getTotalM = (ngdVaror()) == 8;
} | ggTillVaraIMetod() {
kassa.Kvitto k = skapaTomtK();
kassa.Vara v = skapaTomV();
k.l = ggTillVara(skapaTomV(), 1);
assertTrue(k.varaFinns(v));
for (int i = 0; i < 7; i++) {
k.l = ggTillVara(skapaTomV());
}
assertTrue((k.getTotalM = (ngdVaror()) == 8));
} |
public void postMessage(java.lang.String url, java.lang.String secret, java.lang.String hmac, java.lang.String contentType, java.lang.String content) {
java.lang.String signature = br.com.minone.webhooks.security.SignatureService.newInstance(HmacAlgorithm.HMAC_SHA1).calculateHMAC(secret, content);
if (signature... | public void postMessage(java.lang.String url, java.lang.String secret, java.lang.String hmac, java.lang.String contentType, java.lang.String content) {
java.lang.String signature = br.com.minone.webhooks.security.SignatureService.newInstance(HmacAlgorithm.HMAC_SHA1).calculateHMAC(secret, content);
if (!(signatu... |
public javax.sql.DataSource dataSource() {
com.vincent.SSHProject.configuration.DBConfig.logger.info("dataSource");
org.springframework.jdbc.datasource.DriverManagerDataSource dataSource = new org.springframework.jdbc.datasource.DriverManagerDataSource();
dataSource.setDriverClassName(environment.getRequire... | public javax.sql.DataSource dataSource() {
org.springframework.jdbc.datasource.DriverManagerDataSource dataSource = new org.springframework.jdbc.datasource.DriverManagerDataSource();
dataSource.setDriverClassName(environment.getRequiredProperty("jdbc.driverClassName"));
dataSource.setUrl(environment.getRequ... |
public android.app.Dialog onCreateDialog(android.os.Bundle savedInstanceState) {
final java.util.Calendar c = java.util.Calendar.getInstance();
int hour = c.get(java.util.Calendar.HOUR_OF_DAY);
int minute = c.get(java.util.Calendar.MINUTE);
return new android.app.TimePickerDialog(getActivity(), this, ho... | public android.app.Dialog onCreateDialog(android.os.Bundle savedInstanceState) {
final java.util.Calendar c = java.util.Calendar.getInstance();
int hour = c.get(java.util.Calendar.HOUR_OF_DAY);
int minute = c.get(java.util.Calendar.MINUTE);
return new android.app.TimePickerDialog(getActivity(), this, ho... |
public void addPreference(de.prob2.ui.project.Preference preference) {
java.util.List<de.prob2.ui.project.Preference> preferencesList = this.getPreferences();
preferencesList.add(preference);
this.set(new de.prob2.ui.project.Project(this.getName(), this.getDescription(), this.getMachines(), preferencesList,... | public void addPreference(de.prob2.ui.project.Preference preference) {
java.util.List<de.prob2.ui.project.Preference> preferencesList = this.getPreferences();
preferencesList.add(preference);
this.update(new de.prob2.ui.project.Project(this.getName(), this.getDescription(), this.getMachines(), preferencesLi... |
private int getCurrentRecordNumber() throws java.sql.SQLException {
if (cursor.getResultSet().isBeforeFirst()) {
throw new org.apache.drill.jdbc.InvalidCursorStateSqlException("Result set cursor is positioned before all rows. Call next() first.");
}else
if (cursor.getResultSet().isAfterLast()) ... | private int getCurrentRecordNumber() throws java.sql.SQLException {
if (cursor.getResultSet().isAfterLast()) {
throw new org.apache.drill.jdbc.InvalidCursorStateSqlException("Result set cursor is already positioned past all rows.");
}else
if (cursor.getResultSet().isBeforeFirst()) {
... |
private boolean updateLastRegistrationTime() {
long currentTime = java.lang.System.currentTimeMillis();
if (isTimeWindowEmpty(currentTime)) {
if (registrationWeakLock.compareAndSet(false, true)) {
if (isTimeWindowEmpty(currentTime)) {
lastRegistrationTime = currentTime;
... | private boolean updateLastRegistrationTime() {
long currentTime = java.lang.System.currentTimeMillis();
boolean result = false;
if (isTimeWindowEmpty(currentTime)) {
if (registrationWeakLock.compareAndSet(false, true)) {
if (isTimeWindowEmpty(currentTime)) {
lastRegistrat... |
public void updateProperties(java.lang.String scenarioName) throws java.io.FileNotFoundException, java.io.IOException {
java.util.Properties properties = new java.util.Properties();
properties.load(new java.io.FileReader(new java.io.File("conf/tester.properties")));
properties.setProperty("BaseTemplateScena... | public void updateProperties(java.lang.String scenarioName) throws java.io.FileNotFoundException, java.io.IOException {
java.util.Properties properties = new java.util.Properties();
properties.load(new java.io.FileReader(new java.io.File("conf/tester.properties")));
properties.setProperty("BaseTemplateScena... |
public void deleteUserById(java.lang.String id) throws com.insframe.server.error.UserAccessException {
@java.lang.SuppressWarnings(value = "unused")
boolean noReferenceFound;
if ((userRepository.findById(id)) == null)
throw new com.insframe.server.error.UserAccessException(com.insframe.server.error.... | public void deleteUserById(java.lang.String id) throws com.insframe.server.error.UserAccessException {
if ((userRepository.findById(id)) == null)
throw new com.insframe.server.error.UserAccessException(com.insframe.server.error.UserAccessException.USERID_NOT_FOUND, com.insframe.server.error.UserAccessExcept... |
public void onClick(android.view.View v) {
try {
com.google.android.gms.maps.model.LatLng northEast = new com.google.android.gms.maps.model.LatLng(52.648079, 13.645263);
com.google.android.gms.maps.model.LatLng southWest = new com.google.android.gms.maps.model.LatLng(52.395659, 13.08553);
co... | public void onClick(android.view.View v) {
try {
com.google.android.gms.maps.model.LatLng northEast = new com.google.android.gms.maps.model.LatLng(52.648079, 13.645263);
com.google.android.gms.maps.model.LatLng southWest = new com.google.android.gms.maps.model.LatLng(52.395659, 13.08553);
co... |
public org.springframework.http.ResponseEntity<nl.bos.entities.Pin> ledBlink() {
final nl.bos.controllers.GpioPinDigitalOutput gpioPin = initGpioPin();
if (gpioPin.isLow()) {
gpioPin.blink(1000);
log.info("LED IS BLINKING");
pin.setState(gpioPin.getState());
}
gpio.unprovisionPin... | public org.springframework.http.ResponseEntity<nl.bos.entities.Pin> ledBlink() {
final nl.bos.controllers.GpioPinDigitalOutput gpioPin = initGpioPin();
if (gpioPin.isLow()) {
gpioPin.blink(1000);
log.info("LED IS BLINKING");
pin.setState(gpioPin.getState());
}
gpio.unprovisionPin... |
public int getCurrentPosition() {
switch (mState) {
case systems.byteswap.publicstream.MediaService.MEDIA_STATE_PLAYING :
try {
int ret = systems.byteswap.publicstream.MediaService.safeLongToInt(mMediaPlayer.getTime());
return ret;
} catch (java.lang.N... | public int getCurrentPosition() {
switch (mState) {
case systems.byteswap.publicstream.MediaService.MEDIA_STATE_PLAYING :
try {
return systems.byteswap.publicstream.MediaService.safeLongToInt(mMediaPlayer.getTime());
} catch (java.lang.NullPointerException e) {
... |
private void writeFile(java.io.File outputFile) throws javax.xml.transform.TransformerException {
javax.xml.transform.TransformerFactory tFactory = javax.xml.transform.TransformerFactory.newInstance();
javax.xml.transform.Transformer transformer = tFactory.newTransformer();
javax.xml.transform.dom.DOMSource... | public void writeFile(java.io.File outputFile) throws javax.xml.transform.TransformerException {
javax.xml.transform.TransformerFactory tFactory = javax.xml.transform.TransformerFactory.newInstance();
javax.xml.transform.Transformer transformer = tFactory.newTransformer();
javax.xml.transform.dom.DOMSource ... |
public GameComponents.Riddle GetUserRiddleById(java.lang.Integer i_Id, GameComponents.User i_User) {
GameComponents.Team team = getPlayerTeam(i_User);
if (m_IsTeamGame) {
return m_Levels.get(team.GetTeamRiddleLevel()).GetRiddleById(i_Id);
}
return m_Levels.get(team.GetPlayerRiddleLevel(i_User)).... | public GameComponents.Riddle GetUserRiddleById(java.lang.Integer i_Id, GameComponents.User i_User) {
GameComponents.Team team = getPlayerTeam(i_User);
if (m_IsTeamGame) {
return m_Levels.get(team.GetTeamRiddleLevel()).GetRiddleById(i_Id);
}
return m_Levels.get(team.GetPlayerRiddleLevel(i_User, m... |
private void ensureCapacity() {
if ((edu.cpp.cs.cs240.prog_assgmnt_3.UnboundedList.size()) == (values.length)) {
java.lang.Object[] newArray = new java.lang.Object[(values.length) * 2];
for (int i = 0; i < (values.length); i++) {
newArray[i] = values[(i + ((start) % (values.length)))];
... | private void ensureCapacity() {
if ((edu.cpp.cs.cs240.prog_assgmnt_3.UnboundedList.size()) == (values.length)) {
java.lang.Object[] newArray = new java.lang.Object[(values.length) * 2];
for (int i = 0; i < (values.length); i++) {
newArray[i] = values[((i + (start)) % (values.length))];
... |
public void addShare(de.hsaugsburg.ShareGame.Assets.Share share, int count) {
int shareItemIndex = findShareItem(share);
if (shareItemIndex >= 0) {
shareItems[shareItemIndex].add(count);
return ;
}
checkAddSize();
shareItems[shareItemCount] = new de.hsaugsburg.ShareGame.Assets.ShareI... | public void addShare(de.hsaugsburg.ShareGame.Assets.Share share, int count) {
int shareItemIndex = findShareItem(share);
if (shareItemIndex >= 0) {
shareItems[shareItemIndex].add(count);
return ;
}
checkAddSize();
shareItems[shareItemCount] = new de.hsaugsburg.ShareGame.Assets.ShareI... |
public void putMondrianSchema(java.io.InputStream dataInputStream, com.sun.jersey.core.header.FormDataContentDisposition schemaFileInfo, java.lang.String catalogName, java.lang.String origCatalogName, java.lang.String datasourceName, boolean overwrite, boolean xmlaEnabledFlag, java.lang.String parameters, org.pentaho.p... | public void putMondrianSchema(java.io.InputStream dataInputStream, com.sun.jersey.core.header.FormDataContentDisposition schemaFileInfo, java.lang.String catalogName, java.lang.String origCatalogName, java.lang.String datasourceName, boolean overwrite, boolean xmlaEnabledFlag, java.lang.String parameters, org.pentaho.p... |
protected void init(java.util.Map<java.lang.Integer, com.googlecode.kanbanik.client.api.Dtos.PermissionDto> permissionDtoMap) {
this.permissionDtoMap = permissionDtoMap;
super.init(permissionDtoMap);
permissions.initialize();
fillPermissionsList(permissions);
add(permissions);
getCheckBox().addV... | protected void init(java.util.Map<java.lang.Integer, com.googlecode.kanbanik.client.api.Dtos.PermissionDto> permissionDtoMap) {
this.permissionDtoMap = permissionDtoMap;
super.init(permissionDtoMap);
permissions.initialize();
fillPermissionsList(permissions);
add(permissions);
updateContentEnabl... |
public static com.jukusoft.libgdx.rpg.engine.entity.Entity createParticlesEntity(com.jukusoft.libgdx.rpg.engine.entity.EntityManager ecs, java.lang.String particleFile, com.badlogic.gdx.graphics.Texture lightMap, float x, float y) {
com.jukusoft.libgdx.rpg.engine.entity.Entity entity = new com.jukusoft.libgdx.rpg.e... | public static com.jukusoft.libgdx.rpg.engine.entity.Entity createParticlesEntity(com.jukusoft.libgdx.rpg.engine.entity.EntityManager ecs, java.lang.String particleFile, com.badlogic.gdx.graphics.Texture lightMap, float x, float y) {
com.jukusoft.libgdx.rpg.engine.entity.Entity entity = new com.jukusoft.libgdx.rpg.e... |
private void multiply(double d, javax.swing.JTextField[] fields, java.util.Stack<java.lang.Double> stack) {
if (emptyStack(stack))
return ;
fields[0].setText(java.lang.Double.toString(((stack.pop()) * d)));
resetStack(fields, stack);
} | private void multiply(double d, javax.swing.JTextField[] fields, java.util.Stack<java.lang.Double> stack) {
if (stack.isEmpty())
return ;
fields[0].setText(java.lang.Double.toString(((stack.pop()) * d)));
resetStack(fields, stack);
} |
private void sendMessageToChatBot(java.lang.String containerId, java.lang.String status) {
fr.aumjaud.antoine.services.common.http.HttpResponse httpResponse = httpHelper.postData(properties.getProperty("api-synology-chatbot.url"), ((("Deploy " + status) + " of ") + containerId), properties.getProperty("api-synology... | private void sendMessageToChatBot(java.lang.String containerId, java.lang.String status) {
fr.aumjaud.antoine.services.common.http.HttpResponse httpResponse = httpHelper.postData(properties.getProperty("api-synology-chatbot.url"), properties.getProperty("api-synology-chatbot.secure-key", ((("Deploy " + status) + " ... |
public void testInvalidChoice() throws org.quattor.pan.exceptions.SyntaxException {
org.quattor.pan.template.Context context = new org.quattor.pan.template.BuildContext();
java.util.List<org.quattor.pan.dml.data.Element> args = new java.util.ArrayList<org.quattor.pan.dml.data.Element>();
args.add(org.quatto... | public void testInvalidChoice() throws org.quattor.pan.exceptions.SyntaxException {
org.quattor.pan.template.Context context = new org.quattor.pan.template.BuildContext();
java.util.List<org.quattor.pan.dml.data.Element> args = new java.util.ArrayList<org.quattor.pan.dml.data.Element>();
args.add(org.quatto... |
public static void ReadMovieParameter(java.lang.String filepath) {
java.io.BufferedReader br = null;
java.lang.String strLine = "";
try {
br = new java.io.BufferedReader(new java.io.FileReader(filepath));
while ((strLine = br.readLine()) != null) {
java.lang.System.out.println(st... | public static void ReadMovieParameter(java.lang.String filepath) {
java.io.BufferedReader br = null;
java.lang.String strLine = "";
try {
br = new java.io.BufferedReader(new java.io.FileReader(filepath));
while ((strLine = br.readLine()) != null) {
eu.ooti.forumlite.String_show.s... |
public <T> com.applidium.graphqlient.call.QLResponse<T> send(com.applidium.graphqlient.QLRequest request) throws com.applidium.graphqlient.exceptions.QLException {
com.applidium.graphqlient.call.QLCall<T> call = call(request);
com.applidium.graphqlient.call.QLResponse<T> response = send(call);
if ((response... | public <T> com.applidium.graphqlient.call.QLResponse<T> send(com.applidium.graphqlient.QLRequest request) throws com.applidium.graphqlient.exceptions.QLException {
com.applidium.graphqlient.call.QLCall<T> call = call(request);
com.applidium.graphqlient.call.QLResponse<T> response = send(call);
if ((response... |
public com.axelor.apps.account.db.Account getInternalBankToBankAccount(com.axelor.apps.account.db.AccountConfig accountConfig) throws com.axelor.exception.AxelorException {
if ((accountConfig.getExternalBankToBankAccount()) == null) {
throw new com.axelor.exception.AxelorException(java.lang.String.format(co... | public com.axelor.apps.account.db.Account getInternalBankToBankAccount(com.axelor.apps.account.db.AccountConfig accountConfig) throws com.axelor.exception.AxelorException {
if ((accountConfig.getInternalBankToBankAccount()) == null) {
throw new com.axelor.exception.AxelorException(java.lang.String.format(co... |
public java.util.List<java.lang.Integer> getSelectedItems() {
java.util.List<java.lang.Integer> items = new java.util.ArrayList(selectedItems.size());
for (int i = 0; i < (selectedItems.size()); ++i) {
items.add(selectedItems.keyAt(i));
}
return items;
} | public java.util.List<java.lang.Integer> getSelectedItems() {
java.util.List<java.lang.Integer> items = new java.util.ArrayList<java.lang.Integer>(selectedItems.size());
for (int i = 0; i < (selectedItems.size()); ++i) {
items.add(selectedItems.keyAt(i));
}
return items;
} |
public void startInstances(java.util.List<java.lang.String> instances) {
if (!(isConnected))
return ;
if ((instances.size()) == 0) {
it.polimi.modaclouds.scalingrules.utils.CloudMLNew.logger.debug("No instance to start.");
return ;
}
it.polimi.modaclouds.scalingrules.utils.C... | private void startInstances(java.util.List<java.lang.String> instances) {
if (!(isConnected))
return ;
if ((instances.size()) == 0) {
it.polimi.modaclouds.scalingrules.utils.CloudMLNew.logger.debug("No instance to start.");
return ;
}
it.polimi.modaclouds.scalingrules.utils.... |
public boolean onContextItemSelected(android.view.MenuItem item) {
java.util.UUID uuid = mTaskViewAdapter.getUUID();
mDataManager.changeTaskStatus(uuid, item.getTitle().toString());
android.content.Intent intent = new android.content.Intent(ShowTaskFragment.CUSTOM_INTENT_FILTER);
android.support.v4.cont... | public boolean onContextItemSelected(android.view.MenuItem item) {
java.util.UUID uuid = mTaskViewAdapter.getUUID();
if (uuid != null) {
mDataManager.changeTaskStatus(uuid, item.getTitle().toString());
android.content.Intent intent = new android.content.Intent(ShowTaskFragment.CUSTOM_INTENT_FILT... |
private void updateSelectionPosition() {
int selectedPosition = ((int) (((-(mAngle)) + (((-0.5) * (java.lang.Math.signum(mAngle))) * (mItemAngle))) / (mItemAngle)));
int currentSelectedPosition = getSelectedPosition();
if (selectedPosition != currentSelectedPosition) {
setSelectedPosition(selectedPo... | private void updateSelectionPosition() {
int position = ((int) (((-(mAngle)) + (((-0.5) * (java.lang.Math.signum(mAngle))) * (mItemAngle))) / (mItemAngle)));
setSelectedPosition(position);
} |
protected void validateComponentTree(final org.hdiv.validation.ValidationContext context, final javax.faces.component.UIComponent component) {
validateComponent(context, component);
if (context.hasErrors()) {
return ;
}
java.util.Iterator<javax.faces.component.UIComponent> it = component.getFace... | protected void validateComponentTree(final org.hdiv.validation.ValidationContext context, final javax.faces.component.UIComponent component) {
validateComponent(context, component);
java.util.Iterator<javax.faces.component.UIComponent> it = component.getFacetsAndChildren();
while (it.hasNext()) {
ja... |
protected void onResume() {
super.onResume();
if ((mCamera) == null) {
try {
mCamera = android.hardware.Camera.open();
} catch (java.lang.Exception e) {
e.printStackTrace();
android.widget.Toast.makeText(this, "启动照相机失败,请检查设备并打开权限", Toast.LENGTH_SHORT).show();
... | protected void onResume() {
super.onResume();
try {
mCamera = android.hardware.Camera.open();
} catch (java.lang.Exception e) {
e.printStackTrace();
android.widget.Toast.makeText(this, "启动照相机失败,请检查设备并打开权限", Toast.LENGTH_SHORT).show();
}
cameraCurrentlyLocked = defaultCameraId... |
private void heapify(TreapNode node) {
TreapNode parent = node.parent;
if ((node != (root)) && ((node.priority) < (parent.priority))) {
if ((parent.left) == node) {
rotateRight(node.parent);
heapify(node);
}
if ((parent.right) == node) {
rotateLeft(nod... | private void heapify(TreapNode node) {
TreapNode parent = node.parent;
while ((node != (root)) && ((node.priority) < (parent.priority))) {
if ((parent.left) == node) {
rotateRight(node.parent);
}
if ((parent.right) == node) {
rotateLeft(node.parent);
}
... |
public void uncaughtException(java.lang.Thread thread, java.lang.Throwable ex) {
java.lang.String content = com.tns.ErrorReport.getErrorMessage(ex);
com.tns.Platform.passUncaughtExceptionToJsNative(ex, content);
if (com.tns.Platform.IsLogEnabled)
android.util.Log.e(com.tns.Platform.DEFAULT_LOG_TAG, ... | public void uncaughtException(java.lang.Thread thread, java.lang.Throwable ex) {
java.lang.String content = com.tns.ErrorReport.getErrorMessage(ex);
if (com.tns.Platform.IsLogEnabled)
android.util.Log.e(com.tns.Platform.DEFAULT_LOG_TAG, ("Uncaught Exception Message=" + (ex.getMessage())));
bool... |
public static byte[] StringHexToByteArray(java.lang.String x) throws java.lang.Exception {
if (!(x.startsWith("0x")))
throw new java.lang.Exception("Incorrect hex syntax");
x = x.substring(2);
return org.spongycastle.util.encoders.Hex.decode(x);
} | public static byte[] StringHexToByteArray(java.lang.String x) throws java.lang.Exception {
if (!(x.startsWith("0x")))
throw new java.lang.Exception("Incorrect hex syntax");
x = x.substring(2);
if (((x.length()) % 2) != 0)
x = "0" + x;
return org.spongycastle.util.encoders.Hex.d... |
public synchronized java.lang.String getNextReferenceForTransaction(pl.morecraft.dev.settler.domain.Transaction transaction) {
java.lang.String sequenceName = "T" + (((transaction.getCategories()) == null) || (transaction.getCategories().isEmpty()) ? "RNS" : transaction.getCategories().get(0).getCode());
java.l... | public synchronized java.lang.String getNextReferenceForTransaction(pl.morecraft.dev.settler.domain.Transaction transaction) {
java.lang.String sequenceName = "T" + (((transaction.getCategories()) == null) || (transaction.getCategories().isEmpty()) ? "RNS" : transaction.getCategories().get(0).getCode());
java.l... |
private void recordUriCommand(java.net.URI uri, java.lang.String command) {
java.io.Writer writer;
try {
writer = new java.io.FileWriter(this.redeployDataset.toFile(), true);
org.eclipse.virgo.kernel.deployer.core.internal.recovery.DeployerRecoveryLog.recordUriCommand(writer, uri, command);
... | private void recordUriCommand(java.net.URI uri, java.lang.String command) {
try (java.io.Writer writer = new java.io.FileWriter(this.redeployDataset.toFile(), true)) {
org.eclipse.virgo.kernel.deployer.core.internal.recovery.DeployerRecoveryLog.recordUriCommand(writer, uri, command);
writer.close();... |
public final boolean isOpponentThinking() {
if ((getGame()) == null) {
throw new java.lang.IllegalStateException();
}
return ((getGame().getGameStatus()) == (Game.Status.ALIVE)) && (((getGameMode()) == (org.empyrn.darkknight.GameMode.ANALYSIS)) || (!(isPlayerTurn())));
} | public boolean isOpponentThinking() {
return (((getGame()) != null) && ((getGame().getGameStatus()) == (Game.Status.ALIVE))) && (((getGameMode()) == (org.empyrn.darkknight.GameMode.ANALYSIS)) || (!(isPlayerTurn())));
} |
protected boolean commitCustomer(customerdb.Customer c) {
java.util.Random r = new java.util.Random();
int key = r.nextInt(100001);
boolean wasCommitted = false;
if (customerList.containsKey(key)) {
commitCustomer(c);
}else
if (!(customerList.containsKey(key))) {
c.setKey... | protected void commitCustomer(customerdb.Customer c) {
java.util.Random r = new java.util.Random();
while (true) {
int key = r.nextInt(100001);
if (!(customerList.containsKey(key))) {
c.setKey(key);
customerList.put(key, c);
return ;
}
}
} |
public void deleteBlockSession(nyc.c4q.rosmaryfc.focus_app.BlockSession blockSession) {
android.database.sqlite.SQLiteDatabase db = this.getWritableDatabase();
db.delete(BlockSessionContract.TABLE_BLOCK_SESSIONS, ((BlockSessionContract.Columns.BLOCK_ID) + " = ?"), new java.lang.String[]{ java.lang.String.valueO... | public void deleteBlockSession(nyc.c4q.rosmaryfc.focus_app.BlockSession blockSession) {
android.database.sqlite.SQLiteDatabase db = this.getWritableDatabase();
db.delete(BlockSessionContract.TABLE_BLOCK_SESSIONS, ((BlockSessionContract.Columns.BLOCK_ID) + " = ?"), new java.lang.String[]{ java.lang.String.valueO... |
public void pull(de.htwg.risiko.turn.Turn turn) {
maxRecruitment = turn.getMaxRecruitment();
if ((maxRecruitment) <= 0) {
turn.setState(new de.htwg.risiko.turn.InvadeTurn());
return ;
}
recCountry = turn.getRecCountry();
recruitment = turn.getRecruitment();
addRecruitment();
... | public void pull(de.htwg.risiko.turn.Turn turn) {
maxRecruitment = turn.getMaxRecruitment();
recCountry = turn.getRecCountry();
recruitment = turn.getRecruitment();
addRecruitment(turn);
if ((turn.getMaxRecruitment()) == 0) {
turn.setState(new de.htwg.risiko.turn.InvadeTurn());
retur... |
public static org.openrdf.rio.RDFFormat requestedContentType(java.lang.String contentType) {
org.openrdf.rio.RDFFormat requesetedContentType = null;
if (((contentType.contentEquals(RDFFormat.TURTLE.getDefaultMIMEType())) || (contentType == null)) || (contentType.contains(MediaType.ALL_VALUE))) {
requese... | public static org.openrdf.rio.RDFFormat requestedContentType(java.lang.String contentType) {
org.openrdf.rio.RDFFormat requesetedContentType = null;
if ((contentType.contentEquals(RDFFormat.TURTLE.getDefaultMIMEType())) || (contentType.contains(MediaType.ALL_VALUE))) {
requesetedContentType = org.openrd... |
public void run() {
if ((exit) == false) {
if ((((periodCount)++) % 4) == 0) {
query(com.vehicle.uart.DevMaster.CMD_ID_GENERAL_LONG, com.vehicle.uart.DevMaster.DEVICE_TYPE_BIKE);
periodCount = 0;
}
query(com.vehicle.uart.DevMaster.CMD_ID_GENERAL_SHORT, com.vehicle.uar... | public void run() {
if ((exit) == false) {
if ((((periodCount)++) % 4) == 0) {
query(com.vehicle.uart.DevMaster.CMD_ID_GENERAL_LONG, com.vehicle.uart.DevMaster.DEVICE_TYPE_BIKE);
}else {
query(com.vehicle.uart.DevMaster.CMD_ID_GENERAL_SHORT, com.vehicle.uart.DevMaster.DEVICE_... |
public synchronized void shoot() {
if ((bTimer) > 0)
return ;
getPoly();
bullets.add(new core.Bullet(((int) (tip.getX())), ((int) (tip.getY())), angle, 5));
bullets.lastElement().move();
bTimer = 10;
} | public synchronized void shoot() {
if ((bTimer) > 0)
return ;
getPoly();
bullets.add(new core.Bullet(((int) (tip.getX())), ((int) (tip.getY())), angle, 5, this));
bullets.lastElement().move();
bTimer = 10;
} |
public Application.MatOfFloat getDescVals() {
Application.Mat grabbedImage = new Application.Mat();
HD.getDetectedHand().copyTo(grabbedImage);
Application.Imgproc.cvtColor(grabbedImage, grabbedImage, Imgproc.COLOR_BGR2GRAY);
Application.Imgproc.resize(grabbedImage, grabbedImage, new Application.Size(64,... | public Application.MatOfFloat getDescVals() {
HD.getDetectedHand().copyTo(grabbedImage);
Application.Imgproc.cvtColor(grabbedImage, grabbedImage, Imgproc.COLOR_BGR2GRAY);
Application.Imgproc.resize(grabbedImage, grabbedImage, new Application.Size(64, 128));
desc.compute(grabbedImage, descVals);
retu... |
public void networkUpdate(remarema.services.network.UpdateNetwork command) {
remarema.domain.Network nw = em.find(remarema.domain.Network.class, command.getNetworkID());
nw.setNetworkName(command.getNetworkName());
remarema.domain.Network parentNetwork = findParentNetwork(command.getNetworkParentName());
... | public void networkUpdate(remarema.services.network.UpdateNetwork command) {
remarema.domain.Network nw = em.find(remarema.domain.Network.class, command.getNetworkID());
nw.setNetworkName(command.getNetworkName());
remarema.domain.Network parentNetwork = findParentNetwork(command.getNetworkParentName());
... |
public boolean onNavigationItemSelected(@android.support.annotation.NonNull
android.view.MenuItem item) {
switch (item.getItemId()) {
case R.id.action_camera :
android.util.Log.i(LOG_TAG, "Accessing Camera Activity...");
android.content.Intent cameraIntent = new android.content.Inten... | public boolean onNavigationItemSelected(@android.support.annotation.NonNull
android.view.MenuItem item) {
switch (item.getItemId()) {
case R.id.action_camera :
android.util.Log.i(LOG_TAG, "Accessing Camera Activity...");
android.content.Intent cameraIntent = new android.content.Inten... |
public frazer.Specimen[] selectMutants(frazer.Population population) {
java.util.Random random = new java.util.Random();
java.util.ArrayList<frazer.Specimen> selectedMutants = new java.util.ArrayList<>();
frazer.Specimen[] specimens = population.getSpecimens();
return ((frazer.Specimen[]) (selectedMutan... | public frazer.Specimen[] selectMutants(frazer.Population population) {
java.util.Random random = new java.util.Random();
java.util.ArrayList<frazer.Specimen> selectedMutants = new java.util.ArrayList<>();
frazer.Specimen[] specimens = population.getSpecimens();
return selectedMutants.toArray(new frazer.... |
public com.spectralogic.ds3client.commands.spectrads3.PutBulkJobSpectraS3Request withMaxUploadSize(final long maxUploadSize) {
if (maxUploadSize > (com.spectralogic.ds3client.commands.spectrads3.PutBulkJobSpectraS3Request.MIN_UPLOAD_SIZE_IN_BYTES)) {
this.getQueryParams().put("max_upload_size", java.lang.Lo... | public com.spectralogic.ds3client.commands.spectrads3.PutBulkJobSpectraS3Request withMaxUploadSize(final long maxUploadSize) {
if (maxUploadSize >= (com.spectralogic.ds3client.commands.spectrads3.PutBulkJobSpectraS3Request.MIN_UPLOAD_SIZE_IN_BYTES)) {
this.getQueryParams().put("max_upload_size", java.lang.L... |
public void testUsersMetaDataStreaming() throws java.io.IOException {
io.crate.metadata.UsersMetaData users = new io.crate.metadata.UsersMetaData(com.google.common.collect.ImmutableList.of("Trillian"));
org.elasticsearch.common.io.stream.BytesStreamOutput out = new org.elasticsearch.common.io.stream.BytesStream... | public void testUsersMetaDataStreaming() throws java.io.IOException {
io.crate.metadata.UsersMetaData users = new io.crate.metadata.UsersMetaData(com.google.common.collect.ImmutableList.of("Trillian"));
org.elasticsearch.common.io.stream.BytesStreamOutput out = new org.elasticsearch.common.io.stream.BytesStream... |
private android.app.Notification getNotification(int taskCount) {
return new android.support.v4.app.NotificationCompat.Builder(this).setContentTitle((taskCount == 0 ? getString(R.string.uploading) : getResources().getQuantityString(R.plurals.uploading_notification, taskCount))).setPriority(NotificationCompat.PRIORI... | private android.app.Notification getNotification(int taskCount) {
return new android.support.v4.app.NotificationCompat.Builder(this).setContentTitle((taskCount == 0 ? getString(R.string.uploading) : getResources().getQuantityString(R.plurals.uploading_notification, taskCount, taskCount))).setPriority(NotificationCo... |
public boolean elementIsPresent(final net.serenitybdd.core.pages.By byElementCriteria) {
boolean isDisplayed = true;
try {
java.util.List<net.serenitybdd.core.pages.WebElement> matchingElements = driver.findElements(byElementCriteria);
if (matchingElements.isEmpty()) {
isDisplayed = ... | public boolean elementIsPresent(final net.serenitybdd.core.pages.By byElementCriteria) {
boolean isDisplayed = true;
try {
java.util.List<net.serenitybdd.core.pages.WebElement> matchingElements = driver.findElements(byElementCriteria);
if (matchingElements.isEmpty()) {
isDisplayed = ... |
public boolean percolates() {
for (int i = 1; i < ((grid) + 1); i++) {
if ((isOpen(grid, i)) && (isFull(grid, i))) {
return true;
}
}
return false;
} | public boolean percolates() {
for (int i = 0; i < (grid); i++) {
if ((isOpen(grid, (i + 1))) && (isFull(grid, (i + 1)))) {
return true;
}
}
return false;
} |
public static UndirectedGraph<java.lang.Integer, java.lang.Integer> getNeighbourGraph(UndirectedGraph graph, Graph.Vertex v) {
java.util.List<Graph.Vertex<java.lang.Integer>> neighbours = new java.util.ArrayList<Graph.Vertex<java.lang.Integer>>();
java.util.Iterator<Graph.Vertex<java.lang.Integer>> it = graph.n... | public static UndirectedGraph<java.lang.Integer, java.lang.Integer> getNeighbourGraph(UndirectedGraph<java.lang.Integer, java.lang.Integer> graph, Graph.Vertex<java.lang.Integer> v) {
java.util.List<Graph.Vertex<java.lang.Integer>> neighbours = new java.util.ArrayList<Graph.Vertex<java.lang.Integer>>();
java.ut... |
private org.apache.stratos.messaging.domain.instance.GroupInstance createGroupInstance(org.apache.stratos.messaging.domain.applications.Group group, java.lang.String parentInstanceId, java.lang.String partitionId, java.lang.String networkPartitionId) {
java.lang.String instanceId = parentInstanceId;
int minGrou... | private org.apache.stratos.messaging.domain.instance.GroupInstance createGroupInstance(org.apache.stratos.messaging.domain.applications.Group group, java.lang.String networkPartitionId, java.lang.String parentInstanceId, java.lang.String partitionId) {
java.lang.String instanceId = parentInstanceId;
int minGrou... |
public static java.util.List<us.freeandfair.corla.model.CastVoteRecord> computeBallotOrder(final us.freeandfair.corla.model.CountyDashboard the_cdb, final int the_round, final boolean the_audited) {
if ((the_round <= 0) || ((the_cdb.rounds().size()) < the_round)) {
throw new java.lang.IllegalArgumentExcepti... | public static java.util.List<us.freeandfair.corla.model.CastVoteRecord> computeBallotOrder(final us.freeandfair.corla.model.CountyDashboard the_cdb, final int the_round, final boolean the_audited) {
if ((the_round <= 0) || ((the_cdb.rounds().size()) < the_round)) {
return new java.util.ArrayList<>();
}
... |
public java.lang.Object[] toArray() {
java.lang.Object[] array = new java.lang.Object[realLength];
for (int i = begin; i < (realLength); i++) {
array[(i - (begin))] = values[i].toJava(java.lang.Object.class);
}
return array;
} | public java.lang.Object[] toArray() {
java.lang.Object[] array = new java.lang.Object[realLength];
for (int i = 0; i < (realLength); i++) {
array[i] = values[(i + (begin))].toJava(java.lang.Object.class);
}
return array;
} |
public void onItemClick(android.widget.AdapterView<?> parent, android.view.View view, int position, long id) {
if (((android.widget.TextView) (view)).getText().toString().equals("ΕΠΙΣΤΡΟΦΗ")) {
android.content.Intent intent = new android.content.Intent(this, com.example.marios.mathlearn.MainActivity.class);... | public void onItemClick(android.widget.AdapterView<?> parent, android.view.View view, int position, long id) {
android.content.Intent intent = new android.content.Intent(this, com.example.marios.mathlearn.ProvolhAnakoinwshs.class);
intent.putExtra("str2", anakoinwseis[position]);
startActivity(intent);
} |
public void create(org.elasticsoftware.elasticactors.ShardKey shardKey, org.elasticsoftware.elasticactors.cluster.scheduler.ScheduledMessage scheduledMessage) {
com.datastax.driver.core.PreparedStatement insertStatement = cassandraSession.prepare("INSERT INTO ScheduledMessages (key, key2, column1, column2, value) V... | public void create(org.elasticsoftware.elasticactors.ShardKey shardKey, org.elasticsoftware.elasticactors.cluster.scheduler.ScheduledMessage scheduledMessage) {
cassandraSession.execute(insertStatement.bind(clusterName, shardKey.toString(), scheduledMessage.getFireTime(java.util.concurrent.TimeUnit.MILLISECONDS), s... |
public void init() {
preferencesUtil = new com.arrg.app.uapplock.util.SharedPreferencesUtil(this);
lockedAppsPreferences = getSharedPreferences(UAppLock.LOCKED_APPS_PREFERENCES, Context.MODE_PRIVATE);
packagesAppsPreferences = getSharedPreferences(UAppLock.PACKAGES_APPS_PREFERENCES, Context.MODE_PRIVATE);
... | public void init() {
preferencesUtil = new com.arrg.app.uapplock.util.SharedPreferencesUtil(this);
lockedAppsPreferences = getSharedPreferences(UAppLock.LOCKED_APPS_PREFERENCES, Context.MODE_PRIVATE);
packagesAppsPreferences = getSharedPreferences(UAppLock.PACKAGES_APPS_PREFERENCES, Context.MODE_PRIVATE);
... |
public void renameField(com.zhangwei.smali.api.SmaliEntry se, com.zhangwei.smali.api.FieldEntry fe, java.lang.String s) {
java.lang.String className = se.classHeader.classNameSelf;
java.lang.String oldFieldName = fe.classFieldName;
java.lang.String newFieldName = s;
java.util.Iterator<com.zhangwei.smali... | public void renameField(com.zhangwei.smali.api.SmaliEntry se, com.zhangwei.smali.api.FieldEntry fe, java.lang.String s) {
java.lang.String className = se.classHeader.classNameSelf;
java.lang.String oldFieldName = fe.classFieldName;
java.lang.String newFieldName = s;
java.util.Iterator<com.zhangwei.smali... |
public void validate(org.kumoricon.model.attendee.Attendee attendee) throws org.kumoricon.service.validate.ValidationException {
if (attendee.isMinor()) {
if (((attendee.getParentFormReceived()) == null) || (!(attendee.getParentFormReceived()))) {
throw new jdk.nashorn.internal.runtime.regexp.jo... | public void validate(org.kumoricon.model.attendee.Attendee attendee) throws org.kumoricon.service.validate.ValidationException {
if (attendee.isMinor()) {
if (((attendee.getParentFormReceived()) == null) || (!(attendee.getParentFormReceived()))) {
throw new org.kumoricon.service.validate.Validat... |
public void setTone() {
com.justinmutsito.whizzer.wizzerclock.preferences.Preferences preferences = new com.justinmutsito.whizzer.wizzerclock.preferences.Preferences(this);
if ((mWhichTone) == 0) {
preferences.saveAlarmTone(checkedRB());
}else {
preferences.saveTimerTone(checkedRB());
}
... | public void setTone() {
com.justinmutsito.whizzer.wizzerclock.preferences.Preferences preferences = new com.justinmutsito.whizzer.wizzerclock.preferences.Preferences(this);
if ((mWhichTone) == 0) {
preferences.saveAlarmTone(checkedRB());
}else {
preferences.saveTimerTone(checkedRB());
}
... |
public java.lang.Object getCoupon(java.lang.String utoken, int couponId) {
cn.momia.common.core.http.MomiaHttpParamBuilder builder = new cn.momia.common.core.http.MomiaHttpParamBuilder().add("utoken", utoken).add("coupon", couponId);
return executeReturnObject(cn.momia.common.core.http.MomiaHttpRequestBuilder.P... | public java.lang.Object getCoupon(java.lang.String utoken, int couponId) {
cn.momia.common.core.http.MomiaHttpParamBuilder builder = new cn.momia.common.core.http.MomiaHttpParamBuilder().add("utoken", utoken).add("coupon", couponId);
return executeReturnObject(cn.momia.common.core.http.MomiaHttpRequestBuilder.P... |
private void bindTexture(go.graphics.TextureHandle texture) throws go.graphics.IllegalBufferException {
int id;
if (texture == null) {
id = 0;
}else {
if (!(texture.isValid())) {
throw new go.graphics.IllegalBufferException(("Texture handle is not valid: " + texture));
}
... | private void bindTexture(go.graphics.TextureHandle texture) throws go.graphics.IllegalBufferException {
int id;
if (texture == null) {
id = 0;
}else {
if (!(texture.isValid())) {
throw new go.graphics.IllegalBufferException(("Texture handle is not valid: " + texture));
}
... |
public void onLoadFinished(android.support.v4.content.Loader<android.database.Cursor> cursorLoader, android.database.Cursor cursor) {
if (!(isAdded())) {
return ;
}
if ((firstRun) && ((cursor.getCount()) == 0)) {
entryFilter.setVisibility(View.GONE);
}
firstRun = false;
adapter.s... | public void onLoadFinished(android.support.v4.content.Loader<android.database.Cursor> cursorLoader, android.database.Cursor cursor) {
if ((!(isAdded())) || (cursor == null)) {
return ;
}
if ((firstRun) && ((cursor.getCount()) == 0)) {
entryFilter.setVisibility(View.GONE);
}
firstRun ... |
public void init(int begin, int end) {
this.begin = begin;
this.index = begin;
this.end = (inclusive) ? end + 1 : end;
for (int i = begin; i < end; i += stride) {
(length)++;
}
} | public void init(int begin, int end) {
this.begin = begin;
this.index = begin;
this.end = (inclusive) ? end + 1 : end;
for (int i = begin; i < (this.end); i += stride) {
(length)++;
}
} |
public void restoreFromBundle(com.watabou.utils.Bundle bundle) {
levelTemplates = new java.util.ArrayList<com.dit599.customPD.levels.template.LevelTemplate>(com.dit599.customPD.levels.template.DungeonTemplate.MAX_DEPTH);
levelTemplates.addAll(((java.util.Collection<? extends com.dit599.customPD.levels.template.... | public void restoreFromBundle(com.watabou.utils.Bundle bundle) {
levelTemplates = new java.util.ArrayList<com.dit599.customPD.levels.template.LevelTemplate>(com.dit599.customPD.levels.template.DungeonTemplate.MAX_DEPTH);
levelTemplates.addAll(((java.util.Collection<? extends com.dit599.customPD.levels.template.... |
public boolean equals(java.lang.Object other) {
if (other instanceof website.frontrow.util.Point) {
return false;
}
website.frontrow.util.Point that = ((website.frontrow.util.Point) (other));
if ((this.x) != (that.x)) {
return false;
}
if ((this.y) != (that.y)) {
return f... | public boolean equals(java.lang.Object other) {
if (other instanceof website.frontrow.util.Point) {
website.frontrow.util.Point that = ((website.frontrow.util.Point) (other));
return ((this.x) == (that.x)) & ((this.y) == (that.y));
}
return false;
} |
public void setMovies(final android.database.Cursor cursor) {
if ((null != cursor) && ((cursor.getCount()) != 0)) {
final name.meszaros.gabor.popularmovies.models.Movie[] movies = new name.meszaros.gabor.popularmovies.models.Movie[cursor.getCount()];
int currentMovieIndex = 0;
while (cursor.... | public void setMovies(final android.database.Cursor cursor) {
name.meszaros.gabor.popularmovies.models.Movie[] movies = null;
if (null != cursor) {
movies = new name.meszaros.gabor.popularmovies.models.Movie[cursor.getCount()];
int currentMovieIndex = 0;
while (cursor.moveToNext()) {
... |
public java.lang.String[] assemble(java.lang.String[] parts, java.util.HashMap<java.lang.String, java.lang.Integer> symbolTable, int pc, java.io.PrintStream error, int lineno) {
java.lang.String[] ans = new java.lang.String[3];
java.lang.Integer address = symbolTable.get(parts[1]);
ans[0] = "" + 13;
pc+... | public java.lang.String[] assemble(java.lang.String[] parts, java.util.HashMap<java.lang.String, java.lang.Integer> symbolTable, int pc, java.io.PrintStream error, int lineno, java.lang.String filename) {
java.lang.String[] ans = new java.lang.String[3];
java.lang.Integer address = symbolTable.get(parts[1]);
... |
public void contextInitialized(javax.servlet.ServletContextEvent contextEvent) {
javax.servlet.ServletContext context = contextEvent.getServletContext();
java.lang.System.out.println("Context Initialized!");
com.hivesys.core.db.DBConnectionPool dbconn = com.hivesys.core.db.DBConnectionPool.getInstance();
... | public void contextInitialized(javax.servlet.ServletContextEvent contextEvent) {
javax.servlet.ServletContext context = contextEvent.getServletContext();
java.lang.System.out.println("Context Initialized!");
com.hivesys.core.db.DBConnectionPool dbconn = com.hivesys.core.db.DBConnectionPool.getInstance();
... |
public int receiveEnergy(net.minecraftforge.common.util.ForgeDirection from, int maxReceive, boolean simulate) {
int taken = storage.receiveEnergy(maxReceive, simulate);
if (!simulate) {
if (!(worldObj.isRemote)) {
lastIn += taken;
}
this.markDirty();
}
return taken;
... | public int receiveEnergy(net.minecraftforge.common.util.ForgeDirection from, int maxReceive, boolean simulate) {
int taken = storage.receiveEnergy(maxReceive, simulate);
if (!simulate) {
if (!(worldObj.isRemote)) {
this.lastIn += taken;
}
this.markDirty();
}
return ta... |
public void findAllArchivedTest() throws java.lang.Exception {
java.util.Set<io.gravitee.repository.management.model.Application> applications = applicationRepository.findAll(ApplicationStatus.ARCHIVED);
org.junit.Assert.assertNotNull(applications);
org.junit.Assert.assertEquals("Fail to resolve application... | public void findAllArchivedTest() throws java.lang.Exception {
java.util.Set<io.gravitee.repository.management.model.Application> applications = applicationRepository.findAll(ApplicationStatus.ARCHIVED);
assertNotNull(applications);
assertEquals("Fail to resolve application in findAll with application statu... |
public void run() {
currentMessages = get(org.apache.flume.source.taildirectory.DirectoryTailSourceCounter.COUNTER_MESSAGE_SENT);
previousMessages = currentMessages;
currentThroughput = (currentMessages) - (previousMessages);
set(org.apache.flume.source.taildirectory.DirectoryTailSourceCounter.CURRENT_T... | public void run() {
currentMessages = get(org.apache.flume.source.taildirectory.DirectoryTailSourceCounter.COUNTER_MESSAGE_SENT);
if ((currentMessages) >= (previousMessages)) {
currentThroughput = (currentMessages) - (previousMessages);
set(org.apache.flume.source.taildirectory.DirectoryTailSour... |
private int popupExit() {
int choix;
choix = org.analyse.core.util.GUIUtilities.question_YES_NO(org.analyse.core.util.Utilities.getLangueMessage(Constantes.MESSAGE_FERMER_LOGICIEL));
if (choix == (javax.swing.JOptionPane.NO_OPTION))
choix = javax.swing.JOptionPane.CANCEL_OPTION;
if (choix =... | private int popupExit() {
int choix;
choix = org.analyse.core.util.GUIUtilities.question_YES_NO(org.analyse.core.util.Utilities.getLangueMessage(Constantes.MESSAGE_FERMER_LOGICIEL));
if (choix == (javax.swing.JOptionPane.YES_OPTION)) {
if ((this.fileName) != null) {
choix = org.analyse.c... |
public void CheckRowLeft(MyPanel myPanelB, int ClickedInX, int ClickedInY) {
java.awt.Color hasNumber = java.awt.Color.ORANGE;
int newGridX = ClickedInX;
int newGridY = ClickedInY;
while (!(BombsAround(myPanelB, newGridX, newGridY))) {
myPanelB.colorArray[newGridX][newGridY] = uncoveredCell;
... | public void CheckRowLeft(MyPanel myPanelB, int ClickedInX, int ClickedInY) {
java.awt.Color hasNumber = java.awt.Color.ORANGE;
int newGridX = ClickedInX;
int newGridY = ClickedInY;
while (newGridX > 1) {
newGridX = newGridX - 1;
if (!(BombsAround(myPanelB, newGridX, newGridY))) {
... |
public boolean equals(java.lang.Object o) {
if (!(o instanceof jcmp.DocCompare.Pair)) {
return false;
}
try {
return ((((jcmp.DocCompare.Pair) (o)).i1) == (i1)) && ((((jcmp.DocCompare.Pair) (o)).i2) == (i2));
} catch (java.lang.Exception e) {
return false;
}
} | public boolean equals(java.lang.Object o) {
if ((o == null) || (!(o instanceof jcmp.DocCompare.Pair))) {
return false;
}
return ((((jcmp.DocCompare.Pair) (o)).i1) == (i1)) && ((((jcmp.DocCompare.Pair) (o)).i2) == (i2));
} |
private java.lang.Boolean assertion(com.inovia.magnifier.database.FunctionParameter p) {
return (((p.getName()) != null) && (!(p.getName().isEmpty()))) && (p.getName().endsWith(("_" + (p.getMode().toLowerCase()))));
} | private java.lang.Boolean assertion(com.inovia.magnifier.database.FunctionParameter p) {
return (((p.getName()) != null) && (!(p.getName().isEmpty()))) && (p.getName().toLowerCase().endsWith(("_" + (p.getMode().toLowerCase()))));
} |
public static boolean isAfterDate(java.lang.String firstDateString, java.lang.String secondDateString) {
java.lang.System.out.println(((("firstDate : " + firstDateString) + ", seccondDate : ") + secondDateString));
try {
java.util.Date firstDate = th.co.gosoft.go10.util.DateUtils.dbFormat.parse(firstDat... | public static boolean isAfterDate(java.lang.String firstDateString, java.lang.String secondDateString) {
try {
java.util.Date firstDate = th.co.gosoft.go10.util.DateUtils.dbFormat.parse(firstDateString);
java.util.Date secondDate = th.co.gosoft.go10.util.DateUtils.dbFormat.parse(secondDateString);
... |
public void onClick(android.view.View v) {
android.widget.Toast.makeText(getContext(), "Add player to scout list.", Toast.LENGTH_SHORT).show();
android.content.Intent intent = new android.content.Intent(getActivity(), tom.chinesefootballtracker.ScoutActivity.class).putExtra(tom.chinesefootballtracker.MainFragme... | public void onClick(android.view.View v) {
android.widget.Toast.makeText(getContext(), "Add player to scout list.", Toast.LENGTH_SHORT).show();
android.content.Intent intent = new android.content.Intent(getActivity(), tom.chinesefootballtracker.ScoutActivity.class);
android.support.v4.app.ActivityOptionsCom... |
public void setIncrementerClass() {
org.jboss.hal.testsuite.fragment.ConfigFragment editPanelFragment = jcaPage.getConfigFragment();
editPanelFragment.getEditor().select("capacityIncrementerClass", "org.jboss.jca.core.connectionmanager.pool.capacity.SizeIncrementer");
boolean finished = editPanelFragment.sa... | public void setIncrementerClass() {
org.jboss.hal.testsuite.fragment.ConfigFragment editPanelFragment = jcaPage.getConfigFragment();
editPanelFragment.getEditor().select("capacity-incrementer-class", "org.jboss.jca.core.connectionmanager.pool.capacity.SizeIncrementer");
boolean finished = editPanelFragment.... |
public void onResult(boolean confirmed, android.os.Bundle bundle) {
if (!confirmed) {
if ((selectUser) == null)
return ;
try {
ChatActivity.activityInstance.finish();
} catch (java.lang.Exception e) {
}
android.content.Intent intent = new andr... | public void onResult(boolean confirmed, android.os.Bundle bundle) {
if (confirmed) {
if ((selectUser) == null)
return ;
try {
ChatActivity.activityInstance.finish();
} catch (java.lang.Exception e) {
}
android.content.Intent intent = new andro... |
processing.javafx.PGraphicsFX2D.FontInfo result = new processing.javafx.PGraphicsFX2D.FontInfo();
result.font = font;
{
measuringText.setFont(result.font);
measuringText.setText(" ");
float lineHeight = ((float) (measuringText.getLayoutBounds().getHeight()));
result.ascent = ... | processing.javafx.PGraphicsFX2D.FontInfo result = new processing.javafx.PGraphicsFX2D.FontInfo();
result.font = font;
if (font != null) {
measuringText.setFont(result.font);
measuringText.setText(" ");
float lineHeight = ((float) (measuringText.getLayoutBounds().getHeight()));
... |
public int compare(com.ob.dailyReport.model.ProjectReport projectReport1, com.ob.dailyReport.model.ProjectReport projectReport2) {
java.lang.String name1 = projectReport1.getProjectName();
java.lang.String name2 = projectReport2.getProjectName();
com.ob.dailyReport.model.Project project1;
try {
... | public int compare(com.ob.dailyReport.model.ProjectReport projectReport1, com.ob.dailyReport.model.ProjectReport projectReport2) {
try {
java.lang.String name1 = projectReport1.getProjectName();
java.lang.String name2 = projectReport2.getProjectName();
com.ob.dailyReport.model.Project projec... |
public void setSharedIntent(java.lang.String text) {
android.content.Intent sharedIntent = com.jagr.android.popularmovies.util.Utility.createSharedIntent(text);
if (null != sharedIntent) {
mShareActionProvider.setShareIntent(sharedIntent);
}else {
android.util.Log.d(com.jagr.android.popularm... | public void setSharedIntent(java.lang.String text) {
android.content.Intent sharedIntent = com.jagr.android.popularmovies.util.Utility.createSharedIntent(text);
if ((null != sharedIntent) && (null != (mShareActionProvider))) {
mShareActionProvider.setShareIntent(sharedIntent);
}else {
androi... |
public boolean isBookmarkable() {
final org.apache.isis.core.metamodel.spec.feature.ObjectAction action = getActionMemento().getAction(getSpecificationLoader());
final org.apache.isis.core.metamodel.facets.object.bookmarkpolicy.BookmarkPolicyFacet bookmarkPolicy = action.getFacet(org.apache.isis.core.metamodel.... | public boolean isBookmarkable() {
final org.apache.isis.core.metamodel.spec.feature.ObjectAction action = getAction();
final org.apache.isis.core.metamodel.facets.object.bookmarkpolicy.BookmarkPolicyFacet bookmarkPolicy = action.getFacet(org.apache.isis.core.metamodel.facets.object.bookmarkpolicy.BookmarkPolicy... |
public static java.util.ArrayList<model.roster.Student> getStudentsAssociatedWithRoster(model.roster.Roster roster) {
java.util.ArrayList<model.roster.Student> list = new java.util.ArrayList<model.roster.Student>();
for (model.roster.Student student : model.server.Server.associatedClasses.keySet()) {
if... | public static java.util.ArrayList<model.roster.Student> getStudentsAssociatedWithRoster(model.roster.Roster roster) {
java.util.ArrayList<model.roster.Student> list = new java.util.ArrayList<model.roster.Student>();
if ((model.server.Server.associatedClasses) != null) {
for (model.roster.Student student... |
public void onClick(android.view.View view) {
int position = 0;
java.lang.String itemTag = editTag.getText().toString();
editTag.setText("");
list.add(position, ("#" + itemTag));
tagdb.insertTag(new com.example.vlad.scruji.Main_Screen_With_Tabs.Models.MyTag(pref.getString(Constants.UNIQUE_ID, ""), i... | public void onClick(android.view.View view) {
int position = 0;
java.lang.String itemTag = "#" + (editTag.getText().toString());
editTag.setText("");
list.add(position, ("" + itemTag));
tagdb.insertTag(new com.example.vlad.scruji.Main_Screen_With_Tabs.Models.MyTag(pref.getString(Constants.UNIQUE_ID,... |
public void onClick(android.content.DialogInterface dialog, int which) {
boolean edited = com.infiniteloop.mytasks.data.TaskLab.get(getActivity()).editTask(mTask);
if (edited) {
android.content.Intent resultIntent = new android.content.Intent();
getActivity().setResult(Activity.RESULT_OK, result... | public void onClick(android.content.DialogInterface dialog, int which) {
boolean edited = com.infiniteloop.mytasks.data.TaskLab.get(getActivity()).editTask(mTask, getActivity());
if (edited) {
android.content.Intent resultIntent = new android.content.Intent();
getActivity().setResult(Activity.RE... |
public void execute(wl.domain.ExecutionContext context) {
context.waitUntil((org.openqa.selenium.WebDriver driver) -> expectedTitle.equals(driver.getTitle()));
java.lang.String title = context.getDriver().getTitle();
org.junit.Assert.assertEquals(getDescription(), expectedTitle, title);
} | public void execute(wl.domain.ExecutionContext context) {
context.waitUntil((org.openqa.selenium.WebDriver driver) -> driver.getTitle().equals(expectedTitle));
java.lang.String title = context.getDriver().getTitle();
org.junit.Assert.assertEquals(getDescription(), expectedTitle, title);
} |
public boolean execute() throws java.sql.SQLException {
checkClosed();
checkAllArgumentsProvided();
sqlRequest.args(currentParams);
executeSingle();
if (!(hasResultSet(sqlResponse))) {
return false;
}
resultSet = new io.crate.client.jdbc.CrateResultSet(this, sqlResponse);
return ... | public boolean execute() throws java.sql.SQLException {
checkClosed();
checkAllArgumentsProvided();
sqlRequest.args(currentParams);
executeSingle();
resultSet = new io.crate.client.jdbc.CrateResultSet(this, sqlResponse);
if (!(hasResultSet(sqlResponse))) {
return false;
}
return ... |
public void moveFile(java.lang.String fromFilePath, java.lang.String toFilePath, boolean closeSession) {
com.jcraft.jsch.ChannelSftp sftp = null;
try {
sftp = openConnectedChannel(org.jumpmind.metl.core.runtime.resource.SftpDirectory.CHANNEL_1);
sftp.cd(basePath);
sftp.rename(fromFilePat... | public void moveFile(java.lang.String fromFilePath, java.lang.String toFilePath, boolean closeSession) {
com.jcraft.jsch.ChannelSftp sftp = null;
try {
sftp = (closeSession) ? openConnectedChannel() : openConnectedChannel(org.jumpmind.metl.core.runtime.resource.SftpDirectory.CHANNEL_1);
sftp.cd(... |
protected void onPostExecute(java.lang.String errorMessage) {
feedbackView.setProgressBarVisibility(false);
if (errorMessage != null) {
android.util.Log.w(amai.org.conventions.events.activities.EventActivity.TAG, ("Failed to send feedback mail. Reason: " + errorMessage));
android.widget.Toast.ma... | protected void onPostExecute(java.lang.String errorMessage) {
feedbackView.setProgressBarVisibility(false);
if (errorMessage != null) {
android.util.Log.w(amai.org.conventions.events.activities.EventActivity.TAG, ("Failed to send feedback mail. Reason: " + errorMessage));
android.widget.Toast.ma... |
private boolean repairHasSegmentRunning(long repairRunId) {
java.util.Collection<com.spotify.reaper.core.RepairSegment> segments = context.storage.getRepairSegmentsForRun(repairRunId);
java.lang.System.out.println(segments);
for (com.spotify.reaper.core.RepairSegment segment : segments) {
if ((segme... | private boolean repairHasSegmentRunning(long repairRunId) {
java.util.Collection<com.spotify.reaper.core.RepairSegment> segments = context.storage.getRepairSegmentsForRun(repairRunId);
for (com.spotify.reaper.core.RepairSegment segment : segments) {
if ((segment.getState()) == (RepairSegment.State.RUNNI... |
public Visualisation.Map initialize() {
addFloors();
addWalls();
addDoors();
this.graphMap = cellMap.createAndGetGraphMap();
int agentNumber = Visualisation.RandomGenerator.getInstance().uniformInt(1, maxAgentsNumber);
addAgents(1);
return cellMap;
} | public Visualisation.Map initialize() {
addFloors();
addWalls();
addDoors();
this.graphMap = cellMap.createAndGetGraphMap();
int agentNumber = Visualisation.RandomGenerator.getInstance().uniformInt(1, maxAgentsNumber);
addAgents(agentNumber);
return cellMap;
} |
markImpossibleConnections(int father, ia_practica_1_busqueda_local.Connection[] connections, int[] possible) {
java.util.ArrayList<java.lang.Integer> children = connections[father].getFromConnections();
int child;
for (child = 0; child < (children.size()); child++) {
if ((possible[child]) != (-1)) {... | private void markImpossibleConnections(int father, ia_practica_1_busqueda_local.Connection[] connections, int[] possible) {
java.util.ArrayList<java.lang.Integer> children = connections[father].getFromConnections();
int child;
for (child = 0; child < (children.size()); child++) {
if ((possible[child... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.