id int64 1 49k | buggy stringlengths 34 37.5k | fixed stringlengths 2 37k |
|---|---|---|
4,801 | import static pl.librus.client.sql.EntityChange.Type.ADDED;
public class LibrusGcmListenerService extends GcmListenerService {
private UpdateHelper updateHelper;
private Consumer<String> firebaseLogger;
private NotificationService notificationService;
<BUG>private CompletableFuture<?> reloads;
</BUG>
@Override
public ComponentName startService(Intent service) {
updateHelper = new UpdateHelper(getApplicationContext());
| private Flowable<?> reloads;
|
4,802 | import com.google.common.collect.Lists;
import org.joda.time.DateTimeConstants;
import org.joda.time.LocalDate;
import org.joda.time.LocalTime;
import java.util.ArrayList;
<BUG>import java.util.List;
import io.requery.Persistable;</BUG>
import java8.util.concurrent.CompletableFuture;
import java8.util.stream.StreamSupport;
import pl.librus.client.datamodel.Identifiable;
| import io.reactivex.Single;
import io.requery.Persistable;
|
4,803 | public class APIClient implements IAPIClient {
private final MockEntityRepository repository = new MockEntityRepository();
private final EntityMocks templates = new EntityMocks();
public APIClient(Context _context) {
}
<BUG>public CompletableFuture<Void> login(String username, String password) {
return CompletableFuture.completedFuture(null);
}
public CompletableFuture<Timetable> getTimetable(LocalDate weekStart) {
</BUG>
Timetable result = new Timetable();
| public Single<String> login(String username, String password) {
return Single.just(username);
public Single<Timetable> getTimetable(LocalDate weekStart) {
|
4,804 | ));
result.get(weekStart.plusDays(1)).add(newArrayList(
withLessonNumber(substitutionLesson(), 7)
));
result.get(weekStart.plusDays(2)).remove(2);
<BUG>return CompletableFuture.completedFuture(result);
}</BUG>
private ImmutableJsonLesson withLessonNumber(ImmutableJsonLesson lesson, int lessonNo) {
List<PlainLesson> plainLessons = repository.getList(PlainLesson.class);
PlainLesson plainLesson = plainLessons.get(lessonNo % plainLessons.size());
| return Single.just(result);
}
|
4,805 | </BUG>
EntityInfo info = EntityInfos.infoFor(clazz);
if (info.single()) {
return getObject(info.endpoint(), info.topLevelName(), clazz)
<BUG>.thenApply(Lists::newArrayList);
</BUG>
} else {
return getList(info.endpoint(), info.topLevelName(), clazz);
}
}
| .withSubstitutionNote("Zabrakło śledzi")
.withOrgTeacher(repository.getList(Teacher.class).get(3).id())
.withOrgSubject(repository.getList(Subject.class).get(3).id())
.withOrgDate(LocalDate.parse("2017-01-01"));
public <T extends Persistable> Single<List<T>> getAll(Class<T> clazz) {
.map(Lists::newArrayList);
|
4,806 | public ReportElement getBase() {
return base;
}
@Override
public float print(PDDocument document, PDPageContentStream stream, int pageNumber, float startX, float startY, float allowedWidth) throws IOException {
<BUG>PDPage currPage = (PDPage) document.getDocumentCatalog().getPages().get(pageNo);
PDPageContentStream pageStream = new PDPageContentStream(document, currPage, true, false);
</BUG>
base.print(document, pageStream, pageNo, x, y, width);
pageStream.close();
| PDPage currPage = document.getDocumentCatalog().getPages().get(pageNo);
PDPageContentStream pageStream = new PDPageContentStream(document, currPage, PDPageContentStream.AppendMode.APPEND, false);
|
4,807 | public PdfTextStyle(String config) {
Assert.hasText(config);
String[] split = config.split(",");
Assert.isTrue(split.length == 3, "config must look like: 10,Times-Roman,#000000");
fontSize = Integer.parseInt(split[0]);
<BUG>font = resolveStandard14Name(split[1]);
color = new Color(Integer.valueOf(split[2].substring(1), 16));</BUG>
}
public int getFontSize() {
return fontSize;
| font = getFont(split[1]);
color = new Color(Integer.valueOf(split[2].substring(1), 16));
|
4,808 | package cc.catalysts.boot.report.pdf.elements;
import cc.catalysts.boot.report.pdf.config.PdfTextStyle;
import cc.catalysts.boot.report.pdf.utils.ReportAlignType;
import org.apache.pdfbox.pdmodel.PDPageContentStream;
<BUG>import org.apache.pdfbox.pdmodel.font.PDFont;
import org.slf4j.Logger;</BUG>
import org.slf4j.LoggerFactory;
import org.springframework.util.StringUtils;
import java.io.IOException;
| import org.apache.pdfbox.pdmodel.font.PDType1Font;
import org.apache.pdfbox.util.Matrix;
import org.slf4j.Logger;
|
4,809 | addTextSimple(stream, textConfig, textX, nextLineY, "");
return nextLineY;
}
try {
<BUG>String[] split = splitText(textConfig.getFont(), textConfig.getFontSize(), allowedWidth, fixedText);
</BUG>
float x = calculateAlignPosition(textX, align, textConfig, allowedWidth, split[0]);
if (!underline) {
addTextSimple(stream, textConfig, x, nextLineY, split[0]);
} else {
| String[] split = splitText(textConfig.getFont(), textConfig.getFontSize(), allowedWidth, text);
|
4,810 | 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.showText(text);</BUG>
} catch (Exception e) {
LOG.warn("Could not add text: " + e.getClass() + " - " + e.getMessage());
}
| stream.setTextMatrix(new Matrix(1,0,0,1, textX, textY));
stream.showText(text);
|
4,811 | 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(0.5F);
stream.drawLine(textX, textY - lineOffset, textX + getTextWidth(textConfig.getFont(), textConfig.getFontSize(), text), textY - lineOffset);
</BUG>
stream.stroke();
} catch (IOException e) {
| stream.moveTo(textX, textY - lineOffset);
stream.lineTo(textX + getTextWidth(textConfig.getFont(), textConfig.getFontSize(), text), textY - lineOffset);
|
4,812 | 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());
if (breakSplitted.size() > 1) {</BUG>
String[] splittedFirst = splitText(font, fontSize, allowedWidth, breakSplitted.get(0));
StringBuilder remaining = new StringBuilder(splittedFirst[1] == null ? "" : splittedFirst[1] + "\n");
| List<String> breakSplitted = Arrays.asList(text.split("(\\r\\n)|(\\n)|(\\n\\r)")).stream().collect(Collectors.toList());
if (breakSplitted.size() > 1) {
|
4,813 | 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;
|
4,814 | 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 {
|
4,815 | 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));
|
4,816 | } 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()
|
4,817 |
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));
|
4,818 | 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));
|
4,819 | 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 {
|
4,820 | 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);
|
4,821 | 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() );
|
4,822 | 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_();
|
4,823 | 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 );
|
4,824 | 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 );
|
4,825 | 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_();
|
4,826 | 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_();
|
4,827 | 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_();
|
4,828 | {
ReverseDependencyLink p1 = (ReverseDependencyLink) o1;
ReverseDependencyLink p2 = (ReverseDependencyLink) o2;
return p1.getProject().getId().compareTo( p2.getProject().getId() );
}
<BUG>else
{</BUG>
return 0;
}
}
| iconError( sink );
|
4,829 | import com.fasterxml.jackson.core.JsonToken;
final class ScalarReaderWrapper extends AvroStructureReader
{
private final AvroScalarReader _wrappedReader;
private final BinaryDecoder _decoder;
<BUG>private final AvroParserImpl _parser;
public ScalarReaderWrapper(AvroScalarReader wrappedReader) {
this(wrappedReader, null, null);
</BUG>
}
| private final boolean _rootReader;
this(wrappedReader, null, null, false);
|
4,830 | e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
}
}
<BUG>public void buildModule(final String path) {
final Object lock = new Object() { };
synchronized(lock) {</BUG>
ApplicationManager.getApplication().invokeLater(new Runnable() {
| });
public boolean isVCSSupported(final String path) {
final boolean[] result = new boolean[1];
ApplicationManager.getApplication().runReadAction(new Runnable() {
|
4,831 | progress.startLeafTask(ModelsProgressUtil.TASK_NAME_REFRESH_FS);
MPSPlugin.getInstance().refreshFS();
progress.finishTask(ModelsProgressUtil.TASK_NAME_REFRESH_FS);
checkMonitorCanceled(progress);
progress.startLeafTask(ModelsProgressUtil.TASK_NAME_COMPILE_ON_GENERATION);
<BUG>MPSPlugin.getInstance().buildModule(outputFolder);
</BUG>
progress.finishTask(ModelsProgressUtil.TASK_NAME_COMPILE_ON_GENERATION);
checkMonitorCanceled(progress);
}
| progress.addText(MPSPlugin.getInstance().buildModule(outputFolder));
|
4,832 | progress.startLeafTask(ModelsProgressUtil.TASK_NAME_REFRESH_FS);
MPSPlugin.getInstance().refreshFS();
progress.finishTask(ModelsProgressUtil.TASK_NAME_REFRESH_FS);
checkMonitorCanceled(progress);
progress.startLeafTask(ModelsProgressUtil.TASK_NAME_COMPILE_ON_GENERATION);
<BUG>MPSPlugin.getInstance().buildModule(outputFolder);
</BUG>
progress.finishTask(ModelsProgressUtil.TASK_NAME_COMPILE_ON_GENERATION);
checkMonitorCanceled(progress);
progress.addText("reloading MPS classes...");
| progress.addText(MPSPlugin.getInstance().buildModule(outputFolder));
}
|
4,833 | boolean isFileChanged(final String path) throws RemoteException;
String getCurrentRevisionFor(final String path) throws RemoteException;
String commit(final String path, final String comment) throws RemoteException;
byte[] getContentsForRevision(final String path, final String revision) throws RemoteException;
void refreshFS() throws RemoteException;
<BUG>void buildModule(final String path) throws RemoteException;
</BUG>
List<String> getAspectMethodIds(final String namespace, final String prefix) throws RemoteException;
List<String> findInheritors(final String fqName) throws RemoteException;
void openClass(final String fqName) throws RemoteException;
| String buildModule(final String path) throws RemoteException;
|
4,834 | getMPSupportHandler().addImport(namespace, fqName);
}
public void refreshFS() throws RemoteException {
getMPSupportHandler().refreshFS();
}
<BUG>public void buildModule(String path) throws RemoteException {
getMPSupportHandler().buildModule(path);
</BUG>
}
| public String buildModule(String path) throws RemoteException {
return getMPSupportHandler().buildModule(path);
|
4,835 | 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 PatchUtils {
| import java.text.DateFormat;
import java.util.Date;
import java.util.List;
|
4,836 | 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;
|
4,837 | 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"),
MISC_FILES("misc-files"),
| APPLIES_TO_VERSION("applies-to-version"),
BUNDLES("bundles"),
|
4,838 | 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_VERSION:
if(type == Patch.PatchType.CUMULATIVE) {
| [DELETED] |
4,839 | 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, bytesToHexString(item.getContentHash()));
}
if(type != ModificationType.ADD) {
| if (item.isDirectory()) {
writer.writeAttribute(Attribute.DIRECTORY.name, "true");
if(type != ModificationType.REMOVE) {
|
4,840 | 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>
import java.util.List;
@MessageBundle(projectCode = "JBAS")
public interface PatchMessages {
| import org.jboss.logging.annotations.Cause;
import java.io.IOException;
|
4,841 | import org.kaazing.gateway.service.messaging.collections.CollectionsFactory;
import org.kaazing.mina.netty.util.threadlocal.VicariousThreadLocal;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.hazelcast.core.EntryEvent;
<BUG>import com.hazelcast.core.EntryListener;
public class GatewayManagementBeanImpl extends AbstractManagementBean</BUG>
implements GatewayManagementBean, MembershipEventListener, InstanceKeyListener, BalancerMapListener,
EntryListener<MemberId, Collection<String>> {
private static final Logger logger = LoggerFactory.getLogger(GatewayManagementBeanImpl.class);
| import com.hazelcast.core.MapEvent;
public class GatewayManagementBeanImpl extends AbstractManagementBean
|
4,842 | import org.kaazing.gateway.util.scheduler.SchedulerProvider;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.hazelcast.config.AwsConfig;
import com.hazelcast.config.Config;
<BUG>import com.hazelcast.config.Join;
</BUG>
import com.hazelcast.config.MapConfig;
import com.hazelcast.config.MulticastConfig;
import com.hazelcast.config.NetworkConfig;
| import com.hazelcast.config.JoinConfig;
|
4,843 | multicastConfig.setMulticastPort(multicastAddress.getPort());
}
if (unicastAddresses.size() > 0) {
tcpIpConfig.setEnabled(!usingMulticast);
for (InetSocketAddress unicastAddress : unicastAddresses) {
<BUG>tcpIpConfig.addAddress(new Address(unicastAddress));
}</BUG>
}
boolean useAnyAddress = false;
for (String networkInterface : networkConfig.getInterfaces().getInterfaces()) {
| tcpIpConfig.addMember(
String.format("%s:%s", unicastAddress.getAddress().getHostAddress(), unicastAddress.getPort()));
|
4,844 | break;
}
}
if (!useAnyAddress) {
networkConfig.getInterfaces().setEnabled(true);
<BUG>hazelCastConfig.setProperty(GroupProperties.PROP_SOCKET_BIND_ANY, "false");
}</BUG>
} else {
String path = awsMember.getPath();
String groupName = null;
| hazelCastConfig.setProperty(HAZELCAST_SOCKET_BIND_ANY_PROPERTY, "false");
|
4,845 | public Collection<MemberId> getMemberIds() {
Map<MemberId, String> instanceKeyMap = getCollectionsFactory().getMap(INSTANCE_KEY_MAP);
return instanceKeyMap.keySet();
}
private MemberId getMemberId(Member member) {
<BUG>InetSocketAddress inetSocketAddress = member.getInetSocketAddress();
String hostname = inetSocketAddress.getHostName();</BUG>
if (!inetSocketAddress.isUnresolved()) {
String ipAddr = inetSocketAddress.getAddress().getHostAddress();
hostname = ipAddr;
| InetSocketAddress inetSocketAddress = member.getSocketAddress();
String hostname = inetSocketAddress.getHostName();
|
4,846 | System.out.println(change);
}
}
};
@Override
<BUG>protected Callback<VChild, Void> copyChildCallback()
</BUG>
{
return (child) ->
{
| protected Callback<VChild, Void> copyIntoCallback()
|
4,847 | 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.component.recurrence.RecurrenceDates;
import jfxtras.labs.icalendarfx.properties.component.recurrence.RecurrenceRule;
| import jfxtras.labs.icalendarfx.properties.component.misc.NonStandardProperty;
|
4,848 | 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.DESCRIPTION, PropertyType.DURATION, PropertyType.EXCEPTION_DATE_TIMES,
<BUG>PropertyType.GEOGRAPHIC_POSITION, PropertyType.IANA_PROPERTY, PropertyType.LAST_MODIFIED,
PropertyType.LOCATION, PropertyType.NON_STANDARD, PropertyType.ORGANIZER, PropertyType.PRIORITY,</BUG>
PropertyType.RECURRENCE_DATE_TIMES, PropertyType.RECURRENCE_IDENTIFIER, PropertyType.RELATED_TO,
PropertyType.RECURRENCE_RULE, PropertyType.REQUEST_STATUS, PropertyType.RESOURCES, PropertyType.SEQUENCE,
PropertyType.STATUS, PropertyType.SUMMARY, PropertyType.TIME_TRANSPARENCY, PropertyType.UNIQUE_IDENTIFIER,
| PropertyType.GEOGRAPHIC_POSITION, PropertyType.LAST_MODIFIED,
PropertyType.LOCATION, PropertyType.NON_STANDARD, PropertyType.ORGANIZER, PropertyType.PRIORITY,
|
4,849 | 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_TIME_START, PropertyType.DESCRIPTION, PropertyType.DURATION,
<BUG>PropertyType.EXCEPTION_DATE_TIMES, PropertyType.GEOGRAPHIC_POSITION, PropertyType.IANA_PROPERTY,
PropertyType.LAST_MODIFIED, PropertyType.LOCATION, PropertyType.NON_STANDARD, PropertyType.ORGANIZER,</BUG>
PropertyType.PERCENT_COMPLETE, PropertyType.PRIORITY, PropertyType.RECURRENCE_DATE_TIMES,
PropertyType.RECURRENCE_IDENTIFIER, PropertyType.RELATED_TO, PropertyType.RECURRENCE_RULE,
PropertyType.REQUEST_STATUS, PropertyType.RESOURCES, PropertyType.SEQUENCE, PropertyType.STATUS,
| PropertyType.EXCEPTION_DATE_TIMES, PropertyType.GEOGRAPHIC_POSITION,
PropertyType.LAST_MODIFIED, PropertyType.LOCATION, PropertyType.NON_STANDARD, PropertyType.ORGANIZER,
|
4,850 | 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.TIME_ZONE_OFFSET_FROM,</BUG>
PropertyType.TIME_ZONE_OFFSET_TO),
DaylightSavingTime.class)
{
| PropertyType.RECURRENCE_RULE, PropertyType.TIME_ZONE_NAME, PropertyType.TIME_ZONE_OFFSET_FROM,
|
4,851 | 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, PropertyType.TRIGGER),</BUG>
VAlarm.class)
{
@Override
| 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)
|
4,852 | 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 isn't overridden in subclass." + this.getClass());
};
| protected Callback<VChild, Void> copyIntoCallback()
|
4,853 | 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),
CalendarScale.class)</BUG>
{
@Override
public VChild parse(VCalendar vCalendar, String contentLine)
| Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD),
CalendarScale.class)
|
4,854 | 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 contentLine)
| Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD),
Method.class)
|
4,855 | }
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)
|
4,856 | 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 vCalendar, String contentLine)
| Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD),
Version.class)
|
4,857 | 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.component.recurrence.RecurrenceDates;
import jfxtras.labs.icalendarfx.properties.component.recurrence.RecurrenceRule;
| import jfxtras.labs.icalendarfx.properties.component.misc.NonStandardProperty;
|
4,858 | import mil.nga.geopackage.projection.ProjectionFactory;
import mil.nga.geopackage.projection.ProjectionTransform;
import mil.nga.geopackage.schema.TableColumnKey;
import mil.nga.geopackage.tiles.TileBoundingBoxUtils;
import mil.nga.geopackage.tiles.features.FeatureTiles;
<BUG>import mil.nga.geopackage.tiles.features.MapFeatureTiles;
</BUG>
import mil.nga.geopackage.tiles.features.custom.NumberFeaturesTile;
import mil.nga.geopackage.tiles.matrix.TileMatrix;
import mil.nga.geopackage.tiles.matrixset.TileMatrixSet;
| import mil.nga.geopackage.map.tiles.features.MapFeatureTiles;
|
4,859 | import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.GoogleMap.OnMapClickListener;
import com.google.android.gms.maps.GoogleMap.OnMapLongClickListener;
import com.google.android.gms.maps.GoogleMap.OnMarkerClickListener;
import com.google.android.gms.maps.GoogleMap.OnMarkerDragListener;
<BUG>import com.google.android.gms.maps.MapFragment;
import com.google.android.gms.maps.Projection;</BUG>
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.LatLngBounds;
| import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.Projection;
|
4,860 | import mil.nga.wkb.geom.Geometry;
import mil.nga.wkb.geom.GeometryType;
import mil.nga.wkb.geom.LineString;
import mil.nga.wkb.util.GeometryPrinter;
public class GeoPackageMapFragment extends Fragment implements
<BUG>OnMapLongClickListener, OnMapClickListener, OnMarkerClickListener,
</BUG>
OnMarkerDragListener, ILoadTilesTask, IIndexerTask {
private static final String MAX_FEATURES_KEY = "max_features_key";
private static final String MAP_TYPE_KEY = "map_type_key";
| OnMapReadyCallback, OnMapLongClickListener, OnMapClickListener, OnMarkerClickListener,
|
4,861 | public OGraphElement newInstance(final String iClassName) {
if (iClassName.equals(OGraphVertex.class.getSimpleName()))
return new OGraphVertex(this);
else if (iClassName.equals(OGraphEdge.class.getSimpleName()))
return new OGraphEdge(this);
<BUG>final OClass cls = getMetadata().getSchema().getClass(iClassName);
if (cls != null && cls.getSuperClass() != null) {
if (cls.getSuperClass().getName().equals(OGraphVertex.class.getSimpleName()))
return new OGraphVertex(this, iClassName);
else if (cls.getSuperClass().getName().equals(OGraphEdge.class.getSimpleName()))
return new OGraphEdge(this, iClassName);
}</BUG>
throw new OGraphException("Unrecognized class: " + iClassName);
| if (cls != null) {
cls = cls.getSuperClass();
while (cls != null) {
if (cls.getName().equals(OGraphVertex.class.getSimpleName()))
else if (cls.getName().equals(OGraphEdge.class.getSimpleName()))
cls = cls.getSuperClass();
|
4,862 | }else if(programsSelected.size() == 1){
lytProgsPanel.setVisibility(View.VISIBLE);
lytProg2MAHAdsExtDlg.setVisibility(View.GONE);
prog1 = programsSelected.get(0);
((TextView)view.findViewById(R.id.tvProg1NameMAHAdsExtDlg)).setText(prog1.getName());
<BUG>if (prog1.getImg() != null && !prog1.getImg().trim().isEmpty()) {
((SmartImageView)view.findViewById(R.id.ivProg1ImgMAHAds)).setImageUrl(MAHAdsController.urlRootOnServer + prog1.getImg());
}
AngledLinearLayout prog1LytNewText = (AngledLinearLayout)view.findViewById(R.id.lytProg1NewText);</BUG>
if(prog1.isNewPrgram()){
| Picasso.with(view.getContext())
.load(MAHAdsController.urlRootOnServer + prog1.getImg())
.placeholder(R.drawable.img_place_holder_normal)
.error(R.drawable.img_not_found)
.into((ImageView) view.findViewById(R.id.ivProg1ImgMAHAds));
AngledLinearLayout prog1LytNewText = (AngledLinearLayout)view.findViewById(R.id.lytProg1NewText);
|
4,863 | 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 {
|
4,864 | 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));
|
4,865 | } 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()
|
4,866 |
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));
|
4,867 | 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));
|
4,868 | 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 {
|
4,869 | 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);
|
4,870 | resourceRegistration.registerSubModel(JdbcDriverDefinition.INSTANCE);
resourceRegistration.registerSubModel(DataSourceDefinition.createInstance(registerRuntimeOnly, deployed));
resourceRegistration.registerSubModel(XaDataSourceDefinition.createInstance(registerRuntimeOnly, deployed));
}
static void registerTransformers(SubsystemRegistration subsystem) {
<BUG>TransformationDescription.Tools.register(get110TransformationDescription(), subsystem, ModelVersion.create(1, 1, 0));
TransformationDescription.Tools.register(get111TransformationDescription(), subsystem, ModelVersion.create(1, 1, 1));
TransformationDescription.Tools.register(get200TransformationDescription(), subsystem, ModelVersion.create(2, 0, 0));
}</BUG>
static TransformationDescription get200TransformationDescription() {
| TransformationDescription.Tools.register(get120TransformationDescription(), subsystem, ModelVersion.create(1, 2, 0)); //EAP 6.2.0
static TransformationDescription get120TransformationDescription() {
ResourceTransformationDescriptionBuilder builder = TransformationDescriptionBuilder.Factory.createSubsystemInstance();
DataSourceDefinition.registerTransformers120(builder);
XaDataSourceDefinition.registerTransformers120(builder);
return builder.build();
|
4,871 | package org.jboss.as.connector.subsystems.datasources;
import static org.jboss.as.connector.subsystems.datasources.Constants.CONNECTABLE;
<BUG>import static org.jboss.as.connector.subsystems.datasources.Constants.CONNECTION_LISTENER_CLASS;
import static org.jboss.as.connector.subsystems.datasources.Constants.CONNECTION_LISTENER_PROPERTIES;</BUG>
import static org.jboss.as.connector.subsystems.datasources.Constants.DATASOURCE_ATTRIBUTE;
import static org.jboss.as.connector.subsystems.datasources.Constants.DATASOURCE_ATTRIBUTE_RELOAD_REQUIRED;
import static org.jboss.as.connector.subsystems.datasources.Constants.DATASOURCE_DISABLE;
| [DELETED] |
4,872 | import static org.jboss.as.connector.subsystems.datasources.Constants.DATASOURCE_DISABLE;
import static org.jboss.as.connector.subsystems.datasources.Constants.DATASOURCE_ENABLE;
import static org.jboss.as.connector.subsystems.datasources.Constants.DATASOURCE_PROPERTIES_ATTRIBUTES;
import static org.jboss.as.connector.subsystems.datasources.Constants.DATA_SOURCE;
import static org.jboss.as.connector.subsystems.datasources.Constants.DUMP_QUEUED_THREADS;
<BUG>import static org.jboss.as.connector.subsystems.datasources.Constants.ENABLE_ADD_TRANSFORMER;
import static org.jboss.as.connector.subsystems.datasources.Constants.ENABLE_TRANSFORMER;</BUG>
import static org.jboss.as.connector.subsystems.datasources.Constants.FLUSH_ALL_CONNECTION;
import static org.jboss.as.connector.subsystems.datasources.Constants.FLUSH_GRACEFULLY_CONNECTION;
import static org.jboss.as.connector.subsystems.datasources.Constants.FLUSH_IDLE_CONNECTION;
| [DELETED] |
4,873 | package com.projecttango.examples.java.augmentedreality;
import com.google.atap.tangoservice.Tango;
import com.google.atap.tangoservice.Tango.OnTangoUpdateListener;
import com.google.atap.tangoservice.TangoCameraIntrinsics;
import com.google.atap.tangoservice.TangoConfig;
<BUG>import com.google.atap.tangoservice.TangoCoordinateFramePair;
import com.google.atap.tangoservice.TangoEvent;</BUG>
import com.google.atap.tangoservice.TangoOutOfDateException;
import com.google.atap.tangoservice.TangoPoseData;
import com.google.atap.tangoservice.TangoXyzIjData;
| import com.google.atap.tangoservice.TangoErrorException;
import com.google.atap.tangoservice.TangoEvent;
|
4,874 | super.onResume();
if (!mIsConnected) {
mTango = new Tango(AugmentedRealityActivity.this, new Runnable() {
@Override
public void run() {
<BUG>try {
connectTango();</BUG>
setupRenderer();
mIsConnected = true;
} catch (TangoOutOfDateException e) {
| TangoSupport.initialize();
connectTango();
|
4,875 | if (lastFramePose.statusCode == TangoPoseData.POSE_VALID) {
mRenderer.updateRenderCameraPose(lastFramePose, mExtrinsics);
mCameraPoseTimestamp = lastFramePose.timestamp;</BUG>
} else {
<BUG>Log.w(TAG, "Can't get device pose at time: " + mRgbTimestampGlThread);
}</BUG>
}
}
}
@Override
| mRenderer.updateRenderCameraPose(lastFramePose);
mCameraPoseTimestamp = lastFramePose.timestamp;
Log.w(TAG, "Can't get device pose at time: " +
|
4,876 | import org.rajawali3d.materials.Material;
import org.rajawali3d.materials.methods.DiffuseMethod;
import org.rajawali3d.materials.textures.ATexture;
import org.rajawali3d.materials.textures.StreamingTexture;
import org.rajawali3d.materials.textures.Texture;
<BUG>import org.rajawali3d.math.Matrix4;
import org.rajawali3d.math.vector.Vector3;</BUG>
import org.rajawali3d.primitives.ScreenQuad;
import org.rajawali3d.primitives.Sphere;
import org.rajawali3d.renderer.RajawaliRenderer;
| import org.rajawali3d.math.Quaternion;
import org.rajawali3d.math.vector.Vector3;
|
4,877 | translationMoon.setRepeatMode(Animation.RepeatMode.INFINITE);
translationMoon.setTransformable3D(moon);
getCurrentScene().registerAnimation(translationMoon);
translationMoon.play();
}
<BUG>public void updateRenderCameraPose(TangoPoseData devicePose, DeviceExtrinsics extrinsics) {
Pose cameraPose = ScenePoseCalculator.toOpenGlCameraPose(devicePose, extrinsics);
getCurrentCamera().setRotation(cameraPose.getOrientation());
getCurrentCamera().setPosition(cameraPose.getPosition());
}</BUG>
public int getTextureId() {
| public void updateRenderCameraPose(TangoPoseData cameraPose) {
float[] rotation = cameraPose.getRotationAsFloats();
float[] translation = cameraPose.getTranslationAsFloats();
Quaternion quaternion = new Quaternion(rotation[3], rotation[0], rotation[1], rotation[2]);
getCurrentCamera().setRotation(quaternion.conjugate());
getCurrentCamera().setPosition(translation[0], translation[1], translation[2]);
|
4,878 | package com.projecttango.examples.java.helloareadescription;
import com.google.atap.tangoservice.Tango;
<BUG>import com.google.atap.tangoservice.Tango.OnTangoUpdateListener;
import com.google.atap.tangoservice.TangoConfig;</BUG>
import com.google.atap.tangoservice.TangoCoordinateFramePair;
import com.google.atap.tangoservice.TangoErrorException;
import com.google.atap.tangoservice.TangoEvent;
| import com.google.atap.tangoservice.TangoAreaDescriptionMetaData;
import com.google.atap.tangoservice.TangoConfig;
|
4,879 | import com.intellij.openapi.project.ProjectBundle;
import com.intellij.openapi.roots.*;
import com.intellij.openapi.util.Key;
import com.intellij.openapi.vfs.*;
import com.intellij.psi.impl.PsiManagerConfiguration;
<BUG>import com.intellij.util.*;
import com.intellij.util.messages.MessageBusConnection;</BUG>
import gnu.trove.THashMap;
import junit.framework.Assert;
import org.jetbrains.annotations.NotNull;
| import com.intellij.util.containers.HashMap;
import com.intellij.util.messages.MessageBusConnection;
|
4,880 | CharSequence mBreadCrumbTitleText;
int mBreadCrumbShortTitleRes;
CharSequence mBreadCrumbShortTitleText;
ArrayList<String> mSharedElementSourceNames;
ArrayList<String> mSharedElementTargetNames;
<BUG>boolean mAllowOptimization = true;
</BUG>
@Override
public String toString() {
StringBuilder sb = new StringBuilder(128);
| boolean mAllowOptimization = false;
|
4,881 | public void postponedAddRemove() throws Throwable {
final FragmentManager fm = mActivityRule.getActivity().getSupportFragmentManager();
final AnimatorFragment fragment1 = new AnimatorFragment();
fm.beginTransaction()
.add(R.id.fragmentContainer, fragment1)
<BUG>.addToBackStack(null)
.commit();</BUG>
FragmentTestUtil.waitForExecution(mActivityRule);
final AnimatorFragment fragment2 = new AnimatorFragment();
fragment2.postponeEnterTransition();
| .setAllowOptimization(true)
.commit();
|
4,882 | final AnimatorFragment fragment2 = new AnimatorFragment();
fragment2.postponeEnterTransition();
fm.beginTransaction()
.setCustomAnimations(ENTER, EXIT, POP_ENTER, POP_EXIT)
.replace(R.id.fragmentContainer, fragment2)
<BUG>.addToBackStack(null)
.commit();</BUG>
FragmentTestUtil.waitForExecution(mActivityRule);
assertPostponed(fragment2, 0);
assertNotNull(fragment1.getView());
| .setAllowOptimization(true)
.commit();
|
4,883 | @Test
public void popPostponed() throws Throwable {
final FragmentManager fm = mActivityRule.getActivity().getSupportFragmentManager();
final AnimatorFragment fragment1 = new AnimatorFragment();
fm.beginTransaction()
<BUG>.add(R.id.fragmentContainer, fragment1)
.commit();</BUG>
FragmentTestUtil.waitForExecution(mActivityRule);
assertEquals(0, fragment1.numAnimators);
final AnimatorFragment fragment2 = new AnimatorFragment();
| .setAllowOptimization(true)
.commit();
|
4,884 | final AnimatorFragment fragment2 = new AnimatorFragment();
fragment2.postponeEnterTransition();
fm.beginTransaction()
.setCustomAnimations(ENTER, EXIT, POP_ENTER, POP_EXIT)
.replace(R.id.fragmentContainer, fragment2)
<BUG>.addToBackStack(null)
.commit();</BUG>
FragmentTestUtil.waitForExecution(mActivityRule);
assertPostponed(fragment2, 0);
FragmentTestUtil.popBackStackImmediate(mActivityRule);
| .setAllowOptimization(true)
.commit();
|
4,885 | FragmentTestUtil.assertChildren(mContainer);
}
@Test
public void startWithPop() throws Throwable {
final CountCallsFragment fragment1 = new CountCallsFragment();
<BUG>mFM.beginTransaction().add(R.id.fragmentContainer, fragment1).addToBackStack(null).commit();
FragmentTestUtil.executePendingTransactions(mActivityRule);</BUG>
FragmentTestUtil.assertChildren(mContainer, fragment1);
mInstrumentation.runOnMainSync(new Runnable() {
@Override
| mFM.beginTransaction()
.add(R.id.fragmentContainer, fragment1)
.addToBackStack(null)
.setAllowOptimization(true)
FragmentTestUtil.executePendingTransactions(mActivityRule);
|
4,886 | @Override
public void run() {
mFM.popBackStack();
mFM.beginTransaction()
.add(R.id.fragmentContainer, fragment1)
<BUG>.addToBackStack(null)
.commit();</BUG>
mFM.executePendingTransactions();
}
});
| .setAllowOptimization(true)
.commit();
|
4,887 | mInstrumentation.runOnMainSync(new Runnable() {
@Override
public void run() {
id[0] = mFM.beginTransaction()
.add(R.id.fragmentContainer, fragment1)
<BUG>.addToBackStack(null)
.commit();
mFM.beginTransaction().hide(fragment1).addToBackStack(null).commit();
mFM.beginTransaction().remove(fragment1).addToBackStack(null).commit();
mFM.executePendingTransactions();</BUG>
}
| mFM.popBackStack();
.setAllowOptimization(true)
mFM.executePendingTransactions();
|
4,888 | public void optimizeDetach() throws Throwable {
final CountCallsFragment fragment1 = new CountCallsFragment();
int id = mFM.beginTransaction()
.add(R.id.fragmentContainer, fragment1)
.detach(fragment1)
<BUG>.addToBackStack(null)
.commit();</BUG>
FragmentTestUtil.executePendingTransactions(mActivityRule);
assertEquals(1, fragment1.onAttachCount);
assertEquals(0, fragment1.onDetachCount);
| .setAllowOptimization(true)
.commit();
|
4,889 | public void optimizeHide() throws Throwable {
final CountCallsFragment fragment1 = new CountCallsFragment();
int id = mFM.beginTransaction()
.add(R.id.fragmentContainer, fragment1)
.hide(fragment1)
<BUG>.addToBackStack(null)
.commit();</BUG>
FragmentTestUtil.executePendingTransactions(mActivityRule);
assertEquals(0, fragment1.onShowCount);
assertEquals(1, fragment1.onHideCount);
| .setAllowOptimization(true)
.commit();
|
4,890 | @Test
public void optimizeShow() throws Throwable {
final CountCallsFragment fragment1 = new CountCallsFragment();
int id = mFM.beginTransaction()
.add(R.id.fragmentContainer, fragment1)
<BUG>.addToBackStack(null)
.commit();</BUG>
FragmentTestUtil.executePendingTransactions(mActivityRule);
assertEquals(0, fragment1.onShowCount);
assertEquals(0, fragment1.onHideCount);
| .setAllowOptimization(true)
.commit();
|
4,891 | @Test
public void viewOrder() throws Throwable {
final CountCallsFragment fragment1 = new CountCallsFragment();
int id = mFM.beginTransaction()
.add(R.id.fragmentContainer, fragment1)
<BUG>.addToBackStack(null)
.commit();</BUG>
FragmentTestUtil.executePendingTransactions(mActivityRule);
FragmentTestUtil.assertChildren(mContainer, fragment1);
final CountCallsFragment fragment2 = new CountCallsFragment();
| .setAllowOptimization(true)
.commit();
|
4,892 | 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() );
|
4,893 | 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_();
|
4,894 | 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 );
|
4,895 | 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 );
|
4,896 | 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_();
|
4,897 | 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_();
|
4,898 | 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_();
|
4,899 | {
ReverseDependencyLink p1 = (ReverseDependencyLink) o1;
ReverseDependencyLink p2 = (ReverseDependencyLink) o2;
return p1.getProject().getId().compareTo( p2.getProject().getId() );
}
<BUG>else
{</BUG>
return 0;
}
}
| iconError( sink );
|
4,900 | e.printStackTrace();
}
filePlayback=null;
}
@Override
<BUG>public void stop() { if ( filePlayback!=null ) filePlayback.stop(); }
void initFiles() throws FileNotFoundException {</BUG>
if ((dataDir.length() != 0) && !dataDir.endsWith("/")) { dataDir = dataDir + "/"; } // guard path if needed
String samples_str = dataDir + "samples";
String events_str = dataDir + "events";
| @Override public boolean isrunning(){ if ( filePlayback!=null ) return filePlayback.isrunning(); return false; }
void initFiles() throws FileNotFoundException {
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.