buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public ClassB.NestedClass visit(ast.ExpCore.ClassB.NestedClass nc) {
java.util.List<java.lang.String> old = path;
path = new java.util.ArrayList<>(path);
path.add(nc.getName());
assert (nc.getInner()) instanceof ast.ExpCore.ClassB : "CloneWithPath works only for compiled classes, to deal with paths + cl... | public ClassB.NestedClass visit(ast.ExpCore.ClassB.NestedClass nc) {
java.util.List<java.lang.String> old = path;
path = new java.util.ArrayList<>(path);
path.add(nc.getName());
if (!((nc.getInner()) instanceof ast.ExpCore.ClassB)) {
return nc;
}
try {
return super.visit(nc);
... |
private java.net.HttpURLConnection preparePost(java.lang.String content, java.lang.String path) throws java.io.IOException {
java.net.HttpURLConnection connect = getConnection(path);
connect.setRequestProperty("Authorization", ("Basic " + (org.exist.http.RESTServiceTest.credentials)));
connect.setRequestMet... | private java.net.HttpURLConnection preparePost(java.lang.String content, java.lang.String path) throws java.io.IOException {
java.net.HttpURLConnection connect = getConnection(path);
connect.setRequestProperty("Authorization", ("Basic " + (org.exist.http.RESTServiceTest.credentials)));
connect.setRequestMet... |
public void testIntArray() throws java.lang.Exception {
final io.swagger.models.Model model = context.resolve(io.swagger.jackson.SimpleGenerationTest.IntArrayBean.class);
final java.util.Map<java.lang.String, io.swagger.models.properties.Property> props = model.getProperties();
org.testng.AssertJUnit.assert... | public void testIntArray() throws java.lang.Exception {
final io.swagger.models.Model model = context.resolve(io.swagger.jackson.SimpleGenerationTest.IntArrayBean.class);
final java.util.Map<java.lang.String, io.swagger.models.properties.Property> props = model.getProperties();
org.testng.Assert.assertEqual... |
public boolean accept(java.io.File dir, java.lang.String name) {
if (!(name.startsWith("."))) {
return false;
}else
if ((!(name.endsWith(".png"))) && (!(name.endsWith(".jpg")))) {
return false;
}
return true;
} | public boolean accept(java.io.File dir, java.lang.String name) {
if (name.startsWith(".")) {
return false;
}else
if ((!(name.endsWith(".png"))) && (!(name.endsWith(".jpg")))) {
return false;
}
return true;
} |
public void testTilesContainedRadius4() {
area.setRange(4);
java.util.List<model.area.RealCoordinate> locations = area.getCoveredLocations();
for (model.area.RealCoordinate loc : locations) {
model.area.TileCoordinate loc2 = model.area.RealCoordinate.convertToTileCoordinate(loc);
java.lang.S... | public void testTilesContainedRadius4() {
area.setRange(4);
java.util.List<model.area.TileCoordinate> locations = area.getCoveredLocations();
for (model.area.TileCoordinate loc : locations) {
model.area.TileCoordinate loc2 = loc;
java.lang.System.out.println((((loc2.getX()) + " ") + (loc2.ge... |
public void onClick(android.view.View v) {
final java.lang.String hiragana = hiraganaTextInput.getText().toString();
if (hiragana.equals(hiraganaAnswers.get(count))) {
count = rand.nextInt(randLimit);
hiraganaTextInput.setText("");
hiraganaWords.remove(count);
hiraganaAnswers.rem... | public void onClick(android.view.View v) {
final java.lang.String hiragana = hiraganaTextInput.getText().toString();
if (hiragana.equals(hiraganaAnswers.get(count))) {
hiraganaTextInput.setText("");
hiraganaWords.remove(count);
hiraganaAnswers.remove(count);
randLimit -= 1;
... |
public int getCalculatedBasicPriceWithProtectionFee(int finalPrice, double impost, int excise) {
double tempFeeM = (ua.com.glady.uacc.model.Constants.TEMPORARY_PROTECTION_FEE_BASE) + 1;
double vatM = (ua.com.glady.uacc.model.Constants.VAT_BASE) + 1;
double result = ((finalPrice / vatM) - excise) / ((1 + tem... | public int getCalculatedBasicPriceWithProtectionFee(int finalPrice, double impost, int excise) {
double vatM = (ua.com.glady.uacc.model.Constants.VAT_BASE) + 1;
double result = ((finalPrice / vatM) - excise) / ((1 + (ua.com.glady.uacc.model.Constants.TEMPORARY_PROTECTION_FEE_BASE)) + impost);
return ((int) ... |
public void test_131_ACLRemoveAllFields(edu.umass.cs.gnsclient.client.util.GuidEntry westyEntry, edu.umass.cs.gnsclient.client.util.GuidEntry samEntry) {
try {
edu.umass.cs.gnsclient.client.integrationtests.ServerIntegrationTest.client.aclRemove(AclAccessType.READ_WHITELIST, westyEntry, GNSProtocol.ENTIRE_R... | public void test_131_ACLRemoveAllFields(edu.umass.cs.gnsclient.client.util.GuidEntry westyEntry, edu.umass.cs.gnsclient.client.util.GuidEntry samEntry) {
try {
edu.umass.cs.gnsclient.client.integrationtests.ServerIntegrationTest.client.aclRemove(AclAccessType.READ_WHITELIST, westyEntry, GNSProtocol.ENTIRE_R... |
public void onCheckedChanged(android.widget.CompoundButton buttonView, boolean isChecked) {
if (buttonView == (favoriteCheckbox)) {
rssItem.setFavorite((!(rssItem.isFavorite())));
if ((delegate) != null) {
getDelegate().onFavoriteClicked(this, rssItem);
}
}
android.util.L... | public void onCheckedChanged(android.widget.CompoundButton buttonView, boolean isChecked) {
if (buttonView == (favoriteCheckbox)) {
rssItem.setFavorite(isChecked);
if ((delegate) != null) {
getDelegate().onFavoriteClicked(this, rssItem);
}
}
} |
public void setOnlineOnly(java.lang.String taxName, java.lang.Boolean online, java.lang.Double interval) {
conf.setProperty((("taxes." + taxName) + ".onlineOnly.isEnabled"), online);
conf.setProperty((("taxes." + taxName) + ".onlineOnly.interval"), interval);
conf.save();
return ;
} | public void setOnlineOnly(java.lang.String taxName, java.lang.Boolean online, java.lang.Double interval) {
conf.save();
conf.setProperty((("taxes." + taxName) + ".onlineOnly.isEnabled"), online);
conf.setProperty((("taxes." + taxName) + ".onlineOnly.interval"), interval);
conf.save();
return ;
} |
public java.lang.String getAbsoluteUriPattern() {
if ((absoluteUriPattern) == null) {
ro.pippo.core.route.RouteGroup group = this.group;
java.lang.String path = this.uriPattern;
while (group != null) {
path = ro.pippo.core.util.StringUtils.addStart(ro.pippo.core.util.StringUtils.... | public java.lang.String getAbsoluteUriPattern() {
if ((absoluteUriPattern) == null) {
ro.pippo.core.route.RouteGroup group = this.group;
java.lang.String path = this.uriPattern;
while (group != null) {
path = ro.pippo.core.util.StringUtils.addStart(ro.pippo.core.util.StringUtils.... |
private org.eclipse.swt.widgets.Control createUpperPart(org.eclipse.swt.widgets.Composite parent) {
org.eclipse.swt.widgets.Composite frame = new org.eclipse.swt.widgets.Composite(parent, org.eclipse.swt.SWT.NONE);
frame.setLayout(com.eclipsesource.example.ece2011.ui.admin.AdminUI.createGridLayout());
org.e... | private org.eclipse.swt.widgets.Control createUpperPart(org.eclipse.swt.widgets.Composite parent) {
org.eclipse.swt.widgets.Composite frame = new org.eclipse.swt.widgets.Composite(parent, org.eclipse.swt.SWT.NONE);
frame.setLayout(com.eclipsesource.example.ece2011.ui.admin.AdminUI.createGridLayout());
org.e... |
public void testScheduleJobWithRepeatTime() throws java.lang.Exception {
org.quartz.JobDetail job1 = buildJob("Job1", org.quartz.Scheduler.DEFAULT_GROUP, com.bikeemotion.quartz.MyJob.class);
final org.quartz.impl.triggers.SimpleTriggerImpl o = ((org.quartz.impl.triggers.SimpleTriggerImpl) (buildTrigger("key1", ... | public void testScheduleJobWithRepeatTime() throws java.lang.Exception {
org.quartz.JobDetail job1 = buildJob("Job1", org.quartz.Scheduler.DEFAULT_GROUP, com.bikeemotion.quartz.MyJob.class);
final org.quartz.impl.triggers.SimpleTriggerImpl o = ((org.quartz.impl.triggers.SimpleTriggerImpl) (buildTrigger("key1", ... |
public java.util.List<net.minecraft.item.ItemStack> getDrops(net.minecraft.world.World world, java.util.Random rand, java.util.Map<java.lang.String, java.lang.Boolean> harvesterSettings, int x, int y, int z) {
return scala.actors.threadpool.Arrays.asList(new net.minecraft.item.ItemStack[]{ new net.minecraft.item.It... | public java.util.List<net.minecraft.item.ItemStack> getDrops(net.minecraft.world.World world, java.util.Random rand, java.util.Map<java.lang.String, java.lang.Boolean> harvesterSettings, int x, int y, int z) {
return java.util.Arrays.asList(new net.minecraft.item.ItemStack[]{ new net.minecraft.item.ItemStack(com.gr... |
public Metadata.Builder putStandardMethodUnderrides(org.inferred.freebuilder.processor.Metadata.StandardMethod key, org.inferred.freebuilder.processor.Metadata.UnderrideLevel value) {
com.google.common.base.Preconditions.checkNotNull(key);
com.google.common.base.Preconditions.checkNotNull(value);
com.google... | public Metadata.Builder putStandardMethodUnderrides(org.inferred.freebuilder.processor.Metadata.StandardMethod key, org.inferred.freebuilder.processor.Metadata.UnderrideLevel value) {
com.google.common.base.Preconditions.checkNotNull(key);
com.google.common.base.Preconditions.checkNotNull(value);
com.google... |
public void load() {
if ((config) != null) {
java.util.Set<java.lang.String> keySet = config.getKeys(false);
for (java.lang.String key : keySet) {
io.github.dre2n.dungeonsxl.file.DMessages.Messages.getByIdentifier(key).setMessage(config.getString(key));
}
}
} | public void load() {
if ((config) != null) {
java.util.Set<java.lang.String> keySet = config.getKeys(false);
for (java.lang.String key : keySet) {
io.github.dre2n.dungeonsxl.file.DMessages.Messages message = io.github.dre2n.dungeonsxl.file.DMessages.Messages.getByIdentifier(key);
... |
public void draw_user(android.graphics.Canvas canvas) {
if (((user_pos_x) != (-999)) && ((user_pos_y) != (-999))) {
p.setColor(Color.RED);
canvas.drawCircle(((float) (user_pos_x)), ((float) (user_pos_y)), 40, p);
}
} | public void draw_user(android.graphics.Canvas canvas) {
if (((user_pos_x) >= 0) && ((user_pos_y) >= 0)) {
p.setColor(Color.RED);
canvas.drawCircle(((float) (user_pos_x)), ((float) (user_pos_y)), 40, p);
}
} |
protected ca.rmen.android.scrumchatter.meeting.detail.MeetingPagerAdapter doInBackground(java.lang.Void... param) {
if (meetingId < 0) {
ca.rmen.android.scrumchatter.meeting.detail.Meeting newMeeting = ca.rmen.android.scrumchatter.meeting.detail.Meeting.createNewMeeting(this);
mMeetingId = newMeetin... | protected ca.rmen.android.scrumchatter.meeting.detail.MeetingPagerAdapter doInBackground(java.lang.Void... param) {
if (meetingId < 0) {
ca.rmen.android.scrumchatter.meeting.detail.Meeting newMeeting = ca.rmen.android.scrumchatter.meeting.detail.Meeting.createNewMeeting(this);
if (newMeeting != null... |
public void run() {
try {
while (true) {
org.insa.chatsystem.ni.UDPReceiver.socket.receive(this.packet);
java.lang.String data = new java.lang.String(packet.getData(), 0, packet.getLength());
org.insa.chatsystem.ni.JSONObject dataJSON = new org.insa.chatsystem.ni.JSONObje... | public void run() {
while (true) {
try {
org.insa.chatsystem.ni.UDPReceiver.socket.receive(this.packet);
java.lang.String data = new java.lang.String(packet.getData(), 0, packet.getLength());
org.insa.chatsystem.ni.JSONObject dataJSON = new org.insa.chatsystem.ni.JSONObje... |
public void preInit(cpw.mods.fml.common.event.FMLPreInitializationEvent evt) {
sct.hexxitgear.setup.HexxitGearConfig.setConfigFolderBase(evt.getModConfigurationDirectory());
sct.hexxitgear.setup.HexxitGearConfig.loadCommonConfig(evt);
sct.hexxitgear.setup.HexxitGearConfig.extractLang(new java.lang.String[]{... | public void preInit(cpw.mods.fml.common.event.FMLPreInitializationEvent evt) {
sct.hexxitgear.setup.HexxitGearConfig.setConfigFolderBase(evt.getModConfigurationDirectory());
sct.hexxitgear.setup.HexxitGearConfig.loadCommonConfig(evt);
sct.hexxitgear.setup.HexxitGearConfig.registerDimBlacklist();
sct.hex... |
public T remove(javax.servlet.ServletRequest request, java.util.Map<java.lang.String, java.lang.Object> expandContext) {
org.apache.ofbiz.base.util.collections.FlexibleServletAccessor.AttributeAccessor<T> aa = new org.apache.ofbiz.base.util.collections.FlexibleServletAccessor.AttributeAccessor<T>(name, expandContex... | public T remove(javax.servlet.ServletRequest request, java.util.Map<java.lang.String, java.lang.Object> expandContext) {
org.apache.ofbiz.base.util.collections.FlexibleServletAccessor.AttributeAccessor<T> aa = new org.apache.ofbiz.base.util.collections.FlexibleServletAccessor.AttributeAccessor(name, expandContext, ... |
public boolean equals(java.lang.Object o) {
if ((this) == o) {
return true;
}
if ((o == null) || ((getClass()) != (o.getClass()))) {
return false;
}
io.bookster.domain.User user = ((io.bookster.domain.User) (o));
if (!(login.equals(user.login))) {
return false;
}
... | public boolean equals(java.lang.Object o) {
if ((this) == o) {
return true;
}
if ((o == null) || ((getClass()) != (o.getClass()))) {
return false;
}
io.bookster.domain.User user = ((io.bookster.domain.User) (o));
return login.equals(user.login);
} |
private void highlight(int start, int end, java.awt.Color color) throws javax.swing.text.BadLocationException {
javax.swing.text.Highlighter hl = expressions.getHighlighter();
if ((highlight) != null) {
hl.removeHighlight(highlight);
}
javax.swing.text.Highlighter.HighlightPainter p = new javax.... | private void highlight(int start, int end, java.awt.Color color) throws javax.swing.text.BadLocationException {
javax.swing.text.Highlighter hl = expressions.getHighlighter();
removeHighlight();
javax.swing.text.Highlighter.HighlightPainter p = new javax.swing.text.DefaultHighlighter.DefaultHighlightPainter... |
public void setRawData(com.kauailabs.navx.AHRSProtocol.GyroUpdate raw_data_update) {
synchronized(this) {
this.raw_gyro_x = raw_data_update.gyro_x;
this.raw_gyro_y = raw_data_update.gyro_y;
this.raw_gyro_z = raw_data_update.gyro_z;
this.raw_accel_x = raw_data_update.accel_x;
... | public void setRawData(com.kauailabs.navx.AHRSProtocol.GyroUpdate raw_data_update) {
this.raw_gyro_x = raw_data_update.gyro_x;
this.raw_gyro_y = raw_data_update.gyro_y;
this.raw_gyro_z = raw_data_update.gyro_z;
this.raw_accel_x = raw_data_update.accel_x;
this.raw_accel_y = raw_data_update.accel_y;
... |
public void startHardLevel() throws java.lang.Exception {
javafx.application.Platform.runLater(() -> {
javafx.stage.Stage stage = new javafx.stage.Stage();
((javafx.stage.Stage) (easyLevelButton.getScene().getWindow())).close();
managers.GameManager gameManager = new managers.GameManager();
... | public void startHardLevel() throws java.lang.Exception {
javafx.application.Platform.runLater(() -> {
javafx.stage.Stage stage = ((javafx.stage.Stage) (easyLevelButton.getScene().getWindow()));
managers.GameManager gameManager = new managers.GameManager();
models.level.BaseLevel level = new... |
public void onEnterWaiting(hudson.model.Queue.WaitingItem wi) {
org.zeroturnaround.stats.model.RunStats stats = new org.zeroturnaround.stats.model.RunStats();
stats.setProjectName(wi.task.getName());
stats.setQueueId(wi.id);
org.zeroturnaround.stats.ClusterStatisticsPlugin plugin = org.zeroturnaround.st... | public void onEnterWaiting(hudson.model.Queue.WaitingItem wi) {
org.zeroturnaround.stats.model.RunStats stats = new org.zeroturnaround.stats.model.RunStats();
stats.setProjectName(wi.task.getName());
stats.setQueueId(((int) (wi.getId())));
org.zeroturnaround.stats.ClusterStatisticsPlugin plugin = org.ze... |
private seedu.address.logic.parser.DateParser.InferredDate parseEndDate(java.lang.String commandText, java.lang.String dateText) throws seedu.address.logic.parser.ParseException {
try {
return dateParser.parseSingle(dateText);
} catch (seedu.address.logic.parser.ParseException ex) {
throw new se... | private seedu.address.logic.parser.DateParser.InferredDate parseEndDate(java.lang.String commandText, java.lang.String dateText) throws seedu.address.logic.parser.ParseException {
try {
if (dateText == null)
return null;
return dateParser.parseSingle(dateText);
} catch (seed... |
public long GetUserID(java.lang.String email) {
java.util.ArrayList<java.lang.Object[]> r = ExecuteStoredProcedureRead(connection, "getUserID", new java.lang.Object[]{ email });
java.lang.Object[] o = r.get(0);
return ((int) (o[0]));
} | public long GetUserID(java.lang.String email) {
java.util.ArrayList<java.lang.Object[]> r = ExecuteStoredProcedureRead(connection, "getUserID", new java.lang.Object[]{ email });
if ((r.size()) == 0)
return -1;
java.lang.Object[] o = r.get(0);
return ((int) (o[0]));
} |
public void testLogInfo() throws java.io.IOException {
consoleOutput.reset();
final java.lang.String logMsg = "Test info log";
final java.lang.String expectedLog = ("INFO [] - " + logMsg) + " \n";
org.ballerinalang.test.utils.BTestUtils.invoke(result, "testInfo", new org.ballerinalang.model.values.BValu... | public void testLogInfo() throws java.io.IOException {
consoleOutput.reset();
final java.lang.String logMsg = "Test info log";
final java.lang.String expectedLog = ("INFO [] - " + logMsg) + " \n";
org.ballerinalang.test.utils.BTestUtils.invoke(result, "testInfo", new org.ballerinalang.model.values.BValu... |
private void setToolbarTitle() {
android.support.v7.app.ActionBar bar = getSupportActionBar();
if (currentModeIs(ViewMode.ADD_MODE)) {
android.util.Log.e("ADD MODE SET", "Title for add mode set");
bar.setTitle("Add Books");
}else
if (currentModeIs(ViewMode.EDIT_MODE)) {
b... | private void setToolbarTitle() {
android.support.v7.app.ActionBar bar = getSupportActionBar();
if (currentModeIs(ViewMode.ADD_MODE)) {
bar.setTitle("Add Books");
}else
if (currentModeIs(ViewMode.EDIT_MODE)) {
bar.setTitle("Edit");
}else {
bar.setTitle("My Book... |
public void loadConfig() {
if ((com.wuntee.oter.OterStatics.getAndroidHome()) == null) {
try {
com.wuntee.oter.OterWorkshop.loadProperties();
} catch (java.lang.Exception e) {
com.wuntee.oter.view.Gui.logger.error("Error loading config: ", e);
com.wuntee.oter.view... | public void loadConfig() {
try {
com.wuntee.oter.OterWorkshop.loadProperties();
} catch (java.lang.Exception e) {
com.wuntee.oter.view.Gui.logger.error("Error loading config: ", e);
com.wuntee.oter.view.GuiWorkshop.messageError(shlOterTool, "Could not load a configuration file, please sp... |
public void replace(int position, TYP content) {
if ((isEmpty()) && (position == 1)) {
currentLink = new Link(null, null, content);
firstLink = currentLink;
}else
if (position <= (size())) {
iterateCurrentLinkTo(position);
currentLink.setData(content);
}el... | public void set(int position, TYP content) {
if ((isEmpty()) && (position == 1)) {
currentLink = new Link(null, null, content);
firstLink = currentLink;
}else
if (position <= (size())) {
iterateCurrentLinkTo(position);
currentLink.setData(content);
}else {... |
public org.opencps.paymentmgt.model.PaymentFile updatePaymentFile(long paymentFileId, java.lang.String keypayUrl, java.lang.String keypayTransactionId, java.lang.String keypayGoodCode, java.lang.String keypayMerchantCode) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.Sy... | public org.opencps.paymentmgt.model.PaymentFile updatePaymentFile(long paymentFileId, java.lang.String keypayUrl, long keypayTransactionId, java.lang.String keypayGoodCode, java.lang.String keypayMerchantCode) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemExceptio... |
public void preBiomeDecorate(net.minecraftforge.event.terraingen.DecorateBiomeEvent.Pre event) {
if (!(rtg.config.rtg.ConfigRTG.enableVillageModifications)) {
return ;
}
if (((event.world.getWorldInfo().getTerrainType()) instanceof rtg.world.WorldTypeRTG) && ((event.world.getWorldChunkManager()) ins... | public void preBiomeDecorate(net.minecraftforge.event.terraingen.DecorateBiomeEvent.Pre event) {
if (((event.world.getWorldInfo().getTerrainType()) instanceof rtg.world.WorldTypeRTG) && ((event.world.getWorldChunkManager()) instanceof rtg.world.biome.WorldChunkManagerRTG)) {
rtg.world.biome.WorldChunkManage... |
public void setUp() throws java.lang.Exception {
emailSender = mock(no.java.moosehead.saga.EmailSender.class);
no.java.moosehead.controller.SystemSetup setup = mock(no.java.moosehead.controller.SystemSetup.class);
when(setup.emailSender()).thenReturn(emailSender);
no.java.moosehead.controller.SystemSetu... | public void setUp() throws java.lang.Exception {
emailSender = mock(no.java.moosehead.saga.EmailSender.class);
no.java.moosehead.controller.SystemSetup setup = mock(no.java.moosehead.controller.SystemSetup.class);
when(setup.emailSender()).thenReturn(emailSender);
no.java.moosehead.controller.SystemSetu... |
public static void stopTimer() {
if (((theweekend.visual.TopBar.task) == null) || ((theweekend.visual.TopBar.lastBar) == null)) {
return ;
}
if ((org.bukkit.Bukkit.getOnlinePlayers().size()) == 1) {
theweekend.visual.TopBar.lastBar.setVisible(false);
org.bukkit.Bukkit.getScheduler().... | public static void stopTimer() {
if (((theweekend.visual.TopBar.task) == null) || ((theweekend.visual.TopBar.lastBar) == null)) {
return ;
}
if ((org.bukkit.Bukkit.getOnlinePlayers().size()) == 1) {
org.bukkit.Bukkit.getScheduler().cancelTask(theweekend.visual.TopBar.task);
theweeken... |
public com.wegas.core.persistence.variable.VariableInstance get(@com.wegas.core.rest.PathParam(value = "variableDescriptorId")
java.lang.Long variableDescriptorId, @com.wegas.core.rest.PathParam(value = "variableInstanceId")
java.lang.Long variableInstanceId) {
com.wegas.core.persistence.variable.VariableInstance v... | public com.wegas.core.persistence.variable.VariableInstance get(@com.wegas.core.rest.PathParam(value = "variableDescriptorId")
java.lang.Long variableDescriptorId, @com.wegas.core.rest.PathParam(value = "variableInstanceId")
java.lang.Long variableInstanceId) {
com.wegas.core.persistence.variable.VariableInstance v... |
public void saveContent(java.lang.String content) throws java.io.IOException {
java.io.FileOutputStream o = new java.io.FileOutputStream(file);
for (int i = 0; i < (content.length()); i += 1) {
o.write(content.charAt(i));
}
} | public void saveContent(java.lang.String content) throws java.io.IOException {
synchronized(file) {
java.io.FileOutputStream o = new java.io.FileOutputStream(file);
for (int i = 0; i < (content.length()); i += 1) {
o.write(content.charAt(i));
}
}
} |
private void updateBrowserView() {
showing = control.doSearch(txtSearchText.getText());
javax.swing.table.DefaultTableModel model = ((javax.swing.table.DefaultTableModel) (tblUserList.getModel()));
int rows = model.getRowCount();
for (int i = rows - 1; i >= 0; i--) {
model.removeRow(i);
}
... | public void updateBrowserView() {
showing = control.doSearch(txtSearchText.getText());
javax.swing.table.DefaultTableModel model = ((javax.swing.table.DefaultTableModel) (tblUserList.getModel()));
int rows = model.getRowCount();
for (int i = rows - 1; i >= 0; i--) {
model.removeRow(i);
}
... |
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
connection.setUsername(tboxUsername.getText());
connection.setServer(tboxServer.getText());
if (("".equals(tboxDatabase.getText())) == false) {
connection.setDatabase(null);
}
connection.setPassword(getPassword());
if... | private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
connection.setUsername(tboxUsername.getText());
connection.setServer(tboxServer.getText());
if (("".equals(tboxDatabase.getText())) == false) {
connection.setDatabase(tboxDatabase.getText());
}
connection.setPassword(getP... |
public boolean okToLeave() {
boolean readyToLeave = false;
if (dirty) {
readyToLeave = updateSLD();
}
if (readyToLeave) {
return true;
}else {
return org.eclipse.jface.dialogs.MessageDialog.openQuestion(org.eclipse.swt.widgets.Display.getCurrent().getActiveShell(), Messages.S... | public boolean okToLeave() {
boolean readyToLeave = true;
if (dirty) {
readyToLeave = updateSLD();
}
if (readyToLeave) {
return true;
}else {
return org.eclipse.jface.dialogs.MessageDialog.openQuestion(org.eclipse.swt.widgets.Display.getCurrent().getActiveShell(), Messages.St... |
public void testSplit_bSEPb_limit1() throws java.lang.Exception {
final byte[] bytes = new byte[]{ 1 , orwell.proxy.UtilsTest.SEPARATOR , 2 };
final java.util.List<byte[]> list = orwell.proxy.Utils.split(orwell.proxy.UtilsTest.SEPARATOR, bytes, 1);
org.junit.Assert.assertEquals(1, list.size());
org.juni... | public void testSplit_bSEPb_limit1() throws java.lang.Exception {
final byte[] bytes = new byte[]{ 1 , orwell.proxy.UtilsTest.SEPARATOR , 2 };
final java.util.List<byte[]> list = orwell.proxy.Utils.split(orwell.proxy.UtilsTest.SEPARATOR, bytes, 1);
org.junit.Assert.assertEquals(1, list.size());
org.juni... |
private void processNotFoundMessage(org.bitcoinj.core.NotFoundMessage m) {
for (org.bitcoinj.core.Peer.GetDataRequest req : getDataFutures) {
for (org.bitcoinj.core.InventoryItem item : m.getItems()) {
if (item.hash.equals(req.hash)) {
org.bitcoinj.core.Peer.log.info("{}: Bottome... | protected void processNotFoundMessage(org.bitcoinj.core.NotFoundMessage m) {
for (org.bitcoinj.core.Peer.GetDataRequest req : getDataFutures) {
for (org.bitcoinj.core.InventoryItem item : m.getItems()) {
if (item.hash.equals(req.hash)) {
org.bitcoinj.core.Peer.log.info("{}: Botto... |
public java.util.List<java.lang.String> getPaymentControlPluginNames(@org.skife.config.Param(value = "dummy")
final org.killbill.billing.callcontext.InternalTenantContext tenantContext) {
final java.lang.reflect.Method method = new java.lang.Object() { }.getClass().getEnclosingMethod();
final java.lang.Strin... | public java.util.List<java.lang.String> getPaymentControlPluginNames(@org.skife.config.Param(value = "dummy")
final org.killbill.billing.callcontext.InternalTenantContext tenantContext) {
final java.lang.reflect.Method method = new java.lang.Object() { }.getClass().getEnclosingMethod();
final java.lang.Strin... |
public java.lang.String obtenirLaRepresentationTexte() {
systeme.out.println((((((("L'�v�nement" + (this.nom)) + ("aura lieu �".lieu)) + " ,le") + (this.date)) + " ,�") + (this.heure)));
throw new java.lang.UnsupportedOperationException();
} | public java.lang.String obtenirLaRepresentationTexte() {
java.lang.System.out.println(((((((("L'�v�nement" + (this.nom)) + "aura lieu �") + (this.lieu)) + " ,le") + (this.date)) + " ,�") + (this.heure)));
throw new java.lang.UnsupportedOperationException();
} |
private void checkTime() {
if (!(isValidTime())) {
m_time.setErrorMessageWidth((((m_popup.getOffsetWidth()) - 32) + (Unit.PX.toString())));
m_time.setErrorMessage(org.opencms.gwt.client.Messages.get().key(Messages.ERR_DATEBOX_INVALID_TIME_FORMAT_0));
}else
if (isValidTime()) {
... | private void checkTime() {
if (!(isValidTime())) {
m_time.setErrorMessageWidth((((m_popup.getOffsetWidth()) - 32) + (Unit.PX.toString())));
m_time.setErrorMessage(org.opencms.gwt.client.Messages.get().key(Messages.ERR_DATEBOX_INVALID_TIME_FORMAT_0));
}else {
m_time.setErrorMessage(null);... |
public java.lang.String addRoute(javax.servlet.http.HttpServletRequest request, org.springframework.ui.Model model) {
com.tsystems.jschool.railage.view.controllers.helpers.RouteFormParams params = new com.tsystems.jschool.railage.view.controllers.helpers.RouteFormParams();
try {
params.fill(request);
... | public java.lang.String addRoute(javax.servlet.http.HttpServletRequest request, org.springframework.ui.Model model) {
com.tsystems.jschool.railage.view.controllers.helpers.RouteFormParams params = new com.tsystems.jschool.railage.view.controllers.helpers.RouteFormParams();
params.fill(request);
try {
... |
java.lang.String nums;
java.lang.String result = "";
java.lang.String reverse;
nums = java.lang.String.valueOf((n % 2));
result = result + nums;
java.lang.System.out.print(result);
if (n == 1) {
return 1;
}else
if (n == 0) {
return 0;
}else {
... | java.lang.String nums = java.lang.String.valueOf((n % 2));
if (n == 1) {
return 1;
}else
if (n == 0) {
return 0;
}else {
java.lang.System.out.print(nums);
return Exercise2.binaryConvert((n / 2));
}
} |
public void updateWeights() {
bias = (bias) + (((Perceptron.LEARNING_RATE) * (delta)) * (activationValue));
for (int i = 0; i < (inputWeights.size()); i++) {
double weight = inputWeights.get(i);
inputWeights.set(i, (weight + (((Perceptron.LEARNING_RATE) * (delta)) * (activationValue))));
}
} | public void updateWeights() {
bias = (bias) - (((Perceptron.LEARNING_RATE) * (delta)) * (activationValue));
for (int i = 0; i < (inputWeights.size()); i++) {
double weight = inputWeights.get(i);
inputWeights.set(i, (weight - (((Perceptron.LEARNING_RATE) * (delta)) * (activationValue))));
}
} |
public static void addThread(java.lang.Thread thd, java.lang.String thdDesc) {
if (DebugUtils.canDebug(ThreadMonitor.class, ThreadMonitor.DebugFlag.WARN_NO_THD_PROGRESS, ThreadMonitor.DebugFlag.THD_LIVENESS_INFO, ThreadMonitor.DebugFlag.RUNTIME_INFO)) {
synchronized(ThreadMonitor.monitoredThds) {
... | public static void addThread(java.lang.Thread thd, java.lang.String thdDesc) {
if (DebugUtils.canDebug(ThreadMonitor.class, ThreadMonitor.DebugFlag.WARN_NO_THD_PROGRESS, ThreadMonitor.DebugFlag.THD_LIVENESS_INFO, ThreadMonitor.DebugFlag.RUNTIME_INFO)) {
synchronized(ThreadMonitor.monitoredThds) {
... |
protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
com.ciplogic.allelon.eventbus.ObjectInstantiator.ensureInstantiated(this);
com.ciplogic.allelon.PlayActivity.INSTANCE = this;
setContentView(R.layout.play_activity);
findUiComponents();
addEventLi... | protected void onCreate(android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
com.ciplogic.allelon.eventbus.ObjectInstantiator.ensureInstantiated(this);
com.ciplogic.allelon.PlayActivity.INSTANCE = this;
setContentView(R.layout.play_activity);
findUiComponents();
updateCont... |
public void run() {
com.google.common.util.concurrent.CheckedFuture<java.lang.Void, org.opendaylight.distributed.tx.api.DTxException> writeFuture;
if (finalI == errorOccur) {
internalDtxNetconfTestTx1.setReadException(n0, true);
writeFuture = netConfOnlyDTx.deleteAndRollbackOnFailure(DTXLogicalT... | public void run() {
com.google.common.util.concurrent.CheckedFuture<java.lang.Void, org.opendaylight.distributed.tx.api.DTxException> writeFuture;
if (finalI == errorOccur) {
internalDtxNetconfTestTx1.setReadException(n0, true);
writeFuture = netConfOnlyDTx.deleteAndRollbackOnFailure(DTXLogicalT... |
private void dispatchAction(java.lang.String message) {
java.lang.String jsonTestObj = "{\"type\": \"error\", \"body\": \"some blabla. \"}";
controlpanel.Action action = this.gson.fromJson(jsonTestObj, controlpanel.Action.class);
switch (action.type) {
case "SUCCESS_STEP" :
successStep()... | private void dispatchAction(java.lang.String message) {
controlpanel.Action action = this.gson.fromJson(message, controlpanel.Action.class);
switch (action.type) {
case "SUCCESS_STEP" :
successStep();
break;
case "STATUS_MESSAGE" :
break;
case "ERROR" ... |
public float getPrice(int productPriceId, int productId, int priceCategoryId, int currencyId, java.sql.Timestamp time, int timeframeId, int addressId, java.sql.Date exactDate) throws java.rmi.RemoteException, java.sql.SQLException {
return getStockroomBusiness().getPrice(productPriceId, productId, priceCategoryId, ... | public float getPrice(int productPriceId, int productId, int priceCategoryId, int currencyId, java.sql.Timestamp time, int timeframeId, int addressId, java.sql.Date exactDate) throws java.rmi.RemoteException, java.sql.SQLException {
return getStockroomBusiness().getPrice(productPriceId, productId, priceCategoryId, ... |
public void addSplitAnnotation() throws gate.util.InvalidOffsetException {
int end = seq_anot.lastEndInt();
if (end > 0)
end--;
int start = end;
if ((start > 0) && (czsem.gate.externalannotator.Annotator.isEndPunctuationChar(seq_anot.charAt((start - 1)))))
start--;
as.add((... | public void addSplitAnnotation() throws gate.util.InvalidOffsetException {
int end = seq_anot.lastEndInt();
int start = end;
if ((start > 0) && (czsem.gate.externalannotator.Annotator.isEndPunctuationChar(seq_anot.charAt((start - 1)))))
start--;
as.add(((long) (start)), ((long) (end)), "Spl... |
void rxtxoff() {
if (DEBUG) {
log(("Strobe RXTX-OFF!!! at " + (cpu.cycles)));
if ((((stateMachine) == (se.sics.mspsim.chip.CC2520.RadioState.TX_ACK)) || ((stateMachine) == (se.sics.mspsim.chip.CC2520.RadioState.TX_FRAME))) || ((stateMachine) == (se.sics.mspsim.chip.CC2520.RadioState.RX_FRAME))) {
... | void rxtxoff() {
if (DEBUG) {
if ((((stateMachine) == (se.sics.mspsim.chip.CC2520.RadioState.TX_ACK)) || ((stateMachine) == (se.sics.mspsim.chip.CC2520.RadioState.TX_FRAME))) || ((stateMachine) == (se.sics.mspsim.chip.CC2520.RadioState.RX_FRAME))) {
}
}
setState(se.sics.mspsim.chip.CC2520.Ra... |
public void createEmailTemplate(org.xcolab.model.tables.pojos.ContestEmailTemplate contestEmailTemplate) {
this.dslContext.insertInto(org.xcolab.model.Tables.CONTEST_EMAIL_TEMPLATE).set(CONTEST_EMAIL_TEMPLATE.TYPE_, contestEmailTemplate.getType_()).set(CONTEST_EMAIL_TEMPLATE.SUBJECT, contestEmailTemplate.getSubject... | public void createEmailTemplate(org.xcolab.model.tables.pojos.ContestEmailTemplate contestEmailTemplate) {
this.dslContext.insertInto(org.xcolab.model.Tables.CONTEST_EMAIL_TEMPLATE).set(CONTEST_EMAIL_TEMPLATE.TYPE_, contestEmailTemplate.getType_()).set(CONTEST_EMAIL_TEMPLATE.SUBJECT, contestEmailTemplate.getSubject... |
public java.lang.String logout(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpSession session) {
java.lang.String userName = ((java.lang.String) (session.getAttribute("userName")));
java.lang.System.out.println(("in logout >> " + userName));
chatbox.UserDatabase.logout(userName);
... | public java.lang.String logout(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpSession session) {
java.lang.String userName = ((java.lang.String) (session.getAttribute("userName")));
chatbox.UserDatabase.logout(userName);
try {
request.logout();
session.invalidate();
... |
public static void main(java.lang.String[] args) throws com.asual.lesscss.LessException, java.io.IOException {
com.asual.lesscss.LessEngine engine = new com.asual.lesscss.LessEngine();
if ((args.length) == 1) {
java.lang.System.out.println(engine.compile(args[0]));
}else
if ((args.length) ==... | public static void main(java.lang.String[] args) throws com.asual.lesscss.LessException, java.io.IOException {
com.asual.lesscss.LessEngine engine = new com.asual.lesscss.LessEngine();
if ((args.length) == 1) {
java.lang.System.out.println(engine.compile(new java.io.File(args[0])));
}else
if... |
public java.util.Date validate(java.lang.String time) {
java.util.Date ora = null;
matcher = pattern.matcher(time);
if (matcher.matches())
try {
ora = formatter.parse(time);
} catch (java.text.ParseException e) {
e.printStackTrace();
}
return ora;
} | public java.util.Date validate(java.lang.String time) {
java.util.Date ora = null;
if (time != null) {
matcher = pattern.matcher(time);
if (matcher.matches())
try {
ora = formatter.parse(time);
} catch (java.text.ParseException e) {
e.print... |
public linked_yarn.LinkedYarn clone() {
linked_yarn.LinkedYarn linkYarnClone = new linked_yarn.LinkedYarn();
linkYarnClone.size = this.size;
linkYarnClone.uniqueSize = this.uniqueSize;
linkYarnClone.modCount = this.modCount;
linked_yarn.LinkedYarn.Node currentNode = this.head;
for (int i = 0; i ... | public linked_yarn.LinkedYarn clone() {
linked_yarn.LinkedYarn linkYarnClone = new linked_yarn.LinkedYarn();
linkYarnClone.size = this.size;
linkYarnClone.modCount = this.modCount;
linked_yarn.LinkedYarn.Node currentNode = this.head;
while (currentNode != null) {
linkYarnClone.addNewNode(cur... |
public void initialize() {
setUserString(username_Label.getText());
setModeChoices();
setTitleChoices();
currentFloor = 4;
graph = new mapManagementFloorAndMode.MapOverlay(admin_FloorPane, ((controllers.mapScene) (this)));
controllers.MapController.getInstance().requestMapCopy();
graph.setMa... | public void initialize() {
setUserString(username_Label.getText());
setModeChoices();
setTitleChoices();
currentFloor = 1;
graph = new mapManagementFloorAndMode.MapOverlay(admin_FloorPane, ((controllers.mapScene) (this)));
controllers.MapController.getInstance().requestMapCopy();
graph.setMa... |
public java.util.List<webservice.TrainTicketRealTimeData> filterBySlot(java.lang.String slotname) {
switch (slotname) {
case "user_traintype" :
return filteredTrainType();
case "user_starttime" :
return filterByStarttime();
case "user_arrivetime" :
return ... | public java.util.List<webservice.TrainTicketRealTimeData> filterBySlot(java.lang.String slotname) {
switch (slotname) {
case "user_traintype" :
return filteredTrainType();
case "user_starttime" :
return filterByStarttime();
case "user_arrivetime" :
return ... |
private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {
indiceVolumen = ((float) (jComboBox1.getSelectedIndex())) / 10;
player.p.getGainControl().setLevel(4);
if ((jComboBox1.getSelectedIndex()) == 0) {
eVolumen.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/Mut... | private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {
indiceVolumen = ((float) (jComboBox1.getSelectedIndex())) / 10;
if ((jComboBox1.getSelectedIndex()) == 0) {
eVolumen.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/Mute.png")));
}else
eVolumen.setIc... |
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
try {
java.lang.String[] receivedData = owner.ftp.receiveData("LIST");
for (java.lang.String aReceivedData : receivedData) {
owner.updateTerminalText(aReceivedData);
}
} catch (java.io.IOException ex) {
... | private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
try {
java.lang.String[] receivedData = owner.ftp.receiveData("LIST");
owner.updateTerminalText("\n");
for (java.lang.String aReceivedData : receivedData) {
owner.updateTerminalText(aReceivedData);
}
... |
public java.util.List<com.pajato.android.gamechat.common.adapter.ListItem> getList(android.app.Activity activity) {
java.util.List<com.pajato.android.gamechat.common.adapter.ListItem> items = new java.util.ArrayList<>();
items.add(new com.pajato.android.gamechat.common.adapter.ListItem(com.pajato.android.gamech... | public java.util.List<com.pajato.android.gamechat.common.adapter.ListItem> getList(android.app.Activity activity) {
java.util.List<com.pajato.android.gamechat.common.adapter.ListItem> items = new java.util.ArrayList<>();
items.add(new com.pajato.android.gamechat.common.adapter.ListItem(com.pajato.android.gamech... |
long crc32(long address, long offset, long len) {
java.util.zip.CRC32 crc = new java.util.zip.CRC32();
for (; (len--) > 0; len-- , offset++)
crc.update(org.caffinitas.ohc.linked.Uns.getByte(address, offset));
long h = crc.getValue();
h |= h << 32;
return h;
} | long crc32(long address, long offset, long len) {
java.util.zip.CRC32 crc = new java.util.zip.CRC32();
for (; (len--) > 0; offset++)
crc.update(org.caffinitas.ohc.linked.Uns.getByte(address, offset));
long h = crc.getValue();
h |= h << 32;
return h;
} |
private java.util.List<org.openide.filesystems.FileObject> getPluignDirectories() {
org.openide.filesystems.FileObject rootDirectory = getRootDirectory();
if (rootDirectory == null) {
return java.util.Collections.emptyList();
}
org.openide.filesystems.FileObject defaultPlugins = rootDirectory.ge... | private java.util.List<org.openide.filesystems.FileObject> getPluignDirectories() {
org.openide.filesystems.FileObject rootDirectory = getRootDirectory();
if (rootDirectory == null) {
return java.util.Collections.emptyList();
}
org.openide.filesystems.FileObject defaultPlugins = rootDirectory.ge... |
public int compareTo(LFUCache.Data that) {
if ((this.frequency) < (that.frequency)) {
return -1;
}else
if ((this.frequency) == (that.frequency)) {
return 0;
}else {
return 1;
}
} | public int compareTo(LFUCache.Data that) {
if ((this.frequency) < (that.frequency)) {
return -1;
}else
if ((this.frequency) == (that.frequency)) {
if ((this.index) < (that.index)) {
return -1;
}else
if ((this.index) > (that.index)) {
... |
public static boolean validateTasksList(java.util.List<java.lang.String> taskList, java.lang.String assignee) {
if (taskList != null) {
org.activiti.engine.task.TaskQuery taskQuery = org.wso2.carbon.bpmn.people.substitution.UserSubstitutionOperations.taskService.createTaskQuery();
for (java.lang.Str... | public static boolean validateTasksList(java.util.List<java.lang.String> taskList, java.lang.String assignee) {
if (taskList != null) {
org.activiti.engine.task.TaskQuery taskQuery = org.wso2.carbon.bpmn.people.substitution.UserSubstitutionOperations.taskService.createTaskQuery();
for (java.lang.Str... |
public void send(org.bukkit.entity.Player player, java.lang.String... target) {
final java.lang.String end = (de.wolfi.minopoly.utils.Messages.Prefix) + (this.txt);
for (int i = 0; i < (target.length); i++)
end.replaceAll(("$" + i), target[i]);
player.sendMessage(end);
} | public void send(org.bukkit.entity.Player player, java.lang.String... target) {
final java.lang.String end = (de.wolfi.minopoly.utils.Messages.Prefix) + (this.txt);
java.lang.StringBuilder tmp = new java.lang.StringBuilder();
for (int i = 0; i < (target.length); i++)
tmp.append(end.replaceAll(("$" +... |
public void changeLoadedPDFPreviewPage(int selectedIndex, int pageNum) throws java.io.IOException {
if ((pageNum >= 1) && (pageNum <= (lNumPages))) {
lPDFIcon = null;
if (selectedIndex != (-1)) {
lPDFIcon = new javax.swing.ImageIcon(loadedRenderer.renderImage((pageNum - 1)));
... | public void changeLoadedPDFPreviewPage(int selectedIndex, int pageNum) throws java.io.IOException {
if (pageNum < 1) {
pageNum = 1;
}else
if (pageNum > (lNumPages)) {
pageNum = lNumPages;
}
lPDFIcon = null;
if (selectedIndex != (-1)) {
lPDFIcon = new java... |
public java.lang.String toString(java.lang.String indent) {
return ((((((((indent + "<ExprArray>\n") + (expression.toString((indent + '\t')))) + indent) + "\t<ArrayName>\n") + (ident.toString((indent + '\t')))) + indent) + "\t</ArrayName>\n") + indent) + "</ExprArray>\n";
} | public java.lang.String toString(java.lang.String indent) {
return ((((((((indent + "<ExprArray>\n") + (expression.toString((indent + '\t')))) + indent) + "\t<ArrayName>\n") + (ident.toString(((indent + '\t') + '\t')))) + indent) + "\t</ArrayName>\n") + indent) + "</ExprArray>\n";
} |
public void onClick(android.view.View v) {
switch (chooseItem) {
case com.otosoft.setupwizard.SetupWizardActivity.CHOOSE_CHINA_ITEM :
com.otosoft.setupwizard.SetupWizardActivity.mCurrentLocale = java.util.Locale.CHINA;
updateLocale(com.otosoft.setupwizard.SetupWizardActivity.mCurrent... | public void onClick(android.view.View v) {
switch (chooseItem) {
case com.otosoft.setupwizard.SetupWizardActivity.CHOOSE_CHINA_ITEM :
com.otosoft.setupwizard.SetupWizardActivity.mCurrentLocale = java.util.Locale.CHINA;
updateLocale(com.otosoft.setupwizard.SetupWizardActivity.mCurrent... |
private void setSportComboBoxData() {
java.util.List<at.fhv.itb13.sportify.client.presentation.controller.SimpleSportDTO> sportList;
sportList = at.fhv.itb13.sportify.client.communication.ServiceLocator.getInstance().getRemote(at.fhv.itb13.sportify.shared.communication.remote.ejb.SessionRemote.class).getSportRe... | private void setSportComboBoxData() {
java.util.List<at.fhv.itb13.sportify.client.presentation.controller.SimpleSportDTO> sportList;
sportList = at.fhv.itb13.sportify.client.communication.ServiceLocator.getInstance().getRemote(at.fhv.itb13.sportify.shared.communication.remote.ejb.SessionRemote.class).getSportRe... |
public void afterPropertiesSet() throws java.lang.Exception {
this.baseDirectory = new java.io.File(fileSinkProperties.getBaseDirectory());
if (!(baseDirectory.isDirectory())) {
if (!(this.baseDirectory.mkdirs())) {
throw new java.lang.IllegalStateException(("Cannot create base directory " +... | public void afterPropertiesSet() throws java.lang.Exception {
this.baseDirectory = new java.io.File(fileSinkProperties.getBaseDirectory());
if ((!(baseDirectory.isDirectory())) && (!(this.baseDirectory.mkdirs()))) {
throw new java.lang.IllegalStateException(("Cannot create base directory " + (fileSinkPr... |
public java.util.Set<java.lang.String> getRequiredWords() {
java.lang.String requiredWords = requiredWordsInput.getText();
java.lang.String[] requiredWordsList = requiredWords.split("\n");
java.util.Set<java.lang.String> requiredWordsSet = new java.util.HashSet<>();
for (java.lang.String word : required... | public java.util.Set<java.lang.String> getRequiredWords() {
java.lang.String requiredWords = requiredWordsInput.getText();
java.util.Set<java.lang.String> requiredWordsSet = new java.util.HashSet<>();
if ((requiredWords.length()) == 0) {
return requiredWordsSet;
}else {
java.lang.String[... |
public java.util.List<com.example.mayc.openmind.DocumentPayload> getDocuments(java.lang.String input) throws java.lang.Exception {
com.example.mayc.openmind.DiscoveryQuery discoveryQuery = new com.example.mayc.openmind.DiscoveryQuery();
com.ibm.watson.developer_cloud.discovery.v1.model.query.QueryResponse outpu... | public java.util.List<com.example.mayc.openmind.DocumentPayload> getDocuments(android.content.Context c, java.lang.String input) throws java.lang.Exception {
com.example.mayc.openmind.DiscoveryQuery discoveryQuery = new com.example.mayc.openmind.DiscoveryQuery(c);
com.ibm.watson.developer_cloud.discovery.v1.mod... |
public boolean isEnabled(java.lang.String username, java.lang.String actionId) {
registerIRightsService();
boolean returnValue = isBlacklist();
java.util.Map<java.lang.String, sernet.verinice.model.auth.Action> actionMap = getUserActionMap().get(username);
if (actionMap != null) {
sernet.verinic... | public boolean isEnabled(java.lang.String username, java.lang.String actionId) {
boolean returnValue = isBlacklist();
java.util.Map<java.lang.String, sernet.verinice.model.auth.Action> actionMap = getUserActionMap().get(username);
if (actionMap != null) {
sernet.verinice.model.auth.Action action = a... |
private int testPixel(java.awt.image.BufferedImage img, int x, int y) {
return (((x < (img.getWidth())) && (y < (img.getHeight()))) && (x >= 0)) && (y >= 0) ? img.getRGB(x, y) : 0;
} | private int testPixel(java.awt.image.BufferedImage img, int x, int y) {
return (((x <= ((img.getWidth()) - 1)) && (y <= ((img.getHeight()) - 1))) && (x >= 0)) && (y >= 0) ? img.getRGB(x, y) : 0;
} |
private void addTowers(java.util.ArrayList<java.awt.Point> towerPositions, int tick) {
for (java.awt.Point point : towerPositions) {
boolean alreadyCreated = false;
for (MarioAI.enemySimuation.simulators.BulletBillTower bulletBillTower : bulletTowers) {
if (((point.x) == (bulletBillTower... | private void addTowers(java.util.ArrayList<java.awt.Point> towerPositions, int tick) {
for (java.awt.Point point : towerPositions) {
boolean alreadyCreated = false;
for (MarioAI.enemySimuation.simulators.BulletBillTower bulletBillTower : bulletTowers) {
if (((point.x) == (bulletBillTower... |
public void setDefaultCity(android.view.View view) {
android.content.SharedPreferences.Editor prefEditor = _settings.edit();
if (this._defaultCityCheckbox.isChecked()) {
prefEditor.putString("DEFAULT", this._location.toUpperCase());
prefEditor.commit();
}else {
prefEditor.remove("DEF... | public void setDefaultCity(android.view.View view) {
android.content.SharedPreferences.Editor prefEditor = _settings.edit();
if (this._defaultCityCheckbox.isChecked()) {
prefEditor.putString("DEFAULT", this._location.toUpperCase());
prefEditor.commit();
}else {
prefEditor.remove("DEF... |
private boolean validCand(main.Poly cand) {
if (!(cand.trim().equals(cand))) {
return false;
}
main.PolyAnalyzer analyzer = main.PolyAnalyzer.of(cand);
if ((!(opt.allowUnconnected)) && (!(analyzer.isConnected()))) {
return false;
}
if ((!(opt.allowHole)) && (!(analyzer.hasNoHole(... | private boolean validCand(main.Poly cand) {
main.PolyAnalyzer analyzer = main.PolyAnalyzer.of(cand);
if ((!(opt.allowUnconnected)) && (!(analyzer.isConnected()))) {
return false;
}
if ((!(opt.allowHole)) && (!(analyzer.hasNoHole()))) {
return false;
}
return true;
} |
protected void onCreate(android.os.Bundle savedInstanceState) {
mPickOptions = de.greenrobot.event.EventBus.getDefault().getStickyEvent(Events.OnPublishPickOptionsEvent.class).options;
initTheme();
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_pick);
addToolbarToLayout();
... | protected void onCreate(android.os.Bundle savedInstanceState) {
mPickOptions = de.greenrobot.event.EventBus.getDefault().getStickyEvent(Events.OnPublishPickOptionsEvent.class).options;
initTheme();
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_pick);
addToolbarToLayout();
... |
public void run() {
if ((mPickerController) == null)
return ;
final android.os.Bundle bundle = new android.os.Bundle();
try {
setOptionsOnBundle(data.getJSONObject(0), bundle);
mPickerController.updateUI(bundle);
} catch (org.json.JSONException e) {
e.printStackTrace... | public void run() {
if ((mPickerController) != null) {
final android.os.Bundle bundle = new android.os.Bundle();
try {
setOptionsOnBundle(data.getJSONObject(0), bundle);
mPickerController.updateUI(bundle);
} catch (org.json.JSONException e) {
e.printStackT... |
public void onClick(android.view.View v) {
android.content.Intent intent = new android.content.Intent();
intent.setClass(this, com.werb.pickphotoview.PickPhotoPreviewActivity.class);
intent.putExtra(PickConfig.INTENT_IMG_PATH, pickGridAdapter.getSelectPath().get(0));
intent.putExtra(PickConfig.INTENT_IM... | public void onClick(android.view.View v) {
if (!(pickGridAdapter.getSelectPath().isEmpty())) {
android.content.Intent intent = new android.content.Intent();
intent.setClass(this, com.werb.pickphotoview.PickPhotoPreviewActivity.class);
intent.putExtra(PickConfig.INTENT_IMG_PATH, pickGridAdapt... |
public void run() {
for (int i = i_startRow; i <= (i_endRow); i++) {
for (int j = 0; j < (i_Mat_A.length); j++) {
for (int k = 0; k < (i_Mat_A.length); k++) {
i_ResMat[i][j] += (i_Mat_A[i][k]) * (i_Mat_B[k][j]);
}
}
}
} | public void run() {
for (int i = i_startRow; i <= (i_endRow); i++) {
for (int j = 0; j < (i_Mat_B.length); j++) {
for (int k = 0; k < (i_Mat_A.length); k++) {
i_ResMat[i][j] += (i_Mat_A[i][k]) * (i_Mat_B[k][j]);
}
}
}
} |
private void initializeCustomDevelopmentItems() {
if ((devDialogListener) == null) {
return ;
}
java.util.List<com.deepdroid.coredev.devdialog.uifordevdialog.CustomDevelopmentItem> customOptionsList = devDialogListener.getCustomOptionsList();
customOptionsArea.removeAllViews();
com.deepdroid... | private void initializeCustomDevelopmentItems() {
if ((devDialogListener) == null) {
return ;
}
java.util.List<com.deepdroid.coredev.devdialog.uifordevdialog.CustomDevelopmentItem> customOptionsList = devDialogListener.getCustomOptionsList();
customOptionsArea.removeAllViews();
com.deepdroid... |
public void Union(int i) throws java.sql.SQLException {
java.sql.PreparedStatement stmt = conn.prepareStatement(UNION);
PGStatement pgstmt = ((PGStatement) (stmt));
pgstmt.setPrepareThreshold(1);
stmt.setInt(1, i);
stmt.setInt(2, i);
java.sql.ResultSet r = stmt.executeQuery();
java.lang.Syst... | public void Union(int i) throws java.sql.SQLException {
java.sql.PreparedStatement stmt = conn.prepareStatement(UNION);
PGStatement pgstmt = ((PGStatement) (stmt));
pgstmt.setPrepareThreshold(0);
stmt.setInt(1, i);
stmt.setInt(2, i);
java.sql.ResultSet r = stmt.executeQuery();
java.lang.Syst... |
public static void registerCommand(me.wirlie.allbanks.command.Command command, java.lang.String label, java.lang.String... arguments) {
java.util.List<java.lang.String> argumentsRepresentation = new java.util.ArrayList<java.lang.String>();
for (java.lang.String s : arguments) {
argumentsRepresentation.a... | public static void registerCommand(me.wirlie.allbanks.command.Command command, java.lang.String... arguments) {
java.util.List<java.lang.String> argumentsRepresentation = new java.util.ArrayList<java.lang.String>();
for (java.lang.String s : arguments) {
argumentsRepresentation.add(s);
}
command... |
public void onSetNodeType(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName oldType, org.alfresco.service.namespace.QName newType) {
boolean isNewContent = !(org.alfresco.museum.ucm.sizelimits.SiteSizeLimitsBean.TYPES_TO_CHECK.contains(oldType));
if (isNewContent) {
... | public void onSetNodeType(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName oldType, org.alfresco.service.namespace.QName newType) {
boolean isNewContent = !(org.alfresco.museum.ucm.sizelimits.SiteSizeLimitsBean.TYPES_TO_CHECK.contains(oldType));
if (isNewContent) {
... |
public java.lang.String getText(java.lang.Object element) {
final java.lang.String res;
final java.lang.Object unwrapped = unwrapp(element);
if (unwrapped instanceof fr.obeo.dsl.debug.Variable) {
res = getText(((fr.obeo.dsl.debug.Variable) (unwrapped)).getValue());
}else
if (element inst... | public java.lang.String getText(java.lang.Object element) {
final java.lang.String res;
final java.lang.Object unwrapped = unwrapp(element);
if (unwrapped instanceof fr.obeo.dsl.debug.Variable) {
res = getText(((fr.obeo.dsl.debug.Variable) (unwrapped)).getValue());
}else
if (element inst... |
private void compute() throws java.lang.Exception {
weka.core.Instances dataa = weka.core.converters.ConverterUtils.DataSource.read(filePath);
weka.clusterers.DBSCAN DBS;
DBS = new weka.clusterers.DBSCAN();
weka.clusterers.ClusterEvaluation eval = new weka.clusterers.ClusterEvaluation();
DBS.buildCl... | private void compute() throws java.lang.Exception {
weka.core.Instances dataa = weka.core.converters.ConverterUtils.DataSource.read(filePath);
weka.clusterers.DBSCAN DBS;
DBS = new weka.clusterers.DBSCAN();
weka.clusterers.ClusterEvaluation eval = new weka.clusterers.ClusterEvaluation();
DBS.buildCl... |
public final boolean isGLES2() {
if (0 != ((ctxOptions) & (com.jogamp.opengl.GLContext.CTX_PROFILE_ES))) {
final int major = ctxVersion.getMajor();
return (2 == major) || (3 == major);
}
return false;
} | public final boolean isGLES2() {
if (0 != ((ctxOptions) & (com.jogamp.opengl.GLContext.CTX_PROFILE_ES))) {
final int major = ctxVersion.getMajor();
return (2 == major) || (3 == major);
}else {
return false;
}
} |
private void initPrice() {
org.powerbot.script.GeItem ge = new org.powerbot.script.GeItem(sap);
psapphire = ge.price;
ge = new org.powerbot.script.GeItem(rub);
pruby = ge.price;
ge = new org.powerbot.script.GeItem(eme);
pemerald = ge.price;
ge = new org.powerbot.script.GeItem(dia);
pdiam... | private void initPrice() {
org.powerbot.script.GeItem ge = new org.powerbot.script.GeItem(sap);
psapphire = ge.price;
ge = new org.powerbot.script.GeItem(eme);
pemerald = ge.price;
ge = new org.powerbot.script.GeItem(rub);
pruby = ge.price;
ge = new org.powerbot.script.GeItem(dia);
pdiam... |
public void connectFailed(java.net.URI uri, java.net.SocketAddress sa, java.io.IOException ioe) {
java.net.InetSocketAddress socketAddress = ((java.net.InetSocketAddress) (sa));
failures.add(okhttp3.internal.Util.format("%s %s:%d %s", uri, socketAddress.getHostName(), socketAddress.getPort(), ioe.getMessage()))... | public void connectFailed(java.net.URI uri, java.net.SocketAddress sa, java.io.IOException ioe) {
java.net.InetSocketAddress socketAddress = ((java.net.InetSocketAddress) (sa));
failures.add(okhttp3.internal.Util.format("%s %s:%d %s", uri, socketAddress, socketAddress.getPort(), ioe.getMessage()));
} |
public void afterTextChanged(android.text.Editable s) {
if ((Phoneno.getText().toString().length()) == 10) {
phonenoTextInputLayout.setErrorEnabled(false);
isphone = true;
}else {
isphone = false;
Phoneno.setError("NOT VALID PHONE NUMBER");
}
} | public void afterTextChanged(android.text.Editable s) {
if ((Phoneno.getText().toString().length()) == 10) {
phonenoTextInputLayout.setErrorEnabled(false);
isphone = true;
}else {
phonenoTextInputLayout.setError("NOT VALID PHONE NUMBER");
isphone = false;
}
} |
public org.json.JSONObject serialiseToJSON() throws org.json.JSONException {
org.json.JSONObject returnObject = new org.json.JSONObject();
returnObject.put("groupId", this.groupID);
returnObject.put("groupName", this.groupName);
returnObject.put("parentGroups", this.parentGroups);
returnObject.put("... | public org.json.JSONObject serialiseToJSON() throws org.json.JSONException {
org.json.JSONObject returnObject = new org.json.JSONObject();
returnObject.put("groupId", this.id);
returnObject.put("groupName", this.groupName);
returnObject.put("parentGroups", this.parentGroups);
returnObject.put("child... |
public static void overwriteFile(java.lang.String content, java.lang.String fileName) {
java.io.File file = cn.j1angvei.castk2.util.FileUtil.createFileIfNotExist(fileName);
try {
org.apache.commons.io.FileUtils.writeStringToFile(file, content, java.nio.charset.Charset.defaultCharset(), false);
} cat... | public static void overwriteFile(java.lang.String content, java.lang.String fileName) {
java.io.File file = cn.j1angvei.castk2.util.FileUtil.createFileIfNotExist(fileName);
try {
assert file != null;
org.apache.commons.io.FileUtils.writeStringToFile(file, content, java.nio.charset.Charset.defaul... |
public android.os.Message insert(int ds_id, org.md2k.datakitapi.datatype.DataType dataType) {
org.md2k.utilities.Report.Log.d(org.md2k.datakit.manager.DataManager.TAG, ("ds_id=" + ds_id));
org.md2k.datakit.datarouter.Publishers.getInstance().receivedData(ds_id, dataType);
android.os.Bundle bundle = new andr... | public android.os.Message insert(int ds_id, org.md2k.datakitapi.datatype.DataType dataType) {
org.md2k.datakit.datarouter.Publishers.getInstance().receivedData(ds_id, dataType);
android.os.Bundle bundle = new android.os.Bundle();
bundle.putSerializable(org.md2k.datakitapi.status.Status.class.getSimpleName()... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.