id int64 1 49k | buggy stringlengths 34 37.5k | fixed stringlengths 2 37k |
|---|---|---|
42,701 | TypeElement parent = entry.getKey();
model.put(parent, map);
for (Map.Entry<String, ExecutableElement> entrySub : entry.getValue().entrySet()) {
ExecutableElement methodElement = entrySub.getValue();
CodecModel codecModel = createCodecModel(methodElement, lang);
<BUG>codecModel.comment = elementUtils.getDocComment(methodElement);
map.put(entrySub.getKey(), codecModel);</BUG>
}
}
| String docComment = elementUtils.getDocComment(methodElement);
if (null != docComment) {
codecModel.setComment(docComment);
map.put(entrySub.getKey(), codecModel);
|
42,702 | import com.SmithsModding.Armory.Util.*;
import com.SmithsModding.SmithsCore.Client.GUI.Components.Core.*;
import com.SmithsModding.SmithsCore.Client.GUI.Components.Implementations.*;
import com.SmithsModding.SmithsCore.Client.GUI.*;
import com.SmithsModding.SmithsCore.Client.GUI.Host.*;
<BUG>import com.SmithsModding.SmithsCore.Client.GUI.Ledgers.Core.*;
import com.SmithsModding.SmithsCore.Client.GUI.State.*;</BUG>
import com.SmithsModding.SmithsCore.Common.Inventory.*;
import com.SmithsModding.SmithsCore.Util.Client.Color.*;
import com.SmithsModding.SmithsCore.Util.Client.*;
| import com.SmithsModding.SmithsCore.Client.GUI.Management.*;
import com.SmithsModding.SmithsCore.Client.GUI.State.*;
|
42,703 | meltingProgress.add(-1F);
}
}
@Override
public Object getData (IStructureComponent requestingComponent, String propertyRequested) {
<BUG>if (propertyRequested.equals(References.NBTTagCompoundData.TE.FirePit.FUELSTACKBURNINGTIME) && ( (TileEntityFirePit) parent ).isSlaved())
return ( (TileEntityFirePit) parent ).getMasterEntity().getStructureRelevantData().getData(requestingComponent, propertyRequested);
if (propertyRequested.equals(References.NBTTagCompoundData.TE.FirePit.FUELSTACKFUELAMOUNT) && ( (TileEntityFirePit) parent ).isSlaved())
return ( (TileEntityFirePit) parent ).getMasterEntity().getStructureRelevantData().getData(requestingComponent, propertyRequested);
if (propertyRequested.equals(References.NBTTagCompoundData.TE.FirePit.FUELSTACKBURNINGTIME))</BUG>
return totalBurningTicksLeft;
| if (propertyRequested.equals(References.NBTTagCompoundData.TE.FirePit.FUELSTACKBURNINGTIME) && ( (TileEntityFirePit) parent ).isSlaved() && ( (TileEntityFirePit) parent ).getStructureData() != null)
return ( (TileEntityFirePit) parent ).getStructureData().getData(requestingComponent, propertyRequested);
if (propertyRequested.equals(References.NBTTagCompoundData.TE.FirePit.FUELSTACKFUELAMOUNT) && ( (TileEntityFirePit) parent ).isSlaved() && ( (TileEntityFirePit) parent ).getStructureData() != null)
return ( (TileEntityFirePit) parent ).getStructureData().getData(requestingComponent, propertyRequested);
if (propertyRequested.equals(References.NBTTagCompoundData.TE.FirePit.FUELSTACKBURNINGTIME))
|
42,704 | return 0F;
}
@Override
public void setData (IStructureComponent sendingComponent, String propertySend, Object data) {
if (propertySend.equals(References.NBTTagCompoundData.TE.FirePit.FUELSTACKBURNINGTIME) && ( (TileEntityFirePit) parent ).isSlaved())
<BUG>( (TileEntityFirePit) parent ).getMasterEntity().getStructureRelevantData().setData(sendingComponent, propertySend, data);
if (propertySend.equals(References.NBTTagCompoundData.TE.FirePit.FUELSTACKFUELAMOUNT) && ( (TileEntityFirePit) parent ).isSlaved())
( (TileEntityFirePit) parent ).getMasterEntity().getStructureRelevantData().setData(sendingComponent, propertySend, data);
if (propertySend.equals(References.NBTTagCompoundData.TE.FirePit.FUELSTACKBURNINGTIME))</BUG>
totalBurningTicksLeft = (Float) data;
| ( (TileEntityFirePit) parent ).getStructureData().setData(sendingComponent, propertySend, data);
( (TileEntityFirePit) parent ).getStructureData().setData(sendingComponent, propertySend, data);
if (propertySend.equals(References.NBTTagCompoundData.TE.FirePit.FUELSTACKBURNINGTIME))
|
42,705 | EnumChatFormatting masterTeLocation;
String location;
if (!tileEntityFirePit.isSlaved()) {
masterTeLocation = EnumChatFormatting.STRIKETHROUGH;
location = "current";
<BUG>} else if (tileEntityFirePit.getMasterEntity() == null) {
</BUG>
masterTeLocation = EnumChatFormatting.RED;
location = "unknown";
} else {
| } else if (tileEntityFirePit.getMasterLocation() == null) {
|
42,706 | </BUG>
masterTeLocation = EnumChatFormatting.RED;
location = "unknown";
} else {
masterTeLocation = EnumChatFormatting.GREEN;
<BUG>location = tileEntityFirePit.getMasterEntity().getLocation().toString();
}</BUG>
event.right.add("slave count:" + slaveCount + count + EnumChatFormatting.RESET);
event.right.add("masterlocation:" + masterTeLocation + location + EnumChatFormatting.RESET);
}
| EnumChatFormatting masterTeLocation;
String location;
if (!tileEntityFirePit.isSlaved()) {
masterTeLocation = EnumChatFormatting.STRIKETHROUGH;
location = "current";
} else if (tileEntityFirePit.getMasterLocation() == null) {
location = tileEntityFirePit.getMasterLocation().toString();
|
42,707 | return new PointerReader(segment, location, nestingLimit);
}
public boolean isNull() {
return this.segment.buffer.getLong(this.pointer) == 0;
}
<BUG>public StructReader getStruct() {
return WireHelpers.readStructPointer(this.segment,
this.pointer,</BUG>
null, 0,
| public <T> T getStruct(FromStructReader<T> factory) {
return WireHelpers.readStructPointer(factory,
this.pointer,
|
42,708 | public final PointerReader reader;
public Reader(PointerReader reader) {
this.reader = reader;
}
public final <T> T getAsStruct(FromStructReader<T> factory) {
<BUG>return factory.fromStructReader(this.reader.getStruct());
}</BUG>
public final <T> T getAsList(FromPointerReader<T> factory) {
return factory.fromPointerReader(this.reader, null, 0);
}
| return this.reader.getStruct(factory);
|
42,709 | public final PointerBuilder builder;
public Builder(PointerBuilder builder) {
this.builder = builder;
}
public final <T> T initAsStruct(FromStructBuilder<T> factory) {
<BUG>return factory.fromStructBuilder(this.builder.initStruct(factory.structSize()));
}</BUG>
public final void clear() {
this.builder.clear();
}
| return this.builder.initStruct(factory);
|
42,710 | public int idx = 0;
public Iterator(Reader<T> list) {
this.list = list;
}
public T next() {
<BUG>return list.factory.fromStructReader(list.reader.getStructElement(idx++));
}</BUG>
public boolean hasNext() {
return idx < list.size();
}
| return list.reader.getStructElement(factory, idx++);
|
42,711 | public int idx = 0;
public Iterator(Builder<T> list) {
this.list = list;
}
public T next() {
<BUG>return list.factory.fromStructBuilder(list.builder.getStructElement(idx++));
}</BUG>
public boolean hasNext() {
return idx < list.size();
}
| public Iterator(Reader<T> list) {
return list.reader.getStructElement(factory, idx++);
|
42,712 | package org.capnproto;
<BUG>public final class StructBuilder {
final SegmentBuilder segment;
final int data; // byte offset to data section
final int pointers; // word offset of pointer section
final int dataSize; // in bits
final short pointerCount;
final byte bit0Offset;
</BUG>
public StructBuilder(SegmentBuilder segment, int data,
| public class StructBuilder {
protected final SegmentBuilder segment;
protected final int data; // byte offset to data section
protected final int pointers; // word offset of pointer section
protected final int dataSize; // in bits
protected final short pointerCount;
protected final byte bit0Offset;
|
42,713 | this.pointers = pointers;
this.dataSize = dataSize;
this.pointerCount = pointerCount;
this.bit0Offset = bit0Offset;
}
<BUG>public final StructReader asReader() {
return new StructReader(this.segment,
this.data, this.pointers, this.dataSize,
this.pointerCount, this.bit0Offset,
0x7fffffff);
}
public final boolean getBooleanField(int offset) {
</BUG>
int bitOffset = (offset == 0 ? this.bit0Offset : offset);
| public final boolean _getBooleanField(int offset) {
|
42,714 | class NaiveBayesDriver extends Driver {
public boolean computeStatsFillModel(NaiveBayesModel model, DataInfo dinfo, NBTask tsk) {
model._output._levels = _response.domain();
model._output._rescnt = tsk._rescnt;
model._output._ncats = dinfo._cats;
<BUG>if(stop_requested()) return false;
</BUG>
_job.update(1, "Initializing arrays for model statistics");
String[][] domains = model._output._domains;
double[] apriori = new double[tsk._nrescat];
| if(stop_requested() && !timeout()) return false;
|
42,715 | double[][][] pcond = new double[tsk._npreds][][];
for(int i = 0; i < pcond.length; i++) {
int ncnt = domains[i] == null ? 2 : domains[i].length;
pcond[i] = new double[tsk._nrescat][ncnt];
}
<BUG>if(stop_requested()) return false;
</BUG>
_job.update(1, "Computing probabilities for categorical cols");
for(int i = 0; i < apriori.length; i++)
apriori[i] = ((double)tsk._rescnt[i] + _parms._laplace)/(tsk._nobs + tsk._nrescat * _parms._laplace);
| if(stop_requested() && !timeout()) return false;
|
42,716 | for(int i = 0; i < pcond[col].length; i++) {
for(int j = 0; j < pcond[col][i].length; j++)
pcond[col][i][j] = ((double)tsk._jntcnt[col][i][j] + _parms._laplace)/((double)tsk._rescnt[i] + domains[col].length * _parms._laplace);
}
}
<BUG>if(stop_requested()) return false;
</BUG>
_job.update(1, "Computing mean and standard deviation for numeric cols");
for(int col = 0; col < dinfo._nums; col++) {
for(int i = 0; i < pcond[0].length; i++) {
| if(stop_requested() && !timeout()) return false;
|
42,717 | _job.update(1, "Scoring and computing metrics on training data");
if (_parms._compute_metrics) {
model.score(_parms.train()).delete(); // This scores on the training data and appends a ModelMetrics
model._output._training_metrics = ModelMetrics.getFromDKV(model,_parms.train());
}
<BUG>if(stop_requested()) return false;
</BUG>
_job.update(1, "Scoring and computing metrics on validation data");
if (_valid != null) {
model.score(_parms.valid()).delete(); //this appends a ModelMetrics on the validation set
| if(stop_requested() && !timeout()) return false;
|
42,718 | 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.util.DataStoreUtils;
import de.vanita5.twittnuker.util.ImagePreloader;</BUG>
import de.vanita5.twittnuker.util.InternalTwitterContentUtils;
import de.vanita5.twittnuker.util.JsonSerializer;
import de.vanita5.twittnuker.util.NotificationManagerWrapper;
| import de.vanita5.twittnuker.util.DebugLog;
import de.vanita5.twittnuker.util.ImagePreloader;
|
42,719 | 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);
|
42,720 | @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.getException());
}</BUG>
}
| public UserKey[] getAccountKeys() {
return DataStoreUtils.getActivatedAccountKeys(context);
|
42,721 | 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);
|
42,722 | 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.format("Unable to delete %s", file));
}</BUG>
}
| if (deleteImage) {
Utils.deleteMedia(context, imageUri);
|
42,723 | 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, String.format("Unable to delete %s", file));
}</BUG>
}
| twitter.updateProfileBannerImage(fileBody);
if (deleteImage) {
Utils.deleteMedia(context, imageUri);
|
42,724 | 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.format("Unable to delete %s", file));
}</BUG>
}
| twitter.updateProfileBannerImage(fileBody);
if (deleteImage) {
Utils.deleteMedia(context, imageUri);
|
42,725 | 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.fragment.AbsStatusesFragment;
import org.mariotaku.sqliteqb.library.AllColumns;</BUG>
import org.mariotaku.sqliteqb.library.Columns;
import org.mariotaku.sqliteqb.library.Columns.Column;
import org.mariotaku.sqliteqb.library.Expression;
| import org.mariotaku.pickncrop.library.PNCUtils;
import org.mariotaku.sqliteqb.library.AllColumns;
|
42,726 | 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());
|
42,727 | 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 SharedPreferencesWrapper mPreferences;
| public class TwidereDns implements Dns, Constants {
|
42,728 | 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);
|
42,729 | import org.codehaus.groovy.control.CompilationUnit;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public final class GroovyTreeParser implements TreeParser {
private static final Logger logger = LoggerFactory.getLogger(GroovyTreeParser.class);
<BUG>private static final String GROOVY_DEFAULT_INTERFACE = "groovy.lang.GroovyObject";
private static final String JAVA_DEFAULT_OBJECT = "java.lang.Object";
private Map<URI, Set<SymbolInformation>> fileSymbols = Maps.newHashMap();
private Map<String, Set<SymbolInformation>> typeReferences = Maps.newHashMap();</BUG>
private final Supplier<CompilationUnit> unitSupplier;
| private Indexer indexer = new Indexer();
|
42,730 | if (scriptClass != null) {
sourceUnit.getAST().getStatementBlock().getVariableScope().getDeclaredVariables().values().forEach(
variable -> {
SymbolInformation symbol =
getVariableSymbolInformation(scriptClass.getName(), sourceUri, variable);
<BUG>addToValueSet(newTypeReferences, variable.getType().getName(), symbol);
symbols.add(symbol);
});
}
newFileSymbols.put(workspaceUriSupplier.get(sourceUri), symbols);</BUG>
});
| newIndexer.addSymbol(sourceUnit.getSource().getURI(), symbol);
if (classes.containsKey(variable.getType().getName())) {
newIndexer.addReference(classes.get(variable.getType().getName()),
GroovyLocations.createLocation(sourceUri, variable.getType()));
|
42,731 | }
if (typeReferences.containsKey(foundSymbol.getName())) {
foundReferences.addAll(typeReferences.get(foundSymbol.getName()));</BUG>
}
<BUG>return foundReferences;
}</BUG>
@Override
public Set<SymbolInformation> getFilteredSymbols(String query) {
checkNotNull(query, "query must not be null");
Pattern pattern = getQueryPattern(query);
| });
sourceUnit.getAST().getStatementBlock()
.visit(new MethodVisitor(newIndexer, sourceUri, sourceUnit.getAST().getScriptClassDummy(),
classes, Maps.newHashMap(), Optional.absent(), workspaceUriSupplier));
|
42,732 | <BUG>package com.palantir.ls.server.api;
import io.typefox.lsapi.ReferenceParams;</BUG>
import io.typefox.lsapi.SymbolInformation;
import java.net.URI;
import java.util.Map;
| import com.google.common.base.Optional;
import io.typefox.lsapi.Location;
import io.typefox.lsapi.Position;
import io.typefox.lsapi.ReferenceParams;
|
42,733 | import java.util.Map;
import java.util.Set;
public interface TreeParser {
void parseAllSymbols();
Map<URI, Set<SymbolInformation>> getFileSymbols();
<BUG>Map<String, Set<SymbolInformation>> getTypeReferences();
Set<SymbolInformation> findReferences(ReferenceParams params);
Set<SymbolInformation> getFilteredSymbols(String query);</BUG>
}
| Map<Location, Set<Location>> getReferences();
Set<Location> findReferences(ReferenceParams params);
Optional<Location> gotoDefinition(URI uri, Position position);
Set<SymbolInformation> getFilteredSymbols(String query);
|
42,734 | .workspaceSymbolProvider(true)
.referencesProvider(true)
.completionProvider(new CompletionOptionsBuilder()
.resolveProvider(false)
.triggerCharacter(".")
<BUG>.build())
.build();</BUG>
InitializeResult result = new InitializeResultBuilder()
.capabilities(capabilities)
.build();
| .definitionProvider(true)
|
42,735 | package com.palantir.ls.server;
import com.palantir.ls.server.api.CompilerWrapper;
import com.palantir.ls.server.api.TreeParser;
import com.palantir.ls.server.api.WorkspaceCompiler;
<BUG>import io.typefox.lsapi.FileEvent;
import io.typefox.lsapi.PublishDiagnosticsParams;</BUG>
import io.typefox.lsapi.ReferenceParams;
import io.typefox.lsapi.SymbolInformation;
import io.typefox.lsapi.TextDocumentContentChangeEvent;
| import com.google.common.base.Optional;
import io.typefox.lsapi.Location;
import io.typefox.lsapi.Position;
import io.typefox.lsapi.PublishDiagnosticsParams;
|
42,736 | params.put("details", pInfo.getDetails());
params.put("uuid", pInfo.getUuid());
params.put("providerName", provider.getName());
store = lifeCycle.initialize(params);
} else {
<BUG>store = (DataStore) dataStoreMgr.getDataStore(pool.getId(), DataStoreRole.Primary);
}</BUG>
HostScope scope = new HostScope(host.getId(), host.getDataCenterId());
lifeCycle.attachHost(store, scope, pInfo);
} catch (Exception e) {
| store = dataStoreMgr.getDataStore(pool.getId(), DataStoreRole.Primary);
}
|
42,737 | lifeCycle.attachHost(store, scope, pInfo);
} catch (Exception e) {
s_logger.warn("Unable to setup the local storage pool for " + host, e);
throw new ConnectionException(true, "Unable to setup the local storage pool for " + host, e);
}
<BUG>return (DataStore) dataStoreMgr.getDataStore(store.getId(), DataStoreRole.Primary);
}</BUG>
@Override
@SuppressWarnings("rawtypes")
public PrimaryDataStoreInfo createPool(CreateStoragePoolCmd cmd) throws ResourceInUseException, IllegalArgumentException, UnknownHostException,
| return dataStoreMgr.getDataStore(store.getId(), DataStoreRole.Primary);
|
42,738 | return futureIops <= pool.getCapacityIops();
}
@Override
public boolean storagePoolHasEnoughSpace(List<Volume> volumes,
StoragePool pool) {
<BUG>if (volumes == null || volumes.isEmpty())
return false;
if (!checkUsagedSpace(pool))
return false;
StoragePoolVO poolVO = _storagePoolDao.findById(pool.getId());</BUG>
long allocatedSizeWithtemplate = _capacityMgr.getAllocatedPoolCapacity(poolVO, null);
| if (volumes == null || volumes.isEmpty()){
if (!checkUsagedSpace(pool)) {
StoragePoolVO poolVO = _storagePoolDao.findById(pool.getId());
|
42,739 | VMTemplateVO tmpl = _templateDao.findById(volume.getTemplateId());
if (tmpl.getFormat() != ImageFormat.ISO) {
allocatedSizeWithtemplate = _capacityMgr.getAllocatedPoolCapacity(poolVO, tmpl);
}
}
<BUG>if (volume.getState() != Volume.State.Ready)
totalAskingSize = totalAskingSize + volume.getSize();
}</BUG>
long totalOverProvCapacity;
| if (volume.getState() != Volume.State.Ready) {
|
42,740 | private static ThreadLocal<ComponentInfo> nextComponentInfo = new ThreadLocal<ComponentInfo>();
private final FunctionalSourceSet mainSourceSet;
private final ModelMap<LanguageSourceSet> source;
private final ComponentSpecIdentifier identifier;
private final String typeName;
<BUG>private final DefaultBinaryContainer binaries;
public static <T extends BaseComponentSpec> T create(Class<T> type, ComponentSpecIdentifier identifier, FunctionalSourceSet mainSourceSet, Instantiator instantiator) {</BUG>
if (type.equals(BaseComponentSpec.class)) {
throw new ModelInstantiationException("Cannot create instance of abstract class BaseComponentSpec.");
}
| private final ModelMap<BinarySpec> binariesMap;
public static <T extends BaseComponentSpec> T create(Class<T> type, ComponentSpecIdentifier identifier, FunctionalSourceSet mainSourceSet, Instantiator instantiator) {
|
42,741 | new NamedEntityInstantiator<LanguageSourceSet>() {
public <S extends LanguageSourceSet> S create(String name, Class<S> type) {
mainSourceSet.create(name, type);
return null;
}
<BUG>},
new org.gradle.api.Namer<Object>() {
public String determineName(Object object) {
return Cast.cast(Named.class, object).getName();
}</BUG>
}
| [DELETED] |
42,742 | ComponentSpecInternal componentSpecInternal = uncheckedCast(componentModelNode.getPrivateData());
MutableModelNode binariesNode = componentModelNode.getLink("binaries");
DefaultModelViewState binariesState = new DefaultModelViewState(DefaultModelMap.modelMapTypeOf(binaryType), getDescriptor());
ModelMap<BinarySpec> binarySpecs = new ModelMapGroovyDecorator<BinarySpec>(
new PolymorphicDomainObjectContainerBackedModelMap<BinarySpec>(
<BUG>componentSpecInternal.getBinaries(), ModelType.of(BinarySpec.class), binariesNode, getDescriptor()
</BUG>
),
binariesState
);
| componentSpecInternal.getBinariesContainer(), ModelType.of(BinarySpec.class), binariesNode, getDescriptor()
|
42,743 | } else {
seen = true;
}
componentRenderer.render(component, getBuilder());
componentSourceSets.addAll(component.getSource().values());
<BUG>componentBinaries.addAll(component.getBinaries());
</BUG>
}
}
public void renderSourceSets(Collection<LanguageSourceSet> sourceSets) {
| componentBinaries.addAll(component.getBinaries().values());
|
42,744 | public void render(ComponentSpec component, TextReportBuilder builder) {
builder.subheading(StringUtils.capitalize(component.getDisplayName()));
builder.getOutput().println();
builder.collection("Source sets", component.getSource().values(), sourceSetRenderer, "source sets");
builder.getOutput().println();
<BUG>builder.collection("Binaries", CollectionUtils.sort(component.getBinaries(), new Comparator<BinarySpec>() {
</BUG>
public int compare(BinarySpec binary1, BinarySpec binary2) {
return binary1.getName().compareTo(binary2.getName());
}
| builder.collection("Binaries", CollectionUtils.sort(component.getBinaries().values(), new Comparator<BinarySpec>() {
|
42,745 | 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(
|
42,746 | ResourceManagementService resources
= NeomediaActivator.getResources();
notificationService.fireNotification(
popUpEvent,
title,
<BUG>device.getName()
+ "\r\n"
</BUG>
+ resources.getI18NString(
"impl.media.configform"
| body
+ "\r\n\r\n"
|
42,747 | package wew.water.gpf;
<BUG>import org.esa.beam.framework.gpf.OperatorException;
public class ChlorophyllNetworkOperation implements NeuralNetworkOperation {
@Override
public void compute(float[] in, float[] out, int mask, int errMask, float a) {</BUG>
if(in.length != getNumberOfInputNodes()) {
| public class ChlorophyllNetworkOperation {
public static int compute(float[] in, float[] out) {
|
42,748 | if(in.length != getNumberOfInputNodes()) {
throw new IllegalArgumentException("Wrong input array size");
}
if(out.length != getNumberOfOutputNodes()) {
throw new IllegalArgumentException("Wrong output array size");
<BUG>}
NeuralNetworkComputer.compute(in, out, mask, errMask, a,
</BUG>
NeuralNetworkConstants.INPUT_SCALE_LIMITS,
NeuralNetworkConstants.INPUT_SCALE_OFFSET_FACTORS,
| final int[] rangeCheckErrorMasks = {
WaterProcessorOp.RESULT_ERROR_VALUES[1],
WaterProcessorOp.RESULT_ERROR_VALUES[2]
};
return NeuralNetworkComputer.compute(in, out, rangeCheckErrorMasks,
|
42,749 | +4.332827e-01, +4.453712e-01, -2.355489e-01, +4.329192e-02,
-3.259577e-02, +4.245090e-01, -1.132328e-01, +2.511418e-01,
-1.995074e-01, +1.797701e-01, -3.817864e-01, +2.854951e-01,
},
};
<BUG>private final double[][] input_hidden_weights = new double[][]{
</BUG>
{
-5.127986e-01, +5.872741e-01, +4.411426e-01, +1.344507e+00,
-7.758738e-01, -7.235078e-01, +2.421909e+00, +1.923607e-02,
| private static final double[][] input_hidden_weights = new double[][]{
|
42,750 | -1.875955e-01, +7.851294e-01, -1.226189e+00, -1.852845e-01,
+9.392875e-01, +9.886471e-01, +8.400441e-01, -1.657109e+00,
+8.292500e-01, +6.291445e-01, +1.855838e+00, +7.817575e-01,
},
};
<BUG>private final double[][] input_intercept_and_slope = new double[][]{
</BUG>
{+4.165578e-02, +1.161174e-02},
{+3.520901e-02, +1.063665e-02},
{+2.920864e-02, +1.050035e-02},
| private static final double[][] input_intercept_and_slope = new double[][]{
|
42,751 | {+2.468300e-01, +8.368545e-01},
{-6.613120e-01, +1.469582e+00},
{-6.613120e-01, +1.469582e+00},
{+7.501110e-01, +2.776545e-01},
};
<BUG>private final double[][] output_weights = new double[][]{
</BUG>
{-6.498447e+00,},
{-1.118659e+01,},
{+7.141798e+00,},
| private static final double[][] output_weights = new double[][]{
|
42,752 | package wew.water.gpf;
public class NeuralNetworkComputer {
<BUG>public static void compute(float[] in, float[] out, int mask, int errMask, float a,
</BUG>
double[][] input_scale_limits,
double[] input_scale_offset_factors,
int[] input_scale_flag,
| public static int compute(float[] in, float[] out, int[] rangeCheckErrorMasks,
|
42,753 | package wew.water.gpf;
<BUG>public class AtmosphericCorrectionNetworkOperation implements NeuralNetworkOperation {
@Override
public void compute(float[] in, float[] out, int mask, int errMask, float a) {
if(in.length != getNumberOfInputNodes()) {
</BUG>
throw new IllegalArgumentException("Wrong input array size");
| import java.util.Arrays;
public class AtmosphericCorrectionNetworkOperation {
public static int compute(float[] in, float[] out) {
if (in.length != getNumberOfInputNodes()) {
|
42,754 | }
@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)
|
42,755 | 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))
|
42,756 | 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)
|
42,757 | 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");
|
42,758 | 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");
|
42,759 | }
@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);
|
42,760 | 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);
|
42,761 | 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);
|
42,762 | 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);
|
42,763 | }
this.iterStatusVariable = new IterationStatusVar();
this.iterStatusVariable.index = 0;
this.iterStatusVariable.size = computeIteratedObjectSize(iteratedObject);
this.precedingWhitespace = precedingWhitespace;
<BUG>this.processed = false;
}
public boolean isProcessed() {
return this.processed;</BUG>
}
| [DELETED] |
42,764 | public ProcessorExecutionVars initializeProcessorExecutionVars() {
return super.initializeProcessorExecutionVars().cloneVars();
}
public boolean process() {
final ITemplateHandler modelHandler = getProcessorTemplateHandler();
<BUG>if (this.processed) {
throw new TemplateProcessingException(
"This delayed model has already been executed. Execution can only take place once");
}</BUG>
final IterationType iterationType;
| [DELETED] |
42,765 | ElementNames.forHTMLName("tr"), ElementNames.forHTMLName("ul"), ElementNames.forHTMLName("video")
}));
private final IEngineConfiguration configuration;
private final TemplateMode templateMode;
private final ProcessorTemplateHandler processorTemplateHandler;
<BUG>private final IEngineContext context;
private AbstractSyntheticModel gatheredModel;</BUG>
private SkipBody skipBody;
private SkipBody[] skipBodyByLevel;
private boolean[] skipCloseTagByLevel;
| private TemplateFlowController templateFlowController;
private AbstractSyntheticModel gatheredModel;
|
42,766 | this.skipCloseTagByLevel = new boolean[DEFAULT_MODEL_LEVELS];
this.skipCloseTagByLevel[this.modelLevel] = false;
this.unskippedFirstElementByLevel = new IProcessableElementTag[DEFAULT_MODEL_LEVELS];
this.unskippedFirstElementByLevel[this.modelLevel] = null;
this.modelLevel = 0;
<BUG>}
int getModelLevel() {</BUG>
return this.modelLevel;
}
void startGatheringDelayedModel(
| void setTemplateFlowController(final TemplateFlowController templateFlowController) {
this.templateFlowController = templateFlowController;
int getModelLevel() {
|
42,767 | final IOpenElementTag firstTag, final ProcessorExecutionVars processorExecutionVars) {
this.modelLevel--;
final SkipBody gatheredSkipBody = this.skipBodyByLevel[this.modelLevel];
final boolean gatheredSkipCloseTagByLevel = this.skipCloseTagByLevel[this.modelLevel];
this.gatheredModel =
<BUG>new DelayedSyntheticModel(
this.configuration, this.processorTemplateHandler, this.context, this, gatheredSkipBody, gatheredSkipCloseTagByLevel, processorExecutionVars);
this.gatheredModel.gatherOpenElement(firstTag);</BUG>
}
| new GatheredSyntheticModel(
this.configuration, this.processorTemplateHandler, this.context,
this, this.templateFlowController,
this.gatheredModel.gatherOpenElement(firstTag);
|
42,768 | final IStandaloneElementTag firstTag, final ProcessorExecutionVars processorExecutionVars) {
SkipBody gatheredSkipBody = this.skipBodyByLevel[this.modelLevel];
gatheredSkipBody = (gatheredSkipBody == SkipBody.SKIP_ELEMENTS ? SkipBody.PROCESS_ONE_ELEMENT : gatheredSkipBody);
final boolean gatheredSkipCloseTagByLevel = this.skipCloseTagByLevel[this.modelLevel];
this.gatheredModel =
<BUG>new DelayedSyntheticModel(
this.configuration, this.processorTemplateHandler, this.context, this, gatheredSkipBody, gatheredSkipCloseTagByLevel, processorExecutionVars);
this.gatheredModel.gatherStandaloneElement(firstTag);</BUG>
}
| new GatheredSyntheticModel(
this.configuration, this.processorTemplateHandler, this.context,
this, this.templateFlowController,
this.gatheredModel.gatherStandaloneElement(firstTag);
|
42,769 | final SkipBody gatheredSkipBody = this.skipBodyByLevel[this.modelLevel];
final boolean gatheredSkipCloseTagByLevel = this.skipCloseTagByLevel[this.modelLevel];
final Text precedingWhitespace = computeWhiteSpacePrecedingIteration(firstTag.getElementDefinition().elementName);
this.gatheredModel =
new IteratedSyntheticModel(
<BUG>this.configuration, this.processorTemplateHandler, this.context, this, gatheredSkipBody, gatheredSkipCloseTagByLevel, processorExecutionVars,
iterVariableName, iterStatusVariableName, iteratedObject, precedingWhitespace);</BUG>
this.gatheredModel.gatherOpenElement(firstTag);
}
void startGatheringIteratedModel(
| this.configuration, this.processorTemplateHandler, this.context,
this, this.templateFlowController,
iterVariableName, iterStatusVariableName, iteratedObject, precedingWhitespace);
|
42,770 | final CloseElementTag closeTag =
new CloseElementTag(
standaloneElementTag.templateMode, standaloneElementTag.elementDefinition,
standaloneElementTag.elementCompleteName, null, standaloneElementTag.synthetic, false,
standaloneElementTag.templateName, standaloneElementTag.line, standaloneElementTag.col);
<BUG>final StandaloneEquivalentSyntheticModel equivalentModel =
new StandaloneEquivalentSyntheticModel(
this.configuration, this.processorTemplateHandler, this.context, this, gatheredSkipBody, gatheredSkipCloseTagByLevel, processorExecutionVars);
equivalentModel.gatherOpenElement(openTag);</BUG>
equivalentModel.gatherCloseElement(closeTag);
| final GatheredSyntheticModel equivalentModel =
new GatheredSyntheticModel(
this.configuration, this.processorTemplateHandler, this.context,
this, this.templateFlowController,
equivalentModel.gatherOpenElement(openTag);
|
42,771 | import org.thymeleaf.model.IXMLDeclaration;
abstract class AbstractSyntheticModel implements ISyntheticModel {
private final ProcessorTemplateHandler processorTemplateHandler;
private final IEngineContext context;
private final Model syntheticModel;
<BUG>private final EventModelController eventModelController;
private final SkipBody buildTimeSkipBody;</BUG>
private final boolean buildTimeSkipCloseTag;
private final ProcessorExecutionVars processorExecutionVars;
private boolean gatheringFinished = false;
| private final TemplateFlowController templateFlowController;
private final SkipBody buildTimeSkipBody;
|
42,772 | protected final void prepareProcessing() {
this.processorTemplateHandler.setCurrentSyntheticModel(this);
resetGatheredSkipFlags();
}
protected final ProcessorTemplateHandler getProcessorTemplateHandler() {
<BUG>return this.processorTemplateHandler;
}</BUG>
public final boolean isGatheringFinished() {
return this.gatheringFinished;
}
| protected final TemplateFlowController getTemplateFlowController() {
return this.templateFlowController;
|
42,773 | import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.configuration.ConfigurationException;
import org.apache.avalon.framework.configuration.DefaultConfiguration;
import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
import org.apache.avalon.framework.configuration.DefaultConfigurationSerializer;
<BUG>import org.apache.jmeter.assertions.AssertionResult;
import org.apache.jmeter.samplers.SampleResult;</BUG>
import org.apache.jmeter.samplers.SampleSaveConfiguration;
import org.apache.jmeter.testelement.TestElement;
import org.apache.jmeter.testelement.property.CollectionProperty;
| import org.apache.jmeter.reporters.ResultCollector;
import org.apache.jmeter.samplers.SampleResult;
|
42,774 | subTree.add(element, t);
}
}
return subTree;
}
<BUG>public static void processSamples(String filename, Visualizer visualizer, boolean showAll)
</BUG>
throws SAXException, IOException, ConfigurationException
{
DefaultConfigurationBuilder cfgbuilder = new DefaultConfigurationBuilder();
| public static void processSamples(String filename, Visualizer visualizer, ResultCollector rc)
|
42,775 | DefaultConfigurationBuilder cfgbuilder = new DefaultConfigurationBuilder();
Configuration savedSamples = cfgbuilder.buildFromFile(filename);
Configuration[] samples = savedSamples.getChildren();
for (int i = 0; i < samples.length; i++) {
SampleResult result = OldSaveService.getSampleResult(samples[i]);
<BUG>if (showAll || !result.isSuccessful()) {
visualizer.add(result);</BUG>
}
}
}
| if (rc.isSampleWanted(result.isSuccessful())) {
visualizer.add(result);
|
42,776 | private static final String XML_HEADER = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; // $NON-NLS-1$
private static final int MIN_XML_FILE_LEN = XML_HEADER.length() + TESTRESULTS_START.length()
+ TESTRESULTS_END.length();
public final static String FILENAME = "filename"; // $NON-NLS-1$
private final static String SAVE_CONFIG = "saveConfig"; // $NON-NLS-1$
<BUG>private static final String ERROR_LOGGING = "ResultCollector.error_logging"; // $NON-NLS-1$
transient private DefaultConfigurationSerializer serializer;</BUG>
transient private volatile PrintWriter out;
private boolean inTest = false;
private static Map files = new HashMap();
| private static final String SUCCESS_ONLY_LOGGING = "ResultCollector.success_only_logging"; // $NON-NLS-1$
transient private DefaultConfigurationSerializer serializer;
|
42,777 | private boolean inTest = false;
private static Map files = new HashMap();
private Set hosts = new HashSet();
protected boolean isStats = false;
public ResultCollector() {
<BUG>setErrorLogging(false);
setProperty(new ObjectProperty(SAVE_CONFIG, new SampleSaveConfiguration()));</BUG>
}
public Object clone(){
ResultCollector clone = (ResultCollector) super.clone();
| setSuccessOnlyLogging(false);
setProperty(new ObjectProperty(SAVE_CONFIG, new SampleSaveConfiguration()));
|
42,778 | }
parsedOK = true;
} else { // We are processing XML
try { // Assume XStream
bufferedInputStream = new BufferedInputStream(new FileInputStream(file));
<BUG>readSamples(SaveService.loadTestResults(bufferedInputStream), visualizer, showAll);
parsedOK = true;</BUG>
} catch (Exception e) {
log.info("Failed to load "+filename+" using XStream, trying old XML format. Error was: "+e);
try {
| public void testStarted() {
testStarted(TEST_IS_LOCAL);
|
42,779 | import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Arrays;
import java.util.Collection;
import javax.swing.JButton;
<BUG>import javax.swing.JCheckBox;
import javax.swing.JPopupMenu;</BUG>
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import org.apache.jmeter.gui.AbstractJMeterGuiComponent;
| import javax.swing.JLabel;
import javax.swing.JPopupMenu;
|
42,780 | extends AbstractJMeterGuiComponent
implements Visualizer, ChangeListener, UnsharedComponent, Clearable
{
private static final Logger log = LoggingManager.getLoggerForClass();
private FilePanel filePanel;
<BUG>private JCheckBox errorLogging;
private JButton saveConfigButton;</BUG>
protected ResultCollector collector = new ResultCollector();
protected boolean isStats = false;
public AbstractVisualizer() {
| private JCheckBox successOnlyLogging;
private JButton saveConfigButton;
|
42,781 | ComponentUtil.centerComponentInComponent(GuiPackage.getInstance().getMainFrame(), d);
d.setVisible(true);
}
});
filePanel = new FilePanel(JMeterUtils.getResString("file_visualizer_output_file"), ".jtl"); // $NON-NLS-1$ $NON-NLS-2$
<BUG>filePanel.addChangeListener(this);
filePanel.add(errorLogging);
filePanel.add(saveConfigButton);</BUG>
}
public boolean isStats() {
| filePanel.add(new JLabel(JMeterUtils.getResString("log_only"))); // $NON-NLS-1$
filePanel.add(successOnlyLogging);
filePanel.add(saveConfigButton);
|
42,782 | }});
}
@Override
protected void onResume() {
super.onResume();
<BUG>Camera.Size size = mCamera.getParameters().getPreviewSize();
visualize.initializeImages( size.width, size.height );</BUG>
}
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int pos, long id ) {
| [DELETED] |
42,783 | paintWideLine.setColor(Color.RED);
paintWideLine.setStrokeWidth(3);
textPaint.setColor(Color.BLUE);
textPaint.setTextSize(60);
}
<BUG>public void initializeImages( int width , int height ) {
graySrc = new ImageFloat32(width,height);</BUG>
grayDst = new ImageFloat32(width,height);
bitmapSrc = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
bitmapDst = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
| if( graySrc != null && graySrc.width == width && graySrc.height == height )
return;
graySrc = new ImageFloat32(width,height);
|
42,784 | public void setMatches( List<AssociatedPair> matches ) {
this.locationSrc.clear();
this.locationDst.clear();
for( int i = 0; i < matches.size(); i++ ) {
AssociatedPair p = matches.get(i);
<BUG>locationSrc.add( p.p1 );
locationDst.add( p.p2 );
</BUG>
}
| locationSrc.add( p.p1.copy() );
locationDst.add( p.p2.copy() );
|
42,785 | hasRight = true;
grayDst.setTo(image);
ConvertBitmap.grayToBitmap(image,bitmapDst,storage);
}
}
<BUG>public synchronized void render(Canvas canvas, double tranX , double tranY , double scale ) {
this.scale = scale;</BUG>
this.tranX = tranX;
this.tranY = tranY;
int startX = bitmapSrc.getWidth()+SEPARATION;
| public void render(Canvas canvas, double tranX , double tranY , double scale ) {
this.scale = scale;
|
42,786 | package com.projecttango.examples.java.augmentedreality;
import com.google.atap.tangoservice.Tango;
import com.google.atap.tangoservice.Tango.OnTangoUpdateListener;
import com.google.atap.tangoservice.TangoCameraIntrinsics;
import com.google.atap.tangoservice.TangoConfig;
<BUG>import com.google.atap.tangoservice.TangoCoordinateFramePair;
import com.google.atap.tangoservice.TangoEvent;</BUG>
import com.google.atap.tangoservice.TangoOutOfDateException;
import com.google.atap.tangoservice.TangoPoseData;
import com.google.atap.tangoservice.TangoXyzIjData;
| import com.google.atap.tangoservice.TangoErrorException;
import com.google.atap.tangoservice.TangoEvent;
|
42,787 | super.onResume();
if (!mIsConnected) {
mTango = new Tango(AugmentedRealityActivity.this, new Runnable() {
@Override
public void run() {
<BUG>try {
connectTango();</BUG>
setupRenderer();
mIsConnected = true;
} catch (TangoOutOfDateException e) {
| TangoSupport.initialize();
connectTango();
|
42,788 | if (lastFramePose.statusCode == TangoPoseData.POSE_VALID) {
mRenderer.updateRenderCameraPose(lastFramePose, mExtrinsics);
mCameraPoseTimestamp = lastFramePose.timestamp;</BUG>
} else {
<BUG>Log.w(TAG, "Can't get device pose at time: " + mRgbTimestampGlThread);
}</BUG>
}
}
}
@Override
| mRenderer.updateRenderCameraPose(lastFramePose);
mCameraPoseTimestamp = lastFramePose.timestamp;
Log.w(TAG, "Can't get device pose at time: " +
|
42,789 | import org.rajawali3d.materials.Material;
import org.rajawali3d.materials.methods.DiffuseMethod;
import org.rajawali3d.materials.textures.ATexture;
import org.rajawali3d.materials.textures.StreamingTexture;
import org.rajawali3d.materials.textures.Texture;
<BUG>import org.rajawali3d.math.Matrix4;
import org.rajawali3d.math.vector.Vector3;</BUG>
import org.rajawali3d.primitives.ScreenQuad;
import org.rajawali3d.primitives.Sphere;
import org.rajawali3d.renderer.RajawaliRenderer;
| import org.rajawali3d.math.Quaternion;
import org.rajawali3d.math.vector.Vector3;
|
42,790 | translationMoon.setRepeatMode(Animation.RepeatMode.INFINITE);
translationMoon.setTransformable3D(moon);
getCurrentScene().registerAnimation(translationMoon);
translationMoon.play();
}
<BUG>public void updateRenderCameraPose(TangoPoseData devicePose, DeviceExtrinsics extrinsics) {
Pose cameraPose = ScenePoseCalculator.toOpenGlCameraPose(devicePose, extrinsics);
getCurrentCamera().setRotation(cameraPose.getOrientation());
getCurrentCamera().setPosition(cameraPose.getPosition());
}</BUG>
public int getTextureId() {
| public void updateRenderCameraPose(TangoPoseData cameraPose) {
float[] rotation = cameraPose.getRotationAsFloats();
float[] translation = cameraPose.getTranslationAsFloats();
Quaternion quaternion = new Quaternion(rotation[3], rotation[0], rotation[1], rotation[2]);
getCurrentCamera().setRotation(quaternion.conjugate());
getCurrentCamera().setPosition(translation[0], translation[1], translation[2]);
|
42,791 | package com.projecttango.examples.java.helloareadescription;
import com.google.atap.tangoservice.Tango;
<BUG>import com.google.atap.tangoservice.Tango.OnTangoUpdateListener;
import com.google.atap.tangoservice.TangoConfig;</BUG>
import com.google.atap.tangoservice.TangoCoordinateFramePair;
import com.google.atap.tangoservice.TangoErrorException;
import com.google.atap.tangoservice.TangoEvent;
| import com.google.atap.tangoservice.TangoAreaDescriptionMetaData;
import com.google.atap.tangoservice.TangoConfig;
|
42,792 | assertNotNull(ref);
PsiElement resolve = ref.resolve();
assertNotNull(resolve);
assertEquals("angular.js", resolve.getContainingFile().getName());
}
<BUG>public void testFilterCutomResolve() {
</BUG>
myFixture.configureByFiles("filterCustom.resolve.html", "angular.js", "custom.js");
int offsetBySignature = AngularTestUtil.findOffsetBySignature("fil<caret>ta", myFixture.getFile());
PsiReference ref = myFixture.getFile().findReferenceAt(offsetBySignature);
| public void testFilterCustomResolve() {
|
42,793 | import com.intellij.xml.util.documentation.HtmlDescriptorsTable;
import org.angularjs.html.Angular2HTMLLanguage;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public class AngularJS2IndexingHandler extends FrameworkIndexingHandler {
<BUG>public static final String TEMPLATE_REF = "TemplateRef";
@Override</BUG>
public void processCallExpression(JSCallExpression callExpression, @NotNull JSElementIndexingData outData) {
final JSExpression expression = callExpression.getMethodExpression();
if (expression instanceof JSReferenceExpression) {
| public static final String SELECTOR = "selector";
public static final String NAME = "name";
@Override
|
42,794 | return metadata != null && metadata.getText().contains(TEMPLATE_REF);
}
return false;
}
@Nullable
<BUG>private static String getSelectorName(PsiElement decorator) {
final JSProperty selector = getSelector(decorator);
</BUG>
final JSExpression value = selector != null ? selector.getValue() : null;
| private static String getPropertyName(PsiElement decorator, String name) {
final JSProperty selector = getProperty(decorator, name);
|
42,795 | import com.intellij.psi.ResolveResult;
import com.intellij.psi.util.PsiTreeUtil;
import com.intellij.util.Consumer;
import com.intellij.util.Function;
import com.intellij.util.containers.ContainerUtil;
<BUG>import org.angularjs.index.AngularControllerIndex;
import org.angularjs.index.AngularIndexUtil;
import org.angularjs.lang.psi.AngularJSAsExpression;
import org.angularjs.lang.psi.AngularJSRepeatExpression;</BUG>
import java.util.ArrayList;
| import org.angularjs.index.AngularFilterIndex;
import org.angularjs.lang.psi.AngularJSFilterExpression;
import org.angularjs.lang.psi.AngularJSRepeatExpression;
|
42,796 | import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.Collection;
import java.util.concurrent.ConcurrentMap;
public class AngularIndexUtil {
<BUG>public static final int BASE_VERSION = 35;
</BUG>
private static final Key<NotNullLazyValue<ModificationTracker>> TRACKER = Key.create("angular.js.tracker");
private static final ConcurrentMap<String, Key<ParameterizedCachedValue<Collection<String>, Pair<Project, ID<String, ?>>>>> ourCacheKeys =
ContainerUtil.newConcurrentMap();
| public static final int BASE_VERSION = 36;
|
42,797 | public class UserControllerTest
{
private static final Logger LOGGER = Logger.getLogger( UserControllerTest.class.getName() );
Properties properties = new Properties();
InputStream input = null;
<BUG>private String neo4jServerPort = System.getProperty( "neo4j.server.port" );
private String neo4jRemoteShellPort = System.getProperty( "neo4j.remoteShell.port" );
private String neo4jGraphDb = System.getProperty( "neo4j.graph.db" );
private ServerControls server;</BUG>
@Before
| private String dbmsConnectorHttpPort = System.getProperty( "dbms.connector.http.port" );
private String dbmsConnectorBoltPort = System.getProperty( "dbms.connector.bolt.port" );
private String dbmsShellPort = System.getProperty( "dbms.shell.port" );
private String dbmsDirectoriesData = System.getProperty( "dbms.directories.data" );
private ServerControls server;
|
42,798 | @Bean
public Configuration getConfiguration()
{
if ( StringUtils.isEmpty( url ) )
{
<BUG>url = "http://localhost:" + port;
</BUG>
}
Configuration config = new Configuration();
config.driverConfiguration().setDriverClassName( HttpDriver.class.getName() )
| url = "http://localhost:" + dbmsConnectorHttpPort;
|
42,799 | }
}
};
private CompositeClassPathItem myCachedClassPathItem;
public JavaModuleFacetImpl(IModule module) {
<BUG>myModule = module;
}
@Override</BUG>
public void invalidateClassPath() {
synchronized (LOCK) {
| super(module);
|
42,800 | </BUG>
}
@Deprecated
public final Collection<String> getOwnClassPath() {
<BUG>return getJavaFacet().getOwnClassPath();
</BUG>
}
@Deprecated
public static IClassPathItem getDependenciesClasspath(Set<IModule> modules, boolean includeStubSolutions) {
return SModuleOperations.getDependenciesClasspath(modules, includeStubSolutions);
| public final Collection<String> getClassPath() {
return getJavaFacet().getClassPath();
public final Collection<String> getAdditionalClassPath() {
return ((JavaModuleFacetImpl) getJavaFacet()).getAdditionalClassPath();
return ((JavaModuleFacetImpl) getJavaFacet()).getOwnClassPath();
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.