id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
46,201
for (final PhoneCountryCodeData entry : pcountries) { final String countryCode = pphoneCountryCodes.get(entry.getCountryCode()); if (countryCode.contains("-")) { final String[] splittedCountryCodes = StringUtils.split(countryCode, '-'); for (final String singleCountryCode : splittedCountryCodes) { <BUG>addCountryToPhoneMap(pphoneCountryNames, countryPhoneMap, phoneTrunkAndExitCodes.phoneTrunkAndExitCodes(), entry, singleCountryCode); </BUG> }
entry.setPhoneCountryData(addCountryToPhoneMap(pphoneCountryNames, countryPhoneMap, phoneTrunkAndExitCodes.phoneTrunkAndExitCodes(), entry, singleCountryCode));
46,202
phoneTrunkAndExitCodes.phoneTrunkAndExitCodes(), entry, singleCountryCode); </BUG> } } else { <BUG>addCountryToPhoneMap(pphoneCountryNames, countryPhoneMap, phoneTrunkAndExitCodes.phoneTrunkAndExitCodes(), entry, countryCode); </BUG> }
for (final PhoneCountryCodeData entry : pcountries) { final String countryCode = pphoneCountryCodes.get(entry.getCountryCode()); if (countryCode.contains("-")) { final String[] splittedCountryCodes = StringUtils.split(countryCode, '-'); for (final String singleCountryCode : splittedCountryCodes) { entry.setPhoneCountryData(addCountryToPhoneMap(pphoneCountryNames, countryPhoneMap, phoneTrunkAndExitCodes.phoneTrunkAndExitCodes(), entry, singleCountryCode)); entry.setPhoneCountryData(addCountryToPhoneMap(pphoneCountryNames, countryPhoneMap, phoneTrunkAndExitCodes.phoneTrunkAndExitCodes(), entry, countryCode));
46,203
import java.util.Objects; import java.util.Set; import java.util.TreeSet; public class PhoneCountryCodeData implements Comparable<PhoneCountryCodeData> { private final String countryCode; <BUG>private final String countryCodeName; private final Set<PhoneAreaCodeData> areaCodeData;</BUG> public PhoneCountryCodeData(final String pcountryCode, final String pcountryCodeName) { super(); this.countryCode = pcountryCode;
private PhoneCountryData phoneCountryData; private final Set<PhoneAreaCodeData> areaCodeData;
46,204
package de.knightsoftnet.validators.shared.data; import org.apache.commons.lang3.StringUtils; <BUG>public class PhoneNumberData { private String countryCode; private String areaCode; private String phoneNumber;</BUG> private String extension;
import java.io.Serializable; public class PhoneNumberData implements Serializable { private static final long serialVersionUID = -5715038613377873088L; private String countryName; private String areaName; private String phoneNumber;
46,205
setPath(httpRequest, httpServletRequest); setQueryString(httpRequest, httpServletRequest); setBody(httpRequest, httpServletRequest); setHeaders(httpRequest, httpServletRequest); setCookies(httpRequest, httpServletRequest); <BUG>httpRequest.setSecure(httpServletRequest.isSecure()); </BUG> return httpRequest; } private void setMethod(HttpRequest httpRequest, HttpServletRequest httpServletRequest) {
httpRequest.withSecure(httpServletRequest.isSecure());
46,206
private RegexStringMatcher methodMatcher = null; private RegexStringMatcher pathMatcher = null; private MultiValueMapMatcher queryStringParameterMatcher = null; private BodyMatcher bodyMatcher = null; private MultiValueMapMatcher headerMatcher = null; <BUG>private HashMapMatcher cookieMatcher = null; public HttpRequestMatcher(HttpRequest httpRequest) {</BUG> this.httpRequest = httpRequest; if (httpRequest != null) { withMethod(httpRequest.getMethod());
private BooleanMatcher keepAliveMatcher = null; private BooleanMatcher sslMatcher = null; public HttpRequestMatcher(HttpRequest httpRequest) {
46,207
withMethod(httpRequest.getMethod()); withPath(httpRequest.getPath()); withQueryStringParameters(httpRequest.getQueryStringParameters()); withBody(httpRequest.getBody()); withHeaders(httpRequest.getHeaders()); <BUG>withCookies(httpRequest.getCookies()); }</BUG> addFieldsExcludedFromEqualsAndHashCode("logFormatter"); } private HttpRequestMatcher withMethod(NottableString method) {
withKeepAlive(httpRequest.isKeepAlive()); withSsl(httpRequest.isSecure());
46,208
bodyMatches = matches(bodyMatcher, string(httpRequest.getBody() != null ? new String(httpRequest.getBody().getRawBytes(), httpRequest.getBody().getCharset(Charsets.UTF_8)) : "")); } else { bodyMatches = matches(bodyMatcher, (httpRequest.getBody() != null ? new String(httpRequest.getBody().getRawBytes(), httpRequest.getBody().getCharset(Charsets.UTF_8)) : "")); } boolean headersMatch = matches(headerMatcher, (httpRequest.getHeaders() != null ? new ArrayList<KeyToMultiValue>(httpRequest.getHeaders()) : null)); <BUG>boolean cookiesMatch = matches(cookieMatcher, (httpRequest.getCookies() != null ? new ArrayList<KeyAndValue>(httpRequest.getCookies()) : null)); boolean result = methodMatches && pathMatches && queryStringParametersMatches && bodyMatches && headersMatch && cookiesMatch; boolean resultAfterNotOperatorsApplied = httpRequest.isNot() == (this.httpRequest.isNot() == (not != result)); </BUG> if (logMatchResults && logger.isInfoEnabled()) {
boolean keepAliveMatches = matches(keepAliveMatcher, httpRequest.isKeepAlive()); boolean sslMatches = matches(sslMatcher, httpRequest.isSecure()); boolean totalResult = methodMatches && pathMatches && queryStringParametersMatches && bodyMatches && headersMatch && cookiesMatch && keepAliveMatches && sslMatches; boolean totalResultAfterNotOperatorApplied = httpRequest.isNot() == (this.httpRequest.isNot() == (not != totalResult));
46,209
} else { request.headers().add(headerName, ""); } } } <BUG>String port = ""; if ((!httpRequest.isSecure() && httpRequest.getDestination().getPort() != 80) || (httpRequest.isSecure() && httpRequest.getDestination().getPort() != 443)) { </BUG> port = ":" + httpRequest.getDestination().getPort();
boolean isSsl = httpRequest.isSecure() != null && httpRequest.isSecure(); if ((!isSsl && httpRequest.getDestination().getPort() != 80) || (isSsl && httpRequest.getDestination().getPort() != 443)) {
46,210
public HttpResponse sendRequest(final OutboundHttpRequest httpRequest) throws SocketConnectionException { return sendRequest(httpRequest, false); } public HttpResponse sendRequest(final OutboundHttpRequest httpRequest, final boolean retryIfSslFails) throws SocketConnectionException { logger.debug("Sending request: {}", httpRequest); <BUG>EventLoopGroup group = new NioEventLoopGroup(); try { final HttpClientInitializer channelInitializer = new HttpClientInitializer(httpRequest.isSecure()); </BUG> new Bootstrap()
boolean isSsl = httpRequest.isSecure() != null && httpRequest.isSecure(); final HttpClientInitializer channelInitializer = new HttpClientInitializer(isSsl);
46,211
return httpResponse; } catch (TimeoutException e) { throw new SocketCommunicationException("Response was not received after " + ConfigurationProperties.maxSocketTimeout() + " milliseconds, to make the proxy wait longer please use \"mockserver.maxSocketTimeout\" system property or ConfigurationProperties.maxSocketTimeout(long milliseconds)", e.getCause()); } catch (ExecutionException e) { if (retryIfSslFails) { <BUG>return sendRequest(httpRequest.setSecure(!httpRequest.isSecure())); } else {</BUG> Throwable cause = e.getCause(); if (cause instanceof ConnectException) { throw new SocketConnectionException("Unable to connect to socket " + httpRequest.getDestination(), cause);
return sendRequest(httpRequest.withSsl(!isSsl)); } else {
46,212
if (cause instanceof ConnectException) { throw new SocketConnectionException("Unable to connect to socket " + httpRequest.getDestination(), cause); } else if (cause instanceof UnknownHostException) { throw new SocketConnectionException("Unable to resolve host " + httpRequest.getDestination(), cause); } else if (cause instanceof NotSslRecordException) { <BUG>return sendRequest(httpRequest.setSecure(false)); </BUG> } else if (cause instanceof IOException) { throw new SocketConnectionException(cause.getMessage(), cause); } else {
return sendRequest(httpRequest.withSsl(false));
46,213
private NottableString method = string(""); private NottableString path = string(""); private List<ParameterDTO> queryStringParameters = new ArrayList<ParameterDTO>(); private BodyDTO body; private List<CookieDTO> cookies = new ArrayList<CookieDTO>(); <BUG>private List<HeaderDTO> headers = new ArrayList<HeaderDTO>(); public HttpRequestDTO(HttpRequest httpRequest) {</BUG> this(httpRequest, false); } public HttpRequestDTO(HttpRequest httpRequest, Boolean not) {
private Boolean keepAlive = null; private Boolean secure = null; public HttpRequestDTO(HttpRequest httpRequest) {
46,214
queryStringParameters = Lists.transform(httpRequest.getQueryStringParameters(), new Function<Parameter, ParameterDTO>() { public ParameterDTO apply(Parameter parameter) { return new ParameterDTO(parameter); } }); <BUG>body = BodyDTO.createDTO(httpRequest.getBody()); }</BUG> } public HttpRequestDTO() { }
keepAlive = httpRequest.isKeepAlive(); secure = httpRequest.isSecure();
46,215
.withQueryStringParameters(Lists.transform(queryStringParameters, new Function<ParameterDTO, Parameter>() { public Parameter apply(ParameterDTO parameter) { return parameter.buildObject(); } })) <BUG>.withBody((body != null ? Not.not(body.buildObject(), body.getNot()) : null)); }</BUG> public NottableString getMethod() { return method; }
.withBody((body != null ? Not.not(body.buildObject(), body.getNot()) : null)) .withSecure(secure) .withKeepAlive(keepAlive);
46,216
DateSearchEntry dateSearchEntry = new DateSearchEntry(); dateSearchEntry.setAlign(getAlign()); dateSearchEntry.setColspan(getColspan()); dateSearchEntry.setCssClass(getCssClass()); dateSearchEntry.setDate(_value); <BUG>dateSearchEntry.setHref((String)getHref()); </BUG> dateSearchEntry.setValign(getValign()); resultRow.addSearchEntry(index, dateSearchEntry); return EVAL_PAGE;
dateSearchEntry.setHref(String.valueOf(getHref()));
46,217
} JSPSearchEntry jspSearchEntry = new JSPSearchEntry(); jspSearchEntry.setAlign(getAlign()); jspSearchEntry.setColspan(getColspan()); jspSearchEntry.setCssClass(getCssClass()); <BUG>jspSearchEntry.setHref((String)getHref()); </BUG> jspSearchEntry.setPath(getPath()); jspSearchEntry.setRequest( (HttpServletRequest)pageContext.getRequest());
jspSearchEntry.setHref(String.valueOf(getHref()));
46,218
} ButtonSearchEntry buttonSearchEntry = new ButtonSearchEntry(); buttonSearchEntry.setAlign(getAlign()); buttonSearchEntry.setColspan(getColspan()); buttonSearchEntry.setCssClass(getCssClass()); <BUG>buttonSearchEntry.setHref((String)getHref()); </BUG> buttonSearchEntry.setName(LanguageUtil.get(request, getName())); buttonSearchEntry.setValign(getValign()); resultRow.addSearchEntry(index, buttonSearchEntry);
buttonSearchEntry.setHref(String.valueOf(getHref()));
46,219
import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.LocalFileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.permission.FsPermission; import org.apache.hadoop.util.Progressable; <BUG>import static org.apache.hadoop.fs.s3a.S3AConstants.*; public class S3AFileSystem extends FileSystem {</BUG> private URI uri; private Path workingDir; private AmazonS3Client s3;
import static org.apache.hadoop.fs.s3a.Constants.*; public class S3AFileSystem extends FileSystem {
46,220
public void initialize(URI name, Configuration conf) throws IOException { super.initialize(name, conf); uri = URI.create(name.getScheme() + "://" + name.getAuthority()); workingDir = new Path("/user", System.getProperty("user.name")).makeQualified(this.uri, this.getWorkingDirectory()); <BUG>String accessKey = conf.get(ACCESS_KEY, null); String secretKey = conf.get(SECRET_KEY, null); </BUG> String userInfo = name.getUserInfo();
String accessKey = conf.get(NEW_ACCESS_KEY, conf.get(OLD_ACCESS_KEY, null)); String secretKey = conf.get(NEW_SECRET_KEY, conf.get(OLD_SECRET_KEY, null));
46,221
} else { accessKey = userInfo; } } AWSCredentialsProviderChain credentials = new AWSCredentialsProviderChain( <BUG>new S3ABasicAWSCredentialsProvider(accessKey, secretKey), new InstanceProfileCredentialsProvider(), new S3AAnonymousAWSCredentialsProvider() );</BUG> bucket = name.getHost();
new BasicAWSCredentialsProvider(accessKey, secretKey), new AnonymousAWSCredentialsProvider()
46,222
awsConf.setSocketTimeout(conf.getInt(SOCKET_TIMEOUT, DEFAULT_SOCKET_TIMEOUT)); </BUG> s3 = new AmazonS3Client(credentials, awsConf); <BUG>maxKeys = conf.getInt(MAX_PAGING_KEYS, DEFAULT_MAX_PAGING_KEYS); partSize = conf.getLong(MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE); partSizeThreshold = conf.getInt(MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD); </BUG> if (partSize < 5 * 1024 * 1024) {
new InstanceProfileCredentialsProvider(), new AnonymousAWSCredentialsProvider() bucket = name.getHost(); ClientConfiguration awsConf = new ClientConfiguration(); awsConf.setMaxConnections(conf.getInt(NEW_MAXIMUM_CONNECTIONS, conf.getInt(OLD_MAXIMUM_CONNECTIONS, DEFAULT_MAXIMUM_CONNECTIONS))); awsConf.setProtocol(conf.getBoolean(NEW_SECURE_CONNECTIONS, conf.getBoolean(OLD_SECURE_CONNECTIONS, DEFAULT_SECURE_CONNECTIONS)) ? Protocol.HTTPS : Protocol.HTTP); awsConf.setMaxErrorRetry(conf.getInt(NEW_MAX_ERROR_RETRIES, conf.getInt(OLD_MAX_ERROR_RETRIES, DEFAULT_MAX_ERROR_RETRIES))); awsConf.setSocketTimeout(conf.getInt(NEW_SOCKET_TIMEOUT, conf.getInt(OLD_SOCKET_TIMEOUT, DEFAULT_SOCKET_TIMEOUT))); maxKeys = conf.getInt(NEW_MAX_PAGING_KEYS, conf.getInt(OLD_MAX_PAGING_KEYS, DEFAULT_MAX_PAGING_KEYS)); partSize = conf.getLong(NEW_MULTIPART_SIZE, conf.getLong(OLD_MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE)); partSizeThreshold = conf.getInt(NEW_MIN_MULTIPART_THRESHOLD, conf.getInt(OLD_MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD));
46,223
cannedACL = null; } if (!s3.doesBucketExist(bucket)) { throw new IOException("Bucket " + bucket + " does not exist"); } <BUG>boolean purgeExistingMultipart = conf.getBoolean(PURGE_EXISTING_MULTIPART, DEFAULT_PURGE_EXISTING_MULTIPART); long purgeExistingMultipartAge = conf.getLong(PURGE_EXISTING_MULTIPART_AGE, DEFAULT_PURGE_EXISTING_MULTIPART_AGE); </BUG> if (purgeExistingMultipart) {
boolean purgeExistingMultipart = conf.getBoolean(NEW_PURGE_EXISTING_MULTIPART, conf.getBoolean(OLD_PURGE_EXISTING_MULTIPART, DEFAULT_PURGE_EXISTING_MULTIPART)); long purgeExistingMultipartAge = conf.getLong(NEW_PURGE_EXISTING_MULTIPART_AGE, conf.getLong(OLD_PURGE_EXISTING_MULTIPART_AGE, DEFAULT_PURGE_EXISTING_MULTIPART_AGE));
46,224
import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; <BUG>import static org.apache.hadoop.fs.s3a.S3AConstants.*; public class S3AOutputStream extends OutputStream {</BUG> private OutputStream backupStream; private File backupFile; private boolean closed;
import static org.apache.hadoop.fs.s3a.Constants.*; public class S3AOutputStream extends OutputStream {
46,225
this.client = client; this.progress = progress; this.fs = fs; this.cannedACL = cannedACL; this.statistics = statistics; <BUG>partSize = conf.getLong(MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE); partSizeThreshold = conf.getInt(MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD); </BUG> if (conf.get(BUFFER_DIR, null) != null) {
partSize = conf.getLong(OLD_MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE); partSizeThreshold = conf.getInt(OLD_MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD);
46,226
package org.biojava.nbio.structure.io; <BUG>import org.biojava.nbio.structure.Atom; </BUG> import org.biojava.nbio.structure.Chain; import org.biojava.nbio.structure.Structure; import org.biojava.nbio.structure.StructureException;
import org.biojava.nbio.structure.Calc;
46,227
import org.biojava.nbio.structure.Chain; import org.biojava.nbio.structure.Structure; import org.biojava.nbio.structure.StructureException; import org.biojava.nbio.structure.StructureIO; import org.biojava.nbio.structure.StructureTools; <BUG>import org.biojava.nbio.structure.align.util.AtomCache; import org.biojava.nbio.structure.geometry.SuperPositionSVD; import org.junit.Test;</BUG> import static org.junit.Assert.*; import java.io.IOException;
import org.biojava.nbio.structure.geometry.CalcPoint; import org.biojava.nbio.structure.geometry.SuperPosition; import org.biojava.nbio.structure.geometry.SuperPositionQCP; import org.junit.Test;
46,228
import static org.junit.Assert.*; import java.io.IOException; import java.util.HashSet; import java.util.List; import java.util.Set; <BUG>import javax.vecmath.Matrix4d; public class TestHardBioUnits {</BUG> @Test public void test4A1Immcif() throws IOException, StructureException { String pdbId = "4A1I";
import javax.vecmath.Point3d; public class TestHardBioUnits {
46,229
assertTrue(chainIdsNoOps.contains("B")); assertTrue(chainIdsNoOps.contains("G")); assertFalse(chainIdsNoOps.contains("A")); assertFalse(chainIdsNoOps.contains("H")); Structure original = StructureIO.getStructure(pdbId); <BUG>Atom[] atomsOrigChainG = StructureTools.getAtomCAArray(original.getPolyChainByPDB("G")); Atom[] atomsOrigChainB = StructureTools.getAtomCAArray(original.getPolyChainByPDB("B")); </BUG> List<Chain> bioAssemblyChains = bioAssembly.getPolyChains();
Point3d[] atomsOrigChainG = Calc.atomsToPoints(StructureTools.getAtomCAArray(original.getPolyChainByPDB("G"))); Point3d[] atomsOrigChainB = Calc.atomsToPoints(StructureTools.getAtomCAArray(original.getPolyChainByPDB("B")));
46,230
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;
46,231
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());
46,232
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
46,233
<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;
46,234
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]
46,235
<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;
46,236
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;
46,237
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;
46,238
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);
46,239
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 {
46,240
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(),
46,241
) ); }else{ return new TimeNode( generateDayCandidatesQuestionMarkNotSupported( <BUG>date.getYear(), date.getMonthOfYear(), </BUG> ((DayOfWeekFieldDefinition) cronDefinition.getFieldDefinition(DAY_OF_WEEK) ).getMondayDoWValue()
date.getYear(), date.getMonthValue(),
46,242
} 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);
46,243
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]
46,244
<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;
46,245
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;
46,246
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()
46,247
package org.gradle.tooling.internal.consumer.connection; import org.gradle.tooling.internal.adapter.ProtocolToModelAdapter; <BUG>import org.gradle.tooling.internal.consumer.converters.ConsumerPropertyHandler; </BUG> import org.gradle.tooling.internal.consumer.parameters.ConsumerOperationParameters; import org.gradle.tooling.internal.consumer.versioning.VersionDetails; import org.gradle.tooling.internal.protocol.BuildActionRunner;
import org.gradle.tooling.internal.consumer.converters.PropertyHandlerFactory;
46,248
package org.gradle.tooling.internal.consumer.connection; import org.gradle.tooling.internal.adapter.ProtocolToModelAdapter; <BUG>import org.gradle.tooling.internal.consumer.converters.ConsumerPropertyHandler; </BUG> import org.gradle.tooling.internal.consumer.parameters.ConsumerOperationParameters; import org.gradle.tooling.internal.consumer.versioning.VersionDetails; import org.gradle.tooling.internal.protocol.ConnectionVersion4;
import org.gradle.tooling.internal.consumer.converters.PropertyHandlerFactory;
46,249
package org.gradle.tooling.internal.adapter; <BUG>import org.gradle.tooling.model.DomainObjectSet; import java.util.*; public class CollectionMapper { Collection<Object> createEmptyCollection(Class<?> collectionType) {</BUG> if (collectionType.equals(DomainObjectSet.class)) {
import java.io.Serializable; public class CollectionMapper implements Serializable { Collection<Object> createEmptyCollection(Class<?> collectionType) {
46,250
package org.gradle.tooling.internal.consumer.connection; import org.gradle.tooling.internal.adapter.CompatibleIntrospector; import org.gradle.tooling.internal.adapter.ProtocolToModelAdapter; <BUG>import org.gradle.tooling.internal.consumer.converters.ConsumerPropertyHandler; </BUG> import org.gradle.tooling.internal.consumer.parameters.ConsumerConnectionParameters; import org.gradle.tooling.internal.consumer.parameters.ConsumerOperationParameters; import org.gradle.tooling.internal.consumer.versioning.VersionDetails;
import org.gradle.tooling.internal.consumer.converters.PropertyHandlerFactory;
46,251
doRunBuild(operationParameters); return null; } else { Class<?> protocolType = getVersionDetails().mapModelTypeToProtocolType(type); Object model = doGetModel(protocolType, operationParameters); <BUG>return adapter.adapt(type, model, new ConsumerPropertyHandler(getVersionDetails())); </BUG> } } protected abstract Object doGetModel(Class<?> protocolType, ConsumerOperationParameters operationParameters);
return adapter.adapt(type, model, new PropertyHandlerFactory().forVersion(getVersionDetails()));
46,252
private static final String DATASET_CAPACITY_TABLE = "dataset_capacity"; private static final String DATASET_TAG_TABLE = "dataset_tag"; private static final String DATASET_CASE_SENSITIVE_TABLE = "dataset_case_sensitivity"; private static final String DATASET_REFERENCE_TABLE = "dataset_reference"; private static final String DATASET_PARTITION_TABLE = "dataset_partition"; <BUG>private static final String DATASET_SECURITY_TABLE = "dataset_security"; </BUG> private static final String DATASET_OWNER_TABLE = "dataset_owner"; private static final String DATASET_OWNER_UNMATCHED_TABLE = "stg_dataset_owner_unmatched"; private static final String DATASET_CONSTRAINT_TABLE = "dataset_constraint";
private static final String DATASET_SECURITY_TABLE = "dataset_security_info";
46,253
throw new IllegalArgumentException( "Dataset deployment info update fail, " + "Json missing necessary fields: " + root.toString()); </BUG> } <BUG>final Object[] idUrn = findIdAndUrn(idNode, urnNode); final Integer datasetId = (Integer) idUrn[0];</BUG> final String urn = (String) idUrn[1]; ObjectMapper om = new ObjectMapper(); for (final JsonNode deploymentInfo : deployment) { DatasetDeploymentRecord record = om.convertValue(deploymentInfo, DatasetDeploymentRecord.class);
"Dataset deployment info update error, missing necessary fields: " + root.toString()); final Object[] idUrn = findDataset(root); if (idUrn[0] == null || idUrn[1] == null) { throw new IllegalArgumentException("Cannot identify dataset from id/uri/urn: " + root.toString()); final Integer datasetId = (Integer) idUrn[0];
46,254
rec.setModifiedTime(System.currentTimeMillis() / 1000); if (datasetId == 0) { DatasetRecord record = new DatasetRecord(); record.setUrn(urn); record.setSourceCreatedTime("" + rec.getCreateTime() / 1000); <BUG>record.setSchema(rec.getOriginalSchema()); record.setSchemaType(rec.getFormat()); </BUG> record.setFields((String) StringUtil.objectToJsonString(rec.getFieldSchema()));
record.setSchema(rec.getOriginalSchema().getText()); record.setSchemaType(rec.getOriginalSchema().getFormat());
46,255
datasetId = Integer.valueOf(DatasetDao.getDatasetByUrn(urn).get("id").toString()); rec.setDatasetId(datasetId); } else { DICT_DATASET_WRITER.execute(UPDATE_DICT_DATASET_WITH_SCHEMA_CHANGE, <BUG>new Object[]{rec.getOriginalSchema(), rec.getFormat(), StringUtil.objectToJsonString(rec.getFieldSchema()), "API", System.currentTimeMillis() / 1000, datasetId}); }</BUG> List<Map<String, Object>> oldInfo; try {
new Object[]{rec.getOriginalSchema().getText(), rec.getOriginalSchema().getFormat(), StringUtil.objectToJsonString(rec.getFieldSchema()), "API", System.currentTimeMillis() / 1000, datasetId});
46,256
case "deploymentInfo": try { DatasetInfoDao.updateDatasetDeployment(rootNode); } catch (Exception ex) { Logger.debug("Metadata change exception: deployment ", ex); <BUG>} break; case "caseSensitivity": try { DatasetInfoDao.updateDatasetCaseSensitivity(rootNode); } catch (Exception ex) { Logger.debug("Metadata change exception: case sensitivity ", ex);</BUG> }
[DELETED]
46,257
package com.redhat.rhn.manager.kickstart.cobbler.test; import com.redhat.rhn.domain.kickstart.KickstartData; import com.redhat.rhn.domain.kickstart.test.KickstartDataTest; import com.redhat.rhn.domain.role.RoleFactory; import com.redhat.rhn.domain.server.NetworkInterface; <BUG>import com.redhat.rhn.domain.server.Server; import com.redhat.rhn.domain.server.test.NetworkInterfaceTest;</BUG> import com.redhat.rhn.domain.user.User; import com.redhat.rhn.domain.user.UserFactory; import com.redhat.rhn.manager.kickstart.KickstartUrlHelper;
import com.redhat.rhn.domain.server.ServerFactory; import com.redhat.rhn.domain.server.test.NetworkInterfaceTest;
46,258
public void setUp() throws Exception { super.setUp(); user = UserTestUtils.createUserInOrgOne(); user.addRole(RoleFactory.ORG_ADMIN); this.ksdata = KickstartDataTest.createKickstartWithDefaultKey(this.user.getOrg()); <BUG>this.ksdata.getTree().setBasePath("/var/satellite/rhn/kickstart/ks-f9-x86_64/"); </BUG> CobblerDistroCreateCommand dcreate = new CobblerDistroCreateCommand(ksdata.getTree(), user); dcreate.store();
this.ksdata.getTree().setBasePath("/opt/repo/f9-x86_64/");
46,259
assertNotNull(systemMap); assertTrue(systemMap.containsKey("name"));</BUG> cmd = new CobblerSystemCreateCommand(user, s, ksdata, "http://localhost/test/path", TestUtils.randomString()); <BUG>cmd.store(); }</BUG> public void testProfileCreate() throws Exception { CobblerProfileCreateCommand cmd = new CobblerProfileCreateCommand( ksdata, user); assertNull(cmd.store());
s.addNetworkInterface(device); CobblerSystemCreateCommand cmd = new CobblerSystemCreateCommand(user, s, ksdata, assertNotNull(s.getCobblerId()); assertNotNull(s.getCobblerId()); }
46,260
import com.redhat.rhn.testing.RhnBaseTestCase; import com.redhat.rhn.testing.TestUtils; import com.redhat.rhn.testing.UserTestUtils; import org.hibernate.Session; import java.util.Date; <BUG>public class NetworkInterfaceTest extends RhnBaseTestCase { public void testEquals() throws Exception {</BUG> NetworkInterface netint1 = createTestNetworkInterface(); NetworkInterface netint2 = new NetworkInterface(); assertFalse(netint1.equals(netint2));
public static String TEST_MAC = "AA:AA:BB:BB:CC:CC"; public void testEquals() throws Exception {
46,261
return createTestNetworkInterface(s); } public static NetworkInterface createTestNetworkInterface(Server server) throws Exception { return createTestNetworkInterface(server, TestUtils.randomString(), <BUG>"AA:AA:BB:BB:CC:CC", "127.0.0.1"); }</BUG> public static NetworkInterface createTestNetworkInterface(Server server, String networkName, String ipAddress, String macAddress) throws Exception {
TEST_MAC, "127.0.0.1");
46,262
<BUG>package com.redhat.rhn.manager.kickstart.cobbler.test; import com.redhat.rhn.frontend.xmlrpc.util.XMLRPCInvoker;</BUG> import com.redhat.rhn.testing.TestUtils; import org.apache.log4j.Logger; import org.cobbler.test.MockConnection;
import com.redhat.rhn.domain.server.NetworkInterface; import com.redhat.rhn.domain.server.test.NetworkInterfaceTest; import com.redhat.rhn.frontend.xmlrpc.util.XMLRPCInvoker;
46,263
import org.apache.commons.lang.StringUtils; import org.apache.log4j.Logger; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; <BUG>import java.util.Iterator; import java.util.List; import java.util.Map; public class CobblerSystemCreateCommand extends CobblerCommand {</BUG> private static Logger log = Logger.getLogger(CobblerSystemCreateCommand.class);
import java.util.LinkedList; import java.util.Set; public class CobblerSystemCreateCommand extends CobblerCommand {
46,264
import java.util.Map; public class CobblerSystemCreateCommand extends CobblerCommand {</BUG> private static Logger log = Logger.getLogger(CobblerSystemCreateCommand.class); private Server server; private String mediaPath; <BUG>private String name; </BUG> private String activationKeys; public CobblerSystemCreateCommand(User userIn, Server serverIn, KickstartData ksDataIn, String mediaPathIn, String activationKeysIn) {
import java.util.Set; public class CobblerSystemCreateCommand extends CobblerCommand { private String profileName;
46,265
KickstartData ksDataIn, String mediaPathIn, String activationKeysIn) { super(userIn); this.server = serverIn; this.mediaPath = mediaPathIn; if (ksDataIn != null) { <BUG>name = (String)lookupCobblerProfile(ksDataIn).get("name"); </BUG> } else { throw new NullPointerException("ksDataIn cant be null");
profileName = (String)lookupCobblerProfile(ksDataIn).get("name");
46,266
} public CobblerSystemCreateCommand(Server serverIn, String cobblerProfileName) { super(serverIn.getCreator()); this.server = serverIn; this.mediaPath = null; <BUG>this.name = cobblerProfileName; </BUG> String note = "Reactivation key for " + server.getName() + "."; ActivationKey key = ActivationKeyManager.getInstance(). createNewReActivationKey(server.getCreator(), server, note);
else { throw new NullPointerException("ksDataIn cant be null"); this.activationKeys = activationKeysIn; this.profileName = cobblerProfileName;
46,267
this.server.getNetworkInterfaces().isEmpty()) { return new ValidatorError("kickstart.no.network.error"); } processNetworkInterfaces(handle, xmlRpcToken, server); Object[] args = new String[]{handle, "profile", <BUG>name, xmlRpcToken}; </BUG> invokeXMLRPC("modify_system", Arrays.asList(args)); if (this.activationKeys == null || this.activationKeys.length() == 0) { log.error("This cobbler profile does not " +
profileName, xmlRpcToken};
46,268
public static final String METADATA_ONLY_OPTION = "metadata-only"; public static final String METADATA_ONLY_DESC = "Only synchronize metadata (in supported plugins)"; public static final String IGNORE_METADATA_OPTION = "ignore-metadata"; public static final String IGNORE_METADATA_DESC = "Ignore all metadata when syncing. Objects written to the target will not have any metadata set by the sync operation."; public static final String INCLUDE_ACL_OPTION = "include-acl"; <BUG>public static final String INCLUDE_ACL_DESC = "Include ACL information when syncing objects (in supported plugins)"; public static final String INCLUDE_RETENTION_EXPIRATION_OPTION = "include-retention-expiration";</BUG> public static final String INCLUDE_RETENTION_EXPIRATION_DESC = "Instructs retention/expiration information when syncing objects (in supported plugins). The target plugin will *attempt* to replicate retention/expiration for each object. Works only on plugins that support retention/expiration. If the target is an Atmos cloud, the target policy must enable retention/expiration immediately for this to work."; public static final String FORCE_OPTION = "force"; public static final String FORCE_DESC = "Instructs supported target plugins to overwrite any existing objects";
public static final String IGNORE_INVALID_ACLS_OPTION = "ignore-invalid-acls"; public static final String IGNORE_INVALID_ACLS_DESC = "If including ACL information when migrating objects, ignore any invalid entries (i.e. permissions or identities that don't exist in the target system)."; public static final String INCLUDE_RETENTION_EXPIRATION_OPTION = "include-retention-expiration";
46,269
opts.addOption(new OptionBuilder().withDescription(METADATA_ONLY_DESC) .withLongOpt(METADATA_ONLY_OPTION).create()); opts.addOption(new OptionBuilder().withDescription(IGNORE_METADATA_DESC) .withLongOpt(IGNORE_METADATA_OPTION).create()); opts.addOption(new OptionBuilder().withDescription(INCLUDE_ACL_DESC) <BUG>.withLongOpt(INCLUDE_ACL_OPTION).create()); opts.addOption(new OptionBuilder().withDescription(INCLUDE_RETENTION_EXPIRATION_DESC)</BUG> .withLongOpt(INCLUDE_RETENTION_EXPIRATION_OPTION).create()); opts.addOption(new OptionBuilder().withDescription(FORCE_DESC) .withLongOpt(FORCE_OPTION).create());
opts.addOption(new OptionBuilder().withDescription(IGNORE_INVALID_ACLS_DESC) .withLongOpt(IGNORE_INVALID_ACLS_OPTION).create()); opts.addOption(new OptionBuilder().withDescription(INCLUDE_RETENTION_EXPIRATION_DESC)
46,270
import java.util.Iterator; import java.util.concurrent.Callable; public abstract class SyncPlugin { protected boolean metadataOnly = false; protected boolean ignoreMetadata = false; <BUG>protected boolean includeAcl = false; protected boolean includeRetentionExpiration = false;</BUG> protected boolean force = false; protected int bufferSize = CommonOptions.DEFAULT_BUFFER_SIZE; public abstract String getName();
protected boolean ignoreInvalidAcls = false; protected boolean includeRetentionExpiration = false;
46,271
public void cleanup() { } public final void parseOptions(CommandLine line) { metadataOnly = line.hasOption(CommonOptions.METADATA_ONLY_OPTION); ignoreMetadata = line.hasOption(CommonOptions.IGNORE_METADATA_OPTION); <BUG>includeAcl = line.hasOption(CommonOptions.INCLUDE_ACL_OPTION); includeRetentionExpiration = line.hasOption(CommonOptions.INCLUDE_RETENTION_EXPIRATION_OPTION);</BUG> force = line.hasOption(CommonOptions.FORCE_OPTION); if (line.hasOption(CommonOptions.IO_BUFFER_SIZE_OPTION)) { bufferSize = Integer.parseInt(line.getOptionValue(CommonOptions.IO_BUFFER_SIZE_OPTION));
ignoreInvalidAcls = line.hasOption(CommonOptions.IGNORE_INVALID_ACLS_OPTION); includeRetentionExpiration = line.hasOption(CommonOptions.INCLUDE_RETENTION_EXPIRATION_OPTION);
46,272
protected static void shortHelp() { System.out.println(" use --help for a detailed (quite long) list of options"); } protected static void longHelp() { HelpFormatter fmt = new HelpFormatter(); <BUG>fmt.setWidth(90); </BUG> Options options = mainOptions(); for (Object o : CommonOptions.getOptions().getOptions()) { options.addOption((Option) o);
fmt.setWidth(79);
46,273
this.syncObject = syncObject; } @Override public void run() { try { <BUG>if (syncObject.hasChildren()) { </BUG> LogMF.debug(l4j, ">>>> querying children of {0}", syncObject); Iterator<T> children = syncSource.childIterator(syncObject); while (children.hasNext()) {
if (syncObject.isDirectory()) {
46,274
import org.uberfire.io.IOService; import org.uberfire.io.impl.IOServiceDotFileImpl; import org.uberfire.paging.PageResponse; import org.uberfire.rpc.SessionInfo; import org.uberfire.rpc.impl.SessionInfoImpl; <BUG>import org.uberfire.security.Resource; import org.uberfire.security.authz.AuthorizationManager; import org.uberfire.security.authz.RuntimeResource; import org.uberfire.security.impl.authz.RuntimeAuthorizationManager;</BUG> @ApplicationScoped
[DELETED]
46,275
import org.uberfire.security.authz.RuntimeResource; import org.uberfire.security.impl.authz.RuntimeAuthorizationManager;</BUG> @ApplicationScoped public class EnvironmentProvider { private final IOService ioService = new IOServiceDotFileImpl(); <BUG>public static final Role ADMIN_ROLE = new Role() { @Override public String getName() { return "admin"; } };</BUG> @Inject
import org.uberfire.io.IOService; import org.uberfire.io.impl.IOServiceDotFileImpl; import org.uberfire.paging.PageResponse; import org.uberfire.rpc.SessionInfo; import org.uberfire.rpc.impl.SessionInfoImpl;
46,276
import java.util.HashMap; import java.util.List; import java.util.Map; import org.kie.config.cli.command.impl.AddDeploymentConfigCliCommand; import org.kie.config.cli.command.impl.AddRepositoryToOrganizationalUnitCliCommand; <BUG>import org.kie.config.cli.command.impl.AddGroupToOrganizationalUnitCliCommand; import org.kie.config.cli.command.impl.AddGroupToProjectCliCommand; import org.kie.config.cli.command.impl.AddGroupToRepositoryCliCommand;</BUG> import org.kie.config.cli.command.impl.CreateOrganizationalUnitCliCommand; import org.kie.config.cli.command.impl.CreateRepositoryCliCommand;
[DELETED]
46,277
import org.kie.config.cli.command.impl.PushGitRepositoryCliCommand; import org.kie.config.cli.command.impl.RemoveDeploymentConfigCliCommand; import org.kie.config.cli.command.impl.RemoveOrganizationalUnitCliCommand; import org.kie.config.cli.command.impl.RemoveRepositoryCliCommand; import org.kie.config.cli.command.impl.RemoveRepositoryFromOrganizationalUnitCliCommand; <BUG>import org.kie.config.cli.command.impl.RemoveGroupFromOrganizationalUnitCliCommand; import org.kie.config.cli.command.impl.RemoveGroupFromProjectCliCommand; import org.kie.config.cli.command.impl.RemoveGroupFromRepositoryCliCommand;</BUG> public class CliCommandRegistry { private static CliCommandRegistry instance;
[DELETED]
46,278
commands.put("remove-deployment", new RemoveDeploymentConfigCliCommand()); commands.put("create-repo", new CreateRepositoryCliCommand()); commands.put("remove-repo", new RemoveRepositoryCliCommand()); commands.put("add-repo-org-unit", new AddRepositoryToOrganizationalUnitCliCommand()); commands.put("remove-repo-org-unit", new RemoveRepositoryFromOrganizationalUnitCliCommand()); <BUG>commands.put("add-group-repo", new AddGroupToRepositoryCliCommand()); commands.put("remove-group-repo", new RemoveGroupFromRepositoryCliCommand()); commands.put("add-group-org-unit", new AddGroupToOrganizationalUnitCliCommand()); commands.put("remove-group-org-unit", new RemoveGroupFromOrganizationalUnitCliCommand()); commands.put("add-group-project", new AddGroupToProjectCliCommand()); commands.put("remove-group-project", new RemoveGroupFromProjectCliCommand());</BUG> commands.put("push-changes", new PushGitRepositoryCliCommand());
[DELETED]
46,279
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() );
46,280
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_();
46,281
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 );
46,282
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 );
46,283
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_();
46,284
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_();
46,285
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_();
46,286
{ ReverseDependencyLink p1 = (ReverseDependencyLink) o1; ReverseDependencyLink p2 = (ReverseDependencyLink) o2; return p1.getProject().getId().compareTo( p2.getProject().getId() ); } <BUG>else {</BUG> return 0; } }
iconError( sink );
46,287
customTokens.put("%%mlFinalForestsPerHost%%", hubConfig.finalForestsPerHost.toString()); customTokens.put("%%mlTraceAppserverName%%", hubConfig.traceHttpName); customTokens.put("%%mlTracePort%%", hubConfig.tracePort.toString()); customTokens.put("%%mlTraceDbName%%", hubConfig.traceDbName); customTokens.put("%%mlTraceForestsPerHost%%", hubConfig.traceForestsPerHost.toString()); <BUG>customTokens.put("%%mlModulesDbName%%", hubConfig.modulesDbName); }</BUG> public void init() { try { LOGGER.error("PLUGINS DIR: " + pluginsDir.toString());
customTokens.put("%%mlTriggersDbName%%", hubConfig.triggersDbName); customTokens.put("%%mlSchemasDbName%%", hubConfig.schemasDbName); }
46,288
import org.apache.velocity.exception.VelocityException; import org.dom4j.Document; import org.dom4j.DocumentException; import org.dom4j.Element; import org.dom4j.io.SAXReader; <BUG>public class JournalVmUtil { public static String transform(</BUG> Map tokens, String languageId, String xml, String script) throws TransformException { StringWriter output = new StringWriter();
public static final String[] _TEMPLATE_VELOCITY_RESTRICTED_VARIABLES = PropsUtil.getArray( PropsUtil.JOURNAL_TEMPLATE_VELOCITY_RESTRICTED_VARIABLES); public static String transform(
46,289
import javax.servlet.http.HttpServletRequest; import org.apache.struts.taglib.tiles.ComponentConstants; import org.apache.struts.tiles.ComponentContext; import org.apache.velocity.VelocityContext; public class VelocityVariables { <BUG>public static void insertHelperUtilities(VelocityContext vc, String[] restrictedVariables) { </BUG> vc.put("arrayUtil", ArrayUtil_IW.getInstance()); vc.put("browserSniffer", BrowserSniffer_IW.getInstance());
public static void insertHelperUtilities( VelocityContext vc, String[] restrictedVariables) {
46,290
themeDisplay.setTilesContent(tilesContent); themeDisplay.setTilesSelectable(tilesSelectable); } vc.put("pageTitle", req.getAttribute(WebKeys.PAGE_TITLE)); vc.put("pageSubtitle", req.getAttribute(WebKeys.PAGE_SUBTITLE)); <BUG>insertHelperUtilities(vc, new String[0]); </BUG> Map vmVariables = (Map)req.getAttribute(WebKeys.VM_VARIABLES); if (vmVariables != null) { Iterator itr = vmVariables.entrySet().iterator();
insertHelperUtilities(vc, null);
46,291
System.arraycopy(array1, 0, combinedArray, 0, array1.length); System.arraycopy( array2, 0, combinedArray, array1.length, array2.length); } public static boolean contains(boolean[] array, boolean value) { <BUG>if (array == null) { return false;</BUG> } else { for (int i = 0; i < array.length; i++) {
if ((array == null) || (array.length == 0)) { return false;
46,292
} return false; } } public static boolean contains(char[] array, char value) { <BUG>if (array == null) { return false;</BUG> } else { for (int i = 0; i < array.length; i++) {
public static void combine( Object[] array1, Object[] array2, Object[] combinedArray) { System.arraycopy(array1, 0, combinedArray, 0, array1.length); System.arraycopy( array2, 0, combinedArray, array1.length, array2.length); public static boolean contains(boolean[] array, boolean value) { if ((array == null) || (array.length == 0)) {
46,293
} return false; } } public static boolean contains(double[] array, double value) { <BUG>if (array == null) { return false;</BUG> } else { for (int i = 0; i < array.length; i++) {
public static void combine( Object[] array1, Object[] array2, Object[] combinedArray) { System.arraycopy(array1, 0, combinedArray, 0, array1.length); System.arraycopy( array2, 0, combinedArray, array1.length, array2.length); public static boolean contains(boolean[] array, boolean value) { if ((array == null) || (array.length == 0)) {
46,294
} return false; } } public static boolean contains(long[] array, long value) { <BUG>if (array == null) { return false;</BUG> } else { for (int i = 0; i < array.length; i++) {
public static void combine( Object[] array1, Object[] array2, Object[] combinedArray) { System.arraycopy(array1, 0, combinedArray, 0, array1.length); System.arraycopy( array2, 0, combinedArray, array1.length, array2.length); public static boolean contains(boolean[] array, boolean value) { if ((array == null) || (array.length == 0)) {
46,295
} return false; } } public static boolean contains(int[] array, int value) { <BUG>if (array == null) { return false;</BUG> } else { for (int i = 0; i < array.length; i++) {
public static void combine( Object[] array1, Object[] array2, Object[] combinedArray) { System.arraycopy(array1, 0, combinedArray, 0, array1.length); System.arraycopy( array2, 0, combinedArray, array1.length, array2.length); public static boolean contains(boolean[] array, boolean value) { if ((array == null) || (array.length == 0)) {
46,296
} return false; } } public static boolean contains(short[] array, short value) { <BUG>if (array == null) { return false;</BUG> } else { for (int i = 0; i < array.length; i++) {
public static void combine( Object[] array1, Object[] array2, Object[] combinedArray) { System.arraycopy(array1, 0, combinedArray, 0, array1.length); System.arraycopy( array2, 0, combinedArray, array1.length, array2.length); public static boolean contains(boolean[] array, boolean value) { if ((array == null) || (array.length == 0)) {
46,297
} return false; } } public static boolean contains(Object[] array, Object value) { <BUG>if ((array == null) || (value == null)) { </BUG> return false; } else {
public static void combine( Object[] array1, Object[] array2, Object[] combinedArray) { System.arraycopy(array1, 0, combinedArray, 0, array1.length); System.arraycopy( array2, 0, combinedArray, array1.length, array2.length); public static boolean contains(boolean[] array, boolean value) { if ((array == null) || (array.length == 0)) {
46,298
customTokens.put("%%mlFinalForestsPerHost%%", hubConfig.finalForestsPerHost.toString()); customTokens.put("%%mlTraceAppserverName%%", hubConfig.traceHttpName); customTokens.put("%%mlTracePort%%", hubConfig.tracePort.toString()); customTokens.put("%%mlTraceDbName%%", hubConfig.traceDbName); customTokens.put("%%mlTraceForestsPerHost%%", hubConfig.traceForestsPerHost.toString()); <BUG>customTokens.put("%%mlModulesDbName%%", hubConfig.modulesDbName); }</BUG> public void init() { try { LOGGER.error("PLUGINS DIR: " + pluginsDir.toString());
customTokens.put("%%mlTriggersDbName%%", hubConfig.triggersDbName); customTokens.put("%%mlSchemasDbName%%", hubConfig.schemasDbName); }
46,299
public String getTableName() { return getQuery(); } @javax.annotation.Nonnull public String getPrimaryKey() { <BUG>return null; }</BUG> @javax.annotation.Nonnull public String getDropSql() { return "";
return "<NO_PRIMARY_KEY_ON_QUERIES>";
46,300
package org.jdc.template.model.database.attached.crossdatabasequery; <BUG>import org.dbtools.android.domain.AndroidBaseRecord; import org.dbtools.android.domain.database.statement.StatementWrapper; import org.dbtools.android.domain.database.contentvalues.DBToolsContentValues; import android.database.Cursor;</BUG> @SuppressWarnings("all")
import android.database.Cursor;