id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
6,201
null, category.getUserId(), category.getCategoryId(), emailAddress, inProtocol, inServerName, inServerPort, inUseSSL, inUserName, inPassword, inReadInterval, outEmailAddress, outCustom, outServerName, outServerPort, outUseSSL, outUserName, outPassword, mailingListActive); <BUG>} return category;</BUG> } protected long getParentCategoryId(long groupId, long parentCategoryId) throws SystemException {
ExpandoBridge expandoBridge = category.getExpandoBridge(); expandoBridge.setAttributes(serviceContext); return category;
6,202
message, serviceContext.getCommunityPermissions(), serviceContext.getGuestPermissions()); } } logAddMessage(messageId, stopWatch, 5); <BUG>ExpandoBridge expandoBridge = message.getExpandoBridge(); expandoBridge.setAttributes(serviceContext);</BUG> if (!category.isDiscussion()) { mbStatsUserLocalService.updateStatsUser( message.getGroupId(), userId, now);
[DELETED]
6,203
mbCategoryPersistence.update(category, false); logAddMessage(messageId, stopWatch, 7); updateAsset( userId, message, serviceContext.getAssetCategoryIds(), serviceContext.getAssetTagNames()); <BUG>logAddMessage(messageId, stopWatch, 8); if (!message.isDiscussion() && !message.isAnonymous() &&</BUG> !user.isDefaultUser()) { int activityType = MBActivityKeys.ADD_MESSAGE; long receiverUserId = 0;
ExpandoBridge expandoBridge = message.getExpandoBridge(); expandoBridge.setAttributes(serviceContext); logAddMessage(messageId, stopWatch, 9); if (!message.isDiscussion() && !message.isAnonymous() &&
6,204
public static boolean debugMode = false; @ModConfigProperty(category = "Debug", name = "debugModeGOTG", comment = "Enable/Disable Debug Mode for the Gift Of The Gods") public static boolean debugModeGOTG = false; @ModConfigProperty(category = "Debug", name = "debugModeEnchantments", comment = "Enable/Disable Debug Mode for the Enchantments") public static boolean debugModeEnchantments = false; <BUG>@ModConfigProperty(category = "Weapons", name = "enableSwordsRecipes", comment = "Enable/Disable The ArmorPlus Sword's Recipes") public static boolean enableSwordsRecipes = true; @ModConfigProperty(category = "Weapons", name = "enableBattleAxesRecipes", comment = "Enable/Disable The ArmorPlus Battle Axes's Recipes") public static boolean enableBattleAxesRecipes = true; @ModConfigProperty(category = "Weapons", name = "enableBowsRecipes", comment = "Enable/Disable The ArmorPlus Bows's Recipes") public static boolean enableBowsRecipes = true; @ModConfigProperty(category = "Armors.SuperStarArmor.Effects", name = "enableSuperStarHRegen", comment = "Enable/Disable The Super Star Helmet Regeneration") </BUG> public static boolean enableSuperStarHRegen = true;
@ModConfigProperty(category = "Weapons", name = "enableSwordsRecipes", comment = "Enable/Disable ArmorPlus Sword's Recipes") @ModConfigProperty(category = "Weapons", name = "enableBattleAxesRecipes", comment = "Enable/Disable ArmorPlus Battle Axes's Recipes") @ModConfigProperty(category = "Weapons", name = "enableBowsRecipes", comment = "Enable/Disable ArmorPlus Bows's Recipes")
6,205
if (DEBUG) System.err.println(fullAddedName + " --> " + fullRemovedName); rewriteMap.put(fullAddedName, fullRemovedName); } } return this; <BUG>} public String rewriteClassName(String className) {</BUG> String rewrittenClassName = rewriteMap.get(className); if (rewrittenClassName != null) { className = rewrittenClassName;
public boolean isEmpty() { return rewriteMap.isEmpty(); public String rewriteClassName(String className) {
6,206
import qubexplorer.NoSuchProjectException; import qubexplorer.PassEncoder; import qubexplorer.RadarIssue; import qubexplorer.ResourceKey; import qubexplorer.Severity; <BUG>import qubexplorer.SonarQubeProject; import qubexplorer.Summary;</BUG> public class SonarQube implements IssuesContainer{ private static final String VIOLATIONS_DENSITY_METRICS = "violations_density";
import qubexplorer.SonarQubeProjectConfiguration; import qubexplorer.DefaultSonarQubeProjectConfiguration; import qubexplorer.Summary;
6,207
} } private static boolean isError401(ConnectionException ex) { return ex.getMessage().contains("HTTP error: 401"); } <BUG>public List<SonarQubeProject> getProjects(UserCredentials userCredentials) { </BUG> try{ Sonar sonar; if(userCredentials == null) {
public SonarQube() { this("http://localhost:9000"); public String getServerUrl() { return serverUrl; public String getVersion(UserCredentials userCredentials) {
6,208
import qubexplorer.UserCredentials; import qubexplorer.AuthorizationException; import qubexplorer.MvnModelFactory; import qubexplorer.MvnModelInputException; import qubexplorer.PassEncoder; <BUG>import qubexplorer.SonarQubeProject; </BUG> import qubexplorer.SonarQubeProjectBuilder; import qubexplorer.server.SonarQube; public class SonarRunnerProccess {
import qubexplorer.SonarQubeProjectConfiguration;
6,209
return true; } else { return false; } } <BUG>private boolean addModuleProperties(String module, Project moduleProject, SonarQubeProject projectInfo) throws MvnModelInputException { SonarQubeProject subprojectInfo=projectInfo.createSubprojectInfo(moduleProject); boolean containsSources = configureSourcesAndBinariesProperties(module, moduleProject);</BUG> if(containsSources){
private boolean addModuleProperties(String module, Project moduleProject, SonarQubeProjectConfiguration projectInfo) throws MvnModelInputException { SonarQubeProjectConfiguration subprojectInfo=SonarQubeProjectBuilder.getDefaultConfiguration(moduleProject); boolean containsSources = configureSourcesAndBinariesProperties(module, moduleProject);
6,210
import org.apache.maven.model.Model; import org.apache.maven.model.io.xpp3.MavenXpp3Reader; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; import org.netbeans.api.project.Project; import org.openide.filesystems.FileObject; <BUG>public class SonarMvnProject implements SonarQubeProject { </BUG> private final Model model; public SonarMvnProject(Project project) throws MvnModelInputException { this.model = createModel(project.getProjectDirectory());
public class SonarMvnProject implements SonarQubeProjectConfiguration {
6,211
if(version == null && model.getParent() != null) { version=model.getParent().getVersion(); } return version; } <BUG>@Override public SonarMvnProject createSubprojectInfo(Project subproject) { try { return new SonarMvnProject(subproject); } catch (MvnModelInputException ex) { throw new SonarQubeProjectException(ex); } }</BUG> private static Model createModel(FileObject projectDir) throws MvnModelInputException {
[DELETED]
6,212
try { return new SonarMvnProject(project); } catch (MvnModelInputException ex) { throw new SonarQubeProjectException(ex); } <BUG>}else{ return new SimpleSonarProject(project); }</BUG> }
[DELETED]
6,213
import org.openstreetmap.josm.actions.mapmode.MapMode; import org.openstreetmap.josm.data.Bounds; import org.openstreetmap.josm.data.coor.LatLon; import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor; import org.openstreetmap.josm.gui.ExtendedDialog; <BUG>import org.openstreetmap.josm.gui.MapFrame; import org.openstreetmap.josm.gui.MapView; import org.openstreetmap.josm.gui.PleaseWaitRunnable; import org.openstreetmap.josm.gui.MapFrame.MapModeChangeListener; import org.openstreetmap.josm.gui.MapView.LayerChangeListener;</BUG> import org.openstreetmap.josm.gui.dialogs.LayerListDialog;
import org.openstreetmap.josm.gui.MapView.LayerChangeListener;
6,214
throw new IllegalArgumentException(); if (dir.getString(GpsDirectory.TAG_GPS_LONGITUDE_REF).charAt(0) == 'W') {</BUG> lon = -lon; } components = dir.getRationalArray(GpsDirectory.TAG_GPS_LATITUDE); <BUG>deg = components[0].intValue(); min = components[1].floatValue(); sec = components[2].floatValue(); lat = (deg + (min / 60) + (sec / 3600)); if (Double.isNaN(lat))</BUG> throw new IllegalArgumentException();
lon = (Double.isNaN(deg) ? 0 : deg + (Double.isNaN(min) ? 0 : (min / 60)) + (Double.isNaN(sec) ? 0 : (sec / 3600))); if (dir.getString(GpsDirectory.TAG_GPS_LONGITUDE_REF).charAt(0) == 'W') { deg = components[0].doubleValue(); min = components[1].doubleValue(); sec = components[2].doubleValue(); if (Double.isNaN(deg) && Double.isNaN(min) && Double.isNaN(sec)) lat = (Double.isNaN(deg) ? 0 : deg + (Double.isNaN(min) ? 0 : (min / 60)) + (Double.isNaN(sec) ? 0 : (sec / 3600))); if (Double.isNaN(lat))
6,215
return new CommentViewHolder(view, fragment.getActivity(), (ICommentableFragment) fragment); } else if (viewType == GiveawayDetailsCard.VIEW_LAYOUT) { return new GiveawayCardViewHolder(view, (GiveawayDetailFragment) fragment); } else if (viewType == DiscussionDetailsCard.VIEW_LAYOUT) { return new DiscussionCardViewHolder(view, (DiscussionDetailFragment) fragment, fragment.getContext()); <BUG>} else if (viewType == TradeDetailsCard.VIEW_LAYOUT) { return new TradeCardViewHolder(view, (TradeDetailFragment) fragment, fragment.getContext());</BUG> } else if (viewType == CommentContextViewHolder.VIEW_LAYOUT) { return new CommentContextViewHolder(view, fragment.getActivity()); } else if (viewType == Poll.Header.VIEW_LAYOUT) {
[DELETED]
6,216
GiveawayDetailsCard card = (GiveawayDetailsCard) getItem(position); holder.setFrom(card); } else if (h instanceof DiscussionCardViewHolder) { DiscussionCardViewHolder holder = (DiscussionCardViewHolder) h; DiscussionDetailsCard card = (DiscussionDetailsCard) getItem(position); <BUG>holder.setFrom(card); } else if (h instanceof TradeCardViewHolder) { TradeCardViewHolder holder = (TradeCardViewHolder) h; TradeDetailsCard card = (TradeDetailsCard) getItem(position);</BUG> holder.setFrom(card);
[DELETED]
6,217
setContentView(R.layout.activity_one_fragment); if (savedInstanceState == null) loadFragment(DiscussionDetailFragment.newInstance((BasicDiscussion) serializable, commentContext)); return; } <BUG>serializable = getIntent().getSerializableExtra(TradeDetailFragment.ARG_TRADE); if (serializable != null) { setContentView(R.layout.activity_one_fragment); if (savedInstanceState == null) loadFragment(TradeDetailFragment.newInstance((BasicTrade) serializable, commentContext)); return; }</BUG> String user = getIntent().getStringExtra(UserDetailFragment.ARG_USER);
[DELETED]
6,218
params.width = commentMarker.getLayoutParams().width * Math.min(MAX_VISIBLE_DEPTH, comment.getDepth()); commentIndent.setLayoutParams(params); Picasso.with(context).load(comment.getAvatar()).placeholder(R.drawable.default_avatar_mask).transform(new RoundedCornersTransformation(20, 0)).into(commentImage); View.OnClickListener viewProfileListener = comment.isDeleted() ? null : new View.OnClickListener() { @Override <BUG>public void onClick(View v) { fragment.showProfile(comment.getAuthor());</BUG> } }; commentImage.setOnClickListener(viewProfileListener);
if(comment instanceof TradeComment) fragment.showProfile(((TradeComment) comment).getSteamID64()); else fragment.showProfile(comment.getAuthor());
6,219
return super.onKeyDown(keyCode, event); } @Override public boolean onKeyLongPress(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { <BUG>final CharSequence[] strings = new CharSequence[]{getString(R.string.go_to_giveaway), getString(R.string.go_to_discussion), getString(R.string.go_to_user), getString(R.string.go_to_trade)}; AlertDialog.Builder builder = new AlertDialog.Builder(this);</BUG> builder.setTitle(R.string.go_to); builder.setItems(strings, new DialogInterface.OnClickListener() { @Override
final CharSequence[] strings = new CharSequence[]{getString(R.string.go_to_giveaway), getString(R.string.go_to_discussion), getString(R.string.go_to_user)}; AlertDialog.Builder builder = new AlertDialog.Builder(this);
6,220
intent.putExtra(DiscussionDetailFragment.ARG_DISCUSSION, new BasicDiscussion(target)); break; case 2: intent.putExtra(UserDetailFragment.ARG_USER, target); break; <BUG>case 3: intent.putExtra(TradeDetailFragment.ARG_TRADE, new BasicTrade(target)); break;</BUG> } startActivity(intent);
[DELETED]
6,221
package com.cronutils.model.time.generator; import java.util.Collections; <BUG>import java.util.List; import org.apache.commons.lang3.Validate;</BUG> import com.cronutils.model.field.CronField; import com.cronutils.model.field.expression.FieldExpression; public abstract class FieldValueGenerator {
import org.apache.commons.lang3.Validate; import org.apache.commons.lang3.Validate;
6,222
import java.util.ResourceBundle; import java.util.function.Function;</BUG> class DescriptionStrategyFactory { private DescriptionStrategyFactory() {} public static DescriptionStrategy daysOfWeekInstance(final ResourceBundle bundle, final FieldExpression expression) { <BUG>final Function<Integer, String> nominal = integer -> new DateTime().withDayOfWeek(integer).dayOfWeek().getAsText(bundle.getLocale()); </BUG> NominalDescriptionStrategy dow = new NominalDescriptionStrategy(bundle, nominal, expression); dow.addDescription(fieldExpression -> { if (fieldExpression instanceof On) {
import java.util.function.Function; import com.cronutils.model.field.expression.FieldExpression; import com.cronutils.model.field.expression.On; final Function<Integer, String> nominal = integer -> DayOfWeek.of(integer).getDisplayName(TextStyle.FULL, bundle.getLocale());
6,223
return dom; } public static DescriptionStrategy monthsInstance(final ResourceBundle bundle, final FieldExpression expression) { return new NominalDescriptionStrategy( bundle, <BUG>integer -> new DateTime().withMonthOfYear(integer).monthOfYear().getAsText(bundle.getLocale()), expression</BUG> ); } public static DescriptionStrategy plainInstance(ResourceBundle bundle, final FieldExpression expression) {
integer -> Month.of(integer).getDisplayName(TextStyle.FULL, bundle.getLocale()), expression
6,224
<BUG>package com.cronutils.model.time.generator; import com.cronutils.mapper.WeekDay;</BUG> import com.cronutils.model.field.CronField; import com.cronutils.model.field.CronFieldName; import com.cronutils.model.field.constraint.FieldConstraintsBuilder;
import java.time.LocalDate; import java.util.Collections; import java.util.List; import java.util.Set; import org.apache.commons.lang3.Validate; import com.cronutils.mapper.WeekDay;
6,225
import com.cronutils.model.field.expression.Between; import com.cronutils.model.field.expression.FieldExpression; import com.cronutils.parser.CronParserField; import com.google.common.collect.Lists; import com.google.common.collect.Sets; <BUG>import org.apache.commons.lang3.Validate; import org.joda.time.DateTime; import java.util.Collections; import java.util.List; import java.util.Set;</BUG> class BetweenDayOfWeekValueGenerator extends FieldValueGenerator {
[DELETED]
6,226
<BUG>package com.cronutils.model.time.generator; import com.cronutils.model.field.CronField;</BUG> import com.cronutils.model.field.CronFieldName; import com.cronutils.model.field.expression.FieldExpression; import com.cronutils.model.field.expression.On;
import java.time.DayOfWeek; import java.time.LocalDate; import java.util.List; import org.apache.commons.lang3.Validate; import com.cronutils.model.field.CronField;
6,227
import com.cronutils.model.field.CronField;</BUG> import com.cronutils.model.field.CronFieldName; import com.cronutils.model.field.expression.FieldExpression; import com.cronutils.model.field.expression.On; import com.google.common.collect.Lists; <BUG>import org.apache.commons.lang3.Validate; import org.joda.time.DateTime; import java.util.List;</BUG> class OnDayOfMonthValueGenerator extends FieldValueGenerator { private int year;
package com.cronutils.model.time.generator; import java.time.DayOfWeek; import java.time.LocalDate; import java.util.List; import com.cronutils.model.field.CronField;
6,228
class OnDayOfMonthValueGenerator extends FieldValueGenerator { private int year; private int month; public OnDayOfMonthValueGenerator(CronField cronField, int year, int month) { super(cronField); <BUG>Validate.isTrue(CronFieldName.DAY_OF_MONTH.equals(cronField.getField()), "CronField does not belong to day of month"); this.year = year;</BUG> this.month = month; }
Validate.isTrue(CronFieldName.DAY_OF_MONTH.equals(cronField.getField()), "CronField does not belong to day of" + " month"); this.year = year;
6,229
package com.cronutils.mapper; public class ConstantsMapper { private ConstantsMapper() {} public static final WeekDay QUARTZ_WEEK_DAY = new WeekDay(2, false); <BUG>public static final WeekDay JODATIME_WEEK_DAY = new WeekDay(1, false); </BUG> public static final WeekDay CRONTAB_WEEK_DAY = new WeekDay(1, true); public static int weekDayMapping(WeekDay source, WeekDay target, int weekday){ return source.mapTo(weekday, target);
public static final WeekDay JAVA8 = new WeekDay(1, false);
6,230
return nextMatch; } catch (NoSuchValueException e) { throw new IllegalArgumentException(e); } } <BUG>DateTime nextClosestMatch(DateTime date) throws NoSuchValueException { </BUG> List<Integer> year = yearsValueGenerator.generateCandidates(date.getYear(), date.getYear()); TimeNode days = null; int lowestMonth = months.getValues().get(0);
ZonedDateTime nextClosestMatch(ZonedDateTime date) throws NoSuchValueException {
6,231
boolean questionMarkSupported = cronDefinition.getFieldDefinition(DAY_OF_WEEK).getConstraints().getSpecialChars().contains(QUESTION_MARK); if(questionMarkSupported){ return new TimeNode( generateDayCandidatesQuestionMarkSupported( <BUG>date.getYear(), date.getMonthOfYear(), </BUG> ((DayOfWeekFieldDefinition) cronDefinition.getFieldDefinition(DAY_OF_WEEK) ).getMondayDoWValue()
date.getYear(), date.getMonthValue(),
6,232
) ); }else{ return new TimeNode( generateDayCandidatesQuestionMarkNotSupported( <BUG>date.getYear(), date.getMonthOfYear(), </BUG> ((DayOfWeekFieldDefinition) cronDefinition.getFieldDefinition(DAY_OF_WEEK) ).getMondayDoWValue()
date.getYear(), date.getMonthValue(),
6,233
} public DateTime lastExecution(DateTime date){ </BUG> Validate.notNull(date); try { <BUG>DateTime previousMatch = previousClosestMatch(date); </BUG> if(previousMatch.equals(date)){ previousMatch = previousClosestMatch(date.minusSeconds(1)); }
public java.time.Duration timeToNextExecution(ZonedDateTime date){ return java.time.Duration.between(date, nextExecution(date)); public ZonedDateTime lastExecution(ZonedDateTime date){ ZonedDateTime previousMatch = previousClosestMatch(date);
6,234
return previousMatch; } catch (NoSuchValueException e) { throw new IllegalArgumentException(e); } } <BUG>public Duration timeFromLastExecution(DateTime date){ return new Interval(lastExecution(date), date).toDuration(); } public boolean isMatch(DateTime date){ </BUG> return nextExecution(lastExecution(date)).equals(date);
[DELETED]
6,235
<BUG>package com.cronutils.model.time.generator; import com.cronutils.model.field.CronField;</BUG> import com.cronutils.model.field.expression.Every; import com.cronutils.model.field.expression.FieldExpression; import com.google.common.annotations.VisibleForTesting;
import java.time.ZonedDateTime; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.cronutils.model.field.CronField;
6,236
import com.cronutils.model.field.CronField;</BUG> import com.cronutils.model.field.expression.Every; import com.cronutils.model.field.expression.FieldExpression; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.Lists; <BUG>import org.joda.time.DateTime; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.List;</BUG> class EveryFieldValueGenerator extends FieldValueGenerator {
package com.cronutils.model.time.generator; import java.time.ZonedDateTime; import java.util.List; import com.cronutils.model.field.CronField;
6,237
private static final Logger log = LoggerFactory.getLogger(EveryFieldValueGenerator.class); public EveryFieldValueGenerator(CronField cronField) { super(cronField); log.trace(String.format( "processing \"%s\" at %s", <BUG>cronField.getExpression().asString(), DateTime.now() </BUG> )); } @Override
cronField.getExpression().asString(), ZonedDateTime.now()
6,238
import java.util.concurrent.TimeUnit; @Beta public class HttpClientConfig { public static final String JAVAX_NET_SSL_KEY_STORE = "javax.net.ssl.keyStore"; <BUG>public static final String JAVAX_NET_SSL_KEY_STORE_PASSWORD = "javax.net.ssl.keyStorePassword"; private boolean http2Enabled;</BUG> private Duration connectTimeout = new Duration(1, TimeUnit.SECONDS); private Duration requestTimeout = new Duration(5, TimeUnit.MINUTES); private Duration idleTimeout = new Duration(1, TimeUnit.MINUTES);
public static final String JAVAX_NET_SSL_TRUST_STORE = "javax.net.ssl.trustStore"; public static final String JAVAX_NET_SSL_TRUST_STORE_PASSWORD = "javax.net.ssl.trustStorePassword"; private boolean http2Enabled;
6,239
private int maxConnectionsPerServer = 20; private int maxRequestsQueuedPerDestination = 1024; private DataSize maxContentLength = new DataSize(16, Unit.MEGABYTE); private HostAndPort socksProxy; private String keyStorePath = System.getProperty(JAVAX_NET_SSL_KEY_STORE); <BUG>private String keyStorePassword = System.getProperty(JAVAX_NET_SSL_KEY_STORE_PASSWORD); private boolean authenticationEnabled;</BUG> private String kerberosPrincipal; private String kerberosRemoteServiceName; public boolean isHttp2Enabled()
private String trustStorePath = System.getProperty(JAVAX_NET_SSL_TRUST_STORE); private String trustStorePassword = System.getProperty(JAVAX_NET_SSL_TRUST_STORE_PASSWORD); private boolean authenticationEnabled;
6,240
import org.testng.annotations.Test; import javax.validation.constraints.NotNull; import java.util.Map; import java.util.concurrent.TimeUnit; import static io.airlift.http.client.HttpClientConfig.JAVAX_NET_SSL_KEY_STORE; <BUG>import static io.airlift.http.client.HttpClientConfig.JAVAX_NET_SSL_KEY_STORE_PASSWORD; import static io.airlift.testing.ValidationAssertions.assertFailsValidation;</BUG> public class TestHttpClientConfig { @Test
import static io.airlift.http.client.HttpClientConfig.JAVAX_NET_SSL_TRUST_STORE; import static io.airlift.http.client.HttpClientConfig.JAVAX_NET_SSL_TRUST_STORE_PASSWORD; import static io.airlift.testing.ValidationAssertions.assertFailsValidation;
6,241
.setMaxConnectionsPerServer(20) .setMaxRequestsQueuedPerDestination(1024) .setMaxContentLength(new DataSize(16, Unit.MEGABYTE)) .setSocksProxy(null) .setKeyStorePath(System.getProperty(JAVAX_NET_SSL_KEY_STORE)) <BUG>.setKeyStorePassword(System.getProperty(JAVAX_NET_SSL_KEY_STORE_PASSWORD)) .setAuthenticationEnabled(false)</BUG> .setKerberosRemoteServiceName(null) .setKerberosPrincipal(null)); }
.setTrustStorePath(System.getProperty(JAVAX_NET_SSL_TRUST_STORE)) .setTrustStorePassword(System.getProperty(JAVAX_NET_SSL_TRUST_STORE_PASSWORD)) .setAuthenticationEnabled(false)
6,242
.put("http-client.max-connections-per-server", "3") .put("http-client.max-requests-queued-per-destination", "10") .put("http-client.max-content-length", "1MB") .put("http-client.socks-proxy", "localhost:1080") .put("http-client.key-store-path", "key-store") <BUG>.put("http-client.key-store-password", "key-store-password") .put("http-client.authentication.enabled", "true")</BUG> .put("http-client.authentication.krb5.remote-service-name", "airlift") .put("http-client.authentication.krb5.principal", "airlift-client") .build();
.put("http-client.trust-store-path", "trust-store") .put("http-client.trust-store-password", "trust-store-password") .put("http-client.authentication.enabled", "true")
6,243
.setMaxConnectionsPerServer(3) .setMaxRequestsQueuedPerDestination(10) .setMaxContentLength(new DataSize(1, Unit.MEGABYTE)) .setSocksProxy(HostAndPort.fromParts("localhost", 1080)) .setKeyStorePath("key-store") <BUG>.setKeyStorePassword("key-store-password") .setAuthenticationEnabled(true)</BUG> .setKerberosRemoteServiceName("airlift") .setKerberosPrincipal("airlift-client"); ConfigAssertions.assertFullMapping(properties, expected);
.setTrustStorePath("trust-store") .setTrustStorePassword("trust-store-password") .setAuthenticationEnabled(true)
6,244
SslContextFactory sslContextFactory = new SslContextFactory(); sslContextFactory.setEndpointIdentificationAlgorithm("HTTPS"); if (config.getKeyStorePath() != null) { sslContextFactory.setKeyStorePath(config.getKeyStorePath()); sslContextFactory.setKeyStorePassword(config.getKeyStorePassword()); <BUG>} HttpClientTransport transport;</BUG> if (config.isHttp2Enabled()) { HTTP2Client client = new HTTP2Client(); client.setSelectors(CLIENT_TRANSPORT_SELECTORS);
if (config.getTrustStorePath() != null) { sslContextFactory.setTrustStorePath(config.getTrustStorePath()); sslContextFactory.setTrustStorePassword(config.getTrustStorePassword()); HttpClientTransport transport;
6,245
protected HttpClientConfig createClientConfig() { return new HttpClientConfig() .setHttp2Enabled(false) .setKeyStorePath(getResource("localhost.keystore").getPath()) <BUG>.setKeyStorePassword("changeit"); }</BUG> @Override public <T, E extends Exception> T executeRequest(Request request, ResponseHandler<T, E> responseHandler) throws Exception
.setKeyStorePassword("changeit") .setTrustStorePath(getResource("localhost.truststore").getPath()) .setTrustStorePassword("changeit"); }
6,246
@Override public String toString() { return "desc"; } }; <BUG>public static final SortOrder DEFAULT = DESC; private static final SortOrder PROTOTYPE = DEFAULT; </BUG> @Override public SortOrder readFrom(StreamInput in) throws IOException {
return "asc"; }, DESC { private static final SortOrder PROTOTYPE = ASC;
6,247
GeoDistance geoDistance = GeoDistance.DEFAULT; boolean reverse = false; MultiValueMode sortMode = null; NestedInnerQueryParseSupport nestedHelper = null; final boolean indexCreatedBeforeV2_0 = context.indexShard().getIndexSettings().getIndexVersionCreated().before(Version.V_2_0_0); <BUG>boolean coerce = false; boolean ignoreMalformed = false; XContentParser.Token token;</BUG> String currentName = parser.currentName(); while ((token = parser.nextToken()) != XContentParser.Token.END_OBJECT) {
boolean coerce = GeoDistanceSortBuilder.DEFAULT_COERCE; boolean ignoreMalformed = GeoDistanceSortBuilder.DEFAULT_IGNORE_MALFORMED; XContentParser.Token token;
6,248
String currentName = parser.currentName(); while ((token = parser.nextToken()) != XContentParser.Token.END_OBJECT) { if (token == XContentParser.Token.FIELD_NAME) { currentName = parser.currentName(); } else if (token == XContentParser.Token.START_ARRAY) { <BUG>parseGeoPoints(parser, geoPoints); </BUG> fieldName = currentName; } else if (token == XContentParser.Token.START_OBJECT) { if ("nested_filter".equals(currentName) || "nestedFilter".equals(currentName)) {
GeoDistanceSortBuilder.parseGeoPoints(parser, geoPoints);
6,249
package org.elasticsearch.search.sort; <BUG>import org.elasticsearch.script.Script; public class SortBuilders {</BUG> public static ScoreSortBuilder scoreSort() { return new ScoreSortBuilder(); }
import org.elasticsearch.common.geo.GeoPoint; import java.util.Arrays; public class SortBuilders {
6,250
public GeoDistanceSortBuilder ignoreMalformed(boolean ignoreMalformed) { this.ignoreMalformed = ignoreMalformed; return this; }</BUG> @Override <BUG>public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException { builder.startObject("_geo_distance"); if (geohashes.size() == 0 && points.size() == 0) { throw new ElasticsearchParseException("No points provided for _geo_distance sort."); }</BUG> builder.startArray(fieldName);
if (coerce == false) { } } public boolean ignoreMalformed() { return this.ignoreMalformed; } builder.startObject(NAME);
6,251
Bundle savedInstanceState) { final View rootView = inflater.inflate(R.layout.tab_qibla, container, false); final QiblaCompassView qiblaCompassView = (QiblaCompassView)rootView.findViewById(R.id.qibla_compass); qiblaCompassView.setConstants(((TextView)rootView.findViewById(R.id.bearing_north)), getText(R.string.bearing_north), ((TextView)rootView.findViewById(R.id.bearing_qibla)), getText(R.string.bearing_qibla)); <BUG>sOrientationListener = new SensorListener() { </BUG> public void onSensorChanged(int s, float v[]) { float northDirection = v[SensorManager.DATA_X]; qiblaCompassView.setDirections(northDirection, sQiblaDirection);
sOrientationListener = new android.hardware.SensorListener() {
6,252
private JSpinner mySSHConnectionTimeout; private JSpinner mySSHReadTimeout; private JBLabel myWarningLabel; private HyperlinkLabel myLinkLabel; private JRadioButton myJavaHLAcceleration; <BUG>private JRadioButton myNoAcceleration; @NonNls private static final String HELP_ID = "project.propSubversion";</BUG> public SvnConfigurable(Project project) { myProject = project; myLinkLabel.setHyperlinkTarget("http://confluence.jetbrains.net/display/IDEADEV/Subversion+1.7+in+IntelliJ+IDEA+11");
private JLabel myJavaHLInfo; @NonNls private static final String HELP_ID = "project.propSubversion";
6,253
import java.util.Locale; import java.util.Map; import java.util.TreeMap; public class DependencyConvergenceReport extends AbstractProjectInfoReport <BUG>{ private List reactorProjects; private static final int PERCENTAGE = 100;</BUG> public String getOutputName() {
private static final int PERCENTAGE = 100; private static final List SUPPORTED_FONT_FAMILY_NAMES = Arrays.asList( GraphicsEnvironment .getLocalGraphicsEnvironment().getAvailableFontFamilyNames() );
6,254
sink.section1(); sink.sectionTitle1(); sink.text( getI18nString( locale, "title" ) ); sink.sectionTitle1_(); Map dependencyMap = getDependencyMap(); <BUG>generateLegend( locale, sink ); generateStats( locale, sink, dependencyMap ); generateConvergence( locale, sink, dependencyMap ); sink.section1_();</BUG> sink.body_();
sink.lineBreak(); sink.section1_();
6,255
Iterator it = artifactMap.keySet().iterator(); while ( it.hasNext() ) { String version = (String) it.next(); sink.tableRow(); <BUG>sink.tableCell(); sink.text( version );</BUG> sink.tableCell_(); sink.tableCell(); generateVersionDetails( sink, artifactMap, version );
sink.tableCell( String.valueOf( cellWidth ) + "px" ); sink.text( version );
6,256
sink.tableCell(); sink.text( getI18nString( locale, "legend.shared" ) ); sink.tableCell_(); sink.tableRow_(); sink.tableRow(); <BUG>sink.tableCell(); iconError( sink );</BUG> sink.tableCell_(); sink.tableCell(); sink.text( getI18nString( locale, "legend.different" ) );
sink.tableCell( "15px" ); // according /images/icon_error_sml.gif iconError( sink );
6,257
sink.tableCaption(); sink.text( getI18nString( locale, "stats.caption" ) ); sink.tableCaption_();</BUG> sink.tableRow(); <BUG>sink.tableHeaderCell(); sink.text( getI18nString( locale, "stats.subprojects" ) + ":" ); sink.tableHeaderCell_();</BUG> sink.tableCell(); sink.text( String.valueOf( reactorProjects.size() ) ); sink.tableCell_();
sink.bold(); sink.bold_(); sink.tableCaption_(); sink.tableHeaderCell( headerCellWidth ); sink.text( getI18nString( locale, "stats.subprojects" ) ); sink.tableHeaderCell_();
6,258
sink.tableCell(); sink.text( String.valueOf( reactorProjects.size() ) ); sink.tableCell_(); sink.tableRow_(); sink.tableRow(); <BUG>sink.tableHeaderCell(); sink.text( getI18nString( locale, "stats.dependencies" ) + ":" ); sink.tableHeaderCell_();</BUG> sink.tableCell(); sink.text( String.valueOf( depCount ) );
sink.tableHeaderCell( headerCellWidth ); sink.text( getI18nString( locale, "stats.dependencies" ) ); sink.tableHeaderCell_();
6,259
sink.text( String.valueOf( convergence ) + "%" ); sink.bold_(); sink.tableCell_(); sink.tableRow_(); sink.tableRow(); <BUG>sink.tableHeaderCell(); sink.text( getI18nString( locale, "stats.readyrelease" ) + ":" ); sink.tableHeaderCell_();</BUG> sink.tableCell(); if ( convergence >= PERCENTAGE && snapshotCount <= 0 )
sink.tableHeaderCell( headerCellWidth ); sink.text( getI18nString( locale, "stats.readyrelease" ) ); sink.tableHeaderCell_();
6,260
{ ReverseDependencyLink p1 = (ReverseDependencyLink) o1; ReverseDependencyLink p2 = (ReverseDependencyLink) o2; return p1.getProject().getId().compareTo( p2.getProject().getId() ); } <BUG>else {</BUG> return 0; } }
iconError( sink );
6,261
minX = src.getMinX(); maxX = src.getMaxX(); minY = src.getMinY(); maxY = src.getMaxY(); } else { <BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC); minX = src.getMinX() + 1; // Left padding maxX = src.getMaxX() - 2; // Right padding minY = src.getMinY() + 1; // Top padding maxY = src.getMaxY() - 2; // Bottom padding </BUG> }
iterSource = getRandomIterator(src, null); minX = src.getMinX() + leftPad; // Left padding maxX = src.getMaxX() - rightPad; // Right padding minY = src.getMinY() + topPad; // Top padding maxY = src.getMaxY() - bottomPad; // Bottom padding
6,262
final int lineStride = dst.getScanlineStride(); final int pixelStride = dst.getPixelStride(); final int[] bandOffsets = dst.getBandOffsets(); final byte[][] data = dst.getByteDataArrays(); final float[] warpData = new float[2 * dstWidth]; <BUG>int lineOffset = 0; if (ctable == null) { // source does not have IndexColorModel if (caseA) { for (int h = 0; h < dstHeight; h++) {</BUG> int pixelOffset = lineOffset;
if(hasROI && !roiContainsTile && roiIter == null){ throw new IllegalArgumentException("Error on creating the ROI iterator"); } if (caseA || (caseB && roiContainsTile)) { for (int h = 0; h < dstHeight; h++) {
6,263
pixelOffset += pixelStride; } // COLS LOOP } // ROWS LOOP } } else {// source has IndexColorModel <BUG>if (caseA) { for (int h = 0; h < dstHeight; h++) {</BUG> int pixelOffset = lineOffset; lineOffset += lineStride; warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
} else if (caseB) { for (int h = 0; h < dstHeight; h++) {
6,264
minX = src.getMinX(); maxX = src.getMaxX(); minY = src.getMinY(); maxY = src.getMaxY(); } else { <BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC); minX = src.getMinX() + 1; // Left padding maxX = src.getMaxX() - 2; // Right padding minY = src.getMinY() + 1; // Top padding maxY = src.getMaxY() - 2; // Bottom padding </BUG> }
iterSource = getRandomIterator(src, null); minX = src.getMinX() + leftPad; // Left padding maxX = src.getMaxX() - rightPad; // Right padding minY = src.getMinY() + topPad; // Top padding maxY = src.getMaxY() - bottomPad; // Bottom padding
6,265
final int pixelStride = dst.getPixelStride(); final int[] bandOffsets = dst.getBandOffsets(); final short[][] data = dst.getShortDataArrays(); final float[] warpData = new float[2 * dstWidth]; int lineOffset = 0; <BUG>if (caseA) { for (int h = 0; h < dstHeight; h++) {</BUG> int pixelOffset = lineOffset; lineOffset += lineStride; warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
if(hasROI && !roiContainsTile && roiIter == null){ throw new IllegalArgumentException("Error on creating the ROI iterator"); } if (caseA || (caseB && roiContainsTile)) { for (int h = 0; h < dstHeight; h++) {
6,266
minX = src.getMinX(); maxX = src.getMaxX(); minY = src.getMinY(); maxY = src.getMaxY(); } else { <BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC); minX = src.getMinX() + 1; // Left padding maxX = src.getMaxX() - 2; // Right padding minY = src.getMinY() + 1; // Top padding maxY = src.getMaxY() - 2; // Bottom padding </BUG> }
iterSource = getRandomIterator(src, null); minX = src.getMinX() + leftPad; // Left padding maxX = src.getMaxX() - rightPad; // Right padding minY = src.getMinY() + topPad; // Top padding maxY = src.getMaxY() - bottomPad; // Bottom padding
6,267
final int pixelStride = dst.getPixelStride(); final int[] bandOffsets = dst.getBandOffsets(); final short[][] data = dst.getShortDataArrays(); final float[] warpData = new float[2 * dstWidth]; int lineOffset = 0; <BUG>if (caseA) { for (int h = 0; h < dstHeight; h++) {</BUG> int pixelOffset = lineOffset; lineOffset += lineStride; warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
if(hasROI && !roiContainsTile && roiIter == null){ throw new IllegalArgumentException("Error on creating the ROI iterator"); } if (caseA || (caseB && roiContainsTile)) { for (int h = 0; h < dstHeight; h++) {
6,268
minX = src.getMinX(); maxX = src.getMaxX(); minY = src.getMinY(); maxY = src.getMaxY(); } else { <BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC); minX = src.getMinX() + 1; // Left padding maxX = src.getMaxX() - 2; // Right padding minY = src.getMinY() + 1; // Top padding maxY = src.getMaxY() - 2; // Bottom padding </BUG> }
iterSource = getRandomIterator(src, null); minX = src.getMinX() + leftPad; // Left padding maxX = src.getMaxX() - rightPad; // Right padding minY = src.getMinY() + topPad; // Top padding maxY = src.getMaxY() - bottomPad; // Bottom padding
6,269
final int pixelStride = dst.getPixelStride(); final int[] bandOffsets = dst.getBandOffsets(); final int[][] data = dst.getIntDataArrays(); final float[] warpData = new float[2 * dstWidth]; int lineOffset = 0; <BUG>if (caseA) { for (int h = 0; h < dstHeight; h++) {</BUG> int pixelOffset = lineOffset; lineOffset += lineStride; warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
if(hasROI && !roiContainsTile && roiIter == null){ throw new IllegalArgumentException("Error on creating the ROI iterator"); } if (caseA || (caseB && roiContainsTile)) { for (int h = 0; h < dstHeight; h++) {
6,270
minX = src.getMinX(); maxX = src.getMaxX(); minY = src.getMinY(); maxY = src.getMaxY(); } else { <BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC); minX = src.getMinX() + 1; // Left padding maxX = src.getMaxX() - 2; // Right padding minY = src.getMinY() + 1; // Top padding maxY = src.getMaxY() - 2; // Bottom padding </BUG> }
iterSource = getRandomIterator(src, null); minX = src.getMinX() + leftPad; // Left padding maxX = src.getMaxX() - rightPad; // Right padding minY = src.getMinY() + topPad; // Top padding maxY = src.getMaxY() - bottomPad; // Bottom padding
6,271
final int pixelStride = dst.getPixelStride(); final int[] bandOffsets = dst.getBandOffsets(); final float[][] data = dst.getFloatDataArrays(); final float[] warpData = new float[2 * dstWidth]; int lineOffset = 0; <BUG>if (caseA) { for (int h = 0; h < dstHeight; h++) {</BUG> int pixelOffset = lineOffset; lineOffset += lineStride; warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
if(hasROI && !roiContainsTile && roiIter == null){ throw new IllegalArgumentException("Error on creating the ROI iterator"); } if (caseA || (caseB && roiContainsTile)) { for (int h = 0; h < dstHeight; h++) {
6,272
minX = src.getMinX(); maxX = src.getMaxX(); minY = src.getMinY(); maxY = src.getMaxY(); } else { <BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC); minX = src.getMinX() + 1; // Left padding maxX = src.getMaxX() - 2; // Right padding minY = src.getMinY() + 1; // Top padding maxY = src.getMaxY() - 2; // Bottom padding </BUG> }
iterSource = getRandomIterator(src, null); minX = src.getMinX() + leftPad; // Left padding maxX = src.getMaxX() - rightPad; // Right padding minY = src.getMinY() + topPad; // Top padding maxY = src.getMaxY() - bottomPad; // Bottom padding
6,273
final int pixelStride = dst.getPixelStride(); final int[] bandOffsets = dst.getBandOffsets(); final double[][] data = dst.getDoubleDataArrays(); final float[] warpData = new float[2 * dstWidth]; int lineOffset = 0; <BUG>if (caseA) { for (int h = 0; h < dstHeight; h++) {</BUG> int pixelOffset = lineOffset; lineOffset += lineStride; warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
if(hasROI && !roiContainsTile && roiIter == null){ throw new IllegalArgumentException("Error on creating the ROI iterator"); } if (caseA || (caseB && roiContainsTile)) { for (int h = 0; h < dstHeight; h++) {
6,274
</BUG> protected int pointSize; protected double segmentSize; protected QuadRect trackBounds; <BUG>double zoom = -1; AsynchronousResampler culler = null; // The currently active resampler protected Paint paint = null; // MUST be set by 'updateLocalPaint' before use </BUG> public RenderableSegment(List <WptPt> points, double segmentSize) {
}, 0, period); } } public static abstract class RenderableSegment { public List<WptPt> points = null; // Original list of points protected List<WptPt> culled = new ArrayList<>(); // Reduced/resampled list of points protected double zoom = -1; protected AsynchronousResampler culler = null; // The currently active resampler protected Paint paint = null; // MUST be set by 'updateLocalPaint' before use
6,275
float lasty = tileBox.getPixYFromLatLon(pt.lat, pt.lon); int size = culled.size();</BUG> for (int i = 1; i < size; i++) { <BUG>pt = culled.get(i); float x = tileBox.getPixXFromLatLon(pt.lat, pt.lon); float y = tileBox.getPixYFromLatLon(pt.lat, pt.lon); if (Math.min(x, lastx) < clipR && Math.max(x, lastx) > clipL && Math.min(y, lasty) < clipT && Math.max(y, lasty) > clipB) {</BUG> paint.setColor(pt.colourARGB);
&& Math.min(y, lasty) < clipT && Math.max(y, lasty) > clipB) { float segment = intp & 15; if (segment < 5) { paint.setColor(internal ? Algorithms.getRainbowColor(((double) (i)) / ((double) size)) : Color.BLACK); float segpiece = 5 - segment; if (segpiece > 3) segpiece = 3; if (!broken) { float sw = stroke * segpiece * scale; paint.setStrokeWidth(sw);
6,276
@Override public void drawSingleSegment(double zoom, Paint p, Canvas canvas, RotatedTileBox tileBox) { if (zoom > 13 && !culled.isEmpty()) { updateLocalPaint(p); canvas.rotate(-tileBox.getRotate(), tileBox.getCenterPixelX(), tileBox.getCenterPixelY()); int cachedC = conveyor; <BUG>drawArrows(cachedC, zoom, canvas, tileBox, false); drawArrows(cachedC, zoom, canvas, tileBox, true); canvas.rotate(tileBox.getRotate(), tileBox.getCenterPixelX(), tileBox.getCenterPixelY());</BUG> } }
drawArrows(cachedC, canvas, tileBox, false); drawArrows(cachedC, canvas, tileBox, true); canvas.rotate(tileBox.getRotate(), tileBox.getCenterPixelX(), tileBox.getCenterPixelY());
6,277
int nsize = rs.points.size(); if (nsize > 0) { boolean survivor[] = new boolean[nsize]; cullRamerDouglasPeucer(survivor, 0, nsize - 1); if (!isCancelled()) { <BUG>culled = new ArrayList(); </BUG> survivor[0] = true; for (int i = 0; i < nsize; i++) { if (survivor[i]) {
culled = new ArrayList<>();
6,278
}else if(programsSelected.size() == 1){ lytProgsPanel.setVisibility(View.VISIBLE); lytProg2MAHAdsExtDlg.setVisibility(View.GONE); prog1 = programsSelected.get(0); ((TextView)view.findViewById(R.id.tvProg1NameMAHAdsExtDlg)).setText(prog1.getName()); <BUG>if (prog1.getImg() != null && !prog1.getImg().trim().isEmpty()) { ((SmartImageView)view.findViewById(R.id.ivProg1ImgMAHAds)).setImageUrl(MAHAdsController.urlRootOnServer + prog1.getImg()); } AngledLinearLayout prog1LytNewText = (AngledLinearLayout)view.findViewById(R.id.lytProg1NewText);</BUG> if(prog1.isNewPrgram()){
Picasso.with(view.getContext()) .load(MAHAdsController.urlRootOnServer + prog1.getImg()) .placeholder(R.drawable.img_place_holder_normal) .error(R.drawable.img_not_found) .into((ImageView) view.findViewById(R.id.ivProg1ImgMAHAds)); AngledLinearLayout prog1LytNewText = (AngledLinearLayout)view.findViewById(R.id.lytProg1NewText);
6,279
root.appendChild(e); } } StringWriter sw = new StringWriter(); DOMSource domSource = new DOMSource(xmldoc); <BUG>try { this.getSerializer().transform(domSource, new StreamResult(sw));</BUG> } catch (TransformerException e) { throw new KettleException(e); }
try this.getSerializer().transform(domSource, new StreamResult(sw));
6,280
outputFields[i].setCurrencySymbol( XMLHandler.getTagValue(fnode, "currency") ); outputFields[i].setDecimalSymbol( XMLHandler.getTagValue(fnode, "decimal") ); outputFields[i].setGroupingSymbol( XMLHandler.getTagValue(fnode, "group") ); outputFields[i].setNullString( XMLHandler.getTagValue(fnode, "nullif") ); outputFields[i].setLength( Const.toInt(XMLHandler.getTagValue(fnode, "length"), -1) ); <BUG>outputFields[i].setPrecision( Const.toInt(XMLHandler.getTagValue(fnode, "precision"), -1) ); }</BUG> } catch(Exception e) {
outputFields[i].setAttribute( "Y".equalsIgnoreCase( XMLHandler.getTagValue(fnode, "attribute") ) );
6,281
outputFields[i].setCurrencySymbol( "" ); outputFields[i].setDecimalSymbol( "," ); outputFields[i].setGroupingSymbol( "." ); outputFields[i].setNullString( "" ); outputFields[i].setLength( -1 ); <BUG>outputFields[i].setPrecision( -1 ); }</BUG> } public Row getFields(Row r, String name, Row info) throws KettleStepException {
outputFields[i].setAttribute( false );
6,282
retval.append(" "+XMLHandler.addTagValue("currency", field.getCurrencySymbol())); retval.append(" "+XMLHandler.addTagValue("decimal", field.getDecimalSymbol())); retval.append(" "+XMLHandler.addTagValue("group", field.getGroupingSymbol())); retval.append(" "+XMLHandler.addTagValue("nullif", field.getNullString())); retval.append(" "+XMLHandler.addTagValue("length", field.getLength())); <BUG>retval.append(" "+XMLHandler.addTagValue("precision", field.getPrecision())); retval.append(" </field>"+Const.CR);</BUG> } } retval.append(" </fields>"+Const.CR);
retval.append(" "+XMLHandler.addTagValue("attribute", field.isAttribute())); retval.append(" </field>"+Const.CR);
6,283
import org.dalesbred.connection.DriverManagerConnectionProvider; import org.dalesbred.conversion.TypeConversionRegistry; import org.dalesbred.dialect.Dialect; import org.dalesbred.dialect.EnumMode; import org.dalesbred.internal.instantiation.InstantiatorProvider; <BUG>import org.dalesbred.internal.result.*; import org.dalesbred.internal.utils.JndiUtils;</BUG> import org.dalesbred.query.SqlQuery; import org.dalesbred.result.ResultSetProcessor;
import org.dalesbred.internal.result.InstantiatorRowMapper; import org.dalesbred.internal.result.MapResultSetProcessor; import org.dalesbred.internal.result.ResultTableResultSetProcessor; import org.dalesbred.internal.utils.JndiUtils;
6,284
public <T> T executeQuery(@NotNull ResultSetProcessor<T> processor, @NotNull @SQL String sql, Object... args) { return executeQuery(processor, SqlQuery.query(sql, args)); } @NotNull public <T> List<T> findAll(@NotNull RowMapper<T> rowMapper, @NotNull SqlQuery query) { <BUG>return executeQuery(new ListWithRowMapperResultSetProcessor<>(rowMapper), query); }</BUG> @NotNull public <T> List<T> findAll(@NotNull RowMapper<T> rowMapper, @NotNull @SQL String sql, Object... args) { return findAll(rowMapper, SqlQuery.query(sql, args));
return executeQuery(rowMapper.list(), query);
6,285
public <T> T findUnique(@NotNull Class<T> cl, @NotNull @SQL String sql, Object... args) { return findUnique(cl, SqlQuery.query(sql, args)); } @NotNull public <T> Optional<T> findOptional(@NotNull RowMapper<T> rowMapper, @NotNull SqlQuery query) { <BUG>return executeQuery(new OptionalResultSetProcessor<>(new ListWithRowMapperResultSetProcessor<>(rowMapper)), query); }</BUG> @NotNull public <T> Optional<T> findOptional(@NotNull RowMapper<T> rowMapper, @NotNull @SQL String sql, Object... args) { return findOptional(rowMapper, SqlQuery.query(sql, args));
return executeQuery(rowMapper.optional(), query);
6,286
public <T> Optional<T> findOptional(@NotNull RowMapper<T> rowMapper, @NotNull @SQL String sql, Object... args) { return findOptional(rowMapper, SqlQuery.query(sql, args)); } @NotNull public <T> Optional<T> findOptional(@NotNull Class<T> cl, @NotNull SqlQuery query) { <BUG>return executeQuery(new OptionalResultSetProcessor<>(resultProcessorForClass(cl)), query); }</BUG> @NotNull public <T> Optional<T> findOptional(@NotNull Class<T> cl, @NotNull @SQL String sql, Object... args) { return findOptional(cl, SqlQuery.query(sql, args));
return executeQuery(rowMapperForClass(cl).optional(), query);
6,287
for (Object arg : args) dialect.bindArgument(ps, i++, instantiatorRegistry.valueToDatabase(unwrapOptionalAsNull(arg))); } @NotNull private <T> ResultSetProcessor<List<T>> resultProcessorForClass(@NotNull Class<T> cl) { <BUG>return new ReflectionResultSetProcessor<>(cl, instantiatorRegistry); }</BUG> @NotNull public TypeConversionRegistry getTypeConversionRegistry() { return instantiatorRegistry.getTypeConversionRegistry();
return rowMapperForClass(cl).list(); private <T> RowMapper<T> rowMapperForClass(@NotNull Class<T> cl) { return new InstantiatorRowMapper<>(cl, instantiatorRegistry);
6,288
return build( modelSource, null, request ); } private ModelBuildingResult build( ModelSource modelSource, File pomFile, ModelBuildingRequest request ) throws ModelBuildingException { <BUG>DefaultModelBuildingResult result = new DefaultModelBuildingResult(); ProfileActivationContext profileActivationContext = getProfileActivationContext( request ); List<Profile> activeExternalProfiles = getActiveExternalProfiles( request, profileActivationContext ); Model model = readModel( modelSource, request ); </BUG> model.setPomFile( pomFile );
List<ModelProblem> problems = new ArrayList<ModelProblem>(); List<Profile> activeExternalProfiles = getActiveExternalProfiles( request, profileActivationContext, problems ); Model model = readModel( modelSource, request, problems );
6,289
Model resultModel = current; resultModels.add( resultModel ); Model rawModel = ModelUtils.cloneModel( current ); rawModels.add( rawModel ); modelNormalizer.mergeDuplicates( resultModel, request ); <BUG>List<Profile> activeProjectProfiles = getActiveProjectProfiles( rawModel, profileActivationContext ); List<Profile> activeProfiles = activeProjectProfiles;</BUG> if ( current == model ) { activeProfiles = new ArrayList<Profile>( activeProjectProfiles.size() + activeExternalProfiles.size() );
List<Profile> activeProjectProfiles = getActiveProjectProfiles( rawModel, profileActivationContext, problems ); List<Profile> activeProfiles = activeProjectProfiles;
6,290
for ( Profile activeProfile : activeProfiles ) { profileInjector.injectProfile( resultModel, activeProfile, request ); } result.setActiveProfiles( rawModel, activeProfiles ); <BUG>configureResolver( request.getModelResolver(), resultModel ); </BUG> } Model superModel = getSuperModel(); rawModels.add( superModel );
configureResolver( request.getModelResolver(), resultModel, problems );
6,291
rawModels.add( superModel ); resultModels.add( superModel ); result.setRawModels( rawModels ); assembleInheritance( resultModels, request ); Model resultModel = resultModels.get( 0 ); <BUG>resultModel = interpolateModel( resultModel, request ); </BUG> resultModels.set( 0, resultModel ); modelPathTranslator.alignToBaseDirectory( resultModel, resultModel.getProjectDirectory(), request ); if ( request.isProcessPlugins() )
resultModel = interpolateModel( resultModel, request, problems );
6,292
managementInjector.injectManagement( resultModel, request ); if ( request.isProcessPlugins() ) { pluginConfigurationExpander.expandPluginConfiguration( resultModel, request ); } <BUG>validateModel( resultModel, false, request ); result.setEffectiveModel( resultModel );</BUG> return result; }
validateModel( resultModel, false, request, problems ); if ( !problems.isEmpty() ) throw new ModelBuildingException( problems ); result.setEffectiveModel( resultModel );
6,293
context.setActiveProfileIds( request.getActiveProfileIds() ); context.setInactiveProfileIds( request.getInactiveProfileIds() ); context.setExecutionProperties( request.getExecutionProperties() ); return context; } <BUG>private Model readModel( ModelSource modelSource, ModelBuildingRequest request ) </BUG> throws ModelBuildingException { Model model;
private Model readModel( ModelSource modelSource, ModelBuildingRequest request, List<ModelProblem> problems )
6,294
Model parent = models.get( i + 1 ); Model child = models.get( i ); inheritanceAssembler.assembleModelInheritance( child, parent, request ); } } <BUG>private Model interpolateModel( Model model, ModelBuildingRequest request ) throws ModelBuildingException</BUG> { try
private Model interpolateModel( Model model, ModelBuildingRequest request, List<ModelProblem> problems )
6,295
{ Parent parent = childModel.getParent(); ModelResolver modelResolver = request.getModelResolver(); if ( modelResolver == null ) { <BUG>Exception e = new IllegalArgumentException( "No model resolver provided" ); throw new UnresolvableParentException( "Failed to resolve parent POM " + toId( parent ) + " for POM " + toSourceHint( childModel ), e ); }</BUG> ModelSource modelSource;
for ( int i = models.size() - 2; i >= 0; i-- ) Model parent = models.get( i + 1 ); Model child = models.get( i ); inheritanceAssembler.assembleModelInheritance( child, parent, request ); } } private Model interpolateModel( Model model, ModelBuildingRequest request, List<ModelProblem> problems )
6,296
? SecurityConstants.USERNAME : SecurityConstants.ENCRYPT_USERNAME); if (encrUser == null || "".equals(encrUser)) { policyNotAsserted(token, "No " + (sign ? "signature" : "encryption") + " username found."); } <BUG>if (encrUser.equals(WSHandlerConstants.USE_REQ_SIG_CERT)) { Object resultsObj = message.getExchange().getInMessage().get(WSHandlerConstants.RECV_RESULTS);</BUG> if (resultsObj != null) { encrKeyBuilder.setUseThisCert(getReqSigCert((Vector)resultsObj)); if (encrKeyBuilder.isCertSet()) {
if (WSHandlerConstants.USE_REQ_SIG_CERT.equals(encrUser)) { Object resultsObj = message.getExchange().getInMessage().get(WSHandlerConstants.RECV_RESULTS);
6,297
package org.apache.cxf.ws.security.wss4j.policyhandlers; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.Calendar; <BUG>import java.util.Vector; import javax.xml.soap.SOAPMessage;</BUG> import org.w3c.dom.Document; import org.w3c.dom.Element; import org.apache.cxf.binding.soap.SoapMessage;
import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage;
6,298
e.printStackTrace(); } } private WSSecBase doEncryption(TokenWrapper recToken, SecurityToken encrTok, <BUG>Element encrElem, Vector<WSEncryptionPart> encrParts) { if (recToken != null && recToken.getToken() != null && encrParts.size() > 0) {</BUG> Token encrToken = recToken.getToken();
boolean attached, Vector<WSEncryptionPart> encrParts, boolean atEnd) { if (recToken != null && recToken.getToken() != null && encrParts.size() > 0) {
6,299
policyAsserted(encrToken); AlgorithmSuite algorithmSuite = sbinding.getAlgorithmSuite(); if (encrToken.isDerivedKeys()) { try { WSSecDKEncrypt dkEncr = new WSSecDKEncrypt(); <BUG>if (encrElem != null && encrTok.getAttachedReference() != null) { </BUG> dkEncr.setExternalKey(encrTok.getSecret(), (Element)saaj.getSOAPPart() .importNode((Element) encrTok.getAttachedReference(),
if (attached && encrTok.getAttachedReference() != null) {
6,300
.getEncryptionDerivedKeyLength() / 8); dkEncr.prepare(saaj.getSOAPPart()); Element encrDKTokenElem = null; encrDKTokenElem = dkEncr.getdktElement(); addDerivedKeyElement(encrDKTokenElem); <BUG>Element refList = dkEncr.encryptForExternalRef(null, encrParts); this.addDerivedKeyElement(refList); return dkEncr;</BUG> } catch (Exception e) { policyNotAsserted(recToken, e);
if (atEnd) { this.insertBeforeBottomUp(refList); } else { } return dkEncr;