id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
13,601
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"),
13,602
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]
13,603
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) {
13,604
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;
13,605
package org.neo4j.impl.shell; import java.rmi.RemoteException; import org.neo4j.api.core.Direction; <BUG>import org.neo4j.api.core.Node; import org.neo4j.api.core.Transaction; import org.neo4j.util.shell.AbstractApp; import org.neo4j.util.shell.AppCommandParser;</BUG> import org.neo4j.util.shell.Output;
import org.neo4j.api.core.RelationshipType; import org.neo4j.util.shell.App; import org.neo4j.util.shell.AppCommandParser;
13,606
import org.neo4j.util.shell.Session; import org.neo4j.util.shell.ShellException; public abstract class NeoApp extends AbstractApp { private static final String NODE_KEY = "CURRENT_NODE"; <BUG>protected Node getCurrentNode( Session session ) {</BUG> Number id = ( Number ) safeGet( session, NODE_KEY ); Node node = null; if ( id == null )
protected static Node getCurrentNode( NeoShellServer server,
13,607
List<Long> paths = readPaths( session ); Node currentNode = getCurrentNode( session ); Node newNode = null; if ( parser.arguments().isEmpty() ) { <BUG>throw new RuntimeException( "fix this" ); }</BUG> else { String arg = parser.arguments().get( 0 );
newNode = getNeoServer().getNeo().getReferenceNode(); paths.clear(); }
13,608
import org.neo4j.util.shell.Output; import org.neo4j.util.shell.Session; import org.neo4j.util.shell.ShellException; public class Gsh extends NeoApp { <BUG>private App sh; public Gsh() { this.sh = new org.neo4j.util.shell.apps.extra.Gsh(); }</BUG> @Override
private App sh = new org.neo4j.util.shell.apps.extra.Gsh();
13,609
package org.neo4j.impl.shell; import java.io.Serializable; import java.rmi.RemoteException; <BUG>import org.neo4j.api.core.NeoService; import org.neo4j.impl.shell.apps.Ls;</BUG> import org.neo4j.util.shell.AbstractClient; import org.neo4j.util.shell.BashVariableInterpreter; import org.neo4j.util.shell.Session;
import org.neo4j.api.core.Transaction; import org.neo4j.impl.shell.apps.Ls;
13,610
package org.apache.lens.cube.parse; <BUG>import static org.apache.hadoop.hive.ql.parse.HiveParser.Identifier; import static org.apache.hadoop.hive.ql.parse.HiveParser.TOK_SELEXPR; import java.util.HashSet;</BUG> import java.util.Map; import java.util.Set;
[DELETED]
13,611
} @Override public void rewriteContext(CubeQueryContext cubeql) throws LensException { Map<String, String> colToTableAlias = cubeql.getColToTableAlias(); extractTabAliasForCol(cubeql); <BUG>findDimAttributesAndMeasures(cubeql); if (colToTableAlias.isEmpty()) {</BUG> return; } replaceAliases(cubeql.getSelectAST(), 0, colToTableAlias);
for (QueriedPhraseContext qur : cubeql.getQueriedPhrases()) { extractTabAliasForCol(colToTableAlias, qur); findExpressionsAndMeasures(cubeql); if (colToTableAlias.isEmpty()) {
13,612
if (nodeType == HiveParser.TOK_TABLE_OR_COL || nodeType == HiveParser.DOT) { ASTNode wrapped = wrapAggregate(cubeql, node); if (wrapped != node) { if (parent != null) { parent.setChild(nodePos, wrapped); <BUG>ASTNode sibling = HQLParser.findNodeByPath(parent, Identifier); String expr; if (sibling != null) { expr = HQLParser.getString(parent); } else { expr = HQLParser.getString(wrapped); } cubeql.addAggregateExpr(expr.trim());</BUG> } else {
[DELETED]
13,613
if (exprCols.isEmpty() // no direct fact columns || (!containsAny(cubeql.getCube().getMeasureNames(), exprCols))) { dimFieldIndices.add(i); } ASTNode aliasNode = HQLParser.findNodeByPath(selectExpr, Identifier); <BUG>String alias = cubeql.getSelectAlias(i); if (aliasNode != null) {</BUG> String queryAlias = aliasNode.getText(); if (!queryAlias.equals(alias)) { ASTNode newAliasNode = new ASTNode(new CommonToken(HiveParser.Identifier, alias));
String alias = cubeql.getSelectPhrases().get(i).getSelectAlias(); if (aliasNode != null) {
13,614
package org.gradle.api.publish.plugins; import org.gradle.api.Incubating; import org.gradle.api.Plugin; import org.gradle.api.Project; <BUG>import org.gradle.api.artifacts.dsl.RepositoryHandler; import org.gradle.api.internal.artifacts.ArtifactPublicationServices;</BUG> import org.gradle.api.publish.PublicationContainer; import org.gradle.api.publish.PublishingExtension; import org.gradle.api.publish.internal.DefaultPublicationContainer;
[DELETED]
13,615
import org.gradle.api.internal.artifacts.ArtifactPublicationServices;</BUG> import org.gradle.api.publish.PublicationContainer; import org.gradle.api.publish.PublishingExtension; import org.gradle.api.publish.internal.DefaultPublicationContainer; import org.gradle.api.publish.internal.DefaultPublishingExtension; <BUG>import org.gradle.internal.Factory; import org.gradle.internal.reflect.Instantiator;</BUG> import javax.inject.Inject; @Incubating public class PublishingPlugin implements Plugin<Project> {
package org.gradle.api.publish.plugins; import org.gradle.api.Incubating; import org.gradle.api.Plugin; import org.gradle.api.Project; import org.gradle.api.publish.internal.PublicationRepositoryContainer; import org.gradle.internal.reflect.Instantiator;
13,616
package org.gradle.api.publish.internal; <BUG>import org.gradle.api.Action; import org.gradle.api.artifacts.dsl.RepositoryHandler; </BUG> import org.gradle.api.publish.PublicationContainer; import org.gradle.api.publish.PublishingExtension;
import org.gradle.api.NamedDomainObjectContainer; import org.gradle.api.artifacts.repositories.ArtifactRepository;
13,617
import org.gradle.api.internal.file.FileResolver; <BUG>import org.gradle.api.internal.plugins.DslObject; import org.gradle.api.publish.PublishingExtension; import org.gradle.api.publish.ivy.IvyPublication; import org.gradle.api.publish.ivy.internal.DefaultIvyPublication; import org.gradle.api.publish.ivy.internal.IvyModuleDescriptorInternal;</BUG> import org.gradle.api.publish.ivy.tasks.internal.DefaultIvyPublishTaskNamer; import org.gradle.api.publish.ivy.tasks.internal.IvyPublishDynamicTaskCreator; import org.gradle.api.publish.plugins.PublishingPlugin; import org.gradle.api.specs.Spec;
import org.gradle.api.publish.PublicationContainer; import org.gradle.api.publish.internal.DefaultPublishingExtension; import org.gradle.api.publish.internal.PublicationRepositoryContainer; import org.gradle.api.publish.ivy.internal.IvyArtifactRepositoryFactory; import org.gradle.api.publish.ivy.internal.IvyModuleDescriptorInternal;
13,618
package org.gradle.api.publish; import org.gradle.api.Action; <BUG>import org.gradle.api.Incubating; import org.gradle.api.artifacts.dsl.RepositoryHandler; </BUG> @Incubating public interface PublishingExtension {
import org.gradle.api.NamedDomainObjectContainer; import org.gradle.api.artifacts.repositories.ArtifactRepository;
13,619
package org.gradle.api.publish.ivy.tasks.internal; import org.gradle.api.Action; <BUG>import org.gradle.api.artifacts.ArtifactRepositoryContainer; import org.gradle.api.artifacts.repositories.ArtifactRepository;</BUG> import org.gradle.api.internal.artifacts.repositories.IvyArtifactRepositoryInternal; import org.gradle.api.publish.Publication; import org.gradle.api.publish.PublicationContainer;
import org.gradle.api.NamedDomainObjectContainer; import org.gradle.api.artifacts.repositories.ArtifactRepository;
13,620
private final IvyPublishTaskNamer taskNamer; public IvyPublishDynamicTaskCreator(TaskContainer tasks, IvyPublishTaskNamer taskNamer) { this.tasks = tasks; this.taskNamer = taskNamer; } <BUG>public void monitor(final PublicationContainer publications, final ArtifactRepositoryContainer repositories) { </BUG> publications.all(new Action<Publication>() { public void execute(Publication publication) { for (ArtifactRepository repository : repositories) {
public void monitor(final PublicationContainer publications, final NamedDomainObjectContainer<ArtifactRepository> repositories) {
13,621
package com.easytoolsoft.easyreport.web.controller.common; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @Controller @RequestMapping(value = "/error") <BUG>public class ErrorController extends AbstractController { @RequestMapping(value = {"/404"})</BUG> public String error404() { return "/error/404"; }
public class ErrorController { @RequestMapping(value = {"/404"})
13,622
private String name; @ManyToMany(fetch = FetchType.EAGER) @OrderBy @JoinTable( name = "ROLE_PERMISSION", <BUG>joinColumns = @JoinColumn(name = "role_id", referencedColumnName = "id"), inverseJoinColumns = @JoinColumn(name = "permission_id", referencedColumnName = "id") </BUG> )
joinColumns = @JoinColumn(name = "ROLE_ID", referencedColumnName = "ID"), inverseJoinColumns = @JoinColumn(name = "PERMISSION_ID", referencedColumnName = "ID")
13,623
import javax.validation.ConstraintViolationException; @WithMockUser(username="Admin",roles = {"ADMIN"}) public class CrudMetaGridDataValidationTest extends AbstractTest { @Test(expected = ConstraintViolationException.class) public void testEmptyCrudMetaGridDataPropertySave() throws Exception { <BUG>CrudMetaGridData newCrudMetaGridData = new CrudMetaGridData(null,"", true, true, null, 10.0,50.0); crudMetaGridDataRepository.save(newCrudMetaGridData);</BUG> crudMetaGridDataRepository.findAll();
CrudMetaGridData newCrudMetaGridData = new CrudMetaGridData(null, "", true, true, null, 10.0, "String", null, null, 50.0); crudMetaGridDataRepository.save(newCrudMetaGridData);
13,624
@ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "CRUD_CLASS_META_DATA") private CrudClassMetaData crudClassMetaData; public CrudMetaFormData() { } <BUG>public CrudMetaFormData(Long id, String property, Boolean editable, Boolean visible, String decorator, Double order) { super(id, property, editable, visible, decorator, order); </BUG> }
public CrudMetaFormData(Long id, String property, Boolean editable, Boolean visible, String decorator, Double order, String type, String linkedClass, String linkedRepository) { super(id, property, editable, visible, decorator, order, type, linkedClass, linkedRepository);
13,625
Customer save(Customer customer); @Override @EntityGraph(attributePaths = {"parentCustomer", "contacts", "users"}) Customer findOne(Long id); @EntityGraph(attributePaths = {"parentCustomer", "contacts", "users"}) <BUG>Customer findByCustomerId(@Param("customerId")Double customerID); </BUG> @Override @EntityGraph(attributePaths = {"parentCustomer", "contacts", "users"}) Page<Customer> findAll(Pageable pageable);
Customer findByCustomerId(@Param("customerId") Double customerID);
13,626
@WithMockUser(username="Admin",roles = {"ADMIN"}) public class CrudMetaFormDataJPATest extends AbstractTest { @Test public void testSaveCrudMetaFormData() throws Exception { CrudMetaFormData newCrudMetaFormData = new CrudMetaFormData(null,"defaultProperty", true, <BUG>true, null, 10.0,"newFieldLayoutGridPosition"); </BUG> newCrudMetaFormData.setCrudClassMetaData(CRUD_CLASS_META_DATA_1); CrudMetaFormData created = crudMetaFormDataRepository.save(newCrudMetaFormData); newCrudMetaFormData.setId(created.getId());
true, null, 10.0, "String", null, null, "newFieldLayoutGridPosition");
13,627
private Set<CustomerContact> contacts; @ManyToMany() @OrderBy @JoinTable( name = "CUSTOMER_USER", <BUG>joinColumns = @JoinColumn(name = "customer_id", referencedColumnName = "id"), inverseJoinColumns = @JoinColumn(name = "user_id", referencedColumnName = "id") </BUG> )
joinColumns = @JoinColumn(name = "CUSTOMER_ID", referencedColumnName = "ID"), inverseJoinColumns = @JoinColumn(name = "USER_ID", referencedColumnName = "ID")
13,628
@WithMockUser(username="Admin",roles = {"ADMIN"}) public class CrudMetaFormDataValidationTest extends AbstractTest { @Test(expected = ConstraintViolationException.class) public void testEmptyCrudMetaFormDataPropertySave() throws Exception { CrudMetaFormData newCrudMetaFormData = new CrudMetaFormData(null,"", true, <BUG>true, null, 10.0,"newFieldLayoutGridPosition"); </BUG> crudMetaFormDataRepository.save(newCrudMetaFormData); crudMetaFormDataRepository.findAll(); }
true, null, 10.0, "String", null, null, "newFieldLayoutGridPosition");
13,629
CRUD_META_GRID_DATA_29, CRUD_META_GRID_DATA_30, CRUD_META_GRID_DATA_31), crudMetaGridDataRepository.findAll()); } @Test public void testSaveCrudMetaGridData() throws Exception { CrudMetaGridData newCrudMetaGridData = new CrudMetaGridData(null,"defaultProperty", true, true, <BUG>"newDecorator", 10.0, 50.0); newCrudMetaGridData.setCrudClassMetaData(CRUD_CLASS_META_DATA_1);</BUG> CrudMetaGridData created = crudMetaGridDataRepository.save(newCrudMetaGridData); newCrudMetaGridData.setId(created.getId()); CRUD_META_GRID_DATA_MODEL_MATCHER.assertEquals(newCrudMetaGridData, crudMetaGridDataRepository.findOne(newCrudMetaGridData.getId()));
"newDecorator", 10.0, "String", null, null, null); newCrudMetaGridData.setCrudClassMetaData(CRUD_CLASS_META_DATA_1);
13,630
@Column(name = "BLOCKED") private Boolean blocked = false; @ManyToMany(fetch = FetchType.EAGER) @JoinTable( name = "USER_ROLE", <BUG>joinColumns = @JoinColumn(name = "user_id", referencedColumnName = "id"), inverseJoinColumns = @JoinColumn(name = "role_id", referencedColumnName = "id") </BUG> )
joinColumns = @JoinColumn(name = "USER_ID", referencedColumnName = "ID"), inverseJoinColumns = @JoinColumn(name = "ROLE_ID", referencedColumnName = "ID")
13,631
import io.smsc.model.User; import org.springframework.beans.factory.annotation.Value; import org.springframework.data.jpa.repository.EntityGraph; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; <BUG>import javax.persistence.EntityManager; import javax.persistence.PersistenceContext;</BUG> import javax.persistence.TypedQuery; import java.util.List; @Component
import javax.persistence.NoResultException; import javax.persistence.PersistenceContext;
13,632
} else { updateMemo(); callback.updateMemo(); } dismiss(); <BUG>}else{ </BUG> Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show(); } }
[DELETED]
13,633
} @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_memo); <BUG>ChinaPhoneHelper.setStatusBar(this,true); </BUG> topicId = getIntent().getLongExtra("topicId", -1); if (topicId == -1) { finish();
ChinaPhoneHelper.setStatusBar(this, true);
13,634
MemoEntry.COLUMN_REF_TOPIC__ID + " = ?" , new String[]{String.valueOf(topicId)}); } public Cursor selectMemo(long topicId) { Cursor c = db.query(MemoEntry.TABLE_NAME, null, MemoEntry.COLUMN_REF_TOPIC__ID + " = ?", new String[]{String.valueOf(topicId)}, null, null, <BUG>MemoEntry._ID + " DESC", null); </BUG> if (c != null) { c.moveToFirst(); }
MemoEntry.COLUMN_ORDER + " ASC", null);
13,635
MemoEntry._ID + " = ?", new String[]{String.valueOf(memoId)}); } public long updateMemoContent(long memoId, String memoContent) { ContentValues values = new ContentValues(); <BUG>values.put(MemoEntry.COLUMN_CONTENT, memoContent); return db.update(</BUG> MemoEntry.TABLE_NAME, values, MemoEntry._ID + " = ?",
return db.update(
13,636
import android.widget.RelativeLayout; import android.widget.TextView; import com.kiminonawa.mydiary.R; import com.kiminonawa.mydiary.db.DBManager; import com.kiminonawa.mydiary.shared.EditMode; <BUG>import com.kiminonawa.mydiary.shared.ThemeManager; import java.util.List; public class MemoAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> implements EditMode { </BUG> private List<MemoEntity> memoList;
import com.marshalchen.ultimaterecyclerview.dragsortadapter.DragSortAdapter; public class MemoAdapter extends DragSortAdapter<DragSortAdapter.ViewHolder> implements EditMode {
13,637
private DBManager dbManager; private boolean isEditMode = false; private EditMemoDialogFragment.MemoCallback callback; private static final int TYPE_HEADER = 0; private static final int TYPE_ITEM = 1; <BUG>public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMemoDialogFragment.MemoCallback callback) { this.mActivity = activity;</BUG> this.topicId = topicId; this.memoList = memoList;
public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMemoDialogFragment.MemoCallback callback, RecyclerView recyclerView) { super(recyclerView); this.mActivity = activity;
13,638
this.memoList = memoList; this.dbManager = dbManager; this.callback = callback; } @Override <BUG>public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { </BUG> View view; if (isEditMode) { if (viewType == TYPE_HEADER) {
public DragSortAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
13,639
editMemoDialogFragment.show(mActivity.getSupportFragmentManager(), "editMemoDialogFragment"); } }); } } <BUG>protected class MemoViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener { private View rootView; private TextView TV_memo_item_content;</BUG> private ImageView IV_memo_item_delete;
protected class MemoViewHolder extends DragSortAdapter.ViewHolder implements View.OnClickListener, View.OnLongClickListener { private ImageView IV_memo_item_dot; private TextView TV_memo_item_content;
13,640
package org.lanternpowered.server.network.vanilla.message.type.play; import org.lanternpowered.server.network.message.Message; public final class MessagePlayOutEntityLook implements Message { private final int entityId; private final boolean onGround; <BUG>private final int yaw; private final int pitch; public MessagePlayOutEntityLook(int entityId, int yaw, int pitch, boolean onGround) { </BUG> this.onGround = onGround;
private final byte yaw; private final byte pitch; public MessagePlayOutEntityLook(int entityId, byte yaw, byte pitch, boolean onGround) {
13,641
final ByteBuffer buf = context.byteBufAlloc().buffer(); buf.writeVarInt(message.getEntityId()); buf.writeDouble(message.getX()); buf.writeDouble(message.getY()); buf.writeDouble(message.getZ()); <BUG>buf.writeByte((byte) message.getYaw()); buf.writeByte((byte) message.getPitch()); buf.writeBoolean(message.isOnGround());</BUG> return buf; }
buf.writeByte(message.getYaw()); buf.writeByte(message.getPitch()); buf.writeBoolean(message.isOnGround());
13,642
package org.lanternpowered.server.network.vanilla.message.type.play; <BUG>import static com.google.common.base.Preconditions.checkNotNull; import com.flowpowered.math.vector.Vector3d;</BUG> import org.lanternpowered.server.network.message.Message; public final class MessagePlayOutEntityTeleport implements Message { private final int entityId;
[DELETED]
13,643
import com.flowpowered.math.vector.Vector3d;</BUG> import org.lanternpowered.server.network.message.Message; public final class MessagePlayOutEntityTeleport implements Message { private final int entityId; private final boolean onGround; <BUG>private final int yaw; private final int pitch; </BUG> private final double x;
package org.lanternpowered.server.network.vanilla.message.type.play; private final byte yaw; private final byte pitch;
13,644
private final int pitch; </BUG> private final double x; private final double y; private final double z; <BUG>public MessagePlayOutEntityTeleport(int entityId, double x, double y, double z, int yaw, int pitch, boolean onGround) { </BUG> this.onGround = onGround; this.entityId = entityId; this.pitch = pitch;
package org.lanternpowered.server.network.vanilla.message.type.play; import org.lanternpowered.server.network.message.Message; public final class MessagePlayOutEntityTeleport implements Message { private final int entityId; private final boolean onGround; private final byte yaw; private final byte pitch; public MessagePlayOutEntityTeleport(int entityId, double x, double y, double z, byte yaw, byte pitch, boolean onGround) {
13,645
package org.lanternpowered.server.network.vanilla.message.type.play; import org.lanternpowered.server.network.message.Message; public final class MessagePlayOutEntityHeadLook implements Message { private final int entityId; <BUG>private final float yaw; public MessagePlayOutEntityHeadLook(int entityId, float yaw) { </BUG> this.entityId = entityId;
private final byte yaw; public MessagePlayOutEntityHeadLook(int entityId, byte yaw) {
13,646
ByteBuffer buf = context.byteBufAlloc().buffer(); buf.writeVarInt(message.getEntityId()); buf.writeShort((short) message.getDeltaX()); buf.writeShort((short) message.getDeltaY()); buf.writeShort((short) message.getDeltaZ()); <BUG>buf.writeByte((byte) message.getYaw()); buf.writeByte((byte) message.getPitch()); buf.writeBoolean(message.isOnGround());</BUG> return buf; }
buf.writeByte(message.getYaw()); buf.writeByte(message.getPitch()); buf.writeBoolean(message.isOnGround());
13,647
}; } private double lastX; private double lastY; private double lastZ; <BUG>private double lastYaw; private double lastPitch; private double lastHeadYaw; </BUG> private double lastVelX;
private byte lastYaw; private byte lastPitch; private byte lastHeadYaw;
13,648
final Vector3d headRot = this.entity instanceof Living ? ((Living) this.entity).getHeadRotation() : null; final Vector3d pos = this.entity.getPosition(); final double x = pos.getX(); final double y = pos.getY(); final double z = pos.getZ(); <BUG>final double yaw = rot.getY(); final double pitch = (headRot != null ? headRot : rot).getX(); </BUG> boolean dirtyPos = x != this.lastX || y != this.lastY || z != this.lastZ;
final byte yaw = wrapAngle(rot.getY()); final byte pitch = wrapAngle((headRot != null ? headRot : rot).getX());
13,649
int dxu = (int) (dx * 4096); int dyu = (int) (dy * 4096); int dzu = (int) (dz * 4096); if (dirtyRot) { context.sendToAllExceptSelf(new MessagePlayOutEntityLookAndRelativeMove(entityId, <BUG>dxu, dyu, dzu, wrapAngle(yaw), wrapAngle(pitch), false)); dirtyRot = false;</BUG> } else { context.sendToAllExceptSelf(new MessagePlayOutEntityRelativeMove(entityId, dxu, dyu, dzu, false));
dxu, dyu, dzu, yaw, pitch, false)); dirtyRot = false;
13,650
context.sendToAllExceptSelf(new MessagePlayOutEntityRelativeMove(entityId, dxu, dyu, dzu, false)); } } else { context.sendToAllExceptSelf(new MessagePlayOutEntityTeleport(entityId, <BUG>x, y, z, wrapAngle(yaw), wrapAngle(pitch), false)); dirtyRot = false;</BUG> } } }
x, y, z, yaw, pitch, false)); dirtyRot = false;
13,651
package org.lanternpowered.server.network.vanilla.message.type.play; import org.lanternpowered.server.network.message.Message; public final class MessagePlayOutEntityLookAndRelativeMove implements Message { private final int entityId; private final boolean onGround; <BUG>private final int yaw; private final int pitch; </BUG> private final int deltaX;
private final byte yaw; private final byte pitch;
13,652
this.lastX = x; this.lastY = y; this.lastZ = z; } else if (x != this.lastX || y != this.lastY || z != this.lastZ) { update0(context); <BUG>context.sendToAll(() -> new MessagePlayOutEntityTeleport(getRootEntityId(), x, y, z, 0, 0, true)); </BUG> this.lastX = x; this.lastY = y; this.lastZ = z;
context.sendToAll(() -> new MessagePlayOutEntityTeleport(getRootEntityId(), x, y, z, (byte) 0, (byte) 0, true));
13,653
import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.LocalFileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.permission.FsPermission; import org.apache.hadoop.util.Progressable; <BUG>import static org.apache.hadoop.fs.s3a.S3AConstants.*; public class S3AFileSystem extends FileSystem {</BUG> private URI uri; private Path workingDir; private AmazonS3Client s3;
import static org.apache.hadoop.fs.s3a.Constants.*; public class S3AFileSystem extends FileSystem {
13,654
public void initialize(URI name, Configuration conf) throws IOException { super.initialize(name, conf); uri = URI.create(name.getScheme() + "://" + name.getAuthority()); workingDir = new Path("/user", System.getProperty("user.name")).makeQualified(this.uri, this.getWorkingDirectory()); <BUG>String accessKey = conf.get(ACCESS_KEY, null); String secretKey = conf.get(SECRET_KEY, null); </BUG> String userInfo = name.getUserInfo();
String accessKey = conf.get(NEW_ACCESS_KEY, conf.get(OLD_ACCESS_KEY, null)); String secretKey = conf.get(NEW_SECRET_KEY, conf.get(OLD_SECRET_KEY, null));
13,655
} else { accessKey = userInfo; } } AWSCredentialsProviderChain credentials = new AWSCredentialsProviderChain( <BUG>new S3ABasicAWSCredentialsProvider(accessKey, secretKey), new InstanceProfileCredentialsProvider(), new S3AAnonymousAWSCredentialsProvider() );</BUG> bucket = name.getHost();
new BasicAWSCredentialsProvider(accessKey, secretKey), new AnonymousAWSCredentialsProvider()
13,656
awsConf.setSocketTimeout(conf.getInt(SOCKET_TIMEOUT, DEFAULT_SOCKET_TIMEOUT)); </BUG> s3 = new AmazonS3Client(credentials, awsConf); <BUG>maxKeys = conf.getInt(MAX_PAGING_KEYS, DEFAULT_MAX_PAGING_KEYS); partSize = conf.getLong(MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE); partSizeThreshold = conf.getInt(MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD); </BUG> if (partSize < 5 * 1024 * 1024) {
new InstanceProfileCredentialsProvider(), new AnonymousAWSCredentialsProvider() bucket = name.getHost(); ClientConfiguration awsConf = new ClientConfiguration(); awsConf.setMaxConnections(conf.getInt(NEW_MAXIMUM_CONNECTIONS, conf.getInt(OLD_MAXIMUM_CONNECTIONS, DEFAULT_MAXIMUM_CONNECTIONS))); awsConf.setProtocol(conf.getBoolean(NEW_SECURE_CONNECTIONS, conf.getBoolean(OLD_SECURE_CONNECTIONS, DEFAULT_SECURE_CONNECTIONS)) ? Protocol.HTTPS : Protocol.HTTP); awsConf.setMaxErrorRetry(conf.getInt(NEW_MAX_ERROR_RETRIES, conf.getInt(OLD_MAX_ERROR_RETRIES, DEFAULT_MAX_ERROR_RETRIES))); awsConf.setSocketTimeout(conf.getInt(NEW_SOCKET_TIMEOUT, conf.getInt(OLD_SOCKET_TIMEOUT, DEFAULT_SOCKET_TIMEOUT))); maxKeys = conf.getInt(NEW_MAX_PAGING_KEYS, conf.getInt(OLD_MAX_PAGING_KEYS, DEFAULT_MAX_PAGING_KEYS)); partSize = conf.getLong(NEW_MULTIPART_SIZE, conf.getLong(OLD_MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE)); partSizeThreshold = conf.getInt(NEW_MIN_MULTIPART_THRESHOLD, conf.getInt(OLD_MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD));
13,657
cannedACL = null; } if (!s3.doesBucketExist(bucket)) { throw new IOException("Bucket " + bucket + " does not exist"); } <BUG>boolean purgeExistingMultipart = conf.getBoolean(PURGE_EXISTING_MULTIPART, DEFAULT_PURGE_EXISTING_MULTIPART); long purgeExistingMultipartAge = conf.getLong(PURGE_EXISTING_MULTIPART_AGE, DEFAULT_PURGE_EXISTING_MULTIPART_AGE); </BUG> if (purgeExistingMultipart) {
boolean purgeExistingMultipart = conf.getBoolean(NEW_PURGE_EXISTING_MULTIPART, conf.getBoolean(OLD_PURGE_EXISTING_MULTIPART, DEFAULT_PURGE_EXISTING_MULTIPART)); long purgeExistingMultipartAge = conf.getLong(NEW_PURGE_EXISTING_MULTIPART_AGE, conf.getLong(OLD_PURGE_EXISTING_MULTIPART_AGE, DEFAULT_PURGE_EXISTING_MULTIPART_AGE));
13,658
import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; <BUG>import static org.apache.hadoop.fs.s3a.S3AConstants.*; public class S3AOutputStream extends OutputStream {</BUG> private OutputStream backupStream; private File backupFile; private boolean closed;
import static org.apache.hadoop.fs.s3a.Constants.*; public class S3AOutputStream extends OutputStream {
13,659
this.client = client; this.progress = progress; this.fs = fs; this.cannedACL = cannedACL; this.statistics = statistics; <BUG>partSize = conf.getLong(MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE); partSizeThreshold = conf.getInt(MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD); </BUG> if (conf.get(BUFFER_DIR, null) != null) {
partSize = conf.getLong(OLD_MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE); partSizeThreshold = conf.getInt(OLD_MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD);
13,660
import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.LocalFileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.permission.FsPermission; import org.apache.hadoop.util.Progressable; <BUG>import static org.apache.hadoop.fs.s3a.S3AConstants.*; public class S3AFileSystem extends FileSystem {</BUG> private URI uri; private Path workingDir; private AmazonS3Client s3;
import static org.apache.hadoop.fs.s3a.Constants.*; public class S3AFileSystem extends FileSystem {
13,661
public void initialize(URI name, Configuration conf) throws IOException { super.initialize(name, conf); uri = URI.create(name.getScheme() + "://" + name.getAuthority()); workingDir = new Path("/user", System.getProperty("user.name")).makeQualified(this.uri, this.getWorkingDirectory()); <BUG>String accessKey = conf.get(ACCESS_KEY, null); String secretKey = conf.get(SECRET_KEY, null); </BUG> String userInfo = name.getUserInfo();
String accessKey = conf.get(NEW_ACCESS_KEY, conf.get(OLD_ACCESS_KEY, null)); String secretKey = conf.get(NEW_SECRET_KEY, conf.get(OLD_SECRET_KEY, null));
13,662
} else { accessKey = userInfo; } } AWSCredentialsProviderChain credentials = new AWSCredentialsProviderChain( <BUG>new S3ABasicAWSCredentialsProvider(accessKey, secretKey), new InstanceProfileCredentialsProvider(), new S3AAnonymousAWSCredentialsProvider() );</BUG> bucket = name.getHost();
new BasicAWSCredentialsProvider(accessKey, secretKey), new AnonymousAWSCredentialsProvider()
13,663
awsConf.setSocketTimeout(conf.getInt(SOCKET_TIMEOUT, DEFAULT_SOCKET_TIMEOUT)); </BUG> s3 = new AmazonS3Client(credentials, awsConf); <BUG>maxKeys = conf.getInt(MAX_PAGING_KEYS, DEFAULT_MAX_PAGING_KEYS); partSize = conf.getLong(MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE); partSizeThreshold = conf.getInt(MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD); </BUG> if (partSize < 5 * 1024 * 1024) {
new InstanceProfileCredentialsProvider(), new AnonymousAWSCredentialsProvider() bucket = name.getHost(); ClientConfiguration awsConf = new ClientConfiguration(); awsConf.setMaxConnections(conf.getInt(NEW_MAXIMUM_CONNECTIONS, conf.getInt(OLD_MAXIMUM_CONNECTIONS, DEFAULT_MAXIMUM_CONNECTIONS))); awsConf.setProtocol(conf.getBoolean(NEW_SECURE_CONNECTIONS, conf.getBoolean(OLD_SECURE_CONNECTIONS, DEFAULT_SECURE_CONNECTIONS)) ? Protocol.HTTPS : Protocol.HTTP); awsConf.setMaxErrorRetry(conf.getInt(NEW_MAX_ERROR_RETRIES, conf.getInt(OLD_MAX_ERROR_RETRIES, DEFAULT_MAX_ERROR_RETRIES))); awsConf.setSocketTimeout(conf.getInt(NEW_SOCKET_TIMEOUT, conf.getInt(OLD_SOCKET_TIMEOUT, DEFAULT_SOCKET_TIMEOUT))); maxKeys = conf.getInt(NEW_MAX_PAGING_KEYS, conf.getInt(OLD_MAX_PAGING_KEYS, DEFAULT_MAX_PAGING_KEYS)); partSize = conf.getLong(NEW_MULTIPART_SIZE, conf.getLong(OLD_MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE)); partSizeThreshold = conf.getInt(NEW_MIN_MULTIPART_THRESHOLD, conf.getInt(OLD_MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD));
13,664
cannedACL = null; } if (!s3.doesBucketExist(bucket)) { throw new IOException("Bucket " + bucket + " does not exist"); } <BUG>boolean purgeExistingMultipart = conf.getBoolean(PURGE_EXISTING_MULTIPART, DEFAULT_PURGE_EXISTING_MULTIPART); long purgeExistingMultipartAge = conf.getLong(PURGE_EXISTING_MULTIPART_AGE, DEFAULT_PURGE_EXISTING_MULTIPART_AGE); </BUG> if (purgeExistingMultipart) {
boolean purgeExistingMultipart = conf.getBoolean(NEW_PURGE_EXISTING_MULTIPART, conf.getBoolean(OLD_PURGE_EXISTING_MULTIPART, DEFAULT_PURGE_EXISTING_MULTIPART)); long purgeExistingMultipartAge = conf.getLong(NEW_PURGE_EXISTING_MULTIPART_AGE, conf.getLong(OLD_PURGE_EXISTING_MULTIPART_AGE, DEFAULT_PURGE_EXISTING_MULTIPART_AGE));
13,665
import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; <BUG>import static org.apache.hadoop.fs.s3a.S3AConstants.*; public class S3AOutputStream extends OutputStream {</BUG> private OutputStream backupStream; private File backupFile; private boolean closed;
import static org.apache.hadoop.fs.s3a.Constants.*; public class S3AOutputStream extends OutputStream {
13,666
this.client = client; this.progress = progress; this.fs = fs; this.cannedACL = cannedACL; this.statistics = statistics; <BUG>partSize = conf.getLong(MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE); partSizeThreshold = conf.getInt(MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD); </BUG> if (conf.get(BUFFER_DIR, null) != null) {
partSize = conf.getLong(OLD_MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE); partSizeThreshold = conf.getInt(OLD_MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD);
13,667
import java.util.function.Consumer; import java.util.function.Function; import org.jooby.Env; import org.jooby.Jooby; import org.jooby.Router; <BUG>import org.jooby.internal.metrics.HealthCheckRegistryProvider; </BUG> import org.jooby.internal.metrics.MetricRegistryInitializer; import com.codahale.metrics.Metric; import com.codahale.metrics.MetricRegistry;
import org.jooby.internal.metrics.HealthCheckRegistryInitializer;
13,668
public Metrics request(final String method, final String pattern) { routes.add(r -> r.use(method, pattern, new InstrumentedHandler())); return this; } public Metrics request(final String pattern) { <BUG>return request("GET", "*"); </BUG> } public Metrics request() { return request("*");
return request("GET", pattern);
13,669
this.reporters.forEach(it -> reporters.addBinding().toInstance(it.apply(registry, conf))); </BUG> binder.bind(MetricRegistryInitializer.class).asEagerSingleton(); <BUG>env.onStop(app -> app.require(MetricRegistryInitializer.class).close()); binder.bind(HealthCheckRegistry.class) .toProvider(HealthCheckRegistryProvider.class) .asEagerSingleton();</BUG> bindings.forEach(it -> it.bind(binder, routes, conf)); this.routes.forEach(it -> it.accept(routes));
MetricHandler mhandler = new MetricHandler(); routes.use("GET", this.pattern + "/metrics", mhandler); routes.use("GET", this.pattern + "/metrics/:type", mhandler); routes.use("GET", this.pattern + "/healthcheck", new HealthCheckHandler()); Multibinder<Reporter> reporters = Multibinder.newSetBinder(binder, Reporter.class); binder.bind(MetricRegistry.class).toInstance(metricRegistry); this.reporters.forEach(it -> reporters.addBinding().toInstance(it.apply(metricRegistry, conf))); binder.bind(HealthCheckRegistry.class).toInstance(healthCheckRegistry); binder.bind(HealthCheckRegistryInitializer.class).asEagerSingleton();
13,670
package brooklyn.location.basic; <BUG>import static brooklyn.util.GroovyJavaMethods.truth; import java.io.Closeable;</BUG> import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException;
import groovy.lang.Closure; import java.io.Closeable;
13,671
@Override public String apply(HasConfigKey<?> input) { return input.getConfigKey().getName(); } })); <BUG>private transient LoadingCache<Map<String, ?>, Pool<SshTool>> sshPoolCache; public SshMachineLocation() {</BUG> this(MutableMap.of()); } public SshMachineLocation(Map properties) {
private Task<?> cleanupTask; public SshMachineLocation() {
13,672
newContent = fixSessionKey( fileName, newContent, taglibSessionKeyPattern); checkLanguageKeys(fileName, newContent, languageKeyPattern); checkLanguageKeys(fileName, newContent, _taglibLanguageKeyPattern); checkXSS(fileName, newContent); <BUG>if (isAutoFix() && (newContent != null) && !content.equals(newContent)) { fileUtil.write(file, newContent); sourceFormatterHelper.printError(fileName, file); }</BUG> return newContent;
if (!content.equals(newContent)) { if (isAutoFix()) {
13,673
fileName, StringPool.BACK_SLASH, StringPool.SLASH); String content = fileUtil.read(file); String newContent = trimContent(content, false); newContent = fixComments(newContent); newContent = fixHexColors(newContent); <BUG>if (isAutoFix() && (newContent != null) && !content.equals(newContent)) { fileUtil.write(file, newContent); sourceFormatterHelper.printError(fileName, file); }</BUG> return newContent;
if (!content.equals(newContent)) { if (isAutoFix()) {
13,674
File file = new File(fileName); if (!file.exists()) { return null; } String content = fileUtil.read(new File(fileName), true); <BUG>if (content.contains("\r")) { processErrorMessage(fileName, "Invalid new line character"); if (isAutoFix()) { content = StringUtil.replace(content, "\r", "");</BUG> fileUtil.write(fileName, content);
if (!content.contains("\r")) { return content; String newContent = StringUtil.replace(content, "\r", "");
13,675
else if ((portalSource && fileName.endsWith("WEB-INF/web.xml")) || (!portalSource && fileName.endsWith("/web.xml"))) { newContent = formatWebXML(fileName, newContent); } newContent = formatXML(newContent); <BUG>if (isAutoFix() && (newContent != null) && !content.equals(newContent)) { fileUtil.write(file, newContent); sourceFormatterHelper.printError(fileName, file); }</BUG> }
[DELETED]
13,676
timeWarp = new OwnLabel(getFormattedTimeWrap(), skin, "warp"); timeWarp.setName("time warp"); Container wrapWrapper = new Container(timeWarp); wrapWrapper.width(60f * GlobalConf.SCALE_FACTOR); wrapWrapper.align(Align.center); <BUG>VerticalGroup timeGroup = new VerticalGroup().align(Align.left).space(3 * GlobalConf.SCALE_FACTOR).padTop(3 * GlobalConf.SCALE_FACTOR); </BUG> HorizontalGroup dateGroup = new HorizontalGroup(); dateGroup.space(4 * GlobalConf.SCALE_FACTOR); dateGroup.addActor(date);
VerticalGroup timeGroup = new VerticalGroup().align(Align.left).columnAlign(Align.left).space(3 * GlobalConf.SCALE_FACTOR).padTop(3 * GlobalConf.SCALE_FACTOR);
13,677
focusListScrollPane.setFadeScrollBars(false); focusListScrollPane.setScrollingDisabled(true, false); focusListScrollPane.setHeight(tree ? 200 * GlobalConf.SCALE_FACTOR : 100 * GlobalConf.SCALE_FACTOR); focusListScrollPane.setWidth(160); } <BUG>VerticalGroup objectsGroup = new VerticalGroup().align(Align.left).space(3 * GlobalConf.SCALE_FACTOR); </BUG> objectsGroup.addActor(searchBox); if (focusListScrollPane != null) { objectsGroup.addActor(focusListScrollPane);
VerticalGroup objectsGroup = new VerticalGroup().align(Align.left).columnAlign(Align.left).space(3 * GlobalConf.SCALE_FACTOR);
13,678
headerGroup.addActor(expandIcon); headerGroup.addActor(detachIcon); addActor(headerGroup); expandIcon.setChecked(expanded); } <BUG>public void expand() { </BUG> if (!expandIcon.isChecked()) { expandIcon.setChecked(true); }
public void expandPane() {
13,679
</BUG> if (!expandIcon.isChecked()) { expandIcon.setChecked(true); } } <BUG>public void collapse() { </BUG> if (expandIcon.isChecked()) { expandIcon.setChecked(false); }
headerGroup.addActor(expandIcon); headerGroup.addActor(detachIcon); addActor(headerGroup); expandIcon.setChecked(expanded); public void expandPane() { public void collapsePane() {
13,680
}); playstop.addListener(new TextTooltip(txt("gui.tooltip.playstop"), skin)); TimeComponent timeComponent = new TimeComponent(skin, ui); timeComponent.initialize(); CollapsiblePane time = new CollapsiblePane(ui, txt("gui.time"), timeComponent.getActor(), skin, true, playstop); <BUG>time.align(Align.left); mainActors.add(time);</BUG> panes.put(timeComponent.getClass().getSimpleName(), time); if (Constants.desktop) { recCamera = new OwnImageButton(skin, "rec");
time.align(Align.left).columnAlign(Align.left); mainActors.add(time);
13,681
panes.put(visualEffectsComponent.getClass().getSimpleName(), visualEffects); ObjectsComponent objectsComponent = new ObjectsComponent(skin, ui); objectsComponent.setSceneGraph(sg); objectsComponent.initialize(); CollapsiblePane objects = new CollapsiblePane(ui, txt("gui.objects"), objectsComponent.getActor(), skin, false); <BUG>objects.align(Align.left); mainActors.add(objects);</BUG> panes.put(objectsComponent.getClass().getSimpleName(), objects); GaiaComponent gaiaComponent = new GaiaComponent(skin, ui); gaiaComponent.initialize();
objects.align(Align.left).columnAlign(Align.left); mainActors.add(objects);
13,682
if (Constants.desktop) { MusicComponent musicComponent = new MusicComponent(skin, ui); musicComponent.initialize(); Actor[] musicActors = MusicActorsManager.getMusicActors() != null ? MusicActorsManager.getMusicActors().getActors(skin) : null; CollapsiblePane music = new CollapsiblePane(ui, txt("gui.music"), musicComponent.getActor(), skin, true, musicActors); <BUG>music.align(Align.left); mainActors.add(music);</BUG> panes.put(musicComponent.getClass().getSimpleName(), music); } Button switchWebgl = new OwnTextButton(txt("gui.webgl.back"), skin, "link");
music.align(Align.left).columnAlign(Align.left); mainActors.add(music);
13,683
param.setDescription(bundle.getString(paramDescriptionKey)); } } } } <BUG>private void setupSqaleModel(NewRule rule, Class<?> ruleClass) { </BUG> SqaleConstantRemediation constant = AnnotationUtils.getAnnotation(ruleClass, SqaleConstantRemediation.class); SqaleLinearRemediation linear = AnnotationUtils.getAnnotation(ruleClass, SqaleLinearRemediation.class); SqaleLinearWithOffsetRemediation linearWithOffset = AnnotationUtils.getAnnotation(ruleClass,
private static void setupSqaleModel(NewRule rule, Class<?> ruleClass) {
13,684
return new ArrayList<>(); } public boolean matches(AstNode originalNode) { AstNode node = normalize(originalNode); LinkedList<AstNode> nodes = Lists.newLinkedList(node.getChildren(PlSqlGrammar.VARIABLE_NAME, PlSqlGrammar.IDENTIFIER_NAME)); <BUG>if (nodes.size() == 0) { return false;</BUG> } boolean matches = true; matches &= nameAcceptable(nodes.removeLast(), methodName);
if (nodes.isEmpty()) { return false;
13,685
json = true; }</BUG> } final Logger logger = Logger.getLogger(""); <BUG>final Handler[] handlers = logger.getHandlers(); boolean displaySubmenu = false; for (int i=0; i<handlers.length; i++) { if (handlers[i] instanceof GuiHandler) { maxlines = ((GuiHandler)handlers[i]).getSize(); if (lines > maxlines) lines = maxlines; log = ((GuiHandler)handlers[i]).getLogLines(reversed,lines); } else if (handlers[i] instanceof LogalizerHandler) { displaySubmenu = true;</BUG> }
lines = Integer.parseInt(post.get("lines")); if(post.containsKey("filter")){ filter = post.get("filter"); for (final Handler handler : handlers) { if (handler instanceof GuiHandler) { maxlines = ((GuiHandler)handler).getSize(); log = ((GuiHandler)handler).getLogLines(reversed,lines);
13,686
package io.fabric8.kubernetes.client; <BUG>import io.fabric8.kubernetes.api.model.DoneableLimitRange; import io.fabric8.kubernetes.api.model.LimitRange;</BUG> import io.fabric8.kubernetes.api.model.LimitRangeList; import okhttp3.OkHttpClient; import io.fabric8.kubernetes.api.model.ComponentStatus;
import io.fabric8.kubernetes.api.model.KubernetesResourceList; import io.fabric8.kubernetes.api.model.LimitRange;
13,687
import io.fabric8.kubernetes.api.model.DoneableServiceAccount; import io.fabric8.kubernetes.api.model.Endpoints; import io.fabric8.kubernetes.api.model.EndpointsList; import io.fabric8.kubernetes.api.model.Event; import io.fabric8.kubernetes.api.model.EventList; <BUG>import io.fabric8.kubernetes.api.model.HasMetadata; import io.fabric8.kubernetes.api.model.LimitRange;</BUG> import io.fabric8.kubernetes.api.model.LimitRangeList; import io.fabric8.kubernetes.api.model.Namespace; import io.fabric8.kubernetes.api.model.NamespaceList;
import io.fabric8.kubernetes.api.model.KubernetesResourceList; import io.fabric8.kubernetes.api.model.LimitRange;
13,688
import java.util.List; public interface KubernetesClient extends Client { ExtensionsAPIGroupDSL extensions(); ClientMixedOperation<ComponentStatus, ComponentStatusList, DoneableComponentStatus, ClientResource<ComponentStatus, DoneableComponentStatus>> componentstatuses(); NamespaceVisitFromServerGetDeleteRecreateApplicable<List<HasMetadata>,Boolean> load(InputStream is); <BUG>NamespaceVisitFromServerGetDeleteRecreateApplicable<List<HasMetadata>,Boolean> resource(HasMetadata is); NamespaceVisitFromServerGetDeleteRecreateApplicable<List<HasMetadata>,Boolean> resource(String s); ClientMixedOperation<Endpoints, EndpointsList, DoneableEndpoints, ClientResource<Endpoints, DoneableEndpoints>> endpoints();</BUG> ClientMixedOperation<Event, EventList, DoneableEvent, ClientResource<Event, DoneableEvent>> events();
NamespaceVisitFromServerGetDeleteRecreateApplicable<List<HasMetadata>, Boolean> resourceList(KubernetesResourceList is); NamespaceVisitFromServerGetDeleteRecreateApplicable<List<HasMetadata>, Boolean> resourceList(String s); NamespaceVisitFromServerGetDeleteRecreateApplicable<HasMetadata,Boolean> resource(HasMetadata is); NamespaceVisitFromServerGetDeleteRecreateApplicable<HasMetadata,Boolean> resource(String s); ClientMixedOperation<Endpoints, EndpointsList, DoneableEndpoints, ClientResource<Endpoints, DoneableEndpoints>> endpoints();
13,689
import io.fabric8.kubernetes.client.dsl.internal.ConfigMapOperationsImpl; import io.fabric8.kubernetes.client.dsl.internal.EndpointsOperationsImpl; import io.fabric8.kubernetes.client.dsl.internal.EventOperationsImpl; import io.fabric8.kubernetes.client.dsl.internal.KubernetesListOperationsImpl; import io.fabric8.kubernetes.client.dsl.internal.NamespaceOperationsImpl; <BUG>import io.fabric8.kubernetes.client.dsl.internal.NamespaceVisitFromServerGetDeleteRecreateApplicableImpl; </BUG> import io.fabric8.kubernetes.client.dsl.internal.NodeOperationsImpl; import io.fabric8.kubernetes.client.dsl.internal.PersistentVolumeClaimOperationsImpl; import io.fabric8.kubernetes.client.dsl.internal.PersistentVolumeOperationsImpl;
import io.fabric8.kubernetes.client.dsl.internal.NamespaceVisitFromServerGetDeleteRecreateApplicableListImpl;
13,690
public ClientMixedOperation<ComponentStatus, ComponentStatusList, DoneableComponentStatus, ClientResource<ComponentStatus, DoneableComponentStatus>> componentstatuses() { return new ComponentStatusOperationsImpl(httpClient, getConfiguration()); } @Override public NamespaceVisitFromServerGetDeleteRecreateApplicable<List<HasMetadata>, Boolean> load(InputStream is) { <BUG>return new NamespaceVisitFromServerGetDeleteRecreateApplicableImpl(httpClient, getConfiguration(), getNamespace(), null, false, false, new ArrayList<Visitor>(), is, false) { }; } @Override public NamespaceVisitFromServerGetDeleteRecreateApplicable<List<HasMetadata>, Boolean> resource(HasMetadata item) { return new NamespaceVisitFromServerGetDeleteRecreateApplicableImpl(httpClient, getConfiguration(), getNamespace(), null, false, false, new ArrayList<Visitor>(), item, -1, false) {</BUG> };
[DELETED]
13,691
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;
13,692
@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;
13,693
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);
13,694
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;
13,695
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;
13,696
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;
13,697
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;
13,698
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;
13,699
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();
13,700
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: " +