id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
27,301
} @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)
27,302
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))
27,303
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)
27,304
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");
27,305
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");
27,306
} @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);
27,307
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);
27,308
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);
27,309
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);
27,310
import java.util.Locale; import java.util.Map; import java.util.TreeMap; public class DependencyConvergenceReport extends AbstractProjectInfoReport <BUG>{ private List reactorProjects; private static final int PERCENTAGE = 100;</BUG> public String getOutputName() {
private static final int PERCENTAGE = 100; private static final List SUPPORTED_FONT_FAMILY_NAMES = Arrays.asList( GraphicsEnvironment .getLocalGraphicsEnvironment().getAvailableFontFamilyNames() );
27,311
sink.section1(); sink.sectionTitle1(); sink.text( getI18nString( locale, "title" ) ); sink.sectionTitle1_(); Map dependencyMap = getDependencyMap(); <BUG>generateLegend( locale, sink ); generateStats( locale, sink, dependencyMap ); generateConvergence( locale, sink, dependencyMap ); sink.section1_();</BUG> sink.body_()...
sink.lineBreak(); sink.section1_();
27,312
Iterator it = artifactMap.keySet().iterator(); while ( it.hasNext() ) { String version = (String) it.next(); sink.tableRow(); <BUG>sink.tableCell(); sink.text( version );</BUG> sink.tableCell_(); sink.tableCell(); generateVersionDetails( sink, artifactMap, version );
sink.tableCell( String.valueOf( cellWidth ) + "px" ); sink.text( version );
27,313
sink.tableCell(); sink.text( getI18nString( locale, "legend.shared" ) ); sink.tableCell_(); sink.tableRow_(); sink.tableRow(); <BUG>sink.tableCell(); iconError( sink );</BUG> sink.tableCell_(); sink.tableCell(); sink.text( getI18nString( locale, "legend.different" ) );
sink.tableCell( "15px" ); // according /images/icon_error_sml.gif iconError( sink );
27,314
sink.tableCaption(); sink.text( getI18nString( locale, "stats.caption" ) ); sink.tableCaption_();</BUG> sink.tableRow(); <BUG>sink.tableHeaderCell(); sink.text( getI18nString( locale, "stats.subprojects" ) + ":" ); sink.tableHeaderCell_();</BUG> sink.tableCell(); sink.text( String.valueOf( reactorProjects.size() ) ); s...
sink.bold(); sink.bold_(); sink.tableCaption_(); sink.tableHeaderCell( headerCellWidth ); sink.text( getI18nString( locale, "stats.subprojects" ) ); sink.tableHeaderCell_();
27,315
sink.tableCell(); sink.text( String.valueOf( reactorProjects.size() ) ); sink.tableCell_(); sink.tableRow_(); sink.tableRow(); <BUG>sink.tableHeaderCell(); sink.text( getI18nString( locale, "stats.dependencies" ) + ":" ); sink.tableHeaderCell_();</BUG> sink.tableCell(); sink.text( String.valueOf( depCount ) );
sink.tableHeaderCell( headerCellWidth ); sink.text( getI18nString( locale, "stats.dependencies" ) ); sink.tableHeaderCell_();
27,316
sink.text( String.valueOf( convergence ) + "%" ); sink.bold_(); sink.tableCell_(); sink.tableRow_(); sink.tableRow(); <BUG>sink.tableHeaderCell(); sink.text( getI18nString( locale, "stats.readyrelease" ) + ":" ); sink.tableHeaderCell_();</BUG> sink.tableCell(); if ( convergence >= PERCENTAGE && snapshotCount <= 0 )
sink.tableHeaderCell( headerCellWidth ); sink.text( getI18nString( locale, "stats.readyrelease" ) ); sink.tableHeaderCell_();
27,317
{ ReverseDependencyLink p1 = (ReverseDependencyLink) o1; ReverseDependencyLink p2 = (ReverseDependencyLink) o2; return p1.getProject().getId().compareTo( p2.getProject().getId() ); } <BUG>else {</BUG> return 0; } }
iconError( sink );
27,318
import java.util.regex.Pattern; public abstract class BaseFilterLexer extends DelegateLexer implements IdTableBuilding.ScanWordProcessor { private final OccurrenceConsumer myOccurrenceConsumer; private int myTodoScannedBound = 0; private int myOccurenceMask; <BUG>private TodoScanningData[] myTodoScanningData; public in...
private CharSequence myCachedBufferSequence; public interface OccurrenceConsumer {
27,319
public class DelegateLexer extends LexerBase { private final Lexer myDelegate; public DelegateLexer(Lexer delegate) { myDelegate = delegate; } <BUG>public Lexer getDelegate() { </BUG> return myDelegate; } public void start(CharSequence buffer, int startOffset, int endOffset, int initialState) {
public final Lexer getDelegate() {
27,320
return myDelegate.getTokenEnd(); } public void advance() { myDelegate.advance(); } <BUG>public CharSequence getBufferSequence() { </BUG> return myDelegate.getBufferSequence(); } public int getBufferEnd() {
public final CharSequence getBufferSequence() {
27,321
if (!found) { sitePlugin.registerManageNodeTabFactory(new ManageTileNodeTabFactory()); } } public abstract String getNodeType(); <BUG>public IRequestHandler respond(IModel<BrixNode> nodeModel, IRequestParameters requestParameters) { return urlMapper.decode(requestParameters, nodeModel); </BUG> }
public IRequestHandler respond(IModel<BrixNode> nodeModel, BrixPageParameters pageParameters) { return urlMapper.decode(pageParameters, nodeModel);
27,322
return null; } public String getName() { return "Unknown"; } <BUG>public IRequestHandler respond(IModel<BrixNode> nodeModel, IRequestParameters requestParameters) { </BUG> return new EmptyRequestHandler(); } public IModel<String> newCreateNodeCaptionModel(IModel<BrixNode> parentNode) {
public IRequestHandler respond(IModel<BrixNode> nodeModel, BrixPageParameters requestParameters) {
27,323
public class PreviewNodeIFrame extends BrixGenericWebMarkupContainer<BrixNode> { private static final String PREVIEW_PARAM = Brix.NS_PREFIX + "preview"; public static boolean isPreview() { BrixPageParameters params = BrixPageParameters.getCurrent(); if (params != null) { <BUG>if (params.getQueryParam(PREVIEW_PARAM).toB...
if (params.get(PREVIEW_PARAM).toBoolean(false)) { return true;
27,324
return TYPE; } public String getName() { return "Folder"; } <BUG>public IRequestHandler respond(IModel<BrixNode> nodeModel, IRequestParameters requestParameters) { </BUG> BrixNode node = nodeModel.getObject(); FolderNode folder = (FolderNode) node; Reference redirect = folder.getRedirectReference();
public IRequestHandler respond(IModel<BrixNode> nodeModel, BrixPageParameters requestParameters) {
27,325
import org.apache.wicket.model.PropertyModel; import org.apache.wicket.model.ResourceModel; import org.apache.wicket.util.lang.Objects; import org.apache.wicket.util.string.StringValue; import org.brixcms.web.nodepage.BrixPageParameters; <BUG>import java.io.Serializable; import java.util.ArrayList; import java.util.Col...
import com.inmethod.grid.IDataSource; import com.inmethod.grid.IGridColumn; import com.inmethod.grid.SizeUnit; import com.inmethod.grid.column.CheckBoxColumn; import com.inmethod.grid.column.editable.EditablePropertyColumn; import com.inmethod.grid.column.editable.SubmitCancelColumn; import com.inmethod.grid.datagrid.D...
27,326
return TYPE; } public String getName() { return (new ResourceModel("resource", "Resource")).getObject(); } <BUG>public IRequestHandler respond(IModel<BrixNode> nodeModel, IRequestParameters requestParameters) { </BUG> return new ResourceNodeHandler(nodeModel); } public IModel<String> newCreateNodeCaptionModel(IModel<Br...
public IRequestHandler respond(IModel<BrixNode> nodeModel, BrixPageParameters requestParameters) {
27,327
if (connect(isProducer)) { break; } } catch (InvalidSelectorException e) { throw new ConnectionException( <BUG>"Connection to JMS failed. Invalid message selector"); } catch (JMSException | NamingException e) { logger.log(LogLevel.ERROR, "RECONNECTION_EXCEPTION", </BUG> new Object[] { e.toString() });
Messages.getString("CONNECTION_TO_JMS_FAILED_INVALID_MSG_SELECTOR")); //$NON-NLS-1$ logger.log(LogLevel.ERROR, "RECONNECTION_EXCEPTION", //$NON-NLS-1$
27,328
private synchronized void createConnectionNoRetry() throws ConnectionException { if (!isConnectValid()) { try { connect(isProducer); } catch (JMSException e) { <BUG>logger.log(LogLevel.ERROR, "Connection to JMS failed", new Object[] { e.toString() }); throw new ConnectionException( "Connection to JMS failed. Did not tr...
logger.log(LogLevel.ERROR, "CONNECTION_TO_JMS_FAILED", new Object[] { e.toString() }); //$NON-NLS-1$ Messages.getString("CONNECTION_TO_JMS_FAILED_NO_RECONNECT_AS_RECONNECT_POLICY_DOES_NOT_APPLY")); //$NON-NLS-1$
27,329
boolean res = false; int count = 0; do { try { if(count > 0) { <BUG>logger.log(LogLevel.INFO, "ATTEMPT_TO_RESEND_MESSAGE", new Object[] { count }); </BUG> Thread.sleep(messageRetryDelay); } synchronized (getSession()) {
logger.log(LogLevel.INFO, "ATTEMPT_TO_RESEND_MESSAGE", new Object[] { count }); //$NON-NLS-1$
27,330
getProducer().send(message); res = true; } } catch (JMSException e) { <BUG>logger.log(LogLevel.WARN, "ERROR_DURING_SEND", new Object[] { e.toString() }); logger.log(LogLevel.INFO, "ATTEMPT_TO_RECONNECT"); </BUG> setConnect(null);
logger.log(LogLevel.WARN, "ERROR_DURING_SEND", new Object[] { e.toString() }); //$NON-NLS-1$ logger.log(LogLevel.INFO, "ATTEMPT_TO_RECONNECT"); //$NON-NLS-1$
27,331
import org.w3c.dom.NodeList; import org.xml.sax.SAXException; import com.ibm.streams.operator.Attribute; import com.ibm.streams.operator.StreamSchema; import com.ibm.streams.operator.Type; <BUG>import com.ibm.streams.operator.Type.MetaType; class ConnectionDocumentParser {</BUG> private static final Set<String> support...
import com.ibm.streamsx.messaging.jms.Messages; class ConnectionDocumentParser {
27,332
return msgClass; } private void convertProviderURLPath(File applicationDir) throws ParseConnectionDocumentException { if(!isAMQ()) { if(this.providerURL == null || this.providerURL.trim().length() == 0) { <BUG>throw new ParseConnectionDocumentException("A value must be specified for provider_url attribute in connection...
throw new ParseConnectionDocumentException(Messages.getString("PROVIDER_URL_MUST_BE_SPECIFIED_IN_CONN_DOC")); //$NON-NLS-1$
27,333
URL absProviderURL = new URL(url.getProtocol(), url.getHost(), applicationDir.getAbsolutePath() + File.separator + path); this.providerURL = absProviderURL.toExternalForm(); } } } catch (MalformedURLException e) { <BUG>throw new ParseConnectionDocumentException("Invalid provider_url value detected: " + e.getMessage());...
throw new ParseConnectionDocumentException(Messages.getString("INVALID_PROVIDER_URL", e.getMessage())); //$NON-NLS-1$
27,334
for (int j = 0; j < accessSpecChildNodes.getLength(); j++) { if (accessSpecChildNodes.item(j).getNodeName().equals("destination")) { //$NON-NLS-1$ destIndex = j; } else if (accessSpecChildNodes.item(j).getNodeName().equals("uses_connection")) { //$NON-NLS-1$ if (!connection.equals(accessSpecChildNodes.item(j).getAttrib...
throw new ParseConnectionDocumentException(Messages.getString("VALUE_OF_CONNECTION_PARAM_NOT_THE_SAME_AS_CONN_USED_BY_ACCESS_ELEMENT", connection, access )); //$NON-NLS-1$
27,335
nativeSchema = access_specification.item(i).getChildNodes().item(nativeSchemaIndex); } break; } } <BUG>if (!accessFound) { throw new ParseConnectionDocumentException("The value of the access parameter " + access + " is not found in the connections document");</BUG> } return nativeSchema;
throw new ParseConnectionDocumentException(Messages.getString("VALUE_OF_ACCESS_PARAM_NOT_FOUND_IN_CONN_DOC", access )); //$NON-NLS-1$
27,336
nativeAttrLength = Integer.parseInt((attrList.item(i).getAttributes().getNamedItem("length") //$NON-NLS-1$ .getNodeValue())); } if ((msgClass == MessageClass.wbe || msgClass == MessageClass.wbe22) && ((streamSchema.getAttribute(nativeAttrName) != null) && (streamSchema <BUG>.getAttribute(nativeAttrName).getType().getMe...
throw new ParseConnectionDocumentException(Messages.getString("BLOB_NOT_SUPPORTED_FOR_MSG_CLASS", msgClass)); //$NON-NLS-1$
27,337
throw new ParseConnectionDocumentException(" Blob data type is not supported for message class " + msgClass);</BUG> } Iterator<NativeSchema> it = nativeSchemaObjects.iterator(); while (it.hasNext()) { <BUG>if (it.next().getName().equals(nativeAttrName)) { throw new ParseConnectionDocumentException("Parameter name: " + ...
nativeAttrLength = Integer.parseInt((attrList.item(i).getAttributes().getNamedItem("length") //$NON-NLS-1$ .getNodeValue())); if ((msgClass == MessageClass.wbe || msgClass == MessageClass.wbe22) && ((streamSchema.getAttribute(nativeAttrName) != null) && (streamSchema .getAttribute(nativeAttrName).getType().getMetaType(...
27,338
if (msgClass == MessageClass.text) { typesWithLength = new HashSet<String>(Arrays.asList("Bytes")); //$NON-NLS-1$ } Set<String> typesWithoutLength = new HashSet<String>(Arrays.asList("Byte", "Short", "Int", "Long", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ "Float", "Double", "Boolean")); //$NON-NLS-1$ //$...
throw new ParseConnectionDocumentException(Messages.getString("LENGTH_ATTRIB_SHOULD_NOT_BE_PRESENT_FOR_PARAM_IN_NATIVE_SCHEMA", nativeAttrName )); //$NON-NLS-1$
27,339
if ((nativeAttrLength != LENGTH_ABSENT_IN_NATIVE_SCHEMA) && (msgClass == MessageClass.wbe || msgClass == MessageClass.wbe22 || msgClass == MessageClass.xml) && (streamSchema.getAttribute(nativeAttrName) != null) && (streamSchema.getAttribute(nativeAttrName).getType().getMetaType() != Type.MetaType.RSTRING) && (streamSc...
throw new ParseConnectionDocumentException(Messages.getString("LENGTH_ATTRIB_SHOULD_NOT_BE_PRESENT_FOR_PARAM_IN_NATIVE_SCHEMA", nativeAttrName )); //$NON-NLS-1$
27,340
if (streamSchema.getAttribute(nativeAttrName) != null) { MetaType metaType = streamSchema.getAttribute(nativeAttrName).getType().getMetaType(); if (metaType == Type.MetaType.DECIMAL32 || metaType == Type.MetaType.DECIMAL64 || metaType == Type.MetaType.DECIMAL128 || metaType == Type.MetaType.TIMESTAMP) { if (nativeAttrL...
Messages.getString("LENGTH_ATTRIB_SHOULD_NOT_BE_PRESENT_FOR_PARAM_WITH_TYPE_IN_NATIVE_SCHEMA", nativeAttrName, metaType )); //$NON-NLS-1$
27,341
nativeAttrLength = -4; } } } if (typesWithLength.contains(nativeAttrType)) { <BUG>if (nativeAttrLength == LENGTH_ABSENT_IN_NATIVE_SCHEMA && msgClass == MessageClass.bytes) { throw new ParseConnectionDocumentException("Length attribute should be present for parameter: " + nativeAttrName + " In native schema file for mes...
throw new ParseConnectionDocumentException(Messages.getString("LENGTH_ATTRIB_SHOULD_NOT_BE_PRESENT_FOR_PARAM_IN_NATIVE_SCHEMA_FOR_MSG_CLASS_BYTES", nativeAttrName )); //$NON-NLS-1$
27,342
if (streamSchema.getAttribute(nativeAttrName) != null) { streamAttrName = streamSchema.getAttribute(nativeAttrName).getName(); streamAttrMetaType = streamSchema.getAttribute(nativeAttrName).getType().getMetaType(); if ((msgClass == MessageClass.stream || msgClass == MessageClass.map) && !mapSPLToNativeSchemaDataTypesFo...
throw new ParseConnectionDocumentException(Messages.getString("ATTRIB_WITH_TYPE_IN_NATIVE_SCHEMA_CANNOT_BE_MAPPED_TO_ATTRIB_WITH_TYPE", nativeAttrName, nativeAttrType, streamAttrName, streamAttrMetaType.getLanguageType())); //$NON-NLS-1$
27,343
+ nativeAttrType + " in the native schema cannot be mapped with attribute: " + streamAttrName + " with type : " + streamAttrMetaType.getLanguageType());</BUG> } else if (msgClass == MessageClass.bytes && !mapSPLToNativeSchemaDataTypesForBytes.get(streamAttrMetaType.getLanguageType()).equals( <BUG>nativeAttrType)) { thr...
if (streamSchema.getAttribute(nativeAttrName) != null) { streamAttrName = streamSchema.getAttribute(nativeAttrName).getName(); streamAttrMetaType = streamSchema.getAttribute(nativeAttrName).getType().getMetaType(); if ((msgClass == MessageClass.stream || msgClass == MessageClass.map) && !mapSPLToNativeSchemaDataTypesFo...
27,344
package com.ibm.streamsx.messaging.i18n; import java.text.MessageFormat; import java.util.MissingResourceException; import java.util.ResourceBundle; public class Messages { <BUG>private static final String BUNDLE_NAME = "com.ibm.streamsx.messaging.mqtt.MQTTMessages"; //$NON-NLS-1$ </BUG> private static final ResourceBu...
private static final String BUNDLE_NAME = "com.ibm.streamsx.messaging.i18n.CommonMessages"; //$NON-NLS-1$
27,345
} else { updateMemo(); callback.updateMemo(); } dismiss(); <BUG>}else{ </BUG> Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show(); } }
[DELETED]
27,346
} @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);
27,347
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);
27,348
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(
27,349
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 {
27,350
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;
27,351
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) {
27,352
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;
27,353
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); } <...
if(te.hasCapability(Capabilities.HEAT_HANDLER_CAPABILITY, null)){ te.getCapability(Capabilities.HEAT_HANDLER_CAPABILITY, null).addHeat(mult);
27,354
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> } publi...
return ((numIn > 0) ? Math.ceil(numIn * (double) tiers) : Math.floor(numIn * (double) tiers)) / (double) tiers;
27,355
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; ...
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;
27,356
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 ...
@CapabilityInject(IAxleHandler.class) public static Capability<IAxleHandler> AXLE_HANDLER_CAPABILITY = null; @CapabilityInject(ICogHandler.class) public static Capability<ICogHandler> COG_HANDLER_CAPABILITY = null;
27,357
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;
27,358
this.result = result; this.installRepository = installRepository; this.userRepository = userRepository; } public void check() { <BUG>this.result.use(Results.json()).from(userRepository.hasUsers(), "hasUsers").serialize(); </BUG> } public void form() { }
this.result.use(Results.json()).from(userRepository.listAll()).serialize();
27,359
package com.jslsolucoes.nginx.admin.repository.impl; import javax.enterprise.context.RequestScoped; import javax.inject.Inject; <BUG>import javax.persistence.EntityManager; import com.jslsolucoes.nginx.admin.model.Configuration;</BUG> import com.jslsolucoes.nginx.admin.model.ConfigurationType; import com.jslsolucoes.ng...
import org.hibernate.Criteria; import org.hibernate.Session; import org.hibernate.criterion.Restrictions; import com.jslsolucoes.nginx.admin.model.Configuration;
27,360
@RequestScoped public class ConfigurationRepositoryImpl extends RepositoryImpl<Configuration> implements ConfigurationRepository { public ConfigurationRepositoryImpl() { } @Inject <BUG>public ConfigurationRepositoryImpl(EntityManager entityManager) { super(entityManager); }</BUG> @Override public Integer getInteger(Con...
public ConfigurationRepositoryImpl(Session session) { super(session);
27,361
@NonNls private static final String RETURN_TAG = "@return"; @NonNls private static final String THROWS_TAG = "@throws"; @NonNls public static final String HTML_EXTENSION = ".html"; @NonNls public static final String PACKAGE_SUMMARY_FILE = "package-summary.html"; @Override <BUG>public String getQuickNavigateInfo(PsiElem...
String navigateInfo = null; navigateInfo = generateClassInfo((PsiClass)element);
27,362
Thread.sleep(1000); } selenium.click(RuntimeVariables.replace("//input[@value='Delete']")); selenium.waitForPageToLoad("30000"); assertTrue(selenium.getConfirmation() <BUG>.matches("^Are you sure you want to delete the selected page[\\s\\S]$")); for (int second = 0;; second++) {</BUG> if (second >= 60) { fail("timeout"...
selenium.click(RuntimeVariables.replace("link=Delete")); .matches("^Are you sure you want to delete this[\\s\\S]$")); assertTrue(selenium.isTextPresent( "Your request processed successfully.")); assertFalse(selenium.isElementPresent("link=Test Entry")); for (int second = 0;; second++) {
27,363
package com.liferay.portalweb.portlet.blogs; import com.liferay.portalweb.portal.BaseTestCase; import com.liferay.portalweb.portal.util.RuntimeVariables; public class AddSecondEntryTest extends BaseTestCase { <BUG>public void testAddSecondEntry() throws Exception { selenium.click(RuntimeVariables.replace("link=Blogs Te...
[DELETED]
27,364
SNodeId rootId = MapSequence.fromMap(myRootForChange).get(change); if (rootId != null && MapSequence.fromMap(myChangesCountsForRoots).containsKey(rootId)) { MapSequence.fromMap(myChangesCountsForRoots).put(rootId, MapSequence.fromMap(myChangesCountsForRoots).get(rootId) - 1); } MapSequence.fromMap(myRootForChange).remo...
fileStatusChangedForRootNode((rootId == null ? null : getModel().getNodeById(rootId)
27,365
import jetbrains.mps.RuntimeFlags; import jetbrains.mps.smodel.SNodeId; import jetbrains.mps.smodel.adapter.ids.MetaIdFactory; import jetbrains.mps.smodel.adapter.ids.SConceptId; import jetbrains.mps.smodel.adapter.ids.SContainmentLinkId; <BUG>import jetbrains.mps.smodel.adapter.ids.SPropertyId; import jetbrains.mps.sm...
import jetbrains.mps.smodel.adapter.structure.ConceptFeatureHelper; import jetbrains.mps.smodel.adapter.structure.FormatException;
27,366
public SPropertyId getId() { return myPropertyId; } @NotNull @Override <BUG>public SAbstractConcept getOwner() { SConceptId id = getId().getConceptId(); ConceptDescriptor concept = ConceptRegistry.getInstance().getConceptDescriptor(id); return concept.isInterfaceConcept() ? MetaAdapterFactory.getInterfaceConcept(id, co...
[DELETED]
27,367
import jetbrains.mps.RuntimeFlags; import jetbrains.mps.smodel.SNodeId; import jetbrains.mps.smodel.adapter.ids.MetaIdFactory; import jetbrains.mps.smodel.adapter.ids.SConceptId; import jetbrains.mps.smodel.adapter.ids.SPropertyId; <BUG>import jetbrains.mps.smodel.adapter.ids.SReferenceLinkId; import jetbrains.mps.smod...
import jetbrains.mps.smodel.adapter.structure.ConceptFeatureHelper; import jetbrains.mps.smodel.adapter.structure.FormatException;
27,368
public SReferenceLinkId getRoleId() { return myRoleId; } @NotNull @Override <BUG>public SAbstractConcept getOwner() { SConceptId id = getRoleId().getConceptId(); ConceptDescriptor concept = ConceptRegistry.getInstance().getConceptDescriptor(id); return concept.isInterfaceConcept() ? MetaAdapterFactory.getInterfaceConce...
[DELETED]
27,369
import jetbrains.mps.RuntimeFlags; import jetbrains.mps.smodel.SNodeId; import jetbrains.mps.smodel.adapter.ids.MetaIdFactory; import jetbrains.mps.smodel.adapter.ids.SConceptId; import jetbrains.mps.smodel.adapter.ids.SContainmentLinkId; <BUG>import jetbrains.mps.smodel.adapter.ids.SLanguageId; import jetbrains.mps.sm...
import jetbrains.mps.smodel.adapter.structure.ConceptFeatureHelper; import jetbrains.mps.smodel.adapter.structure.FormatException;
27,370
public SContainmentLinkId getRoleId() { return myRoleId; } @NotNull @Override <BUG>public SAbstractConcept getOwner() { SConceptId id = getRoleId().getConceptId(); ConceptDescriptor concept = ConceptRegistry.getInstance().getConceptDescriptor(id); String fqName = concept.getConceptFqName(); return concept.isInterfaceCo...
[DELETED]
27,371
import org.apache.sling.jcr.resource.JcrResourceConstants; import org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl; import org.apache.sling.jcr.resource.internal.helper.MapEntries; import org.apache.sling.jcr.resource.internal.helper.Mapping; import org.apache.sling.performance.annotation.Performan...
import org.apache.sling.performance.tests.ResolveNonExistingWithManyAliasTest; import org.apache.sling.performance.tests.ResolveNonExistingWithManyVanityPathTest;
27,372
@PerformanceTestSuite public ParameterizedTestList testPerformance() throws Exception { Helper helper = new Helper(); ParameterizedTestList testCenter = new ParameterizedTestList(); testCenter.setTestSuiteTitle("jcr.resource-2.0.10"); <BUG>testCenter.addTestObject(new ResolveNonExistingWith1000VanityPathTest(helper)); ...
testCenter.addTestObject(new ResolveNonExistingWithManyVanityPathTest("ResolveNonExistingWith1000VanityPathTest",helper, 100, 10)); testCenter.addTestObject(new ResolveNonExistingWithManyVanityPathTest("ResolveNonExistingWith5000VanityPathTest",helper, 100, 50)); testCenter.addTestObject(new ResolveNonExistingWithManyV...
27,373
package org.apache.sling.performance; <BUG>import static org.mockito.Mockito.*; import javax.jcr.NamespaceRegistry;</BUG> import javax.jcr.Session; import junitx.util.PrivateAccessor;
import static org.mockito.Mockito.when; import static org.mockito.Mockito.mock; import javax.jcr.NamespaceRegistry;
27,374
import org.apache.sling.jcr.resource.JcrResourceConstants; import org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl; import org.apache.sling.jcr.resource.internal.helper.MapEntries; import org.apache.sling.jcr.resource.internal.helper.Mapping; import org.apache.sling.performance.annotation.Performan...
import org.apache.sling.performance.tests.ResolveNonExistingWithManyAliasTest; import org.apache.sling.performance.tests.ResolveNonExistingWithManyVanityPathTest;
27,375
import org.apache.sling.api.resource.ResourceResolver; import org.apache.sling.jcr.api.SlingRepository; import org.apache.sling.jcr.resource.JcrResourceConstants; import org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory; import org.apache.sling.performance.annotation.PerformanceTestSuite; <BU...
import org.apache.sling.performance.tests.ResolveNonExistingWithManyAliasTest; import org.apache.sling.performance.tests.ResolveNonExistingWithManyVanityPathTest;
27,376
@PerformanceTestSuite public ParameterizedTestList testPerformance() throws Exception { Helper helper = new Helper(); ParameterizedTestList testCenter = new ParameterizedTestList(); testCenter.setTestSuiteTitle("jcr.resource-2.2.0"); <BUG>testCenter.addTestObject(new ResolveNonExistingWith1000VanityPathTest(helper)); t...
testCenter.addTestObject(new ResolveNonExistingWithManyVanityPathTest("ResolveNonExistingWith1000VanityPathTest",helper, 100, 10)); testCenter.addTestObject(new ResolveNonExistingWithManyVanityPathTest("ResolveNonExistingWith5000VanityPathTest",helper, 100, 50)); testCenter.addTestObject(new ResolveNonExistingWithManyV...
27,377
ResourceManagementService resources = NeomediaActivator.getResources(); notificationService.fireNotification( popUpEvent, title, <BUG>device.getName() + "\r\n" </BUG> + resources.getI18NString( "impl.media.configform"
body + "\r\n\r\n"
27,378
package org.jetbrains.jet.lang.psi; import com.intellij.lang.ASTNode; <BUG>import org.jetbrains.annotations.NotNull; public class JetParenthesizedExpression extends JetExpression {</BUG> public JetParenthesizedExpression(@NotNull ASTNode node) { super(node); }
import org.jetbrains.annotations.Nullable; public class JetParenthesizedExpression extends JetExpression {
27,379
e.printStackTrace(); } filePlayback=null; } @Override <BUG>public void stop() { if ( filePlayback!=null ) filePlayback.stop(); } void initFiles() throws FileNotFoundException {</BUG> if ((dataDir.length() != 0) && !dataDir.endsWith("/")) { dataDir = dataDir + "/"; } // guard path if needed String samples_str = dataDir ...
@Override public boolean isrunning(){ if ( filePlayback!=null ) return filePlayback.isrunning(); return false; } void initFiles() throws FileNotFoundException {
27,380
public class BufferMonitor extends Thread implements FieldtripBufferMonitor { public static final String TAG = BufferMonitor.class.toString(); private final Context context; private final SparseArray<BufferConnectionInfo> clients = new SparseArray<BufferConnectionInfo>(); private final BufferInfo info; <BUG>private fin...
[DELETED]
27,381
public static final String CLIENT_INFO_TIME = "c_time"; public static final String CLIENT_INFO_WAITTIMEOUT = "c_waitTimeout"; public static final String CLIENT_INFO_CONNECTED = "c_connected"; public static final String CLIENT_INFO_CHANGED = "c_changed"; public static final String CLIENT_INFO_DIFF = "c_diff"; <BUG>publi...
public static final int THREAD_INFO_TYPE = 0;
27,382
package nl.dcc.buffer_bci.bufferclientsservice; import android.os.Parcel; import android.os.Parcelable; <BUG>import nl.dcc.buffer_bci.bufferservicecontroller.C; public class ThreadInfo implements Parcelable {</BUG> public static final Creator<ThreadInfo> CREATOR = new Creator<ThreadInfo>() { @Override public ThreadInfo...
import nl.dcc.buffer_bci.C; public class ThreadInfo implements Parcelable {
27,383
import org.jetbrains.jet.lang.psi.JetFile; import org.jetbrains.jet.plugin.DirectiveBasedActionUtils; import org.jetbrains.jet.plugin.KotlinDaemonAnalyzerTestCase; import org.jetbrains.jet.plugin.PluginTestCaseBase; import org.jetbrains.jet.testing.ConfigLibraryUtil; <BUG>import java.io.File; import java.util.ArrayList...
import java.io.FilenameFilter; import java.util.ArrayList;
27,384
doTest(beforeFileName, false); } protected void doTestWithExtraFile(String beforeFileName) throws Exception { doTest(beforeFileName, true); } <BUG>private void doTest(final String beforeFileName, boolean withExtraFile) throws Exception { final String originalFileText = FileUtil.loadFile(new File(getTestDataPath() + bef...
final String testDataPath = getTestDataPath(); File mainFile = new File(testDataPath + beforeFileName); final String originalFileText = FileUtil.loadFile(mainFile, true);
27,385
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...
27,386
public NodeFirstRelationshipStage( Configuration config, NodeStore nodeStore, RelationshipGroupStore relationshipGroupStore, NodeRelationshipLink cache ) { super( "Node --> Relationship", config, false ); add( new ReadNodeRecordsStep( control(), config.batchSize(), config.movingAverageSize(), nodeStore ) ); <BUG>add( n...
add( new RecordProcessorStep<>( control(), "LINK", config.workAheadSize(), config.movingAverageSize(), new NodeFirstRelationshipProcessor( relationshipGroupStore, cache ), false ) ); add( new UpdateRecordsStep<>( control(), config.workAheadSize(), config.movingAverageSize(), nodeStore ) );
27,387
import org.neo4j.kernel.impl.api.CountsAccessor; import org.neo4j.kernel.impl.store.NodeLabelsField; import org.neo4j.kernel.impl.store.NodeStore; import org.neo4j.kernel.impl.store.record.NodeRecord; import org.neo4j.unsafe.impl.batchimport.cache.NodeLabelsCache; <BUG>public class NodeCountsProcessor implements StoreP...
public class NodeCountsProcessor implements RecordProcessor<NodeRecord>
27,388
super.addStatsProviders( providers ); providers.add( monitor ); } @Override protected void done() <BUG>{ monitor.stop();</BUG> } @Override public int numberOfProcessors()
super.done(); monitor.stop();
27,389
import org.neo4j.kernel.impl.store.RelationshipGroupStore; import org.neo4j.kernel.impl.store.record.NodeRecord; import org.neo4j.kernel.impl.store.record.RelationshipGroupRecord; import org.neo4j.unsafe.impl.batchimport.cache.NodeRelationshipLink; import org.neo4j.unsafe.impl.batchimport.cache.NodeRelationshipLink.Gro...
public class NodeFirstRelationshipProcessor implements RecordProcessor<NodeRecord>, GroupVisitor
27,390
<BUG>package org.broadinstitute.sting.gatk.contexts; public class ReferenceContext { private char base; public ReferenceContext( char base ) { this.base = base; } public char getBase() { return base; </BUG> }
import org.broadinstitute.sting.utils.GenomeLoc; import org.broadinstitute.sting.utils.StingException; private GenomeLoc locus; private GenomeLoc window; private char[] bases; public ReferenceContext( GenomeLoc locus, char base ) { this( locus, locus, new char[] { base } );
27,391
import java.util.List; import java.util.Arrays; import net.sf.samtools.SAMRecord; public class PrintLocusContextWalker extends LocusWalker<AlignmentContext, Integer> implements TreeReducible<Integer> { public AlignmentContext map(RefMetaDataTracker tracker, ReferenceContext ref, AlignmentContext context) { <BUG>out.pri...
out.printf( "In map: ref = %s, loc = %s, reads = %s%n", ref.getBase(),
27,392
if ( !(walker instanceof LocusWindowWalker) ) throw new IllegalArgumentException("Walker isn't a locus window walker!"); LocusWindowWalker<M, T> locusWindowWalker = (LocusWindowWalker<M, T>)walker; GenomeLoc interval = shard.getGenomeLoc(); ReadView readView = new ReadView( dataProvider ); <BUG>LocusReferenceView refer...
LocusReferenceView referenceView = new LocusReferenceView( walker, dataProvider );
27,393
logger.debug(String.format("TraverseLoci.traverse Genomic interval is %s", shard.getGenomeLoc())); if ( !(walker instanceof LocusWalker) ) throw new IllegalArgumentException("Walker isn't a loci walker!"); LocusWalker<M, T> locusWalker = (LocusWalker<M, T>)walker; LocusView locusView = getLocusView( walker, dataProvide...
LocusReferenceView referenceView = new LocusReferenceView( walker, dataProvider );
27,394
ReferenceOrderedView referenceOrderedDataView = new ReferenceOrderedView( dataProvider ); while( locusView.hasNext() ) { AlignmentContext locus = locusView.next(); TraversalStatistics.nRecords++; final RefMetaDataTracker tracker = referenceOrderedDataView.getReferenceOrderedDataAtLocus(locus.getLocation()); <BUG>Refere...
ReferenceContext refContext = referenceView.getReferenceContext(locus.getLocation());
27,395
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() {
27,396
package org.seleniumhq.selenium.fluent; <BUG>import org.openqa.selenium.Dimension; import org.openqa.selenium.Point;</BUG> import org.openqa.selenium.WebDriver; import java.util.List; public abstract class BaseFluentWebElement extends BaseFluentWebDriver {
[DELETED]
27,397
} public FluentSelects selects(By by) { MultipleResult multiple = multiple(by, "select"); return newFluentSelects(multiple.getResult(), multiple.getCtx()); } <BUG>public FluentWebElement h1() { </BUG> SingleResult single = single(tagName("h1"), "h1"); return newFluentWebElement(delegate, single.getResult(), single.getC...
protected BaseFluentWebElements spans() { return newFluentWebElements(multiple(tagName("span"), "span"));
27,398
private int getType() { return m_type; } } <BUG>private final List m_queue; </BUG> private final String m_fqcn; private PaxContext m_context = new PaxContext(); public BufferingLog( Bundle bundle, String categoryName )
private final List<LogPackage> m_queue;
27,399
} public static void setBundleContext(BundleContext ctx) { synchronized (m_loggers) { <BUG>m_paxLogging = new OSGIPaxLoggingManager(ctx); Set entrySet = m_loggers.entrySet(); Iterator iterator = entrySet.iterator(); while (iterator.hasNext()) { Map.Entry entry = (Entry) iterator.next(); JclLogger logger = (JclLogger) e...
for (Entry<String, JclLogger> entry : m_loggers.entrySet()) { String name = entry.getKey(); JclLogger logger = entry.getValue(); logger.setPaxLoggingManager(m_paxLogging, name);
27,400
else { paxLogger = m_paxLogging.getLogger( name, LOG4J_FQCN ); } Logger logger = new Logger( paxLogger ); <BUG>m_loggers.put( logger, name ); </BUG> return logger; } public static Logger getLogger( Class clazz )
m_loggers.put( name, logger );