id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
26,701
public static void addTextSimple(PDPageContentStream stream, PdfTextStyle textConfig, float textX, float textY, String text) { try { stream.setFont(textConfig.getFont(), textConfig.getFontSize()); stream.setNonStrokingColor(textConfig.getColor()); stream.beginText(); <BUG>stream.newLineAtOffset(textX, textY); stream.sh...
stream.setTextMatrix(new Matrix(1,0,0,1, textX, textY)); stream.showText(text);
26,702
public static void addTextSimpleUnderlined(PDPageContentStream stream, PdfTextStyle textConfig, float textX, float textY, String text) { addTextSimple(stream, textConfig, textX, textY, text); try { float lineOffset = textConfig.getFontSize() / 8F; stream.setStrokingColor(textConfig.getColor()); <BUG>stream.setLineWidth...
stream.moveTo(textX, textY - lineOffset); stream.lineTo(textX + getTextWidth(textConfig.getFont(), textConfig.getFontSize(), text), textY - lineOffset);
26,703
list.add(text.length()); return list; } public static String[] splitText(PDFont font, int fontSize, float allowedWidth, String text) { String endPart = ""; <BUG>String shortenedText = text; List<String> breakSplitted = Arrays.asList(shortenedText.split("(\\r\\n)|(\\n)|(\\n\\r)")).stream().collect(Collectors.toList()); ...
List<String> breakSplitted = Arrays.asList(text.split("(\\r\\n)|(\\n)|(\\n\\r)")).stream().collect(Collectors.toList()); if (breakSplitted.size() > 1) {
26,704
package cc.catalysts.boot.report.pdf.elements; import org.apache.pdfbox.pdmodel.PDDocument; <BUG>import org.apache.pdfbox.pdmodel.edit.PDPageContentStream; import java.io.IOException;</BUG> import java.util.ArrayList; import java.util.Collection; import java.util.LinkedList;
import org.apache.pdfbox.pdmodel.PDPageContentStream; import java.io.IOException;
26,705
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 FileSyste...
import static org.apache.hadoop.fs.s3a.Constants.*; public class S3AFileSystem extends FileSystem {
26,706
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(...
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));
26,707
} 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()
26,708
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_THR...
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.g...
26,709
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_...
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...
26,710
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 backup...
import static org.apache.hadoop.fs.s3a.Constants.*; public class S3AOutputStream extends OutputStream {
26,711
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) ...
partSize = conf.getLong(OLD_MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE); partSizeThreshold = conf.getInt(OLD_MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD);
26,712
callers.addAll(functionManager.getCallers((PyElement)element)); } final HashMap<PsiElement, PyHierarchyNodeDescriptor> callerToDescriptorMap = new HashMap<PsiElement, PyHierarchyNodeDescriptor>(); PsiElement baseClass = element instanceof PyFunction ? ((PyFunction)element).getContainingClass() : null; for (PsiElement c...
if (isInScope(baseClass, caller, myScopeType)) {
26,713
callees.addAll(functionManager.getCallees((PyElement)element)); } final Map<PsiElement, PyHierarchyNodeDescriptor> calleeToDescriptorMap = new HashMap<PsiElement, PyHierarchyNodeDescriptor>(); PsiElement baseClass = element instanceof PyFunction ? ((PyFunction)element).getContainingClass() : null; for (PsiElement calle...
if (isInScope(baseClass, callee, myScopeType)) {
26,714
String region, String regionAbbr, String county, String localAdmin, String locality, <BUG>String neighborhood, String label,</BUG> String layer, double lat, double lng) {
Double confidence, String label,
26,715
.region(region) .regionAbbr(regionAbbr) .county(county) .localAdmin(localAdmin) .locality(locality) <BUG>.neighborhood(neighborhood) .label(label)</BUG> .layer(layer) .lat(lat) .lng(lng)
.confidence(confidence) .label(label)
26,716
public abstract String region(); public abstract String regionAbbr(); public abstract String county(); public abstract String localAdmin(); public abstract String locality(); <BUG>public abstract String neighborhood(); public abstract String label();</BUG> public abstract String layer(); public abstract double lat(); p...
public abstract Double confidence(); public abstract String label();
26,717
public abstract Builder region(String region); public abstract Builder regionAbbr(String regionAbbr); public abstract Builder county(String county); public abstract Builder localAdmin(String localAdmin); public abstract Builder locality(String locality); <BUG>public abstract Builder neighborhood(String neighborhood); p...
public abstract Builder confidence(Double confidence); public abstract Builder label(String label);
26,718
.region(feature.properties.region) .regionAbbr(feature.properties.region_a) .county(feature.properties.county) .localAdmin(feature.properties.localadmin) .locality(feature.properties.locality) <BUG>.neighborhood(feature.properties.neighbourhood) .label(feature.properties.label)</BUG> .layer(feature.properties.layer) .l...
.confidence(feature.properties.confidence) .label(feature.properties.label)
26,719
properties.region = region(); properties.region_a = regionAbbr(); properties.county = county(); properties.localadmin = localAdmin(); properties.locality = locality(); <BUG>properties.neighbourhood = neighborhood(); properties.label = label();</BUG> properties.layer = layer(); geometry.coordinates.add(lng()); geometry....
properties.confidence = confidence(); properties.label = label();
26,720
.region("New York") .regionAbbr("NY") .county("New York County") .localAdmin("Manhattan") .locality("New York") <BUG>.neighborhood("Koreatown") .label("Test SimpleFeature, Manhattan, NY")</BUG> .layer("locality") .build(); }
.confidence(1.0) .label("Test SimpleFeature, Manhattan, NY")
26,721
properties.region = "New York"; properties.region_a = "NY"; properties.county = "New York County"; properties.localadmin = "Manhattan"; properties.locality = "New York"; <BUG>properties.neighbourhood = "Koreatown"; properties.label = "Test SimpleFeature, Manhattan, NY";</BUG> properties.layer = "locality"; final Geomet...
properties.confidence = 1.0; properties.label = "Test SimpleFeature, Manhattan, NY";
26,722
import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.security.DigestOutputStream; import java.security.MessageDigest; <BUG>import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.Collections; import java.util.List;</BUG> public final class ...
import java.text.DateFormat; import java.util.Date; import java.util.List;
26,723
package org.jboss.as.patching.runner; <BUG>import org.jboss.as.boot.DirectoryStructure; import org.jboss.as.patching.LocalPatchInfo;</BUG> import org.jboss.as.patching.PatchInfo; import org.jboss.as.patching.PatchLogger; import org.jboss.as.patching.PatchMessages;
import static org.jboss.as.patching.runner.PatchUtils.generateTimestamp; import org.jboss.as.patching.CommonAttributes; import org.jboss.as.patching.LocalPatchInfo;
26,724
private static final String PATH_DELIMITER = "/"; public static final byte[] NO_CONTENT = PatchingTask.NO_CONTENT; enum Element { ADDED_BUNDLE("added-bundle"), ADDED_MISC_CONTENT("added-misc-content"), <BUG>ADDED_MODULE("added-module"), BUNDLES("bundles"),</BUG> CUMULATIVE("cumulative"), DESCRIPTION("description"), MIS...
APPLIES_TO_VERSION("applies-to-version"), BUNDLES("bundles"),
26,725
final int count = reader.getAttributeCount(); for (int i = 0; i < count; i++) { final String value = reader.getAttributeValue(i); final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i)); switch (attribute) { <BUG>case APPLIES_TO_VERSION: builder.addAppliesTo(value); break;</BUG> case RESULTING_VE...
[DELETED]
26,726
final StringBuilder path = new StringBuilder(); for(final String p : item.getPath()) { path.append(p).append(PATH_DELIMITER); } path.append(item.getName()); <BUG>writer.writeAttribute(Attribute.PATH.name, path.toString()); if(type != ModificationType.REMOVE) {</BUG> writer.writeAttribute(Attribute.HASH.name, bytesToHex...
if (item.isDirectory()) { writer.writeAttribute(Attribute.DIRECTORY.name, "true"); if(type != ModificationType.REMOVE) {
26,727
package org.jboss.as.patching; import org.jboss.as.controller.OperationFailedException; import org.jboss.as.patching.runner.PatchingException; import org.jboss.logging.Messages; import org.jboss.logging.annotations.Message; <BUG>import org.jboss.logging.annotations.MessageBundle; import java.io.IOException;</BUG> impor...
import org.jboss.logging.annotations.Cause; import java.io.IOException;
26,728
package com.athena.chameleon.engine.core.analyzer.support; import java.io.File; import java.util.List; import org.apache.commons.lang.StringUtils; import org.springframework.util.Assert; <BUG>import org.xeustechnologies.jcl.JarClassLoader; import com.athena.chameleon.common.utils.ClasspathUtil;</BUG> import com.athena....
import com.athena.chameleon.common.jcl.JarClassLoader; import com.athena.chameleon.common.utils.ClasspathUtil;
26,729
package com.athena.chameleon.engine.entity.pdf; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; <BUG>import org.xeustechnologies.jcl.JarClassLoader; public class AnalyzeDefinition {</BUG> private String fileName; private Map<FileType, FileSummary> fileSummaryMap; priva...
import com.athena.chameleon.common.jcl.JarClassLoader; public class AnalyzeDefinition {
26,730
package com.athena.chameleon.engine.core.analyzer.support; import java.io.File; import org.springframework.util.Assert; <BUG>import org.xeustechnologies.jcl.JarClassLoader; import com.athena.chameleon.common.utils.ClasspathUtil;</BUG> import com.athena.chameleon.common.utils.ThreadLocalUtil; import com.athena.chameleon...
import com.athena.chameleon.common.jcl.JarClassLoader; import com.athena.chameleon.common.utils.ClasspathUtil;
26,731
package com.athena.chameleon.engine.core.analyzer.support; import java.io.File; import java.util.List; import org.apache.commons.lang.StringUtils; import org.springframework.util.Assert; <BUG>import org.xeustechnologies.jcl.JarClassLoader; import com.athena.chameleon.common.utils.ClasspathUtil;</BUG> import com.athena....
import com.athena.chameleon.common.jcl.JarClassLoader; import com.athena.chameleon.common.utils.ClasspathUtil;
26,732
if(!StringUtils.isEmpty(getClassesDirPath(new File(tempDir)))) { JarClassLoader jcl = null; if(embed) { jcl = ((PDFMetadataDefinition)ThreadLocalUtil.get(ChameleonConstants.PDF_METADATA_DEFINITION)).getEarDefinition().getJcl(); } <BUG>if(jcl == null) { jcl = new JarClassLoader(); jcl.add(this.getClass().getResource("/l...
[DELETED]
26,733
copy.pos = pos; return copy; } @SuppressWarnings("unchecked") @Override <BUG>public <T> T getRepresentation(Class<T> clazz, Object... args) { </BUG> long requests = full ? responseTimes.length : pos; if (clazz == DefaultOutcome.class) { return (T) new DefaultOutcome(requests, errors, getMeanDuration(), getMaxDuration()...
public <T> T getRepresentation(Class<T> clazz, Statistics ownerStatistics, Object... args) {
26,734
</BUG> long requests = full ? responseTimes.length : pos; if (clazz == DefaultOutcome.class) { return (T) new DefaultOutcome(requests, errors, getMeanDuration(), getMaxDuration()); } else if (clazz == OperationThroughput.class) { <BUG>return (T) OperationThroughput.compute(requests, errors, args); </BUG> } else if (cla...
copy.pos = pos; return copy; } @SuppressWarnings("unchecked") @Override public <T> T getRepresentation(Class<T> clazz, Statistics ownerStatistics, Object... args) { return (T) OperationThroughput.compute(requests, errors, ownerStatistics);
26,735
List<StatisticsAck> statisticsAcks = instancesOf(acks, StatisticsAck.class); Statistics aggregated = statisticsAcks.stream().filter(ack -> ack.iterations != null) .flatMap(ack -> ack.iterations.stream().flatMap(s -> s.stream())).reduce(null, Statistics.MERGE);</BUG> for (StatisticsAck ack : statisticsAcks) { <BUG>if (a...
Statistics aggregated = statisticsAcks.stream().flatMap(ack -> ack.statistics.stream()).reduce(null, Statistics.MERGE); if (ack.statistics != null) { int testIteration = getTestIteration(); String iterationValue = resolveIterationValue();
26,736
public boolean isSingleTxType() { return transactionSize == 1; } protected interface ResultRetriever<T> { T getResult(LegacyStressor stressor); <BUG>void mergeResult(T into, T that); }</BUG> protected static class StatisticsResultRetriever implements ResultRetriever<Statistics> { public StatisticsResultRetriever() {} @...
T merge(T stats1, T stats2);
26,737
@Override public Statistics getResult(LegacyStressor stressor) { return stressor.getStats(); } @Override <BUG>public void mergeResult(Statistics into, Statistics that) { into.merge(that); }</BUG> }
public Statistics merge(Statistics stats1, Statistics stats2) { return Statistics.MERGE.apply(stats1, stats2);
26,738
if (defs != 1) throw new IllegalStateException("Must define exactly one of 'total-below', 'total-over', 'percent-below', 'percent-over'"); } @Override public boolean evaluate(Statistics statistics) { <BUG>OperationStats stats = statistics.getOperationsStats().get(on); if (stats == null) throw new IllegalStateException(...
DefaultOutcome outcome = statistics.getRepresentation(on, DefaultOutcome.class); if (outcome == null) throw new IllegalStateException("Cannot determine error count from " + statistics);
26,739
import org.radargun.config.Property; import org.radargun.config.PropertyHelper; import org.radargun.config.Stage; import org.radargun.reporting.Report; import org.radargun.stages.AbstractDistStage; <BUG>import org.radargun.stats.DefaultStatistics; </BUG> import org.radargun.stats.Statistics; import org.radargun.utils.T...
import org.radargun.stats.BasicStatistics;
26,740
public boolean amendTest = false; @Property(converter = TimeConverter.class, doc = "Benchmark duration.", optional = false) public long duration; @Property(name = "statistics", doc = "Type of gathered statistics. Default are the 'default' statistics " + "(fixed size memory footprint for each operation).", complexConver...
public Statistics statisticsPrototype = new BasicStatistics();
26,741
if (e.getKey() < entry.getKey()) { threadCounter += e.getValue().size(); } } for (Statistics s : entry.getValue()) { <BUG>groups.add(new Group(s.getOperationsStats().get(operation), 1, duration(s), new Origin(iteration, entry.getKey(), threadCounter))); }</BUG> } break; case GROUP_BY_NODE:
groups.add(new Group(s, 1, duration(s), new Origin(iteration, entry.getKey(), threadCounter)));
26,742
package com.intellij.codeInsight.completion; import com.intellij.codeInsight.ExpectedTypeInfo; import com.intellij.codeInsight.generation.OverrideImplementUtil; import com.intellij.codeInsight.lookup.LookupElement; <BUG>import com.intellij.psi.*; import com.intellij.psi.statistics.StatisticsManager;</BUG> import org.je...
import com.intellij.psi.util.TypeConversionUtil; import com.intellij.psi.statistics.StatisticsManager;
26,743
final ExpectedTypeInfo[] infos = JavaCompletionUtil.EXPECTED_TYPES.getValue(location); boolean isDefaultType = false; if (infos != null) { final PsiType type = JavaPsiFacade.getInstance(psiClass.getProject()).getElementFactory().createType(psiClass); for (final ExpectedTypeInfo info : infos) { <BUG>final PsiType infoTy...
final PsiType infoType = TypeConversionUtil.erasure(info.getType().getDeepComponentType()); final PsiType defaultType = TypeConversionUtil.erasure(info.getDefaultType().getDeepComponentType());
26,744
import java.util.ArrayList; import java.util.Date; import java.util.LinkedList; import org.apache.commons.lang3.StringUtils; public class Log { <BUG>private final static String FEHLER = "Fehler(" + Const.PROGRAMMNAME + "): "; private static class Error {</BUG> String cl = ""; int nr = 0; int count = 0;
public final static String LILNE = "################################################################################"; private static class Error {
26,745
sysLog("ImportOLD: " + Config.importOld); if (Config.nurSenderLaden != null) { sysLog("Nur Sender laden: " + StringUtils.join(Config.nurSenderLaden, ',')); } sysLog(""); <BUG>sysLog("##################################################################################"); }</BUG> public static synchronized void endMsg() ...
[DELETED]
26,746
strEx = " "; } retList.add(strEx + e.cl + " Fehlernummer: " + e.nr + " Anzahl: " + e.count); } } <BUG>retList.add("##################################################################################"); return retList;</BUG> } public static synchronized void errorLog(int fehlerNummer, Exception ex) { fehlermeldung_(fehle...
retList.add(LILNE); return retList;
26,747
public final static int VON_NR = 0; public final static String NACH = "nach"; public final static int NACH_NR = 1; public final static String[] COLUMN_NAMES = {VON, NACH}; public static final int MAX_ELEM = 2; <BUG>public LinkedList<String[]> list = new LinkedList<>(); public void init() { </BUG> list.clear();
public static LinkedList<String[]> list = new LinkedList<>(); public static void init() {
26,748
public void init() { </BUG> list.clear(); list.add(new String[]{" ", "_"}); } <BUG>public String replace(String strCheck, boolean pfad) { </BUG> Iterator<String[]> it = list.iterator(); while (it.hasNext()) { String[] strReplace = it.next();
public final static int VON_NR = 0; public final static String NACH = "nach"; public final static int NACH_NR = 1; public final static String[] COLUMN_NAMES = {VON, NACH}; public static final int MAX_ELEM = 2; public static LinkedList<String[]> list = new LinkedList<>(); public static void init() { public static String...
26,749
System.out.println(change); } } }; @Override <BUG>protected Callback<VChild, Void> copyChildCallback() </BUG> { return (child) -> {
protected Callback<VChild, Void> copyIntoCallback()
26,750
package jfxtras.labs.icalendarfx.components; import jfxtras.labs.icalendarfx.properties.component.descriptive.Comment; <BUG>import jfxtras.labs.icalendarfx.properties.component.misc.IANAProperty; import jfxtras.labs.icalendarfx.properties.component.misc.UnknownProperty;</BUG> import jfxtras.labs.icalendarfx.properties...
import jfxtras.labs.icalendarfx.properties.component.misc.NonStandardProperty;
26,751
VEVENT ("VEVENT", Arrays.asList(PropertyType.ATTACHMENT, PropertyType.ATTENDEE, PropertyType.CATEGORIES, PropertyType.CLASSIFICATION, PropertyType.COMMENT, PropertyType.CONTACT, PropertyType.DATE_TIME_CREATED, PropertyType.DATE_TIME_END, PropertyType.DATE_TIME_STAMP, PropertyType.DATE_TIME_START, PropertyType.DESCRIPTI...
PropertyType.GEOGRAPHIC_POSITION, PropertyType.LAST_MODIFIED, PropertyType.LOCATION, PropertyType.NON_STANDARD, PropertyType.ORGANIZER, PropertyType.PRIORITY,
26,752
VTODO ("VTODO", Arrays.asList(PropertyType.ATTACHMENT, PropertyType.ATTENDEE, PropertyType.CATEGORIES, PropertyType.CLASSIFICATION, PropertyType.COMMENT, PropertyType.CONTACT, PropertyType.DATE_TIME_COMPLETED, PropertyType.DATE_TIME_CREATED, PropertyType.DATE_TIME_DUE, PropertyType.DATE_TIME_STAMP, PropertyType.DATE_TI...
PropertyType.EXCEPTION_DATE_TIMES, PropertyType.GEOGRAPHIC_POSITION, PropertyType.LAST_MODIFIED, PropertyType.LOCATION, PropertyType.NON_STANDARD, PropertyType.ORGANIZER,
26,753
throw new RuntimeException("not implemented"); } }, DAYLIGHT_SAVING_TIME ("DAYLIGHT", Arrays.asList(PropertyType.COMMENT, PropertyType.DATE_TIME_START, <BUG>PropertyType.IANA_PROPERTY, PropertyType.NON_STANDARD, PropertyType.RECURRENCE_DATE_TIMES, PropertyType.RECURRENCE_RULE, PropertyType.TIME_ZONE_NAME, PropertyType....
PropertyType.RECURRENCE_RULE, PropertyType.TIME_ZONE_NAME, PropertyType.TIME_ZONE_OFFSET_FROM,
26,754
throw new RuntimeException("not implemented"); } }, VALARM ("VALARM", Arrays.asList(PropertyType.ACTION, PropertyType.ATTACHMENT, PropertyType.ATTENDEE, PropertyType.DESCRIPTION, <BUG>PropertyType.DURATION, PropertyType.IANA_PROPERTY, PropertyType.NON_STANDARD, PropertyType.REPEAT_COUNT, PropertyType.SUMMARY, PropertyT...
DAYLIGHT_SAVING_TIME ("DAYLIGHT", Arrays.asList(PropertyType.COMMENT, PropertyType.DATE_TIME_START, PropertyType.NON_STANDARD, PropertyType.RECURRENCE_DATE_TIMES, PropertyType.RECURRENCE_RULE, PropertyType.TIME_ZONE_NAME, PropertyType.TIME_ZONE_OFFSET_FROM, PropertyType.TIME_ZONE_OFFSET_TO), DaylightSavingTime.class)
26,755
private ContentLineStrategy contentLineGenerator; protected void setContentLineGenerator(ContentLineStrategy contentLineGenerator) { this.contentLineGenerator = contentLineGenerator; } <BUG>protected Callback<VChild, Void> copyChildCallback() </BUG> { throw new RuntimeException("Can't copy children. copyChildCallback ...
protected Callback<VChild, Void> copyIntoCallback()
26,756
import jfxtras.labs.icalendarfx.properties.calendar.Version; import jfxtras.labs.icalendarfx.properties.component.misc.NonStandardProperty; public enum CalendarProperty { CALENDAR_SCALE ("CALSCALE", <BUG>Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD, ParameterType.IANA_PARAMETER), CalendarSca...
Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD), CalendarScale.class)
26,757
CalendarScale calendarScale = (CalendarScale) child; destination.setCalendarScale(calendarScale); } }, METHOD ("METHOD", <BUG>Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD, ParameterType.IANA_PARAMETER), Method.class)</BUG> { @Override public VChild parse(VCalendar vCalendar, String contentLi...
Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD), Method.class)
26,758
} list.add(new NonStandardProperty((NonStandardProperty) child)); } }, PRODUCT_IDENTIFIER ("PRODID", <BUG>Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD, ParameterType.IANA_PARAMETER), ProductIdentifier.class)</BUG> { @Override public VChild parse(VCalendar vCalendar, String contentLine)
public void copyChild(VChild child, VCalendar destination) CalendarScale calendarScale = (CalendarScale) child; destination.setCalendarScale(calendarScale); METHOD ("METHOD", Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD), Method.class)
26,759
ProductIdentifier productIdentifier = (ProductIdentifier) child; destination.setProductIdentifier(productIdentifier); } }, VERSION ("VERSION", <BUG>Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD, ParameterType.IANA_PARAMETER), Version.class)</BUG> { @Override public VChild parse(VCalendar vCal...
Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD), Version.class)
26,760
package jfxtras.labs.icalendarfx.components; import jfxtras.labs.icalendarfx.properties.component.descriptive.Comment; <BUG>import jfxtras.labs.icalendarfx.properties.component.misc.IANAProperty; import jfxtras.labs.icalendarfx.properties.component.misc.UnknownProperty;</BUG> import jfxtras.labs.icalendarfx.properties...
import jfxtras.labs.icalendarfx.properties.component.misc.NonStandardProperty;
26,761
import javax.swing.plaf.basic.BasicScrollPaneUI; import java.awt.*; import java.awt.event.InputEvent; import java.awt.event.MouseEvent; import java.awt.event.MouseWheelEvent; <BUG>import java.awt.event.MouseWheelListener; import java.awt.image.*;</BUG> import java.lang.reflect.Field; public class JBScrollPane extends J...
import java.awt.geom.RoundRectangle2D; import java.awt.image.*;
26,762
if (myFillColor != null) { g.setColor(myFillColor); g.fillRoundRect(x, y, width, height, arc, arc); } if (myDrawColor != null) { <BUG>g.setColor(myDrawColor); g.drawRoundRect(x, y, width - 1, height - 1, arc, arc); }</BUG> g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, old); }
g.fillRect(x, y, width, height);
26,763
public class MockHttpsURLConnection extends HttpsURLConnection { private MockLogger testLogger; private String prefix = "MockHttpsURLConnection "; private ByteArrayOutputStream outputStream; public ResponseType responseType; <BUG>public boolean timeout; protected MockHttpsURLConnection(URL url) {</BUG> super(url); } pu...
public Long waitingTime; protected MockHttpsURLConnection(URL url) {
26,764
this.testLogger = mockLogger; } public InputStream getInputStream() throws IOException { testLogger.test(prefix + "getInputStream, responseType: " + responseType); if (timeout) { <BUG>SystemClock.sleep(10000); }</BUG> if (responseType == ResponseType.CLIENT_PROTOCOL_EXCEPTION) { throw new IOException ("testResponseErro...
if (waitingTime != null) { SystemClock.sleep(waitingTime);
26,765
testLogger.test(prefix + "getRequestProperty, field " + field); return null; } public URL getURL() { testLogger.test(prefix + "getURL"); <BUG>return null; }</BUG> public boolean getUseCaches() { testLogger.test(prefix + "getUseCaches"); return false;
return this.url; public void setURL(URL url) { testLogger.test(prefix + "setURL, " + url);
26,766
package org.jbpm.casemgmt.impl.model; import java.util.Comparator; public class CaseDefinitionComparator implements Comparator<CaseDefinitionImpl> { <BUG>private String orderBy; public CaseDefinitionComparator(String orderBy) { this.orderBy = orderBy; }</BUG> @Override
private boolean ascending; public CaseDefinitionComparator(String orderBy, Boolean ascending) { this.ascending = ascending == null ? Boolean.TRUE : ascending; }
26,767
import org.gradle.internal.Factory; import org.gradle.internal.reflect.Instantiator; import org.gradle.runtime.base.BinaryContainer; import org.gradle.runtime.base.internal.BinaryInternal; import org.gradle.runtime.base.internal.DefaultBinaryContainer; <BUG>import org.gradle.runtime.base.internal.DefaultLibraryContaine...
import org.gradle.runtime.base.internal.DefaultSoftwareComponentContainer;
26,768
public LanguageBasePlugin(Instantiator instantiator, ModelRules modelRules) { this.instantiator = instantiator; this.modelRules = modelRules; } public void apply(final Project target) { <BUG>target.getExtensions().create("libraries", DefaultLibraryContainer.class, instantiator); </BUG> target.getExtensions().create("so...
target.getExtensions().create("libraries", DefaultSoftwareComponentContainer.class, instantiator);
26,769
import org.gradle.language.base.plugins.LifecycleBasePlugin; import org.gradle.model.ModelFinalizer; import org.gradle.model.ModelRule; import org.gradle.model.ModelRules; import org.gradle.nativebinaries.*; <BUG>import org.gradle.nativebinaries.internal.DefaultBuildTypeContainer; import org.gradle.nativebinaries.inter...
import org.gradle.nativebinaries.internal.*;
26,770
import org.gradle.nativebinaries.internal.configure.*; import org.gradle.nativebinaries.internal.resolve.NativeDependencyResolver; import org.gradle.nativebinaries.platform.PlatformContainer; import org.gradle.nativebinaries.platform.internal.DefaultPlatformContainer; import org.gradle.nativebinaries.toolchain.internal...
import org.gradle.runtime.base.BinaryContainer; import org.gradle.runtime.base.SoftwareComponentContainer; import javax.inject.Inject;
26,771
package org.gradle.nativebinaries.internal.resolve; import org.gradle.api.DomainObjectSet; import org.gradle.api.Project; <BUG>import org.gradle.runtime.base.LibraryContainer; </BUG> import org.gradle.nativebinaries.NativeBinary; import org.gradle.nativebinaries.NativeLibrary; import org.gradle.nativebinaries.NativeLib...
import org.gradle.runtime.base.SoftwareComponentContainer;
26,772
package org.gradle.nativebinaries.internal.configure; import org.gradle.api.Action; import org.gradle.api.internal.project.ProjectInternal; import org.gradle.internal.reflect.Instantiator; import org.gradle.runtime.base.BinaryContainer; <BUG>import org.gradle.runtime.base.LibraryContainer; </BUG> import org.gradle.runt...
import org.gradle.runtime.base.SoftwareComponentContainer;
26,773
} return new OrientJdbcResultSet(new OrientJdbcStatement(connection), records, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, ResultSet.HOLD_CURSORS_OVER_COMMIT); } public ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) <BUG>throws SQL...
public String getUserName() throws SQLException { database.activateOnCurrentThread(); return database.getUser().getName();
26,774
doc.field("DATA_TYPE", java.sql.Types.OTHER); doc.field("SPECIFIC_NAME", f.getName()); records.add(doc);</BUG> } <BUG>final ODocument doc = new ODocument(); doc.field("PROCEDURE_CAT", (Object) null); doc.field("PROCEDURE_SCHEM", (Object) null); doc.field("PROCEDURE_NAME", f.getName()); doc.field("COLUMN_NAME", "return"...
final List<ODocument> records = new ArrayList<ODocument>(); for (String fName : database.getMetadata().getFunctionLibrary().getFunctionNames()) { final ODocument doc = new ODocument() .field("PROCEDURE_CAT", (Object) null) .field("PROCEDURE_SCHEM", (Object) null) .field("PROCEDURE_NAME", fName) .field("REMARKS", "") .f...
26,775
final String type; if (OMetadata.SYSTEM_CLUSTER.contains(cls.getName())) type = "SYSTEM TABLE"; else type = "TABLE"; <BUG>if (tableTypes.contains(type) && (tableNamePattern == null || tableNamePattern.equals("%") || tableNamePattern.equalsIgnoreCase(className))) { </BUG> final ODocument doc = new ODocument() .field("TA...
if (tableTypes.contains(type) && (tableNamePattern == null || tableNamePattern.equals("%") || tableNamePattern.equalsIgnoreCase(className))) {
26,776
} return new OrientJdbcResultSet(new OrientJdbcStatement(connection), records, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, ResultSet.HOLD_CURSORS_OVER_COMMIT); } @Override <BUG>public ResultSet getSchemas() throws SQLException { final List<ODocument> records = new ArrayList<ODocument>(); records.add(new OD...
[DELETED]
26,777
records.add(new ODocument().field("TABLE_SCHEM", database.getName()) .field("TABLE_CATALOG", database.getName()));</BUG> return new OrientJdbcResultSet(new OrientJdbcStatement(connection), records, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, ResultSet.HOLD_CURSORS_OVER_COMMIT); } <BUG>public ResultSet getC...
@Override public ResultSet getSchemas() throws SQLException { database.activateOnCurrentThread(); final List<ODocument> records = new ArrayList<ODocument>(); records.add(new ODocument() .field("TABLE_CATALOG", database.getName()));
26,778
} final List<ODocument> records = new ArrayList<ODocument>(); for (OIndex<?> unique : uniqueIndexes) { int keyFiledSeq = 1; for (String keyFieldName : unique.getDefinition().getFields()) { <BUG>ODocument doc = new ODocument(); doc.field("TABLE_CAT", catalog); doc.field("TABLE_SCHEM", catalog); doc.field("TABLE_NAME", t...
return new OrientJdbcResultSet(new OrientJdbcStatement(connection), records, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, ResultSet.HOLD_CURSORS_OVER_COMMIT);
26,779
if (!unique || oIndex.getType().equals(INDEX_TYPE.UNIQUE.name())) indexes.add(oIndex); } final List<ODocument> records = new ArrayList<ODocument>(); for (OIndex<?> idx : indexes) { <BUG>boolean notUniqueIndex = !( idx.getType().equals(INDEX_TYPE.UNIQUE.name())); final String fieldNames = idx.getDefinition().getFields()...
boolean notUniqueIndex = !(idx.getType().equals(INDEX_TYPE.UNIQUE.name())); final String fieldNames = idx.getDefinition().getFields().toString();
26,780
doc.field("DATA_TYPE", java.sql.Types.OTHER); doc.field("SPECIFIC_NAME", f.getName()); records.add(doc);</BUG> } <BUG>final ODocument doc = new ODocument(); doc.field("FUNCTION_CAT", (Object) null); doc.field("FUNCTION_SCHEM", (Object) null); doc.field("FUNCTION_NAME", f.getName()); doc.field("COLUMN_NAME", "return"); ...
final List<ODocument> records = new ArrayList<ODocument>(); for (OClass cls : classes) { final ODocument doc = new ODocument() .field("TYPE_CAT", (Object) null) .field("TYPE_SCHEM", (Object) null) .field("TYPE_NAME", cls.getName()) .field("CLASS_NAME", cls.getName()) .field("DATA_TYPE", java.sql.Types.STRUCT) .field("R...
26,781
package com.orientechnologies.orient.jdbc; import com.orientechnologies.orient.core.id.ORecordId; import org.junit.Test; import java.math.BigDecimal; <BUG>import java.sql.Date; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.Statement; import java.sql.Types;</BUG> import java.util.Calenda...
import java.sql.*;
26,782
import java.sql.ResultSetMetaData; import java.sql.Statement; import java.sql.Types;</BUG> import java.util.Calendar; import java.util.TimeZone; <BUG>import static java.sql.Types.*; import static org.assertj.core.api.Assertions.*; </BUG> public class OrientJdbcResultSetMetaDataTest extends OrientJdbcBaseTest {
package com.orientechnologies.orient.jdbc; import com.orientechnologies.orient.core.id.ORecordId; import org.junit.Test; import java.math.BigDecimal; import java.sql.*; import static java.sql.Types.BIGINT; import static org.assertj.core.api.Assertions.assertThat;
26,783
import com.orientechnologies.orient.core.db.record.ORecordLazyMultiValue; import com.orientechnologies.orient.core.metadata.schema.OType; import com.orientechnologies.orient.core.record.impl.OBlob; import com.orientechnologies.orient.core.record.impl.ODocument; import com.orientechnologies.orient.core.sql.functions.ODe...
import com.orientechnologies.orient.core.sql.parser.*;
26,784
if (fields.isEmpty()) { fields.addAll(Arrays.asList(document.fieldNames())); } return fields; } <BUG>private void activateDatabaseOnCurrentThread() { statement.database.activateOnCurrentThread();</BUG> } public void close() throws SQLException { cursor = 0;
if (!statement.database.isActiveOnCurrentThread()) statement.database.activateOnCurrentThread();
26,785
else if (rawResult instanceof Collection) return ((Collection) rawResult).size(); return 0; } protected <RET> RET executeCommand(OCommandRequest query) throws SQLException { <BUG>try { return database.command(query).execute();</BUG> } catch (OQueryParsingException e) { throw new SQLSyntaxErrorException("Error while par...
database.activateOnCurrentThread(); return database.command(query).execute();
26,786
import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; <BUG>import static org.assertj.core.api.Assertions.assertThat; public class OrientDataSourceTest extends Orien...
import static org.assertj.core.api.Assertions.fail; public class OrientDataSourceTest extends OrientJdbcBaseTest {
26,787
assertThat(rs.first()).isTrue(); assertThat(rs.getString("stringKey")).isEqualTo("1"); rs.close(); statement.close(); conn.close(); <BUG>assertThat(conn.isClosed()).isTrue(); }</BUG> return Boolean.TRUE; } };
} catch (Exception e) { e.printStackTrace(); fail("WTF:::", e);
26,788
ExecutorService pool = Executors.newCachedThreadPool(); pool.submit(dbClient); pool.submit(dbClient); pool.submit(dbClient); pool.submit(dbClient); <BUG>TimeUnit.SECONDS.sleep(2); </BUG> queryTheDb.set(false); pool.shutdown(); }
TimeUnit.SECONDS.sleep(5);
26,789
import java.util.Map; import java.util.Set;</BUG> import static org.assertj.core.api.Assertions.assertThat; <BUG>import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; </BUG> public class OrientJd...
import org.junit.Test; import java.sql.DatabaseMetaData; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; import java.util.*; import static org.junit.Assert.*;
26,790
assertEquals("OrientDB", metaData.getDatabaseProductName()); assertEquals(OConstants.ORIENT_VERSION, metaData.getDatabaseProductVersion()); assertEquals(2, metaData.getDatabaseMajorVersion()); assertEquals(2, metaData.getDatabaseMinorVersion()); assertEquals("OrientDB JDBC Driver", metaData.getDriverName()); <BUG>asser...
assertEquals("OrientDB " + OConstants.getVersion() + " JDBC Driver", metaData.getDriverVersion());
26,791
final String keywordsStr = metaData.getSQLKeywords(); assertNotNull(keywordsStr); assertThat(Arrays.asList(keywordsStr.toUpperCase().split(",\\s*"))).contains("TRAVERSE"); } @Test <BUG>public void shouldRetrieveUniqueIndexInfoForTable() throws Exception { ResultSet indexInfo = metaData.getIndexInfo("OrientJdbcDatabaseM...
ResultSet indexInfo = metaData indexInfo.next();
26,792
} else { updateMemo(); callback.updateMemo(); } dismiss(); <BUG>}else{ </BUG> Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show(); } }
[DELETED]
26,793
} @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_memo); <BUG>ChinaPhoneHelper.setStatusBar(this,true); </BUG> topicId = getIntent().getLongExtra("topicId", -1); if (topicId == -1) { finish();
ChinaPhoneHelper.setStatusBar(this, true);
26,794
MemoEntry.COLUMN_REF_TOPIC__ID + " = ?" , new String[]{String.valueOf(topicId)}); } public Cursor selectMemo(long topicId) { Cursor c = db.query(MemoEntry.TABLE_NAME, null, MemoEntry.COLUMN_REF_TOPIC__ID + " = ?", new String[]{String.valueOf(topicId)}, null, null, <BUG>MemoEntry._ID + " DESC", null); </BUG> if (c != nu...
MemoEntry.COLUMN_ORDER + " ASC", null);
26,795
MemoEntry._ID + " = ?", new String[]{String.valueOf(memoId)}); } public long updateMemoContent(long memoId, String memoContent) { ContentValues values = new ContentValues(); <BUG>values.put(MemoEntry.COLUMN_CONTENT, memoContent); return db.update(</BUG> MemoEntry.TABLE_NAME, values, MemoEntry._ID + " = ?",
return db.update(
26,796
import android.widget.RelativeLayout; import android.widget.TextView; import com.kiminonawa.mydiary.R; import com.kiminonawa.mydiary.db.DBManager; import com.kiminonawa.mydiary.shared.EditMode; <BUG>import com.kiminonawa.mydiary.shared.ThemeManager; import java.util.List; public class MemoAdapter extends RecyclerView.A...
import com.marshalchen.ultimaterecyclerview.dragsortadapter.DragSortAdapter; public class MemoAdapter extends DragSortAdapter<DragSortAdapter.ViewHolder> implements EditMode {
26,797
private DBManager dbManager; private boolean isEditMode = false; private EditMemoDialogFragment.MemoCallback callback; private static final int TYPE_HEADER = 0; private static final int TYPE_ITEM = 1; <BUG>public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMe...
public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMemoDialogFragment.MemoCallback callback, RecyclerView recyclerView) { super(recyclerView); this.mActivity = activity;
26,798
this.memoList = memoList; this.dbManager = dbManager; this.callback = callback; } @Override <BUG>public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { </BUG> View view; if (isEditMode) { if (viewType == TYPE_HEADER) {
public DragSortAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
26,799
editMemoDialogFragment.show(mActivity.getSupportFragmentManager(), "editMemoDialogFragment"); } }); } } <BUG>protected class MemoViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener { private View rootView; private TextView TV_memo_item_content;</BUG> private ImageView IV_memo_item_delete;
protected class MemoViewHolder extends DragSortAdapter.ViewHolder implements View.OnClickListener, View.OnLongClickListener { private ImageView IV_memo_item_dot; private TextView TV_memo_item_content;
26,800
MemoEntry.COLUMN_REF_TOPIC__ID + " = ?" , new String[]{String.valueOf(topicId)}); } public Cursor selectMemo(long topicId) { Cursor c = db.query(MemoEntry.TABLE_NAME, null, MemoEntry.COLUMN_REF_TOPIC__ID + " = ?", new String[]{String.valueOf(topicId)}, null, null, <BUG>MemoEntry._ID + " DESC", null); </BUG> if (c != nu...
MemoEntry.COLUMN_ORDER + " ASC", null);