id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
25,501
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 != nu...
MemoEntry.COLUMN_ORDER + " ASC", null);
25,502
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(
25,503
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.A...
import com.marshalchen.ultimaterecyclerview.dragsortadapter.DragSortAdapter; public class MemoAdapter extends DragSortAdapter<DragSortAdapter.ViewHolder> implements EditMode {
25,504
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, EditMe...
public MemoAdapter(FragmentActivity activity, long topicId, List<MemoEntity> memoList, DBManager dbManager, EditMemoDialogFragment.MemoCallback callback, RecyclerView recyclerView) { super(recyclerView); this.mActivity = activity;
25,505
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) {
25,506
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;
25,507
import java.io.DataInputStream; import java.io.IOException; public abstract class Annotations extends Attribute { private static final long serialVersionUID = 1L; private AnnotationEntry[] annotation_table; <BUG>public Annotations(byte annotation_type, int name_index, int length, DataInputStream file, ConstantPool cons...
public Annotations(int name_index, int length, DataInputStream file, ConstantPool constant_pool) throws IOException { this(name_index, length, (AnnotationEntry[]) null, constant_pool); final int annotation_table_length = (file.readUnsignedShort());
25,508
annotation_table = new AnnotationEntry[annotation_table_length]; for (int i = 0; i < annotation_table_length; i++) { annotation_table[i] = AnnotationEntry.read(file, constant_pool); } } <BUG>public Annotations(byte annotation_type, int name_index, int length, AnnotationEntry[] annotation_table, ConstantPool constant_po...
public Annotations(int name_index, int length, AnnotationEntry[] annotation_table, ConstantPool constant_pool) { super(name_index, length, constant_pool); setAnnotationTable(annotation_table);
25,509
else if (t == ANY_CYPHER_OPTION) { r = AnyCypherOption(b, 0); } else if (t == ANY_FUNCTION_INVOCATION) { r = AnyFunctionInvocation(b, 0); <BUG>} else if (t == BULK_IMPORT_QUERY) {</BUG> r = BulkImportQuery(b, 0); } else if (t == CALL) {
else if (t == ARRAY) { r = Array(b, 0); else if (t == BULK_IMPORT_QUERY) {
25,510
if (!r) r = MapLiteral(b, l + 1); if (!r) r = MapProjection(b, l + 1); if (!r) r = CountStar(b, l + 1); if (!r) r = ListComprehension(b, l + 1); if (!r) r = PatternComprehension(b, l + 1); <BUG>if (!r) r = Expression1_12(b, l + 1); if (!r) r = FilterFunctionInvocation(b, l + 1);</BUG> if (!r) r = ExtractFunctionInvocat...
if (!r) r = Array(b, l + 1); if (!r) r = FilterFunctionInvocation(b, l + 1);
25,511
Bundle savedInstanceState) { final View rootView = inflater.inflate(R.layout.tab_qibla, container, false); final QiblaCompassView qiblaCompassView = (QiblaCompassView)rootView.findViewById(R.id.qibla_compass); qiblaCompassView.setConstants(((TextView)rootView.findViewById(R.id.bearing_north)), getText(R.string.bearing_...
sOrientationListener = new android.hardware.SensorListener() {
25,512
AvailabilityGuard.AvailabilityRequirement { private final HighAvailabilityMemberContext context; private final AvailabilityGuard availabilityGuard; private final ClusterMemberEvents events; <BUG>private final StringLogger logger; private Iterable<HighAvailabilityMemberListener> memberListeners = Listeners.newListeners(...
private StringLogger logger; private Iterable<HighAvailabilityMemberListener> memberListeners = Listeners.newListeners();
25,513
state = state.masterIsElected( context, coordinatorId ); context.setElectedMasterId( coordinatorId ); final HighAvailabilityMemberChangeEvent event = new HighAvailabilityMemberChangeEvent( oldState, state, coordinatorId, null ); <BUG>boolean successful = Listeners.notifyListeners( memberListeners, new Listeners.Notific...
new Listeners.Notification<HighAvailabilityMemberListener>()
25,514
public void notify( HighAvailabilityMemberListener listener ) { listener.masterIsElected( event ); } } ); <BUG>if ( successful ) {</BUG> context.setAvailableHaMasterId( null ); if ( oldState.isAccessAllowed() && oldState != state ) {
[DELETED]
25,515
{ availabilityGuard.deny(HighAvailabilityMemberStateMachine.this); } logger.debug( "Got masterIsElected(" + coordinatorId + "), changed " + oldState + " -> " + state + ". Previous elected master is " + previousElected ); <BUG>} else { logger.debug( "Got masterIsElected(" + coordinatorId + "), but applying it was not su...
@Override public void notify( HighAvailabilityMemberListener listener ) listener.masterIsElected( event );
25,516
state = state.masterIsAvailable( context, instanceId, roleUri ); logger.debug( "Got masterIsAvailable(" + instanceId + "), moved to " + state + " from " + oldState ); final HighAvailabilityMemberChangeEvent event = new HighAvailabilityMemberChangeEvent( oldState, state, instanceId, roleUri ); <BUG>boolean successful = ...
new Listeners.Notification<HighAvailabilityMemberListener>()
25,517
public void notify( HighAvailabilityMemberListener listener ) { listener.masterIsAvailable( event ); } } ); <BUG>if ( successful ) {</BUG> if ( oldState == HighAvailabilityMemberState.TO_MASTER && state == HighAvailabilityMemberState.MASTER ) {
[DELETED]
25,518
{</BUG> if ( oldState == HighAvailabilityMemberState.TO_MASTER && state == HighAvailabilityMemberState.MASTER ) { availabilityGuard.grant(HighAvailabilityMemberStateMachine.this); <BUG>} } else { logger.debug( "Got masterIsAvailable(" + instanceId + "), but applying it was not successful so keeps state " + oldState + "...
public void notify( HighAvailabilityMemberListener listener ) listener.masterIsAvailable( event ); } );
25,519
state = state.slaveIsAvailable( context, instanceId, roleUri ); logger.debug( "Got slaveIsAvailable(" + instanceId + "), " + "moved to " + state + " from " + oldState ); final HighAvailabilityMemberChangeEvent event = new HighAvailabilityMemberChangeEvent( oldState, state, instanceId, roleUri ); <BUG>boolean successful...
new Listeners.Notification<HighAvailabilityMemberListener>()
25,520
public void notify( HighAvailabilityMemberListener listener ) { listener.slaveIsAvailable( event ); } } ); <BUG>if ( successful ) {</BUG> if ( oldState == HighAvailabilityMemberState.TO_SLAVE && state == HighAvailabilityMemberState.SLAVE ) {
[DELETED]
25,521
{</BUG> if ( oldState == HighAvailabilityMemberState.TO_SLAVE && state == HighAvailabilityMemberState.SLAVE ) { availabilityGuard.grant(HighAvailabilityMemberStateMachine.this); <BUG>} } else { logger.debug( "Got slaveIsAvailable(" + instanceId + "), but applying it was not successful so keeps state " + oldState + " ev...
public void notify( HighAvailabilityMemberListener listener ) listener.slaveIsAvailable( event ); } );
25,522
System.out.println(change); } } }; @Override <BUG>protected Callback<VChild, Void> copyChildCallback() </BUG> { return (child) -> {
protected Callback<VChild, Void> copyIntoCallback()
25,523
package jfxtras.labs.icalendarfx.components; import jfxtras.labs.icalendarfx.properties.component.descriptive.Comment; <BUG>import jfxtras.labs.icalendarfx.properties.component.misc.IANAProperty; import jfxtras.labs.icalendarfx.properties.component.misc.UnknownProperty;</BUG> import jfxtras.labs.icalendarfx.properties...
import jfxtras.labs.icalendarfx.properties.component.misc.NonStandardProperty;
25,524
VEVENT ("VEVENT", Arrays.asList(PropertyType.ATTACHMENT, PropertyType.ATTENDEE, PropertyType.CATEGORIES, PropertyType.CLASSIFICATION, PropertyType.COMMENT, PropertyType.CONTACT, PropertyType.DATE_TIME_CREATED, PropertyType.DATE_TIME_END, PropertyType.DATE_TIME_STAMP, PropertyType.DATE_TIME_START, PropertyType.DESCRIPTI...
PropertyType.GEOGRAPHIC_POSITION, PropertyType.LAST_MODIFIED, PropertyType.LOCATION, PropertyType.NON_STANDARD, PropertyType.ORGANIZER, PropertyType.PRIORITY,
25,525
VTODO ("VTODO", Arrays.asList(PropertyType.ATTACHMENT, PropertyType.ATTENDEE, PropertyType.CATEGORIES, PropertyType.CLASSIFICATION, PropertyType.COMMENT, PropertyType.CONTACT, PropertyType.DATE_TIME_COMPLETED, PropertyType.DATE_TIME_CREATED, PropertyType.DATE_TIME_DUE, PropertyType.DATE_TIME_STAMP, PropertyType.DATE_TI...
PropertyType.EXCEPTION_DATE_TIMES, PropertyType.GEOGRAPHIC_POSITION, PropertyType.LAST_MODIFIED, PropertyType.LOCATION, PropertyType.NON_STANDARD, PropertyType.ORGANIZER,
25,526
throw new RuntimeException("not implemented"); } }, DAYLIGHT_SAVING_TIME ("DAYLIGHT", Arrays.asList(PropertyType.COMMENT, PropertyType.DATE_TIME_START, <BUG>PropertyType.IANA_PROPERTY, PropertyType.NON_STANDARD, PropertyType.RECURRENCE_DATE_TIMES, PropertyType.RECURRENCE_RULE, PropertyType.TIME_ZONE_NAME, PropertyType....
PropertyType.RECURRENCE_RULE, PropertyType.TIME_ZONE_NAME, PropertyType.TIME_ZONE_OFFSET_FROM,
25,527
throw new RuntimeException("not implemented"); } }, VALARM ("VALARM", Arrays.asList(PropertyType.ACTION, PropertyType.ATTACHMENT, PropertyType.ATTENDEE, PropertyType.DESCRIPTION, <BUG>PropertyType.DURATION, PropertyType.IANA_PROPERTY, PropertyType.NON_STANDARD, PropertyType.REPEAT_COUNT, PropertyType.SUMMARY, PropertyT...
DAYLIGHT_SAVING_TIME ("DAYLIGHT", Arrays.asList(PropertyType.COMMENT, PropertyType.DATE_TIME_START, PropertyType.NON_STANDARD, PropertyType.RECURRENCE_DATE_TIMES, PropertyType.RECURRENCE_RULE, PropertyType.TIME_ZONE_NAME, PropertyType.TIME_ZONE_OFFSET_FROM, PropertyType.TIME_ZONE_OFFSET_TO), DaylightSavingTime.class)
25,528
private ContentLineStrategy contentLineGenerator; protected void setContentLineGenerator(ContentLineStrategy contentLineGenerator) { this.contentLineGenerator = contentLineGenerator; } <BUG>protected Callback<VChild, Void> copyChildCallback() </BUG> { throw new RuntimeException("Can't copy children. copyChildCallback ...
protected Callback<VChild, Void> copyIntoCallback()
25,529
import jfxtras.labs.icalendarfx.properties.calendar.Version; import jfxtras.labs.icalendarfx.properties.component.misc.NonStandardProperty; public enum CalendarProperty { CALENDAR_SCALE ("CALSCALE", <BUG>Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD, ParameterType.IANA_PARAMETER), CalendarSca...
Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD), CalendarScale.class)
25,530
CalendarScale calendarScale = (CalendarScale) child; destination.setCalendarScale(calendarScale); } }, METHOD ("METHOD", <BUG>Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD, ParameterType.IANA_PARAMETER), Method.class)</BUG> { @Override public VChild parse(VCalendar vCalendar, String contentLi...
Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD), Method.class)
25,531
} list.add(new NonStandardProperty((NonStandardProperty) child)); } }, PRODUCT_IDENTIFIER ("PRODID", <BUG>Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD, ParameterType.IANA_PARAMETER), ProductIdentifier.class)</BUG> { @Override public VChild parse(VCalendar vCalendar, String contentLine)
public void copyChild(VChild child, VCalendar destination) CalendarScale calendarScale = (CalendarScale) child; destination.setCalendarScale(calendarScale); METHOD ("METHOD", Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD), Method.class)
25,532
ProductIdentifier productIdentifier = (ProductIdentifier) child; destination.setProductIdentifier(productIdentifier); } }, VERSION ("VERSION", <BUG>Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD, ParameterType.IANA_PARAMETER), Version.class)</BUG> { @Override public VChild parse(VCalendar vCal...
Arrays.asList(ParameterType.VALUE_DATA_TYPES, ParameterType.NON_STANDARD), Version.class)
25,533
package jfxtras.labs.icalendarfx.components; import jfxtras.labs.icalendarfx.properties.component.descriptive.Comment; <BUG>import jfxtras.labs.icalendarfx.properties.component.misc.IANAProperty; import jfxtras.labs.icalendarfx.properties.component.misc.UnknownProperty;</BUG> import jfxtras.labs.icalendarfx.properties...
import jfxtras.labs.icalendarfx.properties.component.misc.NonStandardProperty;
25,534
public static boolean debugMode = false; @ModConfigProperty(category = "Debug", name = "debugModeGOTG", comment = "Enable/Disable Debug Mode for the Gift Of The Gods") public static boolean debugModeGOTG = false; @ModConfigProperty(category = "Debug", name = "debugModeEnchantments", comment = "Enable/Disable Debug Mode...
@ModConfigProperty(category = "Weapons", name = "enableSwordsRecipes", comment = "Enable/Disable ArmorPlus Sword's Recipes") @ModConfigProperty(category = "Weapons", name = "enableBattleAxesRecipes", comment = "Enable/Disable ArmorPlus Battle Axes's Recipes") @ModConfigProperty(category = "Weapons", name = "enableBowsR...
25,535
public boolean waitEvent(final ProcedureEvent event, final Procedure procedure) { synchronized (event) { if (event.isReady()) { return false; } <BUG>suspendProcedure(event, procedure); return true;</BUG> } } @Override
waitProcedure(event.getSuspendedProcedures(), procedure); return true;
25,536
wakePollIfNeeded(waitingCount); } finally { schedUnlock(); } } <BUG>protected int popEventWaitingObjects(final ProcedureEvent event) { return popEventWaitingProcedures(event); } protected int popEventWaitingProcedures(final ProcedureEventQueue event) { int count = 0; while (event.hasWaitingProcedures()) { wakeProcedur...
protected int wakeWaitingProcedures(final ProcedureDeque waitQueue) { int count = waitQueue.size(); while (!waitQueue.isEmpty()) { wakeProcedure(waitQueue.removeLast());
25,537
return controller; } } return singleton; } <BUG>private SparkTransferManager() { boolean enabled = Enterprise.containsFeature(Enterprise.FILE_TRANSFER_FEATURE); if (!enabled) { return; }</BUG> SparkManager.getConnection().addConnectionListener(new ConnectionListener() {
if (Default.getBoolean("DISABLE_FILE_XFER") || !Enterprise.containsFeature(Enterprise.FILE_TRANSFER_FEATURE)) return;
25,538
break; } final JPopupMenu popup = new JPopupMenu(); final JMenuItem sendMessagesMenu = new JMenuItem(Res.getString("menuitem.send.a.message"), SparkRes.getImageIcon(SparkRes.SMALL_MESSAGE_IMAGE)); fireContextMenuListenerPopup(popup, items); <BUG>if (!Default.getBoolean("DISABLE_BROADCAST_MENU_ITEM")) popup.add(sendMess...
if (!Default.getBoolean("DISABLE_BROADCAST_MENU_ITEM") && Enterprise.containsFeature(Enterprise.BROADCAST_FEATURE)) popup.add(sendMessagesMenu); sendMessagesMenu.addActionListener( e1 -> sendMessages(items) );
25,539
int getComponentIndex(Component component) { return board.getComponentIndex(component); } public int getCustomFieldValueIndex(CustomFieldValue customFieldValue) { return board.getCustomFieldIndex(customFieldValue); <BUG>} void serialize(JiraInjectables jiraInjectables, Board board, ModelNode parent, ApplicationUser use...
public List<String> getRankedIssueKeys() { return rankedIssueKeys; void serialize(JiraInjectables jiraInjectables, Board board, ModelNode parent, ApplicationUser user, boolean backlog) {
25,540
String projectCode = issueKey.substring(0, issueKey.indexOf("-")); Collection<ProjectComponent> projectComponents = clearComponents ? Collections.emptySet() : MockProjectComponent.createProjectComponents(components); Issue issue = issueRegistry.getIssue(projectCode, issueKey); JirbanIssueEvent update = JirbanIssueEvent...
JirbanIssueEvent create = JirbanIssueEvent.createCreateEvent(issueKey, projectCode, issueType, priority, summary, user, MockProjectComponent.createProjectComponents(components), state, customFieldValues); issueRegistry.addIssue(projectCode, issueType, priority, summary, username, components, state);
25,541
import static org.jirban.jira.impl.Constants.ASSIGNEES; import static org.jirban.jira.impl.Constants.BLACKLIST; import static org.jirban.jira.impl.Constants.CHANGES; import static org.jirban.jira.impl.Constants.CLEAR_COMPONENTS; import static org.jirban.jira.impl.Constants.COMPONENTS; <BUG>import static org.jirban.jira...
import static org.jirban.jira.impl.Constants.INDEX; import static org.jirban.jira.impl.Constants.ISSUES;
25,542
ModelNode output = new ModelNode(); ModelNode changes = output.get(CHANGES); changes.get(VIEW).set(view); Set<IssueChange> newIssues = new HashSet<>(); Set<IssueChange> updatedIssues = new HashSet<>(); <BUG>Set<IssueChange> deletedIssues = new HashSet<>(); sortIssues(board, newIssues, updatedIssues, deletedIssues); </B...
Map<String, Set<String>> rerankedIssuesByProject = new HashMap(); sortIssues(board, newIssues, updatedIssues, deletedIssues, rerankedIssuesByProject);
25,543
mergeType(boardChange.getEvent()); if (type == null) { return; } switch (type) { <BUG>case CREATE: case UPDATE: mergeFields(boardChange, newReferenceCollector, boardChange.getNewAssignee(), boardChange.getNewComponents());</BUG> if (boardChange.getBacklogState() != null) { backlogEndState = boardChange.getBacklogState(...
reranked = true; if (!reranked) { reranked = boardChange.getEvent().getDetails().isReranked(); mergeFields(boardChange, newReferenceCollector, boardChange.getNewAssignee(), boardChange.getNewComponents());
25,544
public static final String FIELD_ID = "field-id"; public static final String HEADER = "header"; public static final String HEADERS = "headers"; public static final String HELP = "help"; public static final String ICON = "icon"; <BUG>public static final String ID = "id"; public static final String ISSUE_TYPES = "issue-t...
public static final String INDEX = "index"; public static final String ISSUE_TYPES = "issue-types";
25,545
import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.security.DigestOutputStream; import java.security.MessageDigest; <BUG>import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.Collections; import java.util.List;</BUG> public final class ...
import java.text.DateFormat; import java.util.Date; import java.util.List;
25,546
package org.jboss.as.patching.runner; <BUG>import org.jboss.as.boot.DirectoryStructure; import org.jboss.as.patching.LocalPatchInfo;</BUG> import org.jboss.as.patching.PatchInfo; import org.jboss.as.patching.PatchLogger; import org.jboss.as.patching.PatchMessages;
import static org.jboss.as.patching.runner.PatchUtils.generateTimestamp; import org.jboss.as.patching.CommonAttributes; import org.jboss.as.patching.LocalPatchInfo;
25,547
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"), MIS...
APPLIES_TO_VERSION("applies-to-version"), BUNDLES("bundles"),
25,548
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_VE...
[DELETED]
25,549
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, bytesToHex...
if (item.isDirectory()) { writer.writeAttribute(Attribute.DIRECTORY.name, "true"); if(type != ModificationType.REMOVE) {
25,550
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> impor...
import org.jboss.logging.annotations.Cause; import java.io.IOException;
25,551
Bundle savedInstanceState) { final View rootView = inflater.inflate(R.layout.tab_qibla, container, false); final QiblaCompassView qiblaCompassView = (QiblaCompassView)rootView.findViewById(R.id.qibla_compass); qiblaCompassView.setConstants(((TextView)rootView.findViewById(R.id.bearing_north)), getText(R.string.bearing_...
sOrientationListener = new android.hardware.SensorListener() {
25,552
import org.apache.commons.io.FileUtils; public class BetterFpsHelper { public static final String MC_VERSION = "1.9"; public static final String VERSION = "1.2.1"; public static final String URL = "http://guichaguri.github.io/BetterFps/"; <BUG>public static final String UPDATE_URL = "https://raw.githubusercontent.com/G...
public static final String UPDATE_URL = "http://widget.mcf.li/mc-mods/minecraft/229876-betterfps.json"; public static final LinkedHashMap<String, String> helpers = new LinkedHashMap<String, String>();
25,553
<BUG>package guichaguri.betterfps; import java.io.IOException; import java.io.InputStream; import java.net.URL; import java.util.Properties;</BUG> import net.minecraft.client.Minecraft;
import com.google.gson.JsonArray; import com.google.gson.JsonObject; import com.google.gson.JsonParser; import java.io.InputStreamReader;
25,554
import net.minecraft.util.text.event.ClickEvent; import net.minecraft.util.text.event.HoverEvent; public class UpdateChecker implements Runnable { private static boolean updateCheck = false; private static boolean done = false; <BUG>private static Properties prop = null; public static void check() {</BUG> if(!BetterFps...
private static String updateVersion = null; private static String updateDownload = null; public static void check() {
25,555
thread.setDaemon(true); thread.start(); } } public static void showChat() { <BUG>if(!done) return; if(prop == null) return; if(BetterFpsHelper.VERSION.equals(prop.getProperty("version"))) { prop = null; return; }</BUG> if(!BetterFps.isClient) return;
if(updateVersion == null && updateDownload == null) return;
25,556
@CopyMode(Mode.IGNORE) // Ignore the constructor to prevent an infinite loop public HopperBlock() { } @Override @CopyMode(Mode.APPEND) <BUG>public void onNeighborBlockChange(World worldIn, BlockPos pos, IBlockState state, Block neighborBlock) { </BUG> TileEntity te = worldIn.getTileEntity(pos); if(te != null) { TileEnt...
public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block neighborBlock) {
25,557
} @RootTask static Task<Exec.Result> exec(String parameter, int number) { Task<String> task1 = MyTask.create(parameter); Task<Integer> task2 = Adder.create(number, number + 2); <BUG>return Task.ofType(Exec.Result.class).named("exec", "/bin/sh") .in(() -> task1)</BUG> .in(() -> task2) .process(Exec.exec((str, i) -> args...
return Task.named("exec", "/bin/sh").ofType(Exec.Result.class) .in(() -> task1)
25,558
return args; } static class MyTask { static final int PLUS = 10; static Task<String> create(String parameter) { <BUG>return Task.ofType(String.class).named("MyTask", parameter) .in(() -> Adder.create(parameter.length(), PLUS))</BUG> .in(() -> Fib.create(parameter.length())) .process((sum, fib) -> something(parameter, s...
return Task.named("MyTask", parameter).ofType(String.class) .in(() -> Adder.create(parameter.length(), PLUS))
25,559
final String instanceField = "from instance"; final TaskContext context = TaskContext.inmem(); final AwaitingConsumer<String> val = new AwaitingConsumer<>(); @Test public void shouldJavaUtilSerialize() throws Exception { <BUG>Task<Long> task1 = Task.ofType(Long.class).named("Foo", "Bar", 39) .process(() -> 9999L); Task...
Task<Long> task1 = Task.named("Foo", "Bar", 39).ofType(Long.class) Task<String> task2 = Task.named("Baz", 40).ofType(String.class) .in(() -> task1)
25,560
assertEquals(des.id().name(), "Baz"); assertEquals(val.awaitAndGet(), "[9999] hello 10004"); } @Test(expected = NotSerializableException.class) public void shouldNotSerializeWithInstanceFieldReference() throws Exception { <BUG>Task<String> task = Task.ofType(String.class).named("WithRef") .process(() -> instanceField +...
Task<String> task = Task.named("WithRef").ofType(String.class) .process(() -> instanceField + " causes an outer reference");
25,561
serialize(task); } @Test public void shouldSerializeWithLocalReference() throws Exception { String local = instanceField; <BUG>Task<String> task = Task.ofType(String.class).named("WithLocalRef") .process(() -> local + " won't cause an outer reference");</BUG> serialize(task); Task<String> des = deserialize(); context.e...
Task<String> task = Task.named("WithLocalRef").ofType(String.class) .process(() -> local + " won't cause an outer reference");
25,562
} @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);
25,563
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);
25,564
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);
25,565
TaskContext taskContext = TaskContext.inmem(); TaskContext.Value<Long> value = taskContext.evaluate(fib92); value.consume(f92 -> System.out.println("fib(92) = " + f92)); } static Task<Long> create(long n) { <BUG>TaskBuilder<Long> fib = Task.ofType(Long.class).named("Fib", n); </BUG> if (n < 2) { return fib .process(() ...
TaskBuilder<Long> fib = Task.named("Fib", n).ofType(Long.class);
25,566
package com.orange.ngsi.client; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonProcessingException; <BUG>import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.SerializerProvider;</BUG> import com.fasterxml.jackson.databind.module.SimpleModule...
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializerProvider;
25,567
import org.apache.http.nio.reactor.IOReactorException; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.client.AsyncClientHttpRequestFactory; <BUG>import org.springf...
import org.springframework.http.converter.HttpMessageConverter; import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
25,568
import org.springframework.http.*; import org.springframework.stereotype.Service; import org.springframework.util.concurrent.ListenableFuture; import org.springframework.util.concurrent.ListenableFutureAdapter; import org.springframework.web.client.AsyncRestTemplate; <BUG>import java.io.IOException; import java.util.Co...
import java.net.URISyntaxException; import java.util.Collections;
25,569
package com.orange.ngsi.model; <BUG>import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Collections;</BUG> import java.util.LinkedList; import java.util.List; public class ContextAttribute {
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; import java.util.Collections;
25,570
import java.util.List; public class ContextAttribute { private String name; private String type; private Object value; <BUG>@JsonProperty("metadatas") private List<ContextMetadata> metadata;</BUG> public ContextAttribute() { } public ContextAttribute(String name, String type, Object value)
@JacksonXmlElementWrapper(localName = "metadata") @JacksonXmlProperty(localName = "contextMetadata") private List<ContextMetadata> metadata;
25,571
import static com.xebialabs.overthere.ssh.SshConnectionBuilder.ALLOCATE_PTY; import static com.xebialabs.overthere.ssh.SshConnectionBuilder.CONNECTION_TYPE; import static com.xebialabs.overthere.ssh.SshConnectionBuilder.SSH_PROTOCOL; import static com.xebialabs.overthere.ssh.SshConnectionBuilder.SUDO_PASSWORD_PROMPT_RE...
import static com.xebialabs.overthere.util.OverthereUtils.closeQuietly; import static org.hamcrest.MatcherAssert.assertThat;
25,572
@Test @SuppressWarnings("resource") public void shouldAcceptPasswordPromptRegex() { ConnectionOptions options = new ConnectionOptions(connectionOptions); options.set(SUDO_PASSWORD_PROMPT_REGEX, "[Pp]assword.*:"); <BUG>new SshInteractiveSudoConnection(SSH_PROTOCOL, options, new DefaultAddressPortMapper()); }</BUG> @Tes...
SshInteractiveSudoConnection connection = new SshInteractiveSudoConnection(SSH_PROTOCOL, options, new DefaultAddressPortMapper()); connection.close(); }
25,573
this.options = options; connectToWinrsProxy(options); if (winrsProxyConnection.getHostOperatingSystem() != WINDOWS) { disconnectFromWinrsProxy(); throw new IllegalArgumentException(format("Cannot create a " + CIFS_PROTOCOL + ":%s connection with a winrs proxy that is not running Windows", cifsConnectionType.toString()....
connected();
25,574
protected final int temporaryFileCreationRetries; protected final String temporaryFileHolderDirectoryNamePrefix; protected final List<OverthereFile> temporaryFileHolderDirectories = newArrayList(); protected int temporaryFileHolderDirectoryNameSuffix = 0; protected OverthereFile workingDirectory; <BUG>protected Random ...
private volatile Boolean isClosed; private Throwable openStack; protected BaseOverthereConnection(final String protocol, final ConnectionOptions options, final AddressPortMapper mapper, final boolean canStartProcess) {
25,575
this.canStartProcess = canStartProcess; this.temporaryDirectoryPath = options.get(TEMPORARY_DIRECTORY_PATH, os.getDefaultTemporaryDirectoryPath()); this.deleteTemporaryDirectoryOnDisconnect = options.getBoolean(TEMPORARY_DIRECTORY_DELETE_ON_DISCONNECT, TEMPORARY_DIRECTORY_DELETE_ON_DISCONNECT_DEFAULT); this.temporaryFi...
protected void connected() { this.isClosed = Boolean.FALSE; this.openStack = new Throwable("Opened here..."); @Override
25,576
package com.xebialabs.overthere.ssh; <BUG>import java.util.List; import org.testng.annotations.BeforeMethod;</BUG> import org.testng.annotations.Test; import com.xebialabs.overthere.CmdLine; import com.xebialabs.overthere.CmdLineArgument;
import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod;
25,577
assertThat(args.get(4).toString(UNIX, false), equalTo("/tmp")); } @Test public void shouldUseConfiguredSudoCommandPrefix() { connectionOptions.set(SUDO_COMMAND_PREFIX, "sx -u {0}"); <BUG>@SuppressWarnings("resource") SshSudoConnection connection = new SshSudoConnection(SSH_PROTOCOL, connectionOptions, resolver); List<C...
List<CmdLineArgument> args = connection.processCommandLine(CmdLine.build("ls", "/tmp")).getArguments();
25,578
assertThat(args.get(3).toString(UNIX, false), equalTo("ls\\ /tmp")); assertThat(cmdLine.toString(), equalTo("su -u some-other-user ls\\ /tmp")); } @Test public void commandWithPipeShouldHaveTwoSudoSectionsIfNotQuotingCommand() { <BUG>@SuppressWarnings("resource") SshSudoConnection connection = new SshSudoConnection(SSH...
CmdLine cmdLine = new CmdLine().addArgument("a").addRaw("|").addArgument("b");
25,579
assertThat(prefixed.get(2).toString(UNIX, false), equalTo("some-other-user")); assertThat(prefixed.get(3).toString(UNIX, false), equalTo("a\\ \\|\\ b")); } @Test public void commandWithSemiColonShouldHaveTwoSudoSectionsIfNotQuotingCommand() { <BUG>@SuppressWarnings("resource") SshSudoConnection connection = new SshSudo...
CmdLine cmdLine = new CmdLine().addArgument("a").addRaw(";").addArgument("b");
25,580
} @Test public void shouldUsePasswordIfNoKeyfile() throws IOException { String password = "secret"; connectionOptions.set(PASSWORD, password); <BUG>newConnectionWithClient(client).connect(); verify(client).auth(eq("some-user"), isA(AuthMethod.class), isA(AuthMethod.class)); }</BUG> @Test public void shouldUseKeyfileIfN...
SshConnection connection = newConnectionWithClient(client); connection.connect(); connection.close();
25,581
verify(client).auth(eq("some-user"), isA(AuthMethod.class), isA(AuthMethod.class)); }</BUG> @Test public void shouldUseKeyfileIfNoPassword() throws IOException { connectionOptions.set(PRIVATE_KEY_FILE, "/path/to/keyfile"); <BUG>newConnectionWithClient(client).connect(); verify(client).authPublickey(eq("some-user"), Mat...
connection.close(); } SshConnection connection = newConnectionWithClient(client); connection.connect(); connection.close(); }
25,582
when(client.startSession()).thenReturn(session); connectionOptions.set(ALLOCATE_DEFAULT_PTY, false); SshConnection connection = newConnectionWithClient(client); connection.connect(); connection.startProcess(CmdLine.build("dummy")); <BUG>verify(session, times(0)).allocateDefaultPTY(); }</BUG> @Test public void shouldAll...
connection.close(); }
25,583
} else if (password != null) { PasswordFinder passwordFinder = getPasswordFinder(); client.auth(username, new AuthPassword(passwordFinder), new AuthKeyboardInteractive(new RegularExpressionPasswordResponseProvider(passwordFinder, interactiveKeyboardAuthPromptRegex))); } <BUG>sshClient = client; } catch (SSHException e)...
connected(); } catch (SSHException e) {
25,584
import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.security.DigestOutputStream; import java.security.MessageDigest; <BUG>import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.Collections; import java.util.List;</BUG> public final class ...
import java.text.DateFormat; import java.util.Date; import java.util.List;
25,585
package org.jboss.as.patching.runner; <BUG>import org.jboss.as.boot.DirectoryStructure; import org.jboss.as.patching.LocalPatchInfo;</BUG> import org.jboss.as.patching.PatchInfo; import org.jboss.as.patching.PatchLogger; import org.jboss.as.patching.PatchMessages;
import static org.jboss.as.patching.runner.PatchUtils.generateTimestamp; import org.jboss.as.patching.CommonAttributes; import org.jboss.as.patching.LocalPatchInfo;
25,586
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"), MIS...
APPLIES_TO_VERSION("applies-to-version"), BUNDLES("bundles"),
25,587
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_VE...
[DELETED]
25,588
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, bytesToHex...
if (item.isDirectory()) { writer.writeAttribute(Attribute.DIRECTORY.name, "true"); if(type != ModificationType.REMOVE) {
25,589
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> impor...
import org.jboss.logging.annotations.Cause; import java.io.IOException;
25,590
} finally {</BUG> returnSession(session); } } @Override <BUG>public List<FeatureOutput> getAllExpanded(DbQuery parameters) throws DataAccessException { Session session = getSession(); try {</BUG> FeatureDao featureDao = createDao(session);
return results; public List<FeatureOutput> getAllCondensed(DbQuery parameters) throws DataAccessException { try { return getAllCondensed(parameters, session); } finally { public List<FeatureOutput> getAllCondensed(DbQuery parameters, Session session) throws DataAccessException {
25,591
FeatureDao featureDao = createDao(session); List<FeatureOutput> results = new ArrayList<>(); for (FeatureEntity featureEntity : featureDao.getAllInstances(parameters)) { results.add(createExpanded(featureEntity, parameters)); } <BUG>return results; } finally {</BUG> returnSession(session); } }
results.add(createCondensed(featureEntity, parameters));
25,592
FeatureEntity result = featureDao.getInstance(parseId(id), parameters); if (result == null) { throw new ResourceNotFoundException("Resource with id '" + id + "' could not be found."); } return createExpanded(result, parameters); <BUG>} finally { returnSession(session); }</BUG> } private FeatureOutput createExpanded(Fea...
[DELETED]
25,593
} } @Override public List<GeometryInfo> getAllCondensed(DbQuery parameters) throws DataAccessException { Session session = getSession(); <BUG>try { return getAllInstances(parameters, session, false); } finally { returnSession(session); }</BUG> }
else if (GeometryType.isObservedGeometryId(id)) { id = GeometryType.extractId(id); return false;
25,594
CategoryEntity entity = getInstance(parseId(id), parameters, session); if (entity != null) { return createExpanded(entity, parameters); } return null; <BUG>} finally { returnSession(session); }</BUG> } protected List<CategoryEntity> getAllInstances(DbQuery parameters, Session session) throws DataAccessException {
[DELETED]
25,595
for (String datasetType : query.getDatasetTypes()) { addCondensedResults(getSeriesDao(datasetType, session), query, results); } } return results; <BUG>} finally { returnSession(session); }</BUG> } private void addCondensedResults(DatasetDao<? extends DatasetEntity> dao, DbQuery query, List<DatasetOutput> results) throw...
[DELETED]
25,596
for (String datasetType : query.getDatasetTypes()) { addExpandedResults(getSeriesDao(datasetType, session), query, results, session); } } return results; <BUG>} finally { returnSession(session); }</BUG> } private void addExpandedResults(DatasetDao<? extends DatasetEntity> dao, DbQuery query, List<DatasetOutput> results...
[DELETED]
25,597
MongoClient findBatchWithOptions(String collection, JsonObject query, FindOptions options, Handler<AsyncResult<JsonObject>> resultHandler); @Fluent MongoClient findOne(String collection, JsonObject query, JsonObject fields, Handler<AsyncResult<JsonObject>> resultHandler); @Fluent MongoClient count(String collection, Js...
@Deprecated @Fluent MongoClient removeWithMongoClientDeleteResult(String collection, JsonObject query, Handler<AsyncResult<MongoClientDeleteResult>> resultHandler); @Deprecated @Fluent MongoClient removeWithOptionsWithMongoClientDeleteResult(String collection, JsonObject query, WriteOption writeOption, Handler<AsyncRes...
25,598
package io.vertx.rxjava.ext.mongo; import java.util.Map; <BUG>import io.vertx.lang.rxjava.InternalHelper; import rx.Observable; import io.vertx.ext.mongo.WriteOption;</BUG> import io.vertx.rxjava.core.Vertx; import io.vertx.core.json.JsonArray;
import io.vertx.ext.mongo.MongoClientDeleteResult; import io.vertx.ext.mongo.WriteOption;
25,599
import io.vertx.core.json.JsonArray; import java.util.List; import io.vertx.ext.mongo.FindOptions; import io.vertx.core.json.JsonObject; import io.vertx.core.AsyncResult; <BUG>import io.vertx.core.Handler; import io.vertx.ext.mongo.UpdateOptions;</BUG> public class MongoClient { final io.vertx.ext.mongo.MongoClient del...
import io.vertx.ext.mongo.MongoClientUpdateResult; import io.vertx.ext.mongo.UpdateOptions;
25,600
io.vertx.rx.java.ObservableFuture<JsonObject> resultHandler = io.vertx.rx.java.RxHelper.observableFuture(); distinctBatch(collection, fieldName, resultClassname, resultHandler.toHandler()); return resultHandler; } public void close() { <BUG>this.delegate.close(); }</BUG> public static MongoClient newInstance(io.vertx.e...
[DELETED]