id
int64
1
49k
buggy
stringlengths
34
37.5k
fixed
stringlengths
2
37k
28,401
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;
28,402
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;
28,403
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"),
28,404
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]
28,405
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) {
28,406
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;
28,407
} else { updateMemo(); callback.updateMemo(); } dismiss(); <BUG>}else{ </BUG> Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show(); } }
[DELETED]
28,408
} @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);
28,409
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);
28,410
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(
28,411
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 {
28,412
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;
28,413
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) {
28,414
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;
28,415
PersistentClass associatedClass = null; if(LOG.isDebugEnabled()) LOG.debug( "Mapping collection: " + collection.getRole() + " -> " <BUG>+ collection.getCollectionTable().getName() ); if(collection.isOneToMany() ) {</BUG> OneToMany oneToMany = (OneToMany)collection.getElement(); String associatedClassName = oneToMany.ge...
ColumnConfig cc = getColumnConfig(property); if(collection.isOneToMany() ) {
28,416
import android.content.Context; import ch.logixisland.anuto.game.business.GameManager; import ch.logixisland.anuto.game.business.control.TowerControl; import ch.logixisland.anuto.game.business.control.TowerInserter; import ch.logixisland.anuto.game.business.control.TowerSelector; <BUG>import ch.logixisland.anuto.game.b...
import ch.logixisland.anuto.game.business.level.WaveManager; import ch.logixisland.anuto.game.business.score.ScoreBoard;
28,417
private final Renderer mRenderer; private final ScoreBoard mScoreBoard; private final TowerSelector mTowerSelector; private final TowerControl mTowerControl; private final TowerInserter mTowerInserter; <BUG>private final LevelLoader mLevelLoader; private final GameEngine mGameEngine;</BUG> private final GameManager mGa...
private final WaveManager mWaveManager; private final GameEngine mGameEngine;
28,418
mGameEngine = new GameEngine(mRenderer); mTowerSelector = new TowerSelector(mGameEngine); mTowerControl = new TowerControl(mGameEngine, mScoreBoard, mTowerSelector); mTowerInserter = new TowerInserter(mGameEngine, mScoreBoard, mTowerSelector); mLevelLoader = new LevelLoader(mGameEngine, mViewport, mScoreBoard); <BUG>mG...
mWaveManager = new WaveManager(mGameEngine, mScoreBoard, mLevelLoader); mGameManager = new GameManager(mGameEngine, mScoreBoard, mLevelLoader, mWaveManager); }
28,419
Promise<String> transformedPromise = new Promise<>(); transformedPromise.fulfillInAsync(() -> { Thread.sleep(1000); return "10"; }, executor).then(value -> { return Integer.parseInt(value); }).then(value -> { <BUG>System.out.println(value); }); consumedPromise.await(); transformedPromise.await(); </BUG> }
System.out.println("Consumed transformed int value: " + value); consumedPromise.get(); transformedPromise.get();
28,420
super.setValue(value); postComplete(); }</BUG> @Override <BUG>public void setException(Exception exception) { super.setException(exception); postComplete(); } void postComplete() { if (fulfillmentAction == null) {</BUG> return;
package com.iluwatar.promise; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.Executor; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.function.Consumer; import jav...
28,421
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.SCAL...
VerticalGroup timeGroup = new VerticalGroup().align(Align.left).columnAlign(Align.left).space(3 * GlobalConf.SCALE_FACTOR).padTop(3 * GlobalConf.SCALE_FACTOR);
28,422
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 *...
VerticalGroup objectsGroup = new VerticalGroup().align(Align.left).columnAlign(Align.left).space(3 * GlobalConf.SCALE_FACTOR);
28,423
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() {
28,424
</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() {
28,425
}); 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.ad...
time.align(Align.left).columnAlign(Align.left); mainActors.add(time);
28,426
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, fal...
objects.align(Align.left).columnAlign(Align.left); mainActors.add(objects);
28,427
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"), musicCompo...
music.align(Align.left).columnAlign(Align.left); mainActors.add(music);
28,428
import java.sql.SQLException; import java.sql.Statement; import java.text.MessageFormat; import java.util.ArrayList; import java.util.Collection; <BUG>import java.util.Date; import java.util.HashSet; import java.util.List; import java.util.Set;</BUG> import java.util.concurrent.locks.Lock;
import java.util.HashMap; import java.util.Map; import java.util.Set;
28,429
if (msgin != null) { try { msgin.close(); } catch (IOException e) { } <BUG>} } } protected void updateSourceSequence(SourceSequence seq) </BUG> throws SQLException {
releaseResources(stmt, null); protected void storeMessage(Identifier sid, RMMessage msg, boolean outbound) throws IOException, SQLException { storeMessage(connection, sid, msg, outbound); protected void updateSourceSequence(Connection con, SourceSequence seq)
28,430
} catch (SQLException ex) { if (!isTableExistsError(ex)) { throw ex; } else { LOG.fine("Table CXF_RM_SRC_SEQUENCES already exists."); <BUG>verifyTable(SRC_SEQUENCES_TABLE_NAME, SRC_SEQUENCES_TABLE_COLS); </BUG> } } finally { stmt.close();
verifyTable(con, SRC_SEQUENCES_TABLE_NAME, SRC_SEQUENCES_TABLE_COLS);
28,431
} catch (SQLException ex) { if (!isTableExistsError(ex)) { throw ex; } else { LOG.fine("Table CXF_RM_DEST_SEQUENCES already exists."); <BUG>verifyTable(DEST_SEQUENCES_TABLE_NAME, DEST_SEQUENCES_TABLE_COLS); </BUG> } } finally { stmt.close();
LOG.fine("Table CXF_RM_SRC_SEQUENCES already exists."); verifyTable(con, SRC_SEQUENCES_TABLE_NAME, SRC_SEQUENCES_TABLE_COLS);
28,432
} } finally { stmt.close(); } for (String tableName : new String[] {OUTBOUND_MSGS_TABLE_NAME, INBOUND_MSGS_TABLE_NAME}) { <BUG>stmt = connection.createStatement(); try {</BUG> stmt.executeUpdate(MessageFormat.format(CREATE_MESSAGES_TABLE_STMT, tableName)); } catch (SQLException ex) { if (!isTableExistsError(ex)) {
stmt = con.createStatement(); try { stmt.executeUpdate(CREATE_DEST_SEQUENCES_TABLE_STMT);
28,433
throw ex; } else { if (LOG.isLoggable(Level.FINE)) { LOG.fine("Table " + tableName + " already exists."); } <BUG>verifyTable(tableName, MESSAGES_TABLE_COLS); </BUG> } } finally { stmt.close();
LOG.fine("Table CXF_RM_SRC_SEQUENCES already exists."); verifyTable(con, SRC_SEQUENCES_TABLE_NAME, SRC_SEQUENCES_TABLE_COLS);
28,434
if (newCols.size() > 0) { if (LOG.isLoggable(Level.FINE)) { LOG.log(Level.FINE, "Table " + tableName + " needs additional columns"); } for (String[] newCol : newCols) { <BUG>Statement st = connection.createStatement(); try {</BUG> st.executeUpdate(MessageFormat.format(ALTER_TABLE_STMT_STR, tableName, newCol[0], newCol[...
Statement st = con.createStatement(); try {
28,435
if (nextReconnectAttempt < System.currentTimeMillis()) { nextReconnectAttempt = System.currentTimeMillis() + reconnectDelay; reconnectDelay = reconnectDelay * useExponentialBackOff; } } <BUG>} public static void deleteDatabaseFiles() {</BUG> deleteDatabaseFiles(DEFAULT_DATABASE_NAME, true); } public static void deleteD...
public static void deleteDatabaseFiles() {
28,436
String yamlFileString = getDeploymentContent(fileInputStream); yamlFileString = org.wso2.carbon.kernel.utils.Utils.substituteVariables(yamlFileString); String jsonString = ConfigResolverUtils.convertYAMLToJSON(yamlFileString); return getDeploymentConfigTable(jsonString); } catch (IOException e) { <BUG>String errorMessa...
String errorMessage = "Failed populate Deployment Configuration from " + configFile.getName();
28,437
import org.osgi.service.component.annotations.Reference; import org.osgi.service.component.annotations.ReferenceCardinality; import org.osgi.service.component.annotations.ReferencePolicy; import org.slf4j.Logger; import org.slf4j.LoggerFactory; <BUG>import org.wso2.carbon.kernel.CarbonRuntime; import org.wso2.carbon.ke...
import org.wso2.carbon.kernel.configprovider.ConfigProvider; import org.wso2.carbon.kernel.configresolver.ConfigResolver;
28,438
@Deactivate public void deactivate() { logger.debug("Deactivating CarbonCoreComponent"); } @Reference( <BUG>name = "carbon.core.config.resolver", service = ConfigResolver.class, </BUG> cardinality = ReferenceCardinality.AT_LEAST_ONE,
name = "carbon.core.config.provider", service = ConfigProvider.class,
28,439
package org.wso2.carbon.kernel.internal; <BUG>import org.osgi.framework.BundleContext; import org.wso2.carbon.kernel.configresolver.ConfigResolver;</BUG> import org.wso2.carbon.kernel.internal.runtime.RuntimeManager; import java.util.Optional; public class DataHolder {
import org.wso2.carbon.kernel.configprovider.ConfigProvider; import org.wso2.carbon.kernel.configresolver.ConfigResolver;
28,440
import java.util.Optional; public class DataHolder { private static DataHolder instance = new DataHolder(); private BundleContext bundleContext; private RuntimeManager runtimeManager = null; <BUG>private Optional<ConfigResolver> optConfigResolver = Optional.empty(); public static DataHolder getInstance() {</BUG> return...
private Optional<ConfigProvider> optConfigProvider = Optional.empty(); public static DataHolder getInstance() {
28,441
public class CarbonConfigurationFactory { private static final Logger logger = LoggerFactory.getLogger(CarbonConfigurationFactory.class); private static Hashtable<String, String> deploymentConfigs = new Hashtable<>(); private CarbonConfigurationFactory() { } <BUG>public static Object getConfigurationInstance(String con...
public static Object getConfigurationInstance(String configClassName) throws CarbonConfigurationException { Class configClass; try { } catch (ClassNotFoundException e) { throw new CarbonConfigurationException("Config Class : " + configClassName + "does not exists.", e); Yaml yaml = new Yaml(new CustomClassLoaderConstru...
28,442
package org.wso2.carbon.configuration.annotations.processors; import org.wso2.carbon.configuration.annotations.Configuration; import org.wso2.carbon.configuration.annotations.Ignore; import org.yaml.snakeyaml.Yaml; import java.io.IOException; <BUG>import java.io.Writer; import java.util.LinkedHashMap;</BUG> import java...
import java.util.HashMap; import java.util.LinkedHashMap;
28,443
import javax.annotation.processing.SupportedAnnotationTypes; import javax.annotation.processing.SupportedSourceVersion; import javax.lang.model.SourceVersion; import javax.lang.model.element.Element; import javax.lang.model.element.TypeElement; <BUG>import javax.lang.model.element.VariableElement; import javax.lang.mod...
import javax.lang.model.type.ArrayType; import javax.lang.model.type.TypeKind; import javax.lang.model.type.TypeMirror;
28,444
List<VariableElement> fields = ElementFilter.fieldsIn(element.getEnclosedElements()); for (VariableElement field : fields) { if (field.getAnnotation(Ignore.class) != null) { continue; } <BUG>Element fieldElement = null; TypeMirror fieldType = field.asType(); if (!fieldType.getKind().isPrimitive()) { fieldElement = ((De...
List<TypeMirror> argumentTypes = null; if (fieldType.getKind() == TypeKind.DECLARED) { argumentTypes = (List<TypeMirror>) ((DeclaredType) fieldType).getTypeArguments();
28,445
package org.wso2.carbon.kernel.configprovider.utils; <BUG>import org.wso2.carbon.kernel.Constants; import java.nio.file.Path; import java.nio.file.Paths; public class ConfigurationUtils {</BUG> private ConfigurationUtils() {
import org.yaml.snakeyaml.Yaml; import java.util.Map; public class ConfigurationUtils {
28,446
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) {
28,447
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);
28,448
private static void makeSureNextTransactionIsFullyFetched( ChannelBuffer buffer ) { buffer.markReaderIndex(); try { <BUG>if ( buffer.readByte() > 0 /* datasource id */ ) </BUG> { buffer.skipBytes( 8 ); // tx id int blockSize = 0;
if ( buffer.readUnsignedByte() > 0 /* datasource id */ )
28,449
public boolean isOpen() { return true; } public void close() throws IOException <BUG>{ }</BUG> public int read( ByteBuffer dst ) throws IOException { int bytesWanted = dst.limit();
readToTheEnd();
28,450
return this.imgPathTextField; } boolean getNoFatOrphans() { return noFatOrphansCheckbox.isSelected(); } <BUG>boolean getNoUnallocSpaceProcess() { return noProcessUnallocSpace.isSelected(); }</BUG> public String getImgType() { if (rawSingle.isSelected()) {
[DELETED]
28,451
return; } } this.wizPanel.moveFocusToNext(); }//GEN-LAST:event_imgPathBrowserButtonActionPerformed <BUG>private void noProcessUnallocSpaceActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_noProcessUnallocSpaceActionPerformed }//GEN-LAST:event_noProcessUnallocSpaceActionPerformed</BUG> private javax.swi...
[DELETED]
28,452
return 0; } catch (InvocationTargetException ex) { logger.log(Level.WARNING, "Errors occurred while running add image, could not acquire lock. ", ex); return 0; } <BUG>process = currentCase.makeAddImageProcess(timeZone, !noUnallocSpace, noFatOrphans); </BUG> cancelledWhileRunning.enable(); try { process.run(imgPaths);
process = currentCase.makeAddImageProcess(timeZone, true, noFatOrphans);
28,453
package com.cronutils.model.time.generator; import java.util.Collections; <BUG>import java.util.List; import org.apache.commons.lang3.Validate;</BUG> import com.cronutils.model.field.CronField; import com.cronutils.model.field.expression.FieldExpression; public abstract class FieldValueGenerator {
import org.apache.commons.lang3.Validate; import org.apache.commons.lang3.Validate;
28,454
import java.util.ResourceBundle; import java.util.function.Function;</BUG> class DescriptionStrategyFactory { private DescriptionStrategyFactory() {} public static DescriptionStrategy daysOfWeekInstance(final ResourceBundle bundle, final FieldExpression expression) { <BUG>final Function<Integer, String> nominal = integ...
import java.util.function.Function; import com.cronutils.model.field.expression.FieldExpression; import com.cronutils.model.field.expression.On; final Function<Integer, String> nominal = integer -> DayOfWeek.of(integer).getDisplayName(TextStyle.FULL, bundle.getLocale());
28,455
return dom; } public static DescriptionStrategy monthsInstance(final ResourceBundle bundle, final FieldExpression expression) { return new NominalDescriptionStrategy( bundle, <BUG>integer -> new DateTime().withMonthOfYear(integer).monthOfYear().getAsText(bundle.getLocale()), expression</BUG> ); } public static Descript...
integer -> Month.of(integer).getDisplayName(TextStyle.FULL, bundle.getLocale()), expression
28,456
<BUG>package com.cronutils.model.time.generator; import com.cronutils.mapper.WeekDay;</BUG> import com.cronutils.model.field.CronField; import com.cronutils.model.field.CronFieldName; import com.cronutils.model.field.constraint.FieldConstraintsBuilder;
import java.time.LocalDate; import java.util.Collections; import java.util.List; import java.util.Set; import org.apache.commons.lang3.Validate; import com.cronutils.mapper.WeekDay;
28,457
import com.cronutils.model.field.expression.Between; import com.cronutils.model.field.expression.FieldExpression; import com.cronutils.parser.CronParserField; import com.google.common.collect.Lists; import com.google.common.collect.Sets; <BUG>import org.apache.commons.lang3.Validate; import org.joda.time.DateTime; impo...
[DELETED]
28,458
<BUG>package com.cronutils.model.time.generator; import com.cronutils.model.field.CronField;</BUG> import com.cronutils.model.field.CronFieldName; import com.cronutils.model.field.expression.FieldExpression; import com.cronutils.model.field.expression.On;
import java.time.DayOfWeek; import java.time.LocalDate; import java.util.List; import org.apache.commons.lang3.Validate; import com.cronutils.model.field.CronField;
28,459
import com.cronutils.model.field.CronField;</BUG> import com.cronutils.model.field.CronFieldName; import com.cronutils.model.field.expression.FieldExpression; import com.cronutils.model.field.expression.On; import com.google.common.collect.Lists; <BUG>import org.apache.commons.lang3.Validate; import org.joda.time.DateT...
package com.cronutils.model.time.generator; import java.time.DayOfWeek; import java.time.LocalDate; import java.util.List; import com.cronutils.model.field.CronField;
28,460
class OnDayOfMonthValueGenerator extends FieldValueGenerator { private int year; private int month; public OnDayOfMonthValueGenerator(CronField cronField, int year, int month) { super(cronField); <BUG>Validate.isTrue(CronFieldName.DAY_OF_MONTH.equals(cronField.getField()), "CronField does not belong to day of month"); ...
Validate.isTrue(CronFieldName.DAY_OF_MONTH.equals(cronField.getField()), "CronField does not belong to day of" + " month"); this.year = year;
28,461
package com.cronutils.mapper; public class ConstantsMapper { private ConstantsMapper() {} public static final WeekDay QUARTZ_WEEK_DAY = new WeekDay(2, false); <BUG>public static final WeekDay JODATIME_WEEK_DAY = new WeekDay(1, false); </BUG> public static final WeekDay CRONTAB_WEEK_DAY = new WeekDay(1, true); public st...
public static final WeekDay JAVA8 = new WeekDay(1, false);
28,462
return nextMatch; } catch (NoSuchValueException e) { throw new IllegalArgumentException(e); } } <BUG>DateTime nextClosestMatch(DateTime date) throws NoSuchValueException { </BUG> List<Integer> year = yearsValueGenerator.generateCandidates(date.getYear(), date.getYear()); TimeNode days = null; int lowestMonth = months.g...
ZonedDateTime nextClosestMatch(ZonedDateTime date) throws NoSuchValueException {
28,463
boolean questionMarkSupported = cronDefinition.getFieldDefinition(DAY_OF_WEEK).getConstraints().getSpecialChars().contains(QUESTION_MARK); if(questionMarkSupported){ return new TimeNode( generateDayCandidatesQuestionMarkSupported( <BUG>date.getYear(), date.getMonthOfYear(), </BUG> ((DayOfWeekFieldDefinition) cronDefini...
date.getYear(), date.getMonthValue(),
28,464
) ); }else{ return new TimeNode( generateDayCandidatesQuestionMarkNotSupported( <BUG>date.getYear(), date.getMonthOfYear(), </BUG> ((DayOfWeekFieldDefinition) cronDefinition.getFieldDefinition(DAY_OF_WEEK) ).getMondayDoWValue()
date.getYear(), date.getMonthValue(),
28,465
} public DateTime lastExecution(DateTime date){ </BUG> Validate.notNull(date); try { <BUG>DateTime previousMatch = previousClosestMatch(date); </BUG> if(previousMatch.equals(date)){ previousMatch = previousClosestMatch(date.minusSeconds(1)); }
public java.time.Duration timeToNextExecution(ZonedDateTime date){ return java.time.Duration.between(date, nextExecution(date)); public ZonedDateTime lastExecution(ZonedDateTime date){ ZonedDateTime previousMatch = previousClosestMatch(date);
28,466
return previousMatch; } catch (NoSuchValueException e) { throw new IllegalArgumentException(e); } } <BUG>public Duration timeFromLastExecution(DateTime date){ return new Interval(lastExecution(date), date).toDuration(); } public boolean isMatch(DateTime date){ </BUG> return nextExecution(lastExecution(date)).equals(da...
[DELETED]
28,467
<BUG>package com.cronutils.model.time.generator; import com.cronutils.model.field.CronField;</BUG> import com.cronutils.model.field.expression.Every; import com.cronutils.model.field.expression.FieldExpression; import com.google.common.annotations.VisibleForTesting;
import java.time.ZonedDateTime; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.cronutils.model.field.CronField;
28,468
import com.cronutils.model.field.CronField;</BUG> import com.cronutils.model.field.expression.Every; import com.cronutils.model.field.expression.FieldExpression; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.Lists; <BUG>import org.joda.time.DateTime; import org.slf4j.Logger; i...
package com.cronutils.model.time.generator; import java.time.ZonedDateTime; import java.util.List; import com.cronutils.model.field.CronField;
28,469
private static final Logger log = LoggerFactory.getLogger(EveryFieldValueGenerator.class); public EveryFieldValueGenerator(CronField cronField) { super(cronField); log.trace(String.format( "processing \"%s\" at %s", <BUG>cronField.getExpression().asString(), DateTime.now() </BUG> )); } @Override
cronField.getExpression().asString(), ZonedDateTime.now()
28,470
public static final String EDGE_FIELD_IN = "in"; public static final String EDGE_FIELD_OUT = "out"; public static final String LABEL = "label"; private boolean useCustomTypes = true; private boolean safeMode = false; <BUG>private boolean autoLock = tr...
private LOCK_MODE lockMode = LOCK_MODE.DATABASE_LEVEL_LOCKING; protected OClass vertexBaseClass;
28,471
@Override @SuppressWarnings("unchecked") public <THISDB extends ODatabase> THISDB open(final String iUserName, final String iUserPassword) { super.open(iUserName, iUserPassword); checkForGraphSchema(); <BUG>if (autoLock && !(getStorage() instanceof OStorageEmbedded)) autoLock = false;</BUG> return (THISDB) this; } @Ove...
[DELETED]
28,472
cgl.setLexicalvalue(valueEdit); cgl.setIdgroup(idDomaine); cgl.setIdthesaurus(idTheso); cgl.setLang(langueEdit); GroupHelper cgh = new GroupHelper(); <BUG>if (!cgh.isDomainExist(connect.getPoolConnexion(), cgl.getLexicalvalue(),</BUG> cgl.getIdthesaurus(), cgl.getLang())) { FacesContext.getCurrentInstance().addMessage(...
if (cgh.isDomainExist(connect.getPoolConnexion(), cgl.getLexicalvalue(),
28,473
Term terme = new Term(); terme.setId_thesaurus(idTheso); terme.setLang(langueEdit); terme.setLexical_value(valueEdit); terme.setId_term(idT); <BUG>if (new TermHelper().isTermExist(connect.getPoolConnexion(), </BUG> terme.getLexical_value(), terme.getId_thesaurus(), terme.getLang())) { FacesContext.getCurrentInstance()....
if (termHelper.isTermExist(connect.getPoolConnexion(),
28,474
Term terme = new Term(); terme.setId_thesaurus(idTheso); terme.setLang(langueEdit); terme.setLexical_value(valueEdit); terme.setId_term(idT); <BUG>if (new TermHelper().isTermExist(connect.getPoolConnexion(), </BUG> terme.getLexical_value(), terme.getId_thesaurus(), terme.getLang())) { FacesContext.getCurrentInstance()....
if (termHelper.isTermExist(connect.getPoolConnexion(),
28,475
langues = new ArrayList<>(); HashMap<String, String> tempMapL = new HashMap<>(); for (NodeTermTraduction ntt : tempNTT) { tempMapL.put(ntt.getLang(), ntt.getLexicalValue()); } <BUG>langues.addAll(tempMapL.entrySet()); }</BUG> langueEdit = ""; valueEdit = ""; if (!tradExist) {
if(newTraduction) { nom = termHelper.getThisTerm(connect.getPoolConnexion(),idC, idTheso, idlangue).getLexical_value();
28,476
if (n.getTitle().trim().isEmpty()) { dynamicTreeNode = (TreeNode) new MyTreeNode(1, n.getIdConcept(), idTheso, idlangue, "", "", "dossier", n.getIdConcept(), root); } else { dynamicTreeNode = (TreeNode) new MyTreeNode(1, n.getIdConcept(), idTheso, idlangue, "", "", "dossier", n.getTitle(), root); } <BUG>new DefaultTree...
DefaultTreeNode defaultTreeNode = new DefaultTreeNode("fake", dynamicTreeNode); defaultTreeNode.setExpanded(true);
28,477
SKOSXmlDocument sxd = new ReadFileSKOS().readStringBuffer(sb); for (SKOSResource resource : sxd.getResourcesList()) { NodeAlignment na = new NodeAlignment(); na.setInternal_id_concept(idC); na.setInternal_id_thesaurus(idTheso); <BUG>na.setThesaurus_target("OpenTheso"); </BUG> na.setUri_target(resource.getUri()); for(SK...
na.setThesaurus_target("Pactols");
28,478
public UIMAChecker() { TypeSystemDescription tsd = TypeSystemDescriptionFactory.createTypeSystemDescription("cogroo.ruta.MainTypeSystem"); try { URL url = Resources.getResource("cogroo/ruta/Main.ruta"); String text = Resources.toString(url, Charsets.UTF_8); <BUG>AnalysisEngineDescription aeDes = Ruta.createAnalysisEngi...
AnalysisEngineDescription aeDes = Ruta.createAnalysisEngineDescription(text, tsd);
28,479
private synchronized void initTypeSystem(TypeSystem typeSystem) throws AnalysisEngineProcessException { if(typeSystemInitialized == true) { return; } mProblemType = AnnotatorUtil.getType(typeSystem, <BUG>"cogroo.ruta.Main.PROBLEM"); mTokenType = AnnotatorUtil.getType(typeSystem,</BUG> "opennlp.uima.Token"); mLemmaFeatu...
mIDFeature = AnnotatorUtil.getRequiredFeature(mProblemType, "id", mTokenType = AnnotatorUtil.getType(typeSystem,
28,480
import flex2.compiler.util.CompilerMessage; import flex2.compiler.as3.genext.GenerativeFirstPassEvaluator; import flex2.compiler.as3.reflect.NodeMagic; import flex2.compiler.as3.reflect.TypeTable; import flex2.compiler.mxml.lang.StandardDefs; <BUG>import flex2.compiler.mxml.lang.TextParser; import flex2.compiler.util.N...
import flex2.compiler.util.MultiName; import flex2.compiler.util.NameFormatter;
28,481
package flex2.compiler.as3.binding; <BUG>import flex2.compiler.CompilationUnit; import flex2.compiler.as3.AbstractSyntaxTreeUtil;</BUG> import flex2.compiler.as3.MetaDataEvaluator; import flex2.compiler.as3.genext.GenerativeClassInfo.AccessorInfo; import flex2.compiler.as3.genext.GenerativeClassInfo.GetterSetterInfo;
import flex2.compiler.CompilerException; import flex2.compiler.as3.AbstractSyntaxTreeUtil;
28,482
public abstract String getRPCPackage(); public abstract String getRPCXMLPackage(); public abstract String getStatesPackage(); public abstract String getStylesPackage(); public abstract String getUtilsPackage(); <BUG>public abstract String getBindablePropertyTemplate(); public abstract String getClassDefTemplate();</BUG...
public abstract String getBindablePropertyStarlingTemplate(); public abstract String getClassDefTemplate();
28,483
: "interface " + INTERFACE_IDEFERREDINSTANTIATIONUICOMPONENT + " not found in core framework interface set"; return type.isAssignableTo(INTERFACE_IDEFERREDINSTANTIATIONUICOMPONENT); } public static class StandardDefs2006 extends StandardDefs { <BUG>private static final String BINDABLE_PROPERTY_TEMPLATE = "BindablePrope...
private static final String BINDABLE_PROPERTY_STARLING_TEMPLATE = "BindablePropertyStarling.vm"; private static final String CLASSDEF_TEMPLATE = "ClassDef.vm";
28,484
return PACKAGE_MX_UTILS; } public String getBindablePropertyTemplate() { return BINDABLE_PROPERTY_TEMPLATE; <BUG>} public String getClassDefTemplate()</BUG> { return CLASSDEF_TEMPLATE; }
public String getBindablePropertyStarlingTemplate() return BINDABLE_PROPERTY_STARLING_TEMPLATE; public String getClassDefTemplate()
28,485
import com.intellij.psi.PsiType; import com.intellij.psi.util.TypeConversionUtil; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.plugins.groovy.lang.psi.api.statements.GrStatement; <BUG>import org.jetbrains.plugins.groovy.lang.psi.api.statements.blocks.GrClosab...
import org.jetbrains.plugins.groovy.lang.psi.api.statements.blocks.GrCodeBlock;
28,486
int position = info.getPosition(); assert position < infos.length && infos[position] == null; infos[position] = info; } return infos; <BUG>} public boolean setNewName(@NotNull String oldName, @NotNull String newName) { ParameterInfo info = myInputNamesMap.remove(oldName); if (info == null) return false; info.setNewName...
[DELETED]
28,487
} else { updateMemo(); callback.updateMemo(); } dismiss(); <BUG>}else{ </BUG> Toast.makeText(getActivity(), getString(R.string.toast_memo_empty), Toast.LENGTH_SHORT).show(); } }
[DELETED]
28,488
} @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);
28,489
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);
28,490
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(
28,491
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 {
28,492
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;
28,493
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) {
28,494
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;
28,495
mock.setHeader(request); final AtomicReference<Header> header = new AtomicReference<>();</BUG> header.set(request.getFirstHeader(PKIAuthenticationPlugin.HEADER)); assertNotNull(header.get()); assertTrue(header.get().getValue().startsWith(nodeName)); <BUG>final AtomicReference<ServletRequest> wrappedRequestByFilter = ne...
run("solr", () -> { }); run(null, () -> { principal.set(null); // no user
28,496
wrappedRequestByFilter.set(null);// request = new BasicHttpRequest("GET", "http://localhost:56565"); mock.setHeader(request); assertNull(request.getFirstHeader(PKIAuthenticationPlugin.HEADER)); mock.doAuthenticate(mockReq, null, filterChain); <BUG>assertNotNull(wrappedRequestByFilter.get()); assertNull(((HttpServletReq...
}); run("$", () -> { mock.solrRequestInfo = null;
28,497
StringService example = retrofit.create(StringService.class); assertThat(example.get()).isEqualTo("Hi!"); } @Test public void methodAnnotationsPassedToCallAdapter() { final AtomicReference<Annotation[]> annotationsRef = new AtomicReference<>(); <BUG>class MyCallAdapterFactory implements CallAdapter.Factory { </BUG> @Ov...
class MyCallAdapterFactory extends CallAdapter.Factory {
28,498
import java.io.IOException; import java.lang.annotation.Annotation; import java.lang.reflect.Type; import java.util.concurrent.Executor; import okhttp3.Request; <BUG>final class ExecutorCallAdapterFactory implements CallAdapter.Factory { </BUG> final Executor callbackExecutor; ExecutorCallAdapterFactory(Executor callba...
final class ExecutorCallAdapterFactory extends CallAdapter.Factory {
28,499
ExecutorCallAdapterFactory(Executor callbackExecutor) { this.callbackExecutor = callbackExecutor; } @Override public CallAdapter<Call<?>> get(Type returnType, Annotation[] annotations, Retrofit retrofit) { <BUG>if (Utils.getRawType(returnType) != Call.class) { return null;</BUG> } final Type responseType = Utils.getCal...
if (getRawType(returnType) != Call.class) { return null;
28,500
</BUG> static final CallAdapter.Factory INSTANCE = new DefaultCallAdapterFactory(); @Override public CallAdapter<?> get(Type returnType, Annotation[] annotations, Retrofit retrofit) { <BUG>if (Utils.getRawType(returnType) != Call.class) { return null;</BUG> } final Type responseType = Utils.getCallResponseType(returnTy...
package retrofit2; import java.lang.annotation.Annotation; import java.lang.reflect.Type; final class DefaultCallAdapterFactory extends CallAdapter.Factory { if (getRawType(returnType) != Call.class) { return null;