id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
37,701
import java.util.concurrent.atomic.AtomicReference; import org.eclipse.jetty.client.api.Response; import org.eclipse.jetty.client.api.Result; import org.eclipse.jetty.http.HttpField; import org.eclipse.jetty.http.HttpHeader; <BUG>import org.eclipse.jetty.util.BufferUtil; import org.eclipse.jetty.util.log.Log;</BUG> imp...
import org.eclipse.jetty.util.Callback; import org.eclipse.jetty.util.log.Log;
37,702
import java.util.List; import org.eclipse.jetty.client.api.ContentResponse; import org.eclipse.jetty.client.api.Request; import org.eclipse.jetty.client.api.Response; import org.eclipse.jetty.client.api.Result; <BUG>import org.eclipse.jetty.http.HttpField; import org.eclipse.jetty.util.log.Log;</BUG> import org.eclipse...
import org.eclipse.jetty.util.Callback; import org.eclipse.jetty.util.IteratingNestedCallback; import org.eclipse.jetty.util.log.Log;
37,703
</BUG> { try { <BUG>listener.onContent(response, buffer); </BUG> } catch (Throwable x) { LOG.info("Exception while notifying listener " + listener, x);
buffer.clear(); ResponseNotifier.this.notifyContent((Response.AsyncContentListener)listener, response, buffer, this); return Action.SCHEDULED; else succeeded(); return Action.SCHEDULED;
37,704
package org.eclipse.jetty.client.http; import java.io.EOFException; <BUG>import java.nio.ByteBuffer; import org.eclipse.jetty.client.HttpClient;</BUG> import org.eclipse.jetty.client.HttpExchange; import org.eclipse.jetty.client.HttpReceiver; import org.eclipse.jetty.client.HttpResponse;
import java.util.concurrent.atomic.AtomicBoolean; import org.eclipse.jetty.client.HttpClient;
37,705
int read = endPoint.fill(buffer); if (LOG.isDebugEnabled()) // Avoid boxing of variable 'read' LOG.debug("Read {} bytes from {}", read, endPoint);</BUG> if (read > 0) { <BUG>parse(buffer); }</BUG> else if (read == 0) {
if (LOG.isDebugEnabled()) LOG.debug("Read {} bytes from {}", read, endPoint); if (!parse(buffer)) return false; }
37,706
} @RootTask static Task<Exec.Result> exec(String parameter, int number) { Task<String> task1 = MyTask.create(parameter); Task<Integer> task2 = Adder.create(number, number + 2); <BUG>return Task.ofType(Exec.Result.class).named("exec", "/bin/sh") .in(() -> task1)</BUG> .in(() -> task2) .process(Exec.exec((str, i) -> args...
return Task.named("exec", "/bin/sh").ofType(Exec.Result.class) .in(() -> task1)
37,707
return args; } static class MyTask { static final int PLUS = 10; static Task<String> create(String parameter) { <BUG>return Task.ofType(String.class).named("MyTask", parameter) .in(() -> Adder.create(parameter.length(), PLUS))</BUG> .in(() -> Fib.create(parameter.length())) .process((sum, fib) -> something(parameter, s...
return Task.named("MyTask", parameter).ofType(String.class) .in(() -> Adder.create(parameter.length(), PLUS))
37,708
final String instanceField = "from instance"; final TaskContext context = TaskContext.inmem(); final AwaitingConsumer<String> val = new AwaitingConsumer<>(); @Test public void shouldJavaUtilSerialize() throws Exception { <BUG>Task<Long> task1 = Task.ofType(Long.class).named("Foo", "Bar", 39) .process(() -> 9999L); Task...
Task<Long> task1 = Task.named("Foo", "Bar", 39).ofType(Long.class) Task<String> task2 = Task.named("Baz", 40).ofType(String.class) .in(() -> task1)
37,709
assertEquals(des.id().name(), "Baz"); assertEquals(val.awaitAndGet(), "[9999] hello 10004"); } @Test(expected = NotSerializableException.class) public void shouldNotSerializeWithInstanceFieldReference() throws Exception { <BUG>Task<String> task = Task.ofType(String.class).named("WithRef") .process(() -> instanceField +...
Task<String> task = Task.named("WithRef").ofType(String.class) .process(() -> instanceField + " causes an outer reference");
37,710
serialize(task); } @Test public void shouldSerializeWithLocalReference() throws Exception { String local = instanceField; <BUG>Task<String> task = Task.ofType(String.class).named("WithLocalRef") .process(() -> local + " won't cause an outer reference");</BUG> serialize(task); Task<String> des = deserialize(); context.e...
Task<String> task = Task.named("WithLocalRef").ofType(String.class) .process(() -> local + " won't cause an outer reference");
37,711
} @RootTask public static Task<String> standardArgs(int first, String second) { firstInt = first; secondString = second; <BUG>return Task.ofType(String.class).named("StandardArgs", first, second) .process(() -> second + " " + first * 100);</BUG> } @Test public void shouldParseFlags() throws Exception {
return Task.named("StandardArgs", first, second).ofType(String.class) .process(() -> second + " " + first * 100);
37,712
assertThat(parsedEnum, is(CustomEnum.BAR)); } @RootTask public static Task<String> enums(CustomEnum enm) { parsedEnum = enm; <BUG>return Task.ofType(String.class).named("Enums", enm) .process(enm::toString);</BUG> } @Test public void shouldParseCustomTypes() throws Exception {
return Task.named("Enums", enm).ofType(String.class) .process(enm::toString);
37,713
assertThat(parsedType.content, is("blarg parsed for you!")); } @RootTask public static Task<String> customType(CustomType myType) { parsedType = myType; <BUG>return Task.ofType(String.class).named("Types", myType.content) .process(() -> myType.content);</BUG> } public enum CustomEnum { BAR
return Task.named("Types", myType.content).ofType(String.class) .process(() -> myType.content);
37,714
TaskContext taskContext = TaskContext.inmem(); TaskContext.Value<Long> value = taskContext.evaluate(fib92); value.consume(f92 -> System.out.println("fib(92) = " + f92)); } static Task<Long> create(long n) { <BUG>TaskBuilder<Long> fib = Task.ofType(Long.class).named("Fib", n); </BUG> if (n < 2) { return fib .process(() ...
TaskBuilder<Long> fib = Task.named("Fib", n).ofType(Long.class);
37,715
minX = src.getMinX(); maxX = src.getMaxX(); minY = src.getMinY(); maxY = src.getMaxY(); } else { <BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC); minX = src.getMinX() + 1; // Left padding maxX = src.getMaxX() - 2; // Right padding minY = src.getMinY() + 1; // Top padding max...
iterSource = getRandomIterator(src, null); minX = src.getMinX() + leftPad; // Left padding maxX = src.getMaxX() - rightPad; // Right padding minY = src.getMinY() + topPad; // Top padding maxY = src.getMaxY() - bottomPad; // Bottom padding
37,716
final int lineStride = dst.getScanlineStride(); final int pixelStride = dst.getPixelStride(); final int[] bandOffsets = dst.getBandOffsets(); final byte[][] data = dst.getByteDataArrays(); final float[] warpData = new float[2 * dstWidth]; <BUG>int lineOffset = 0; if (ctable == null) { // source does not have IndexColor...
if(hasROI && !roiContainsTile && roiIter == null){ throw new IllegalArgumentException("Error on creating the ROI iterator"); } if (caseA || (caseB && roiContainsTile)) { for (int h = 0; h < dstHeight; h++) {
37,717
pixelOffset += pixelStride; } // COLS LOOP } // ROWS LOOP } } else {// source has IndexColorModel <BUG>if (caseA) { for (int h = 0; h < dstHeight; h++) {</BUG> int pixelOffset = lineOffset; lineOffset += lineStride; warp.warpRect(dst.getX(), dst.getY() + h, dstWidth, 1, warpData);
} else if (caseB) { for (int h = 0; h < dstHeight; h++) {
37,718
minX = src.getMinX(); maxX = src.getMaxX(); minY = src.getMinY(); maxY = src.getMaxY(); } else { <BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC); minX = src.getMinX() + 1; // Left padding maxX = src.getMaxX() - 2; // Right padding minY = src.getMinY() + 1; // Top padding max...
iterSource = getRandomIterator(src, null); minX = src.getMinX() + leftPad; // Left padding maxX = src.getMaxX() - rightPad; // Right padding minY = src.getMinY() + topPad; // Top padding maxY = src.getMaxY() - bottomPad; // Bottom padding
37,719
final int pixelStride = dst.getPixelStride(); final int[] bandOffsets = dst.getBandOffsets(); final short[][] data = dst.getShortDataArrays(); final float[] warpData = new float[2 * dstWidth]; int lineOffset = 0; <BUG>if (caseA) { for (int h = 0; h < dstHeight; h++) {</BUG> int pixelOffset = lineOffset; lineOffset += l...
if(hasROI && !roiContainsTile && roiIter == null){ throw new IllegalArgumentException("Error on creating the ROI iterator"); } if (caseA || (caseB && roiContainsTile)) { for (int h = 0; h < dstHeight; h++) {
37,720
minX = src.getMinX(); maxX = src.getMaxX(); minY = src.getMinY(); maxY = src.getMaxY(); } else { <BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC); minX = src.getMinX() + 1; // Left padding maxX = src.getMaxX() - 2; // Right padding minY = src.getMinY() + 1; // Top padding max...
iterSource = getRandomIterator(src, null); minX = src.getMinX() + leftPad; // Left padding maxX = src.getMaxX() - rightPad; // Right padding minY = src.getMinY() + topPad; // Top padding maxY = src.getMaxY() - bottomPad; // Bottom padding
37,721
final int pixelStride = dst.getPixelStride(); final int[] bandOffsets = dst.getBandOffsets(); final short[][] data = dst.getShortDataArrays(); final float[] warpData = new float[2 * dstWidth]; int lineOffset = 0; <BUG>if (caseA) { for (int h = 0; h < dstHeight; h++) {</BUG> int pixelOffset = lineOffset; lineOffset += l...
if(hasROI && !roiContainsTile && roiIter == null){ throw new IllegalArgumentException("Error on creating the ROI iterator"); } if (caseA || (caseB && roiContainsTile)) { for (int h = 0; h < dstHeight; h++) {
37,722
minX = src.getMinX(); maxX = src.getMaxX(); minY = src.getMinY(); maxY = src.getMaxY(); } else { <BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC); minX = src.getMinX() + 1; // Left padding maxX = src.getMaxX() - 2; // Right padding minY = src.getMinY() + 1; // Top padding max...
iterSource = getRandomIterator(src, null); minX = src.getMinX() + leftPad; // Left padding maxX = src.getMaxX() - rightPad; // Right padding minY = src.getMinY() + topPad; // Top padding maxY = src.getMaxY() - bottomPad; // Bottom padding
37,723
final int pixelStride = dst.getPixelStride(); final int[] bandOffsets = dst.getBandOffsets(); final int[][] data = dst.getIntDataArrays(); final float[] warpData = new float[2 * dstWidth]; int lineOffset = 0; <BUG>if (caseA) { for (int h = 0; h < dstHeight; h++) {</BUG> int pixelOffset = lineOffset; lineOffset += lineS...
if(hasROI && !roiContainsTile && roiIter == null){ throw new IllegalArgumentException("Error on creating the ROI iterator"); } if (caseA || (caseB && roiContainsTile)) { for (int h = 0; h < dstHeight; h++) {
37,724
minX = src.getMinX(); maxX = src.getMaxX(); minY = src.getMinY(); maxY = src.getMaxY(); } else { <BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC); minX = src.getMinX() + 1; // Left padding maxX = src.getMaxX() - 2; // Right padding minY = src.getMinY() + 1; // Top padding max...
iterSource = getRandomIterator(src, null); minX = src.getMinX() + leftPad; // Left padding maxX = src.getMaxX() - rightPad; // Right padding minY = src.getMinY() + topPad; // Top padding maxY = src.getMaxY() - bottomPad; // Bottom padding
37,725
final int pixelStride = dst.getPixelStride(); final int[] bandOffsets = dst.getBandOffsets(); final float[][] data = dst.getFloatDataArrays(); final float[] warpData = new float[2 * dstWidth]; int lineOffset = 0; <BUG>if (caseA) { for (int h = 0; h < dstHeight; h++) {</BUG> int pixelOffset = lineOffset; lineOffset += l...
if(hasROI && !roiContainsTile && roiIter == null){ throw new IllegalArgumentException("Error on creating the ROI iterator"); } if (caseA || (caseB && roiContainsTile)) { for (int h = 0; h < dstHeight; h++) {
37,726
minX = src.getMinX(); maxX = src.getMaxX(); minY = src.getMinY(); maxY = src.getMaxY(); } else { <BUG>iterSource = RandomIterFactory.create(src, src.getBounds(), TILE_CACHED, ARRAY_CALC); minX = src.getMinX() + 1; // Left padding maxX = src.getMaxX() - 2; // Right padding minY = src.getMinY() + 1; // Top padding max...
iterSource = getRandomIterator(src, null); minX = src.getMinX() + leftPad; // Left padding maxX = src.getMaxX() - rightPad; // Right padding minY = src.getMinY() + topPad; // Top padding maxY = src.getMaxY() - bottomPad; // Bottom padding
37,727
final int pixelStride = dst.getPixelStride(); final int[] bandOffsets = dst.getBandOffsets(); final double[][] data = dst.getDoubleDataArrays(); final float[] warpData = new float[2 * dstWidth]; int lineOffset = 0; <BUG>if (caseA) { for (int h = 0; h < dstHeight; h++) {</BUG> int pixelOffset = lineOffset; lineOffset +=...
if(hasROI && !roiContainsTile && roiIter == null){ throw new IllegalArgumentException("Error on creating the ROI iterator"); } if (caseA || (caseB && roiContainsTile)) { for (int h = 0; h < dstHeight; h++) {
37,728
package heros; import java.util.Collection; import java.util.List; import java.util.Set; public interface InterproceduralCFG<N,M> { <BUG>public M getMethodOf(N n); public List<N> getSuccsOf(N n);</BUG> public Collection<M> getCalleesOfCallAt(N n); public Collection<N> getCallersOf(M m); public Set<N> getCallsFromWithi...
public List<N> getPredsOf(N u); public List<N> getSuccsOf(N n);
37,729
import com.minecraft.moonlake.MoonLakeAPI; import com.minecraft.moonlake.api.entity.AttributeType; import com.minecraft.moonlake.api.fancy.FancyMessage; import com.minecraft.moonlake.api.packet.PacketPlayOutBukkit; import com.minecraft.moonlake.api.packet.PacketPlayOutBungee; <BUG>import com.minecraft.moonlake.api.pack...
import com.minecraft.moonlake.api.packet.wrapper.PacketPlayOutChat; import com.minecraft.moonlake.api.packet.wrapper.PacketPlayOutPlayerListHeaderFooter; import com.minecraft.moonlake.api.packet.wrapper.PacketPlayOutTitle; import com.minecraft.moonlake.api.player.depend.EconomyPlayerData;
37,730
import com.minecraft.moonlake.api.item.firework.FireworkBuilder; import com.minecraft.moonlake.api.item.potion.PotionType; import com.minecraft.moonlake.api.nbt.NBTCompound; import com.minecraft.moonlake.api.nbt.NBTFactory; import com.minecraft.moonlake.api.nbt.NBTLibrary; <BUG>import com.minecraft.moonlake.api.nbt.NBT...
import com.minecraft.moonlake.api.packet.PacketPlayOutBukkit; import com.minecraft.moonlake.api.packet.exception.PacketException; import com.minecraft.moonlake.api.player.MoonLakePlayer;
37,731
import java.net.URISyntaxException; import java.nio.ByteBuffer; import java.util.HashMap; import java.util.LinkedList; import java.util.List; <BUG>import java.util.Map; import io.undertow.client.ClientCallback;</BUG> import io.undertow.client.ClientConnection; import io.undertow.client.ClientExchange; import io.underto...
import java.util.Optional; import io.undertow.client.ClientCallback;
37,732
import org.apache.camel.Exchange; import org.apache.camel.Message; import org.apache.camel.TypeConverter; import org.apache.camel.impl.DefaultAsyncProducer; import org.apache.camel.util.ExchangeHelper; <BUG>import org.apache.camel.util.IOHelper; import org.slf4j.Logger;</BUG> import org.slf4j.LoggerFactory; import org....
import org.apache.camel.util.ObjectHelper; import org.apache.camel.util.StringHelper; import org.apache.camel.util.URISupport; import org.slf4j.Logger;
37,733
public boolean process(Exchange exchange, AsyncCallback callback) { ClientConnection connection = null; try { final UndertowClient client = UndertowClient.getInstance(); IoFuture<ClientConnection> connect = client.connect(endpoint.getHttpURI(), worker, pool, options); <BUG>String url = UndertowHelper.createURL(exchange...
final String exchangeUri = UndertowHelper.createURL(exchange, getEndpoint()); final URI uri = UndertowHelper.createURI(exchange, exchangeUri, getEndpoint()); final String pathAndQuery = URISupport.pathAndQueryOf(uri); HttpString method = UndertowHelper.createMethod(exchange, endpoint, exchange.getIn().getBody() != null...
37,734
public NodeFirstRelationshipStage( Configuration config, NodeStore nodeStore, RelationshipGroupStore relationshipGroupStore, NodeRelationshipLink cache ) { super( "Node --> Relationship", config, false ); add( new ReadNodeRecordsStep( control(), config.batchSize(), config.movingAverageSize(), nodeStore ) ); <BUG>add( n...
add( new RecordProcessorStep<>( control(), "LINK", config.workAheadSize(), config.movingAverageSize(), new NodeFirstRelationshipProcessor( relationshipGroupStore, cache ), false ) ); add( new UpdateRecordsStep<>( control(), config.workAheadSize(), config.movingAverageSize(), nodeStore ) );
37,735
import org.neo4j.kernel.impl.api.CountsAccessor; import org.neo4j.kernel.impl.store.NodeLabelsField; import org.neo4j.kernel.impl.store.NodeStore; import org.neo4j.kernel.impl.store.record.NodeRecord; import org.neo4j.unsafe.impl.batchimport.cache.NodeLabelsCache; <BUG>public class NodeCountsProcessor implements StoreP...
public class NodeCountsProcessor implements RecordProcessor<NodeRecord>
37,736
super.addStatsProviders( providers ); providers.add( monitor ); } @Override protected void done() <BUG>{ monitor.stop();</BUG> } @Override public int numberOfProcessors()
super.done(); monitor.stop();
37,737
import org.neo4j.kernel.impl.store.RelationshipGroupStore; import org.neo4j.kernel.impl.store.record.NodeRecord; import org.neo4j.kernel.impl.store.record.RelationshipGroupRecord; import org.neo4j.unsafe.impl.batchimport.cache.NodeRelationshipLink; import org.neo4j.unsafe.impl.batchimport.cache.NodeRelationshipLink.Gro...
public class NodeFirstRelationshipProcessor implements RecordProcessor<NodeRecord>, GroupVisitor
37,738
import de.vanita5.twittnuker.receiver.NotificationReceiver; import de.vanita5.twittnuker.service.LengthyOperationsService; import de.vanita5.twittnuker.util.ActivityTracker; import de.vanita5.twittnuker.util.AsyncTwitterWrapper; import de.vanita5.twittnuker.util.DataStoreFunctionsKt; <BUG>import de.vanita5.twittnuker.u...
import de.vanita5.twittnuker.util.DebugLog; import de.vanita5.twittnuker.util.ImagePreloader;
37,739
final List<InetAddress> addresses = mDns.lookup(host); for (InetAddress address : addresses) { c.addRow(new String[]{host, address.getHostAddress()}); } } catch (final IOException ignore) { <BUG>if (BuildConfig.DEBUG) { Log.w(LOGTAG, ignore); }</BUG> }
DebugLog.w(LOGTAG, null, ignore);
37,740
@Override public void afterExecute(Bus handler, SingleResponse<Relationship> result) { if (result.hasData()) { handler.post(new FriendshipUpdatedEvent(accountKey, userKey, result.getData())); } else if (result.hasException()) { <BUG>if (BuildConfig.DEBUG) { Log.w(LOGTAG, "Unable to update friendship", result.getExcepti...
public UserKey[] getAccountKeys() { return DataStoreUtils.getActivatedAccountKeys(context);
37,741
MicroBlog microBlog = MicroBlogAPIFactory.getInstance(context, accountId); if (!Utils.isOfficialCredentials(context, accountId)) continue; try { microBlog.setActivitiesAboutMeUnread(cursor); } catch (MicroBlogException e) { <BUG>if (BuildConfig.DEBUG) { Log.w(LOGTAG, e); }</BUG> }
DebugLog.w(LOGTAG, null, e);
37,742
FileBody fileBody = null; try { fileBody = getFileBody(context, imageUri); twitter.updateProfileBannerImage(fileBody); } finally { <BUG>Utils.closeSilently(fileBody); if (deleteImage && "file".equals(imageUri.getScheme())) { final File file = new File(imageUri.getPath()); if (!file.delete()) { Log.w(LOGTAG, String.form...
if (deleteImage) { Utils.deleteMedia(context, imageUri);
37,743
FileBody fileBody = null; try { fileBody = getFileBody(context, imageUri); twitter.updateProfileBackgroundImage(fileBody, tile); } finally { <BUG>Utils.closeSilently(fileBody); if (deleteImage && "file".equals(imageUri.getScheme())) { final File file = new File(imageUri.getPath()); if (!file.delete()) { Log.w(LOGTAG, S...
twitter.updateProfileBannerImage(fileBody); if (deleteImage) { Utils.deleteMedia(context, imageUri);
37,744
FileBody fileBody = null; try { fileBody = getFileBody(context, imageUri); return twitter.updateProfileImage(fileBody); } finally { <BUG>Utils.closeSilently(fileBody); if (deleteImage && "file".equals(imageUri.getScheme())) { final File file = new File(imageUri.getPath()); if (!file.delete()) { Log.w(LOGTAG, String.for...
twitter.updateProfileBannerImage(fileBody); if (deleteImage) { Utils.deleteMedia(context, imageUri);
37,745
import de.vanita5.twittnuker.annotation.CustomTabType; import de.vanita5.twittnuker.library.MicroBlog; import de.vanita5.twittnuker.library.MicroBlogException; import de.vanita5.twittnuker.library.twitter.model.RateLimitStatus; import de.vanita5.twittnuker.library.twitter.model.Status; <BUG>import de.vanita5.twittnuker...
import org.mariotaku.pickncrop.library.PNCUtils; import org.mariotaku.sqliteqb.library.AllColumns;
37,746
context.getApplicationContext().sendBroadcast(intent); } } @Nullable public static Location getCachedLocation(Context context) { <BUG>if (BuildConfig.DEBUG) { Log.v(LOGTAG, "Fetching cached location", new Exception()); }</BUG> Location location = null;
DebugLog.v(LOGTAG, "Fetching cached location", new Exception());
37,747
import java.util.List; import java.util.Map.Entry; import javax.inject.Singleton; import okhttp3.Dns; @Singleton <BUG>public class TwidereDns implements Constants, Dns { </BUG> private static final String RESOLVER_LOGTAG = "TwittnukerDns"; private final SharedPreferences mHostMapping; private final SharedPreferencesWra...
public class TwidereDns implements Dns, Constants {
37,748
for (Location location : twitter.getAvailableTrends()) { map.put(location); } return map.pack(); } catch (final MicroBlogException e) { <BUG>if (BuildConfig.DEBUG) { Log.w(LOGTAG, e); }</BUG> }
DebugLog.w(LOGTAG, null, e);
37,749
import com.google.common.base.Throwables; import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; <BUG>import com.google.common.collect.Multimap; import com.google.inject.AbstractModule;</BUG>...
import com.google.common.io.InputSupplier; import com.google.inject.AbstractModule;
37,750
import com.google.inject.Injector; import com.google.inject.Module; import com.google.inject.Scopes; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.Coprocessor; <BUG>import org.apache.hadoop.hbase.HTableDescriptor; import org.apache.hadoop.hbase.TableNotFoundException; import org.apache.had...
import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.client.HTableInterface; import org.apache.hadoop.hbase.client.ResultScanner;
37,751
cConf.set(Constants.Zookeeper.QUORUM, testHBase.getZkConnectionString()); cConf.set(TxConstants.Service.CFG_DATA_TX_BIND_PORT, Integer.toString(Networks.getRandomPort())); cConf.set(Constants.Dataset.TABLE_PREFIX, "test"); cConf.set(Constants.CFG_HDFS_USER, System.getProperty("user.name")); <BUG>cConf.setLong(QueueCons...
cConf.setLong(QueueConstants.QUEUE_CONFIG_UPDATE_FREQUENCY, 10000L);
37,752
Object txStateCache = getTxStateCache.invoke(cp); Method refreshState = txStateCache.getClass().getSuperclass().getDeclaredMethod("refreshState"); refreshState.setAccessible(true); refreshState.invoke(txStateCache); LOG.info("forcing update cache for HBaseQueueRegionObserver of region: {}", region); <BUG>Method getConf...
Method updateCache = cp.getClass().getDeclaredMethod("updateCache"); updateCache.setAccessible(true); updateCache.invoke(cp); } catch (Exception e) {
37,753
import co.cask.cdap.data2.transaction.queue.hbase.coprocessor.QueueConsumerConfig; import co.cask.cdap.data2.util.TableId; import co.cask.cdap.data2.util.hbase.HTable98NameConverter; import co.cask.tephra.coprocessor.TransactionStateCache; import co.cask.tephra.persist.TransactionSnapshot; <BUG>import com.google.common...
import com.google.common.io.InputSupplier; import org.apache.commons.logging.Log;
37,754
import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.CoprocessorEnvironment; import org.apache.hadoop.hbase.HTableDescriptor; <BUG>import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.coprocessor...
import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.client.HTableInterface; import org.apache.hadoop.hbase.coprocessor.BaseRegionObserver;
37,755
import java.io.IOException; import java.util.Iterator; import java.util.List; public final class HBaseQueueRegionObserver extends BaseRegionObserver { private static final Log LOG = LogFactory.getLog(HBaseQueueRegionObserver.class); <BUG>private Configuration conf; private byte[] configTableNameBytes; </BUG> private CC...
private TableName configTableName;
37,756
} HTable98NameConverter nameConverter = new HTable98NameConverter(); namespaceId = nameConverter.from(tableDesc).getNamespace().getId(); appName = HBaseQueueAdmin.getApplicationName(hTableName); flowName = HBaseQueueAdmin.getFlowName(hTableName); <BUG>conf = env.getConfiguration(); </BUG> String hbaseNamespacePrefix = ...
Configuration conf = env.getConfiguration();
37,757
QueueName queueName = QueueEntryRow.getQueueName(namespaceId, appName, flowName, prefixBytes, cell.getRowArray(), cell.getRowOffset(), cell.getRowLength()); currentQueue = queueName.toBytes(); currentQueueRowPrefix = QueueEntryRow.getQueueRowPrefix(queueName); <BUG>consumerConfig = getConfigCache().getConsumerConfig(cu...
consumerConfig = getConfigCache(env).getConsumerConfig(currentQueue);
37,758
import co.cask.cdap.data2.transaction.queue.hbase.coprocessor.QueueConsumerConfig; import co.cask.cdap.data2.util.TableId; import co.cask.cdap.data2.util.hbase.HTable96NameConverter; import co.cask.tephra.coprocessor.TransactionStateCache; import co.cask.tephra.persist.TransactionSnapshot; <BUG>import com.google.common...
import com.google.common.io.InputSupplier; import org.apache.commons.logging.Log;
37,759
import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.CoprocessorEnvironment; import org.apache.hadoop.hbase.HTableDescriptor; <BUG>import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.coprocessor...
import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.client.HTableInterface; import org.apache.hadoop.hbase.coprocessor.BaseRegionObserver;
37,760
import java.io.IOException; import java.util.Iterator; import java.util.List; public final class HBaseQueueRegionObserver extends BaseRegionObserver { private static final Log LOG = LogFactory.getLog(HBaseQueueRegionObserver.class); <BUG>private Configuration conf; private byte[] configTableNameBytes; </BUG> private CC...
private TableName configTableName;
37,761
} HTable96NameConverter nameConverter = new HTable96NameConverter(); namespaceId = nameConverter.from(tableDesc).getNamespace().getId(); appName = HBaseQueueAdmin.getApplicationName(hTableName); flowName = HBaseQueueAdmin.getFlowName(hTableName); <BUG>conf = env.getConfiguration(); </BUG> String hbaseNamespacePrefix = ...
Configuration conf = env.getConfiguration();
37,762
QueueName queueName = QueueEntryRow.getQueueName(namespaceId, appName, flowName, prefixBytes, cell.getRowArray(), cell.getRowOffset(), cell.getRowLength()); currentQueue = queueName.toBytes(); currentQueueRowPrefix = QueueEntryRow.getQueueRowPrefix(queueName); <BUG>consumerConfig = getConfigCache().getConsumerConfig(cu...
consumerConfig = getConfigCache(env).getConsumerConfig(currentQueue);
37,763
import co.cask.tephra.util.TxUtils; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Supplier; import com.google.common.base.Throwables; import com.google.common.collect.Maps; <BUG>import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.TableNotFoundException; im...
import com.google.common.io.InputSupplier; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.client.HTableInterface;
37,764
import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.HashMap; import java.util.Map; <BUG>import java.util.NavigableMap; import java.util.concurrent.ConcurrentMap;</BUG> import java.util.concurrent.ConcurrentSkipListMap; import javax.annotation...
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap;
37,765
private long lastUpdated; private volatile Map<byte[], QueueConsumerConfig> configCache = Maps.newTreeMap(Bytes.BYTES_COMPARATOR); private long configCacheUpdateFrequency = QueueConstants.DEFAULT_QUEUE_CONFIG_UPDATE_FREQUENCY; private CConfiguration conf; private long lastConfigUpdate; <BUG>ConsumerConfigCache(Configur...
ConsumerConfigCache(TableName queueConfigTableName, CConfigurationReader cConfReader, Supplier<TransactionSnapshot> transactionSnapshotSupplier, InputSupplier<HTableInterface> hTableSupplier) { this.queueConfigTableName = queueConfigTableName;
37,766
TransactionSnapshot txSnapshot = transactionSnapshotSupplier.get(); if (txSnapshot == null) { LOG.debug("No transaction snapshot is available. Not updating the consumer config cache."); return; } <BUG>HTable table = new HTable(hConf, queueConfigTableName); try {</BUG> Scan scan = new Scan(); scan.addFamily(QueueEntryRo...
HTableInterface table = hTableSupplier.getInput(); try {
37,767
} catch (InterruptedException ie) { interrupt(); break; } } <BUG>LOG.info("Config cache update for {} terminated.", Bytes.toString(queueConfigTableName)); INSTANCES.remove(queueConfigTableName, this);</BUG> } }; refreshThread.setDaemon(true);
LOG.info("Config cache update for {} terminated.", queueConfigTableName); INSTANCES.remove(queueConfigTableName, this);
37,768
import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntityDispenser; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; <BUG>import net.minecraftforge.fluids.capability.IFluidHandler; import javax.annotation.Nonnull;</BUG> public class ...
import net.minecraftforge.fluids.capability.IFluidHandlerItem;
37,769
public static DispenseFluidContainer getInstance() { return INSTANCE; } private DispenseFluidContainer() {} <BUG>private final BehaviorDefaultDispenseItem dispenseBehavior = new BehaviorDefaultDispenseItem(); public ItemStack dispenseStack(IBlockSource source, ItemStack stack) </BUG> { if (FluidUtil.getFluidContained(s...
@Nonnull public ItemStack dispenseStack(@Nonnull IBlockSource source, @Nonnull ItemStack stack)
37,770
assertEquals(9.0, b.getDouble(1, 4), 1e-15); nf.close(); } private void checkGroup(GroupNode g) { assertTrue(g.containsAttribute("hello")); <BUG>assertEquals("world", g.getAttribute("hello").getValue().getString()); </BUG> assertTrue(g.isPopulated() && g.containsDataNode("d")); } private void checkData(DataNode n, int[...
assertEquals("world", g.getAttribute("hello").getValue().getString()); // TODO
37,771
if (!group.isPopulated()) { populateGroupNode(path, group); } if (isNapiMount(group)) { parentGroup.removeGroupNode(group); <BUG>IDataset mountData = group.getAttribute("napimount").getValue(); String mountString = mountData.getString(0);</BUG> mountString = mountString.replace("nxfile://", ""); String[] parts = mount...
String mountString = group.getAttribute("napimount").getFirstElement();
37,772
String parentPath = path.substring(0, path.lastIndexOf(name)); recursivelyUpdateTree(parentPath, name, node); } } private void recursivelyUpdateTree(String parentPath, String name, Node node) throws NexusException { <BUG>String nxClass = node.containsAttribute("NX_class") ? node.getAttribute("NX_class").getValue().getS...
String nxClass = node.containsAttribute("NX_class") ? node.getAttribute("NX_class").getFirstElement() : "";
37,773
GroupNode existingNode = (GroupNode) getNode(fullPath, false).node; Iterator<? extends Attribute> it = node.getAttributeIterator(); while (it.hasNext()) { Attribute attr = it.next(); if (!existingNode.containsAttribute(attr.getName())) { <BUG>IDataset value = attr.getValue().getSlice(); </BUG> value.setName(attr.getNam...
IDataset value = attr.getValue().clone();
37,774
DataNode existingNode = getData(parentNode, name); Iterator<? extends Attribute> it = node.getAttributeIterator(); while (it.hasNext()) { Attribute attr = it.next(); if (!existingNode.containsAttribute(attr.getName())) { <BUG>IDataset value = attr.getValue().getSlice(); </BUG> value.setName(attr.getName()); addAttribut...
IDataset value = attr.getValue().clone();
37,775
rank = H5.H5Sget_simple_extent_ndims(sid); isText = type.dtype == Dataset.STRING; isVLEN = type.isVariableLength; final int ldtype = dtype >= 0 ? dtype : type.dtype; final int lisize = isize >= 0 ? isize : type.isize; <BUG>if (rank == 0) { rank = 1; dims = new long[1]; dims[0] = 1; } else {</BUG> dims = new long[rank];...
[DELETED]
37,776
odata = H5Datatype.allocateArray(tid, length); } catch (OutOfMemoryError err) { logger.error("Out of memory", err); throw new NexusException("Out Of Memory", err); } <BUG>long msid = H5.H5Screate_simple(rank, dsize, null); H5.H5Sselect_all(msid);</BUG> PositionIterator it = data.getPositionIterator(axes); final int[] p...
H5.H5Sselect_all(msid);
37,777
HDF5FileFactory.releaseFile(fileName); } } public static void writeDataset(HDF5File f, String dataPath, IDataset data) throws NexusException { Dataset dataset = DatasetUtils.convertToDataset(data); <BUG>long[] shape = dataset.getRank() == 0 ? new long[] {1} : toLongArray(dataset.getShapeRef()); int dtype = dataset.getD...
long[] shape = toLongArray(dataset.getShapeRef()); int dtype = dataset.getDType();
37,778
long hdfDatatypeId = -1; long hdfDataspaceId = -1; long hdfPropertiesId = -1; try { hdfDatatypeId = H5.H5Tcopy(hdfType); <BUG>hdfDataspaceId = H5.H5Screate_simple(shape.length, shape, null); hdfPropertiesId = H5.H5Pcreate(HDF5Constants.H5P_DATASET_CREATE);</BUG> if (stringDataset) { H5.H5Tset_cset(hdfDatatypeId, HDF5Co...
hdfDataspaceId = shape.length == 0 ? H5.H5Screate(HDF5Constants.H5S_SCALAR) : H5.H5Screate_simple(shape.length, shape, null); hdfPropertiesId = H5.H5Pcreate(HDF5Constants.H5P_DATASET_CREATE);
37,779
final long nativeTypeId = nativeTypeResource.getResource(); DatasetType type = getDatasetType(typeResource.getResource(), nativeTypeId); if (type == null) { throw new NexusException("Unknown data type"); } <BUG>if (H5.H5Sget_simple_extent_type(spaceId) == HDF5Constants.H5S_SCALAR) { shape = new long[] {1}; maxShape = n...
[DELETED]
37,780
public int getSize() { return value.getSize(); } @Override public String getFirstElement() { <BUG>return value.getString(0); }</BUG> @Override public String toString() { return value.toString(true);
int r = value.getRank(); // FIXME remove when getXXX() returns first value return r == 0 ? value.getString() : value.getString(new int[r]);
37,781
import javax.swing.ListSelectionModel; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; import javax.swing.table.DefaultTableCellRenderer; import javax.swing.table.DefaultTableModel; <BUG>import javax.swing.table.TableModel; import javax.swing.text.JTextComponent;</BUG> impor...
import javax.swing.table.TableColumnModel; import javax.swing.text.JTextComponent;
37,782
Relation relation = (Relation)membershipData.getValueAt(row, 0); Main.map.relationListDialog.selectRelation(relation); RelationEditor.getEditor( Main.map.mapView.getEditLayer(), relation, <BUG>(Collection<RelationMember>) membershipData.getValueAt(row, 1) ).setVisible(true); </BUG> } void add() { Collection<OsmPrimitiv...
((MemberInfo) membershipData.getValueAt(row, 1)).role).setVisible(true);
37,783
((JLabel)c).setText(str); } return c; } }); <BUG>membershipData.setColumnIdentifiers(new String[]{tr("Member Of"),tr("Role")}); </BUG> membershipTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); membershipTable.addMouseListener(new PopupMenuLauncher() { @Override
membershipData.setColumnIdentifiers(new String[]{tr("Member Of"),tr("Role"),tr("Position")});
37,784
menu.add(new SelectRelationAction(relation, true)); menu.add(new SelectRelationAction(relation, false)); menu.show(membershipTable, p.x, p.y-3); } } <BUG>}); membershipTable.getColumnModel().getColumn(0).setCellRenderer(new DefaultTableCellRenderer() { @Override public Component getTableCellRendererComponent(JTable tab...
TableColumnModel mod = membershipTable.getColumnModel(); mod.getColumn(0).setCellRenderer(new DefaultTableCellRenderer() { @Override public Component getTableCellRendererComponent(JTable table, Object value,
37,785
protected char[] appendPathOnFileSystem(int pathLength, int[] position) { Object o = rawName(); String suffix = getEncodedSuffix(); int rawNameLength = o instanceof String ? ((String)o).length() : ((byte[])o).length; int nameLength = rawNameLength + suffix.length(); <BUG>boolean appendSlash = SystemInfo.isWindows && my...
boolean appendSlash = SystemInfo.isWindows && myParent == null && suffix.isEmpty() && rawNameLength == 2 &&
37,786
public VirtualFile createChildDirectory(final Object requestor, final String name) throws IOException { validateName(name); return ourPersistence.createChildDirectory(requestor, this, name); } private static void validateName(String name) throws IOException { <BUG>if (name == null || name.length() == 0) throw new IOExc...
if (name == null || name.isEmpty()) throw new IOException("File name cannot be empty");
37,787
@Override public String getCanonicalPath() { if (getFlagInt(HAS_SYMLINK_FLAG)) { if (isSymLink()) { return getUserData(SYMLINK_TARGET); <BUG>} else if (myParent != null) { return myParent.getCanonicalPath() + "/" + getName(); </BUG> }
public VirtualFile compute() throws IOException { ourPersistence.moveFile(requestor, VirtualFileSystemEntry.this, newParent); return VirtualFileSystemEntry.this;
37,788
if (connect(isProducer)) { break; } } catch (InvalidSelectorException e) { throw new ConnectionException( <BUG>"Connection to JMS failed. Invalid message selector"); } catch (JMSException | NamingException e) { logger.log(LogLevel.ERROR, "RECONNECTION_EXCEPTION", </BUG> new Object[] { e.toString() });
Messages.getString("CONNECTION_TO_JMS_FAILED_INVALID_MSG_SELECTOR")); //$NON-NLS-1$ logger.log(LogLevel.ERROR, "RECONNECTION_EXCEPTION", //$NON-NLS-1$
37,789
private synchronized void createConnectionNoRetry() throws ConnectionException { if (!isConnectValid()) { try { connect(isProducer); } catch (JMSException e) { <BUG>logger.log(LogLevel.ERROR, "Connection to JMS failed", new Object[] { e.toString() }); throw new ConnectionException( "Connection to JMS failed. Did not tr...
logger.log(LogLevel.ERROR, "CONNECTION_TO_JMS_FAILED", new Object[] { e.toString() }); //$NON-NLS-1$ Messages.getString("CONNECTION_TO_JMS_FAILED_NO_RECONNECT_AS_RECONNECT_POLICY_DOES_NOT_APPLY")); //$NON-NLS-1$
37,790
boolean res = false; int count = 0; do { try { if(count > 0) { <BUG>logger.log(LogLevel.INFO, "ATTEMPT_TO_RESEND_MESSAGE", new Object[] { count }); </BUG> Thread.sleep(messageRetryDelay); } synchronized (getSession()) {
logger.log(LogLevel.INFO, "ATTEMPT_TO_RESEND_MESSAGE", new Object[] { count }); //$NON-NLS-1$
37,791
getProducer().send(message); res = true; } } catch (JMSException e) { <BUG>logger.log(LogLevel.WARN, "ERROR_DURING_SEND", new Object[] { e.toString() }); logger.log(LogLevel.INFO, "ATTEMPT_TO_RECONNECT"); </BUG> setConnect(null);
logger.log(LogLevel.WARN, "ERROR_DURING_SEND", new Object[] { e.toString() }); //$NON-NLS-1$ logger.log(LogLevel.INFO, "ATTEMPT_TO_RECONNECT"); //$NON-NLS-1$
37,792
import org.w3c.dom.NodeList; import org.xml.sax.SAXException; import com.ibm.streams.operator.Attribute; import com.ibm.streams.operator.StreamSchema; import com.ibm.streams.operator.Type; <BUG>import com.ibm.streams.operator.Type.MetaType; class ConnectionDocumentParser {</BUG> private static final Set<String> support...
import com.ibm.streamsx.messaging.jms.Messages; class ConnectionDocumentParser {
37,793
return msgClass; } private void convertProviderURLPath(File applicationDir) throws ParseConnectionDocumentException { if(!isAMQ()) { if(this.providerURL == null || this.providerURL.trim().length() == 0) { <BUG>throw new ParseConnectionDocumentException("A value must be specified for provider_url attribute in connection...
throw new ParseConnectionDocumentException(Messages.getString("PROVIDER_URL_MUST_BE_SPECIFIED_IN_CONN_DOC")); //$NON-NLS-1$
37,794
URL absProviderURL = new URL(url.getProtocol(), url.getHost(), applicationDir.getAbsolutePath() + File.separator + path); this.providerURL = absProviderURL.toExternalForm(); } } } catch (MalformedURLException e) { <BUG>throw new ParseConnectionDocumentException("Invalid provider_url value detected: " + e.getMessage());...
throw new ParseConnectionDocumentException(Messages.getString("INVALID_PROVIDER_URL", e.getMessage())); //$NON-NLS-1$
37,795
for (int j = 0; j < accessSpecChildNodes.getLength(); j++) { if (accessSpecChildNodes.item(j).getNodeName().equals("destination")) { //$NON-NLS-1$ destIndex = j; } else if (accessSpecChildNodes.item(j).getNodeName().equals("uses_connection")) { //$NON-NLS-1$ if (!connection.equals(accessSpecChildNodes.item(j).getAttrib...
throw new ParseConnectionDocumentException(Messages.getString("VALUE_OF_CONNECTION_PARAM_NOT_THE_SAME_AS_CONN_USED_BY_ACCESS_ELEMENT", connection, access )); //$NON-NLS-1$
37,796
nativeSchema = access_specification.item(i).getChildNodes().item(nativeSchemaIndex); } break; } } <BUG>if (!accessFound) { throw new ParseConnectionDocumentException("The value of the access parameter " + access + " is not found in the connections document");</BUG> } return nativeSchema;
throw new ParseConnectionDocumentException(Messages.getString("VALUE_OF_ACCESS_PARAM_NOT_FOUND_IN_CONN_DOC", access )); //$NON-NLS-1$
37,797
nativeAttrLength = Integer.parseInt((attrList.item(i).getAttributes().getNamedItem("length") //$NON-NLS-1$ .getNodeValue())); } if ((msgClass == MessageClass.wbe || msgClass == MessageClass.wbe22) && ((streamSchema.getAttribute(nativeAttrName) != null) && (streamSchema <BUG>.getAttribute(nativeAttrName).getType().getMe...
throw new ParseConnectionDocumentException(Messages.getString("BLOB_NOT_SUPPORTED_FOR_MSG_CLASS", msgClass)); //$NON-NLS-1$
37,798
throw new ParseConnectionDocumentException(" Blob data type is not supported for message class " + msgClass);</BUG> } Iterator<NativeSchema> it = nativeSchemaObjects.iterator(); while (it.hasNext()) { <BUG>if (it.next().getName().equals(nativeAttrName)) { throw new ParseConnectionDocumentException("Parameter name: " + ...
nativeAttrLength = Integer.parseInt((attrList.item(i).getAttributes().getNamedItem("length") //$NON-NLS-1$ .getNodeValue())); if ((msgClass == MessageClass.wbe || msgClass == MessageClass.wbe22) && ((streamSchema.getAttribute(nativeAttrName) != null) && (streamSchema .getAttribute(nativeAttrName).getType().getMetaType(...
37,799
if (msgClass == MessageClass.text) { typesWithLength = new HashSet<String>(Arrays.asList("Bytes")); //$NON-NLS-1$ } Set<String> typesWithoutLength = new HashSet<String>(Arrays.asList("Byte", "Short", "Int", "Long", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ "Float", "Double", "Boolean")); //$NON-NLS-1$ //$...
throw new ParseConnectionDocumentException(Messages.getString("LENGTH_ATTRIB_SHOULD_NOT_BE_PRESENT_FOR_PARAM_IN_NATIVE_SCHEMA", nativeAttrName )); //$NON-NLS-1$
37,800
if ((nativeAttrLength != LENGTH_ABSENT_IN_NATIVE_SCHEMA) && (msgClass == MessageClass.wbe || msgClass == MessageClass.wbe22 || msgClass == MessageClass.xml) && (streamSchema.getAttribute(nativeAttrName) != null) && (streamSchema.getAttribute(nativeAttrName).getType().getMetaType() != Type.MetaType.RSTRING) && (streamSc...
throw new ParseConnectionDocumentException(Messages.getString("LENGTH_ATTRIB_SHOULD_NOT_BE_PRESENT_FOR_PARAM_IN_NATIVE_SCHEMA", nativeAttrName )); //$NON-NLS-1$