id int64 1 49k | buggy stringlengths 34 37.5k | fixed stringlengths 2 37k |
|---|---|---|
17,001 | 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 + " causes an outer reference");</BUG>
serialize(task);
}
@Test
| Task<String> task = Task.named("WithRef").ofType(String.class)
.process(() -> instanceField + " causes an outer reference");
|
17,002 | 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.evaluate(des).consume(val);
| Task<String> task = Task.named("WithLocalRef").ofType(String.class)
.process(() -> local + " won't cause an outer reference");
|
17,003 | }
@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);
|
17,004 | 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);
|
17,005 | 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);
|
17,006 | 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(() -> n);
| TaskBuilder<Long> fib = Task.named("Fib", n).ofType(Long.class);
|
17,007 | customTokens.put("%%mlFinalForestsPerHost%%", hubConfig.finalForestsPerHost.toString());
customTokens.put("%%mlTraceAppserverName%%", hubConfig.traceHttpName);
customTokens.put("%%mlTracePort%%", hubConfig.tracePort.toString());
customTokens.put("%%mlTraceDbName%%", hubConfig.traceDbName);
customTokens.put("%%mlTraceForestsPerHost%%", hubConfig.traceForestsPerHost.toString());
<BUG>customTokens.put("%%mlModulesDbName%%", hubConfig.modulesDbName);
}</BUG>
public void init() {
try {
LOGGER.error("PLUGINS DIR: " + pluginsDir.toString());
| customTokens.put("%%mlTriggersDbName%%", hubConfig.triggersDbName);
customTokens.put("%%mlSchemasDbName%%", hubConfig.schemasDbName);
}
|
17,008 | @Override
protected int getTimeoutSeconds() {
return 10;
}
@Override
<BUG>protected void emitMetrics(TimelineMetrics metrics) {
super.emitMetrics(metrics);
</BUG>
}
| public String getCollectorUri() {
return collectorHost;
|
17,009 | @Override
protected int getTimeoutSeconds() {
return 10;
}
@Override
<BUG>protected void emitMetrics(TimelineMetrics metrics) {
super.emitMetrics(metrics);
</BUG>
}
| public String getCollectorUri() {
return collectorHosts;
|
17,010 | .withSerializationInclusion(JsonSerialize.Inclusion.NON_NULL);
}
public AbstractTimelineMetricsSink() {
LOG = LogFactory.getLog(this.getClass());
}
<BUG>protected void emitMetricsJson(String connectUrl, String jsonData) {
</BUG>
int timeout = getTimeoutSeconds() * 1000;
HttpURLConnection connection = null;
try {
| protected boolean emitMetricsJson(String connectUrl, String jsonData) {
|
17,011 | if (LOG.isDebugEnabled()) {
LOG.debug("Metrics posted to Collector " + connectUrl);
}
}
cleanupInputStream(connection.getInputStream());
<BUG>failedCollectorConnectionsCounter.set(0);
} catch (IOException ioe) {</BUG>
StringBuilder errorMessage =
new StringBuilder("Unable to connect to collector, " + connectUrl + "\n"
+ "This exceptions will be ignored for next " + NUMBER_OF_SKIPPED_COLLECTOR_EXCEPTIONS + " times\n");
| return true;
} catch (IOException ioe) {
|
17,012 | jsonData = mapper.writeValueAsString(metrics);
} catch (IOException e) {
LOG.error("Unable to parse metrics", e);
}
if (jsonData != null) {
<BUG>emitMetricsJson(connectUrl, jsonData);
}
}</BUG>
protected String cleanupInputStream(InputStream is) throws IOException {
| return emitMetricsJson(connectUrl, jsonData);
return false;
|
17,013 | package org.apache.ambari.logsearch.solr.metrics;
import java.io.IOException;
import java.util.Collection;
import java.util.Map;
import java.util.Timer;
<BUG>import java.util.TimerTask;
import javax.management.MalformedObjectNameException;</BUG>
import org.apache.ambari.logsearch.solr.AmbariSolrCloudClient;
import org.apache.ambari.logsearch.solr.AmbariSolrCloudClientBuilder;
import org.apache.ambari.logsearch.util.PropertiesUtil;
| import java.util.TreeMap;
import javax.management.MalformedObjectNameException;
|
17,014 | Exception lastException = null;
for (int retries = 0; retries < 3; retries++) {
</BUG>
try {
double processCpuLoad = solrJmxAdapter.getProcessCpuLoad();
<BUG>addMetric("logsearch.solr.cpu.usage", "Float", processCpuLoad, metrics);
return;</BUG>
} catch (MalformedObjectNameException e) {
lastException = e;
try {
| for (int retries = 0; retries < RETRY; retries++) {
addMetric("logsearch.solr.cpu.usage", "Float", processCpuLoad);
return;
|
17,015 | .withZookeeperHosts(zkHosts)
.build();
Collection<String> solrHosts = ambariSolrCloudClient.getSolrHosts();
for (String solrHost : solrHosts) {
SolrMetricsLoader sml = new SolrMetricsLoader(solrHost, solrJmxPort, collectorHosts);
<BUG>Timer timer = new Timer("Solr Metrics Loader - " + solrHost, false);
</BUG>
timer.scheduleAtFixedRate(sml, 0, 10000);
}
} catch (Exception e) {
| Timer timer = new Timer("Solr Metrics Loader - " + solrHost, true);
|
17,016 | @Override
protected int getTimeoutSeconds() {
return 10;
}
@Override
<BUG>public void emitMetrics(TimelineMetrics metrics) {
super.emitMetrics(metrics);
</BUG>
}
| protected String getCollectorUri() {
return COLLECTOR_URL;
|
17,017 | }
@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("/bin/sh", "-c", "\"echo " + i + "\"")));
}
| return Task.named("exec", "/bin/sh").ofType(Exec.Result.class)
.in(() -> task1)
|
17,018 | 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, sum, fib));
}
| return Task.named("MyTask", parameter).ofType(String.class)
.in(() -> Adder.create(parameter.length(), PLUS))
|
17,019 | 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<String> task2 = Task.ofType(String.class).named("Baz", 40)
.in(() -> task1)</BUG>
.ins(() -> singletonList(task1))
| Task<Long> task1 = Task.named("Foo", "Bar", 39).ofType(Long.class)
Task<String> task2 = Task.named("Baz", 40).ofType(String.class)
.in(() -> task1)
|
17,020 | 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 + " causes an outer reference");</BUG>
serialize(task);
}
@Test
| Task<String> task = Task.named("WithRef").ofType(String.class)
.process(() -> instanceField + " causes an outer reference");
|
17,021 | 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.evaluate(des).consume(val);
| Task<String> task = Task.named("WithLocalRef").ofType(String.class)
.process(() -> local + " won't cause an outer reference");
|
17,022 | }
@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);
|
17,023 | 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);
|
17,024 | 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);
|
17,025 | 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(() -> n);
| TaskBuilder<Long> fib = Task.named("Fib", n).ofType(Long.class);
|
17,026 | import java.io.IOException;
import java.util.Collection;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
<BUG>import org.apache.commons.io.FileUtils;
import org.junit.Test;</BUG>
import org.neo4j.graphdb.Direction;
import org.neo4j.graphdb.DynamicRelationshipType;
import org.neo4j.graphdb.Node;
| import org.junit.Before;
import org.junit.Test;
|
17,027 | new HashSet<Node>() );
for ( Node node : refDb.db.getAllNodes() )
{
Node otherNode = otherDb.db.getNodeById( node.getId() );
<BUG>verifyNode( node, otherNode, refDb, otherDb );
otherNodes.remove( otherNode );
}
assertTrue( otherNodes.isEmpty() );
}
}
private static void verifyNode( Node node, Node otherNode,
</BUG>
VerifyDbContext refDb, VerifyDbContext otherDb )
| int[] counts = verifyNode( node, otherNode, refDb, otherDb );
vRelCount += counts[0];
vNodePropCount += counts[1];
vRelPropCount += counts[2];
vNodeIndexPropCount += counts[3];
vNodeCount++;
|
17,028 | if ( !value1.equals( value2 ) )
{
throw new RuntimeException( entity + " not equals property '" + key + "': " +
value1 + ", " + value2 );
}
<BUG>otherKeys.remove( key );
}</BUG>
if ( !otherKeys.isEmpty() )
{
throw new RuntimeException( "Other node " + otherEntity + " has more properties: " +
| count++;
|
17,029 | protected abstract <T> T executeJobOnMaster( Job<T> job ) throws Exception;
protected abstract void startUpMaster( Map<String, String> config ) throws Exception;
protected abstract Job<Void> getMasterShutdownDispatcher();
@Test
public void slaveCreateNode() throws Exception
<BUG>{
initializeDbs( 1 );</BUG>
executeJob( new CommonJobs.CreateSomeEntitiesJob(), 0 );
}
@Test
| setExpectedResults( 3, 2, 2, 2, 0 );
initializeDbs( 1 );
|
17,030 | executeJob( new CommonJobs.SetSubRefPropertyJob( "name", "Hello" ), 1 );
pullUpdates( 0, 2 );
}
@Test
public void testSlaveConstraintViolation() throws Exception
<BUG>{
initializeDbs( 1 );</BUG>
Long nodeId = executeJob( new CommonJobs.CreateSubRefNodeJob(
CommonJobs.REL_TYPE.name(), null, null ), 0 );
Boolean successful = executeJob( new CommonJobs.DeleteNodeJob( nodeId.longValue() ), 0 );
| setExpectedResults( 2, 1, 0, 1, 0 );
initializeDbs( 1 );
|
17,031 | Boolean successful = executeJob( new CommonJobs.DeleteNodeJob( nodeId.longValue() ), 0 );
assertFalse( successful.booleanValue() );
}
@Test
public void testMasterConstrainViolation() throws Exception
<BUG>{
initializeDbs( 1 );</BUG>
Long nodeId = executeJob( new CommonJobs.CreateSubRefNodeJob( CommonJobs.REL_TYPE.name(),
"name", "Mattias" ), 0 );
Boolean successful = executeJobOnMaster( new CommonJobs.DeleteNodeJob( nodeId.longValue() ) );
| setExpectedResults( 2, 1, 1, 1, 0 );
initializeDbs( 1 );
|
17,032 | assertEquals( (Integer) 2, executeJobOnMaster( new CommonJobs.GetRelationshipCountJob(
CommonJobs.REL_TYPE.name(), CommonJobs.KNOWS.name() ) ) );
}
@Test
public void testNoTransaction() throws Exception
<BUG>{
initializeDbs( 1 );</BUG>
executeJobOnMaster( new CommonJobs.CreateSubRefNodeJob(
CommonJobs.REL_TYPE.name(), null, null ) );
assertFalse( executeJob( new CommonJobs.CreateNodeOutsideOfTxJob(), 0 ).booleanValue() );
| setExpectedResults( 2, 1, 0, 1, 0 );
initializeDbs( 1 );
|
17,033 | assertFalse( executeJob( new CommonJobs.CreateNodeOutsideOfTxJob(), 0 ).booleanValue() );
assertFalse( executeJobOnMaster( new CommonJobs.CreateNodeOutsideOfTxJob() ).booleanValue() );
}
@Test
public void testNodeDeleted() throws Exception
<BUG>{
initializeDbs( 1 );</BUG>
Long nodeId = executeJobOnMaster( new CommonJobs.CreateNodeJob() );
pullUpdates();
assertTrue( executeJobOnMaster( new CommonJobs.DeleteNodeJob(
| setExpectedResults( 1, 0, 0, 0, 0 );
initializeDbs( 1 );
|
17,034 | assertTrue( case1 || case2 );
pullUpdates();
}
@Test
public void createNodeAndIndex() throws Exception
<BUG>{
initializeDbs( 1, INDEX_CONFIG );</BUG>
executeJob( new CommonJobs.CreateNodeAndIndexJob(), 0 );
}
protected abstract void shutdownDbs() throws Exception;
| setExpectedResults( 2, 0, 1, 0, 1 );
initializeDbs( 1, INDEX_CONFIG );
|
17,035 | private Object data;
DelegatingGroundOverlay(com.google.android.gms.maps.model.GroundOverlay real, DelegatingGoogleMap map) {
</BUG>
this.real = real;
<BUG>this.map = map;
}</BUG>
@Override
public float getBearing() {
return real.getBearing();
}
| DelegatingGroundOverlay(com.google.android.gms.maps.model.GroundOverlay real, GroundOverlayManager manager) {
this.manager = manager;
|
17,036 | private Object data;
DelegatingPolyline(com.google.android.gms.maps.model.Polyline real, DelegatingGoogleMap map) {
</BUG>
this.real = real;
<BUG>this.map = map;
}</BUG>
@Override
public int getColor() {
return real.getColor();
}
| DelegatingPolyline(com.google.android.gms.maps.model.Polyline real, PolylineManager manager) {
this.manager = manager;
|
17,037 | private InfoWindowAdapter infoWindowAdapter;
private OnCameraChangeListener onCameraChangeListener;
private OnMarkerDragListener onMarkerDragListener;
private Map<LazyMarker, DelegatingMarker> markers;
private Map<com.google.android.gms.maps.model.Marker, LazyMarker> createdMarkers;
<BUG>private Map<com.google.android.gms.maps.model.Polyline, Polyline> polylines;
private Map<com.google.android.gms.maps.model.Polygon, Polygon> polygons;
private Map<com.google.android.gms.maps.model.Circle, Circle> circles;
private Map<com.google.android.gms.maps.model.GroundOverlay, GroundOverlay> groundOverlays;
private Map<com.google.android.gms.maps.model.TileOverlay, TileOverlay> tileOverlays;
private Marker markerShowingInfoWindow;</BUG>
private ClusteringSettings clusteringSettings = new ClusteringSettings().enabled(false);
| private PolylineManager polylineManager;
private PolygonManager polygonManager;
private CircleManager circleManager;
private GroundOverlayManager groundOverlayManager;
private TileOverlayManager tileOverlayManager;
private Marker markerShowingInfoWindow;
|
17,038 | private MarkerAnimator markerAnimator = new MarkerAnimator();
public DelegatingGoogleMap(com.google.android.gms.maps.GoogleMap real) {
this.real = new GoogleMapWrapper(real);
this.markers = new HashMap<LazyMarker, DelegatingMarker>();
this.createdMarkers = new HashMap<com.google.android.gms.maps.model.Marker, LazyMarker>();
<BUG>this.polylines = new HashMap<com.google.android.gms.maps.model.Polyline, Polyline>();
this.polygons = new HashMap<com.google.android.gms.maps.model.Polygon, Polygon>();
this.circles = new HashMap<com.google.android.gms.maps.model.Circle, Circle>();
this.groundOverlays = new HashMap<com.google.android.gms.maps.model.GroundOverlay, GroundOverlay>();
this.tileOverlays = new HashMap<com.google.android.gms.maps.model.TileOverlay, TileOverlay>();
real.setInfoWindowAdapter(new DelegatingInfoWindowAdapter());</BUG>
real.setOnCameraChangeListener(new DelegatingOnCameraChangeListener());
| this.polylineManager = new PolylineManager(this.real);
this.polygonManager = new PolygonManager(this.real);
this.circleManager = new CircleManager(this.real);
this.groundOverlayManager = new GroundOverlayManager(this.real);
this.tileOverlayManager = new TileOverlayManager(this.real);
real.setInfoWindowAdapter(new DelegatingInfoWindowAdapter());
|
17,039 | clusteringStrategy.onAdd(marker);
marker.setVisible(visible);
return marker;
}
@Override
<BUG>public Polygon addPolygon(PolygonOptions polygonOptions) {
com.google.android.gms.maps.model.Polygon realPolygon = real.addPolygon(polygonOptions);
Polygon polygon = new DelegatingPolygon(realPolygon, this);
polygons.put(realPolygon, polygon);
return polygon;</BUG>
}
| [DELETED] |
17,040 | Polygon polygon = new DelegatingPolygon(realPolygon, this);
polygons.put(realPolygon, polygon);
return polygon;</BUG>
}
@Override
<BUG>public Polyline addPolyline(PolylineOptions polylineOptions) {
com.google.android.gms.maps.model.Polyline realPolyline = real.addPolyline(polylineOptions);
Polyline polyline = new DelegatingPolyline(realPolyline, this);
polylines.put(realPolyline, polyline);
return polyline;</BUG>
}
| clusteringStrategy.onAdd(marker);
marker.setVisible(visible);
return marker;
public Polygon addPolygon(PolygonOptions polygonOptions) {
return polygonManager.addPolygon(polygonOptions);
|
17,041 | Polyline polyline = new DelegatingPolyline(realPolyline, this);
polylines.put(realPolyline, polyline);
return polyline;</BUG>
}
@Override
<BUG>public TileOverlay addTileOverlay(TileOverlayOptions tileOverlayOptions) {
com.google.android.gms.maps.model.TileOverlay realTileOverlay = real.addTileOverlay(tileOverlayOptions);
TileOverlay tileOverlay = new DelegatingTileOverlay(realTileOverlay, this);
tileOverlays.put(realTileOverlay, tileOverlay);
return tileOverlay;</BUG>
}
| clusteringStrategy.onAdd(marker);
marker.setVisible(visible);
return marker;
public Polygon addPolygon(PolygonOptions polygonOptions) {
return polygonManager.addPolygon(polygonOptions);
|
17,042 | private Object data;
DelegatingTileOverlay(com.google.android.gms.maps.model.TileOverlay real, DelegatingGoogleMap map) {
</BUG>
this.real = real;
<BUG>this.map = map;
}</BUG>
@Override
public void clearTileCache() {
real.clearTileCache();
}
| DelegatingTileOverlay(com.google.android.gms.maps.model.TileOverlay real, TileOverlayManager manager) {
this.manager = manager;
|
17,043 | private Object data;
DelegatingPolygon(com.google.android.gms.maps.model.Polygon real, DelegatingGoogleMap map) {
</BUG>
this.real = real;
<BUG>this.map = map;
}</BUG>
@Override
public Object getData() {
return data;
}
| DelegatingPolygon(com.google.android.gms.maps.model.Polygon real, PolygonManager manager) {
this.manager = manager;
|
17,044 | private Object data;
DelegatingCircle(com.google.android.gms.maps.model.Circle real, DelegatingGoogleMap map) {
</BUG>
this.real = real;
<BUG>this.map = map;
}</BUG>
@Override
public boolean contains(LatLng position) {
LatLng center = getCenter();
double radius = getRadius();
| DelegatingCircle(com.google.android.gms.maps.model.Circle real, CircleManager manager) {
this.manager = manager;
}
|
17,045 | this.queryLogger = Loggers.getLogger(logger, ".query");
this.fetchLogger = Loggers.getLogger(logger, ".fetch");
queryLogger.setLevel(level);
fetchLogger.setLevel(level);
indexSettingsService.addListener(new ApplySettings());
<BUG>}
private long parseTimeSetting(String name, long defaultNanos) {
try {
return componentSettings.getAsTime(name, TimeValue.timeValueNanos(defaultNanos)).nanos();
} catch (ElasticSearchParseException e) {
logger.error("Could not parse setting for [{}], disabling", name);
return -1;
}</BUG>
}
| [DELETED] |
17,046 | import org.jitsi.impl.neomedia.device.*;
import org.jitsi.service.resources.*;
import org.osgi.framework.*;
public class AudioDeviceConfigurationListener
extends AbstractDeviceConfigurationListener
<BUG>{
public AudioDeviceConfigurationListener(</BUG>
ConfigurationForm configurationForm)
{
super(configurationForm);
| private CaptureDeviceInfo captureDevice = null;
private CaptureDeviceInfo playbackDevice = null;
private CaptureDeviceInfo notificationDevice = null;
public AudioDeviceConfigurationListener(
|
17,047 | ResourceManagementService resources
= NeomediaActivator.getResources();
notificationService.fireNotification(
popUpEvent,
title,
<BUG>device.getName()
+ "\r\n"
</BUG>
+ resources.getI18NString(
"impl.media.configform"
| body
+ "\r\n\r\n"
|
17,048 | archetypeDescriptor.setFileSets( filesets );
createArchetypeFiles( reverseProperties, filesets, packageName, basedir, archetypeFilesDirectory,
defaultEncoding, excludePatterns );
getLogger().debug( "Created files for " + archetypeDescriptor.getName() );
setParentArtifactId( reverseProperties, configurationProperties.getProperty( Constants.ARTIFACT_ID ) );
<BUG>for ( Iterator<String> modules = pom.getModules().iterator(); modules.hasNext(); )
{
String moduleId = (String) modules.next();</BUG>
String rootArtifactId = configurationProperties.getProperty( Constants.ARTIFACT_ID );
String moduleIdDirectory = moduleId;
| for ( String moduleId : pom.getModules() )
|
17,049 | archetypeIntegrationTestOutputFolder );
}
InvocationRequest internalRequest = new DefaultInvocationRequest();
internalRequest.setPomFile( archetypePomFile );
internalRequest.setGoals( Collections.singletonList( request.getPostPhase() ) );
<BUG>Invoker invoker = new DefaultInvoker();
InvocationResult invokerResult = invoker.execute( internalRequest );</BUG>
if ( invokerResult.getExitCode() != 0 )
{
if ( invokerResult.getExecutionException() != null )
| if ( request.getLocalRepository() != null )
internalRequest.setLocalRepositoryDirectory( new File( request.getLocalRepository().getBasedir() ) );
InvocationResult invokerResult = invoker.execute( internalRequest );
|
17,050 | Model pom = pomManager.readPom( FileUtils.resolveFile( basedir, Constants.ARCHETYPE_POM ) );
String parentArtifactId = pomReversedProperties.getProperty( Constants.PARENT_ARTIFACT_ID );
String artifactId = pom.getArtifactId();
setParentArtifactId( pomReversedProperties, pomReversedProperties.getProperty( Constants.ARTIFACT_ID ) );
setArtifactId( pomReversedProperties, pom.getArtifactId() );
<BUG>for ( Iterator<String> modules = pom.getModules().iterator(); modules.hasNext(); )
{
String subModuleId = modules.next();</BUG>
String subModuleIdDirectory = subModuleId;
if ( subModuleId.indexOf( rootArtifactId ) >= 0 )
| for ( String subModuleId : pom.getModules() )
|
17,051 | private void createPoms( Model pom, String rootArtifactId, String artifactId, File archetypeFilesDirectory,
File basedir, Properties pomReversedProperties, boolean preserveCData, boolean keepParent )
throws IOException, FileNotFoundException, XmlPullParserException
{
setArtifactId( pomReversedProperties, pom.getArtifactId() );
<BUG>for ( Iterator<String> modules = pom.getModules().iterator(); modules.hasNext(); )
{
String moduleId = modules.next();</BUG>
String moduleIdDirectory = moduleId;
if ( moduleId.indexOf( rootArtifactId ) >= 0 )
| for ( String moduleId : pom.getModules() )
|
17,052 | }
private void rewriteReferences( Model pom, String rootArtifactId, String groupId )
{
if ( pom.getDependencies() != null && !pom.getDependencies().isEmpty() )
{
<BUG>for ( Iterator<Dependency> dependencies = pom.getDependencies().iterator(); dependencies.hasNext(); )
{
rewriteDependencyReferences( dependencies.next(), rootArtifactId, groupId );
</BUG>
}
| createModulePom( pom, rootArtifactId, archetypeFilesDirectory, pomReversedProperties,
FileUtils.resolveFile( basedir, Constants.ARCHETYPE_POM ), preserveCData, keepParent );
restoreParentArtifactId( pomReversedProperties, parentArtifactId );
restoreArtifactId( pomReversedProperties, artifactId );
|
17,053 | createArchetypeFiles( reverseProperties, filesets, packageName, basedir, archetypeFilesDirectory,
defaultEncoding, excludePatterns );
getLogger().debug( "Created files for module " + archetypeDescriptor.getName() );
String parentArtifactId = reverseProperties.getProperty( Constants.PARENT_ARTIFACT_ID );
setParentArtifactId( reverseProperties, pom.getArtifactId() );
<BUG>for ( Iterator<String> modules = pom.getModules().iterator(); modules.hasNext(); )
{
String subModuleId = modules.next();</BUG>
String subModuleIdDirectory = subModuleId;
if ( subModuleId.indexOf( rootArtifactId ) >= 0 )
| for ( String subModuleId : pom.getModules() )
|
17,054 | import com.rackspace.papi.commons.util.servlet.filter.ApplicationContextAwareFilter;
import com.rackspace.papi.commons.util.servlet.http.HttpServletHelper;
import com.rackspace.papi.commons.util.servlet.http.MutableHttpServletRequest;
import com.rackspace.papi.commons.util.servlet.http.MutableHttpServletResponse;
import com.rackspace.papi.domain.ServicePorts;
<BUG>import com.rackspace.papi.model.Destination;
import com.rackspace.papi.model.Node;
import com.rackspace.papi.model.ReposeCluster;
import com.rackspace.papi.model.SystemModel;</BUG>
import com.rackspace.papi.service.context.ContextAdapter;
| import com.rackspace.papi.model.*;
|
17,055 | import com.rackspace.papi.service.context.ServletContextHelper;
import com.rackspace.papi.service.deploy.ApplicationDeploymentEvent;
import com.rackspace.papi.service.event.PowerFilterEvent;
import com.rackspace.papi.service.event.common.Event;
import com.rackspace.papi.service.event.common.EventListener;
<BUG>import com.rackspace.papi.service.headers.response.ResponseHeaderService;
import com.rackspace.papi.service.reporting.ReportingService;</BUG>
import com.rackspace.papi.service.reporting.metrics.MeterByCategory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
| import com.rackspace.papi.service.healthcheck.*;
import com.rackspace.papi.service.reporting.ReportingService;
|
17,056 | papiContext = ServletContextHelper.getInstance(filterConfig.getServletContext()).getPowerApiContext();
papiContext.eventService().listen(applicationDeploymentListener, ApplicationDeploymentEvent.APPLICATION_COLLECTION_MODIFIED);
URL xsdURL = getClass().getResource("/META-INF/schema/system-model/system-model.xsd");
papiContext.configurationService().subscribeTo("", "system-model.cfg.xml", xsdURL, systemModelConfigurationListener, SystemModel.class);
filterConfig.getServletContext().setAttribute("powerFilter", this);
<BUG>reportingService = papiContext.reportingService();
responseHeaderService = papiContext.responseHeaderService();
if (papiContext.metricsService() != null) {</BUG>
mbcResponseCodes = papiContext.metricsService().newMeterByCategory(ResponseCode.class, "Repose", "Response Code", TimeUnit.SECONDS);
}
| healthCheckService = papiContext.healthCheckService();
try{
healthCheckUID = healthCheckService.register(this.getClass());
} catch (InputNullException ine) {
LOG.error("Could not register with health check service -- this should never happen");
|
17,057 | return SPropertyOperations.getBoolean(it, "static");
}
})) {
if (SPropertyOperations.getBoolean(imp, "onDemand")) {
String className = Tokens_Behavior.call_stringRep_6148840541591415725(imp);
<BUG>SNode containingClas = resolveFqName(className, moduleScope.getModels(), null);
if ((containingClas == null)) {</BUG>
continue;
}
Iterable<SNode> neededMembers = ListSequence.fromList(BehaviorReflection.invokeVirtual((Class<List<SNode>>) ((Class) Object.class), containingClas, "virtual_getMembers_1213877531970", new Object[]{})).where(new IWhereFilter<SNode>() {
| Iterable<SNode> classes = resolveClassifierByFqNameWithNonStubPriority(moduleScope.getModels(), className);
SNode containingClas = ((int) Sequence.fromIterable(classes).count() == 1 ?
Sequence.fromIterable(classes).first() :
null
if ((containingClas == null)) {
|
17,058 | });
ListSequence.fromList(result).addSequence(Sequence.fromIterable(neededMembers));
} else {
final String memberName = SPropertyOperations.getString(ListSequence.fromList(SLinkOperations.getTargets(imp, "token", true)).last(), "value");
String className = Tokens_Behavior.call_stringRep_6148840541591441572(imp, 1);
<BUG>SNode containingClas = resolveFqName(className, moduleScope.getModels(), null);
if ((containingClas == null)) {</BUG>
continue;
}
SNode neededMember = ListSequence.fromList(BehaviorReflection.invokeVirtual((Class<List<SNode>>) ((Class) Object.class), containingClas, "virtual_getMembers_1213877531970", new Object[]{})).where(new IWhereFilter<SNode>() {
| Iterable<SNode> classes = resolveClassifierByFqNameWithNonStubPriority(moduleScope.getModels(), className);
SNode containingClas = ((int) Sequence.fromIterable(classes).count() == 1 ?
Sequence.fromIterable(classes).first() :
null
if ((containingClas == null)) {
|
17,059 | package com.mycollab.module.mail.service.impl;
import com.mycollab.common.domain.MailRecipientField;
import com.mycollab.configuration.EmailConfiguration;
<BUG>import com.mycollab.configuration.SiteConfiguration;
import com.mycollab.module.mail.DefaultMailer;</BUG>
import com.mycollab.module.mail.EmailAttachmentSource;
import com.mycollab.module.mail.IMailer;
import com.mycollab.module.mail.NullMailer;
| import com.mycollab.core.utils.StringUtils;
import com.mycollab.module.mail.DefaultMailer;
|
17,060 | @Service
public class ExtMailServiceImpl implements ExtMailService {
@Override
public boolean isMailSetupValid() {
EmailConfiguration emailConfiguration = SiteConfiguration.getEmailConfiguration();
<BUG>return !(emailConfiguration.getHost().equals(""));
}</BUG>
private IMailer getMailer() {
EmailConfiguration emailConfiguration = SiteConfiguration.getEmailConfiguration();
if (!isMailSetupValid()) {
| return StringUtils.isNotBlank(emailConfiguration.getHost()) && StringUtils.isNotBlank(emailConfiguration.getUser())
&& (emailConfiguration.getPort() > -1);
}
|
17,061 | import com.mycollab.common.service.CommentService;
import com.mycollab.module.file.AttachmentUtils;
import com.mycollab.module.user.domain.SimpleUser;
import com.mycollab.module.user.ui.components.UserBlock;
import com.mycollab.spring.AppContextUtil;
<BUG>import com.mycollab.vaadin.AppContext;
import com.mycollab.vaadin.web.ui.AttachmentPanel;
import com.mycollab.vaadin.ui.ReloadableComponent;</BUG>
import com.mycollab.vaadin.web.ui.UIConstants;
import com.vaadin.server.FontAwesome;
| import com.mycollab.vaadin.ui.ReloadableComponent;
|
17,062 | CrmCommentInput(final ReloadableComponent component, final String typeVal) {
super();
this.withMargin(new MarginInfo(true, true, false, true)).withFullWidth().withStyleName("message");
SimpleUser currentUser = AppContext.getUser();
UserBlock userBlock = new UserBlock(currentUser.getUsername(), currentUser.getAvatarid(), currentUser.getDisplayName());
<BUG>MVerticalLayout textAreaWrap = new MVerticalLayout().withFullWidth()
.withStyleName("message-container");</BUG>
this.with(userBlock, textAreaWrap).expand(textAreaWrap);
type = typeVal;
| MVerticalLayout textAreaWrap = new MVerticalLayout().withFullWidth().withStyleName("message-container");
|
17,063 | if (!"".equals(attachmentPath)) {
attachments.saveContentsToRepo(attachmentPath);
}
commentArea.setValue("");
attachments.removeAllAttachmentsDisplay();
<BUG>component.reload();
}
});
newCommentBtn.setStyleName(UIConstants.BUTTON_ACTION);
newCommentBtn.setIcon(FontAwesome.SEND);</BUG>
controlsLayout.with(cancelBtn, newCommentBtn);
| }).withIcon(FontAwesome.SEND).withStyleName(UIConstants.BUTTON_ACTION);
|
17,064 | <BUG>package com.mycollab.module.crm.view;
import com.mycollab.common.ActivityStreamConstants;</BUG>
import com.mycollab.common.ModuleNameConstants;
import com.mycollab.common.domain.SimpleActivityStream;
import com.mycollab.common.domain.criteria.ActivityStreamSearchCriteria;
| import com.hp.gagawa.java.elements.A;
import com.hp.gagawa.java.elements.Img;
import com.hp.gagawa.java.elements.Text;
import com.mycollab.common.ActivityStreamConstants;
|
17,065 | searchCriteria.setModuleSet(new SetSearchField<>(ModuleNameConstants.CRM));
searchCriteria.setSaccountid(new NumberSearchField(AppContext.getAccountId()));
searchCriteria.addOrderField(new SearchCriteria.OrderField("createdTime", SearchCriteria.DESC));
this.activityStreamList.setSearchCriteria(searchCriteria);
}
<BUG>static class CrmActivityStreamPagedList extends VerticalLayout {
</BUG>
private static final long serialVersionUID = 1L;
private final CssLayout listContainer = new CssLayout();
private CssLayout controlBarWrapper = new CssLayout();
| private static class CrmActivityStreamPagedList extends VerticalLayout {
|
17,066 | private CssLayout currentFeedBlock;
private ActivityStreamService activityStreamService;
private ActivityStreamSearchCriteria searchCriteria;
private int firstIndex = 0;
private Date currentDate;
<BUG>public CrmActivityStreamPagedList() {
listContainer.setWidth("100%");</BUG>
this.addComponent(listContainer);
activityStreamService = AppContextUtil.getSpringBean(ActivityStreamService.class);
}
| listContainer.setWidth("100%");
|
17,067 | }
});</BUG>
serviceMenu.addService(CrmTypeConstants.ACCOUNT, AppContext.getMessage(AccountI18nEnum.LIST),
<BUG>new Button.ClickListener() {
@Override
public void buttonClick(Button.ClickEvent clickEvent) {
EventBusFactory.getInstance().post(new AccountEvent.GotoList(this, null));
}
});</BUG>
serviceMenu.addService(CrmTypeConstants.CONTACT, AppContext.getMessage(ContactI18nEnum.LIST),
| public void addView(PageView view) {
this.removeAllComponents();
this.with(view).expand(view);
public MHorizontalLayout buildMenu() {
if (serviceMenuContainer == null) {
serviceMenuContainer = new MHorizontalLayout();
serviceMenu = new ServiceMenu();
serviceMenu.addService(CrmTypeConstants.DASHBOARD, AppContext.getMessage(CrmCommonI18nEnum.TOOLBAR_DASHBOARD_HEADER),
clickEvent -> EventBusFactory.getInstance().post(new CrmEvent.GotoHome(this, null)));
clickEvent -> EventBusFactory.getInstance().post(new AccountEvent.GotoList(this, null)));
|
17,068 | 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;
|
17,069 | 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;
|
17,070 | 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"),
|
17,071 | 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] |
17,072 | 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) {
|
17,073 | 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;
|
17,074 | if(worldIn.getTileEntity(pos) != null){
TileEntity te = worldIn.getTileEntity(pos);
if(te.hasCapability(Capabilities.HEAT_HANDLER_CAPABILITY, null) && te.getCapability(Capabilities.HEAT_HANDLER_CAPABILITY, null).getTemp() >= -273D + mult){
te.getCapability(Capabilities.HEAT_HANDLER_CAPABILITY, null).addHeat(-mult);
}
<BUG>for(EnumFacing dir : EnumFacing.values()){
if(te.hasCapability(Capabilities.ROTARY_HANDLER_CAPABILITY, dir)){
te.getCapability(Capabilities.ROTARY_HANDLER_CAPABILITY, dir).addEnergy(-mult, false, false);
break;</BUG>
}
| if(te.hasCapability(Capabilities.HEAT_HANDLER_CAPABILITY, null)){
te.getCapability(Capabilities.HEAT_HANDLER_CAPABILITY, null).addHeat(mult);
|
17,075 | public static double betterRound(double numIn, int decPlac){
double opOn = Math.round(numIn * Math.pow(10, decPlac)) / Math.pow(10D, decPlac);
return opOn;
}
public static double centerCeil(double numIn, int tiers){
<BUG>return ((numIn > 0) ? Math.ceil(numIn * tiers) : Math.floor(numIn * tiers)) / tiers;
</BUG>
}
public static double findEfficiency(double speedIn, double lowerLimit, double upperLimit){
speedIn = Math.abs(speedIn);
| return ((numIn > 0) ? Math.ceil(numIn * (double) tiers) : Math.floor(numIn * (double) tiers)) / (double) tiers;
|
17,076 | package com.Da_Technomancer.crossroads.API;
import com.Da_Technomancer.crossroads.API.DefaultStorageHelper.DefaultStorage;
import com.Da_Technomancer.crossroads.API.heat.DefaultHeatHandler;
import com.Da_Technomancer.crossroads.API.heat.IHeatHandler;
import com.Da_Technomancer.crossroads.API.magic.DefaultMagicHandler;
<BUG>import com.Da_Technomancer.crossroads.API.magic.IMagicHandler;
import com.Da_Technomancer.crossroads.API.rotary.DefaultRotaryHandler;
import com.Da_Technomancer.crossroads.API.rotary.IRotaryHandler;
</BUG>
import net.minecraftforge.common.capabilities.Capability;
| import com.Da_Technomancer.crossroads.API.rotary.DefaultAxleHandler;
import com.Da_Technomancer.crossroads.API.rotary.DefaultCogHandler;
import com.Da_Technomancer.crossroads.API.rotary.IAxleHandler;
import com.Da_Technomancer.crossroads.API.rotary.ICogHandler;
|
17,077 | import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.capabilities.CapabilityInject;
import net.minecraftforge.common.capabilities.CapabilityManager;
public class Capabilities{
@CapabilityInject(IHeatHandler.class)
<BUG>public static Capability<IHeatHandler> HEAT_HANDLER_CAPABILITY = null;
@CapabilityInject(IRotaryHandler.class)
public static Capability<IRotaryHandler> ROTARY_HANDLER_CAPABILITY = null;
</BUG>
@CapabilityInject(IMagicHandler.class)
| @CapabilityInject(IAxleHandler.class)
public static Capability<IAxleHandler> AXLE_HANDLER_CAPABILITY = null;
@CapabilityInject(ICogHandler.class)
public static Capability<ICogHandler> COG_HANDLER_CAPABILITY = null;
|
17,078 | public IEffect getMixEffect(Color col){
if(col == null){
return effect;
}
int top = Math.max(col.getBlue(), Math.max(col.getRed(), col.getGreen()));
<BUG>if(top < rand.nextInt(128) + 128){
return voidEffect;</BUG>
}
return effect;
}
| if(top != 255){
return voidEffect;
|
17,079 | private void markNewStubs() {
for (BaseStubModelDescriptor m : getAllStubModels()) {
if (m.isInitialized()) {
m.unmarkReload();
}
<BUG>}
}
private void refreshModelManagers() {
for (BaseStubModelDescriptor md : getAllStubModels()) {
md.setModelRootManager(null);</BUG>
}
| [DELETED] |
17,080 | for (AbstractModule m : getAllModules()) {
List<StubPath> stubModels = m.areJavaStubsEnabled() ? m.getAllStubPaths() : m.getStubPaths();
for (StubPath sp : stubModels) {
BaseStubModelRootManager manager = createStubManager(m, sp);
sp.setModelRootManager(manager);
<BUG>if (manager == null) continue;
manager.updateModels(sp.getPath(), "", m);
myAllStubPaths.add(m, sp);</BUG>
}
}
| for (SModelDescriptor sm : SModelRepository.getInstance().getModelDescriptors(m)) {
if (!(sm instanceof BaseStubModelDescriptor)) continue;
if (!StubReloadManager.getInstance().needsFullReload(((BaseStubModelDescriptor) sm))) continue;
if (SModelRepository.getInstance().getOwners(sm).size() == 1) {
SModelRepository.getInstance().removeModelDescriptor(sm);
} else {
SModelRepository.getInstance().unRegisterModelDescriptor(sm, m);
|
17,081 | package org.eclipse.jetty.annotations;
import java.net.URI;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
<BUG>import java.util.ServiceLoader;
import javax.servlet.ServletContainerInitializer;
import javax.servlet.ServletContext;
import javax.servlet.annotation.HandlesTypes;</BUG>
import org.eclipse.jetty.annotations.AnnotationParser.DiscoverableAnnotationHandler;
| import java.util.Set;
import javax.servlet.ServletException;
import javax.servlet.annotation.HandlesTypes;
|
17,082 | import org.eclipse.jetty.webapp.WebAppContext;
import org.eclipse.jetty.webapp.WebDescriptor;
public class AnnotationConfiguration extends AbstractConfiguration
{
private static final Logger LOG = Log.getLogger(AnnotationConfiguration.class);
<BUG>public static final String CLASS_INHERITANCE_MAP = "org.eclipse.jetty.classInheritanceMap";
public void preConfigure(final WebAppContext context) throws Exception</BUG>
{
}
@Override
| public static final String CONTAINER_INITIALIZERS = "org.eclipse.jetty.containerInitializers";
public void preConfigure(final WebAppContext context) throws Exception
|
17,083 |
if (context.getServletContext().getEffectiveMajorVersion() >= 3 || context.isConfigurationDiscovered())
{</BUG>
if (LOG.isDebugEnabled()) LOG.debug("Scanning all classses for annotations: webxmlVersion="+context.getServletContext().getEffectiveMajorVersion()+" configurationDiscovered="+context.isConfigurationDiscovered());
parseContainerPath(context, parser);
parseWebInfClasses(context, parser);
parseWebInfLib (context, parser);
}
<BUG>context.setAttribute(CLASS_INHERITANCE_MAP, classHandler.getMap());
}</BUG>
}
| return;
for (DiscoverableAnnotationHandler h:handlers)
{
if (h instanceof AbstractDiscoverableAnnotationHandler)
((AbstractDiscoverableAnnotationHandler)h).resetList();
|
17,084 | parser.registerAnnotationHandler(c.getName(), new ContainerInitializerAnnotationHandler(initializer, c));
}
}
}
else
if (LOG.isDebugEnabled()) LOG.debug("No classes in HandlesTypes on initializer "+service.getClass());
}
else
if (LOG.isDebugEnabled()) LOG.debug("No annotation on initializer "+service.getClass());
<BUG>}
}
}</BUG>
}
| return;
for (DiscoverableAnnotationHandler h:handlers)
{
if (h instanceof AbstractDiscoverableAnnotationHandler)
((AbstractDiscoverableAnnotationHandler)h).resetList();
|
17,085 | import java.sql.SQLException;
import java.sql.Statement;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Collection;
<BUG>import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;</BUG>
import java.util.concurrent.locks.Lock;
| import java.util.HashMap;
import java.util.Map;
import java.util.Set;
|
17,086 | if (msgin != null) {
try {
msgin.close();
} catch (IOException e) {
}
<BUG>}
}
}
protected void updateSourceSequence(SourceSequence seq)
</BUG>
throws SQLException {
| releaseResources(stmt, null);
protected void storeMessage(Identifier sid, RMMessage msg, boolean outbound)
throws IOException, SQLException {
storeMessage(connection, sid, msg, outbound);
protected void updateSourceSequence(Connection con, SourceSequence seq)
|
17,087 | } catch (SQLException ex) {
if (!isTableExistsError(ex)) {
throw ex;
} else {
LOG.fine("Table CXF_RM_SRC_SEQUENCES already exists.");
<BUG>verifyTable(SRC_SEQUENCES_TABLE_NAME, SRC_SEQUENCES_TABLE_COLS);
</BUG>
}
} finally {
stmt.close();
| verifyTable(con, SRC_SEQUENCES_TABLE_NAME, SRC_SEQUENCES_TABLE_COLS);
|
17,088 | } catch (SQLException ex) {
if (!isTableExistsError(ex)) {
throw ex;
} else {
LOG.fine("Table CXF_RM_DEST_SEQUENCES already exists.");
<BUG>verifyTable(DEST_SEQUENCES_TABLE_NAME, DEST_SEQUENCES_TABLE_COLS);
</BUG>
}
} finally {
stmt.close();
| LOG.fine("Table CXF_RM_SRC_SEQUENCES already exists.");
verifyTable(con, SRC_SEQUENCES_TABLE_NAME, SRC_SEQUENCES_TABLE_COLS);
|
17,089 | }
} finally {
stmt.close();
}
for (String tableName : new String[] {OUTBOUND_MSGS_TABLE_NAME, INBOUND_MSGS_TABLE_NAME}) {
<BUG>stmt = connection.createStatement();
try {</BUG>
stmt.executeUpdate(MessageFormat.format(CREATE_MESSAGES_TABLE_STMT, tableName));
} catch (SQLException ex) {
if (!isTableExistsError(ex)) {
| stmt = con.createStatement();
try {
stmt.executeUpdate(CREATE_DEST_SEQUENCES_TABLE_STMT);
|
17,090 | throw ex;
} else {
if (LOG.isLoggable(Level.FINE)) {
LOG.fine("Table " + tableName + " already exists.");
}
<BUG>verifyTable(tableName, MESSAGES_TABLE_COLS);
</BUG>
}
} finally {
stmt.close();
| LOG.fine("Table CXF_RM_SRC_SEQUENCES already exists.");
verifyTable(con, SRC_SEQUENCES_TABLE_NAME, SRC_SEQUENCES_TABLE_COLS);
|
17,091 | if (newCols.size() > 0) {
if (LOG.isLoggable(Level.FINE)) {
LOG.log(Level.FINE, "Table " + tableName + " needs additional columns");
}
for (String[] newCol : newCols) {
<BUG>Statement st = connection.createStatement();
try {</BUG>
st.executeUpdate(MessageFormat.format(ALTER_TABLE_STMT_STR,
tableName, newCol[0], newCol[1]));
if (LOG.isLoggable(Level.FINE)) {
| Statement st = con.createStatement();
try {
|
17,092 | if (nextReconnectAttempt < System.currentTimeMillis()) {
nextReconnectAttempt = System.currentTimeMillis() + reconnectDelay;
reconnectDelay = reconnectDelay * useExponentialBackOff;
}
}
<BUG>}
public static void deleteDatabaseFiles() {</BUG>
deleteDatabaseFiles(DEFAULT_DATABASE_NAME, true);
}
public static void deleteDatabaseFiles(String dbName, boolean now) {
| public static void deleteDatabaseFiles() {
|
17,093 | Set<String> unchanged = rego.setServletSecurity(securityElement);
ServletRegistration.Dynamic rego2 = sce.getServletContext().addServlet("RegoTest2", RegTest.class.getName());
rego2.addMapping("/rego2/*");
securityElement = new ServletSecurityElement(constraintElement, null);
unchanged = rego2.setServletSecurity(securityElement);
<BUG>FilterRegistration.Dynamic registration = sce.getServletContext().addFilter("TestFilter",TestFilter.class.getName());
registration.setInitParameter("remote", "false");</BUG>
registration.setAsyncSupported(true);
registration.addMappingForUrlPatterns(
EnumSet.of(DispatcherType.ERROR,DispatcherType.ASYNC,DispatcherType.FORWARD,DispatcherType.INCLUDE,DispatcherType.REQUEST),
| if (registration != null) //otherwise it was configured in web.xml
{
registration.setInitParameter("remote", "false");
|
17,094 | arguments.appendString(state, sb);
sb.append("]");
}
@Override
public Value modifyTerm(State state, Term term) throws SetlException {
<BUG>Value value = term.firstMember();
if (value.getClass() == Term.class) {
Term firstMember = (Term) value;
if (firstMember.getFunctionalCharacter().equalsIgnoreCase(Variable.getFunctionalCharacter())) {
term.setMember(state, 1, firstMember.firstMember());
}
}</BUG>
final SetlList args = new SetlList(arguments.size());
| [DELETED] |
17,095 | import org.randoom.setlx.utilities.State;
import org.randoom.setlx.utilities.WriteFile;
import java.util.ArrayList;
import java.util.List;
public class SetlX {
<BUG>private final static String VERSION = "2.4.0+";
</BUG>
private final static String SETLX_URL = "http://setlX.randoom.org/";
private final static String C_YEARS = "2011-2015";
private final static String VERSION_PREFIX = "v";
| private final static String VERSION = "2.5.0";
|
17,096 | final Value idStr = body.firstMember(state);
if (idStr.isString() == SetlBoolean.FALSE) { // this is a wrong ^variable term
return new MatchResult(false);
}
final String id = idStr.getUnquotedString(state);
<BUG>final Value thisVal = state.findValue(id);
if (thisVal != Om.OM) {
return thisVal.matchesTerm(state, other);
} else {</BUG>
result.addBinding(id, other);
| [DELETED] |
17,097 | private void addBuffer() {
try {
if (!isClosed && bufferQueue.size() <= BUFFER_QUEUE_SIZE)
bufferQueue.put(new byte[size]);
} catch (InterruptedException e) {
<BUG>LOGGER.log(LogLevel.INFO, "Unable to add buffer to buffer queue", e);
}</BUG>
}
}
public AsyncBufferWriter(OutputStream outputStream, int size, ThreadFactory threadFactory, byte[] newline) {
| LOGGER.log(LogLevel.INFO, Messages.getString("HDFS_ASYNC_UNABLE_ADD_TO_QUEUE"), e);
|
17,098 | isClosed = true;
exService.shutdown();
try {
exService.awaitTermination(Integer.MAX_VALUE, TimeUnit.SECONDS);
} catch (InterruptedException e) {
<BUG>LOGGER.log(LogLevel.WARN, "Execution Service shutdown is interrupted.", e);
}finally {</BUG>
flushNow();
out.close();
bufferQueue.clear();
| LOGGER.log(LogLevel.WARN, Messages.getString("HDFS_ASYNC_SERVICE_SHUTDOWN_INTERRUPTED"), e);
}finally {
|
17,099 | causeTracker = null;
this.tracksEntityDeaths = false;
}
if (this.dead) {
if (causeTracker != null && this.tracksEntityDeaths && !properlyOverridesOnDeathForCauseTrackerCompletion()) {
<BUG>causeTracker.completePhase();
}</BUG>
return;
}
Entity entity = cause.getEntity();
| causeTracker.completePhase(EntityPhase.State.DEATH);
|
17,100 | if (!((EntityLivingBase) (Object) this instanceof EntityHuman)) {
this.world.setEntityState((EntityLivingBase) (Object) this, (byte) 3);
}
if (causeTracker != null && this.tracksEntityDeaths && !properlyOverridesOnDeathForCauseTrackerCompletion()) {
this.tracksEntityDeaths = false;
<BUG>causeTracker.completePhase();
}</BUG>
}
@Redirect(method = "onDeath(Lnet/minecraft/util/DamageSource;)V", at = @At(value = "INVOKE", target =
"Lnet/minecraft/world/World;setEntityState(Lnet/minecraft/entity/Entity;B)V"))
| causeTracker.completePhase(EntityPhase.State.DEATH);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.