id int64 1 49k | buggy stringlengths 34 37.5k | fixed stringlengths 2 37k |
|---|---|---|
27,801 | deepHistoryCheck(generationValueGetter,preDeclarations, state, visited);
}
if(preDeclarations.toString().isEmpty()){
preDeclarations.append(CommonConstants.NEW_LINE);
swtichCalls= preDeclarations+ swtichCalls;
<BUG>}
if("exitOne".equals(generationValueGetter.use(ICppStatemachinesDefinitions.STATEMCHAINE_EXIT_PROCEDURE_... | [DELETED] |
27,802 | public static String entryImplementationStateContents(@GenerationRegistry GenerationPolicyRegistry generationValueGetter,
@GenerationBaseElement Object state,
@GenerationArgument Object element,
@GenerationProcedureParameter(id = ICppStatemachinesDefinitions.STATE_ENTRY_CODE_BODY) String entryCode,
@GenerationProcedure... | @GenerationProcedureParameter(id = ICppStatemachinesDefinitions.STATE_DO_ACTIVITY_CODE_BODY) List<Object> doActivityCodes){
|
27,803 | @GenerationPoint(generationPoint= ICppStatemachinesDefinitions.STATE_EXIT_CODE_BODY)
public static String exit(@GenerationRegistry GenerationPolicyRegistry generationValueGetter, @GenerationBaseElement Object state){
return generationValueGetter.getString(state, ICppStatemachinesDefinitions.STATE_EXIT_CODE_BODY, CPPCom... | public static List<?> doActivity(@GenerationRegistry GenerationPolicyRegistry generationValueGetter, @GenerationBaseElement Object state){
return generationValueGetter.getList(state, ICppStatemachinesDefinitions.STATE_DO_ACTIVITY_CODE_BODY, CPPCommonConstants.CPP_LANGUAGE);
|
27,804 | public final static String THREAD_INSTANCE= "statemachine.thread.instance"; //$NON-NLS-1$
public final static String VOID_POINTER_NAME= "statemachine.void.pointer.name"; //$NON-NLS-1$
public final static String DO_ACTIVITY_METHOD_INSTANCE= "statemachine.do.activity.method"; //$NON-NLS-1$
public final static String DO_A... | public final static String DO_ACTIVITY_FUNCTION_WRAP= "cpp.do.activity.function.pointer.wrap"; //$NON-NLS-1$
public final static String STATEMACHINE_METHOD_IMPLEMENTATION= "cpp.statemachine.events.implementation"; //$NON-NLS-1$
|
27,805 | private static String addLineNumbersInformation(GenerationPolicyRegistry generationValueGetter,
String language, StateMachine statemachine, Position position) {
return getPositionString(generationValueGetter, language, statemachine, position, CommonConstants.BLANK);
}
private static String addLineNumbersInformation(Gen... | if(position== null){
return actionCode;
String extended= actionCode;
|
27,806 | public static void generateMethods(Project project, Editor editor, JetClassOrObject classOrObject, List<DescriptorClassMember> selectedElements) {
final JetClassBody body = classOrObject.getBody();
if (body == null) {
return;
}
<BUG>String lineSeparator = System.getProperty("line.separator");
for (DescriptorClassMember... | final PsiElement newLineWhitespace = JetPsiFactory.createWhiteSpace(body.getProject(), "\n");
body.addBefore(newLineWhitespace, body.getRBrace());
final DeclarationDescriptor descriptor = selectedElement.getDescriptor();
|
27,807 | addImportDirective(JetPluginUtil.computeTypeFullName(type), file);
}
public static void addImportDirective(@NotNull String importString, @NotNull JetFile file) {
List<JetImportDirective> importDirectives = file.getImportDirectives();
JetImportDirective newDirective = JetPsiFactory.createImportDirective(file.getProject(... | final PsiElement newLineWhitespace = JetPsiFactory.createWhiteSpace(file.getProject(), "\n");
final PsiElement doubleLineWhitespace = JetPsiFactory.createWhiteSpace(file.getProject(), "\n\n");
if (!importDirectives.isEmpty()) {
|
27,808 | channel.send(new Message(local_addr, null, new Integer(i)));
if(i % 100 == 0)
System.out.println("-- sent " + i);
}
num_msgs_sent_after = getNumMessagesSentViaNetwork(channel) ;
<BUG>Assert.assertEquals(num_msgs_sent_before, num_msgs_sent_after, "Messages are (incorrectly) being sent via network") ;
try {
Boolean resul... | System.out.println("num msgs before: " + num_msgs_sent_before + ", num msgs after: " + num_msgs_sent_after);
assert num_msgs_sent_before <= num_msgs_sent_after;
assert num_msgs_sent_after < NUM/10;
|
27,809 | }</BUG>
catch(TimeoutException te) {
Assert.fail("Test timed out before all messages were received") ;
}
}
<BUG>private long getNumMessagesSentViaNetwork(JChannel ch) throws Exception {
TP transport = (TP) ch.getProtocolStack().getTransport();
if (transport == null) {</BUG>
throw new Exception("transport layer is not ... | channel.send(new Message(local_addr, null, new Integer(i)));
if(i % 100 == 0)
System.out.println("-- sent " + i);
num_msgs_sent_after = getNumMessagesSentViaNetwork(channel) ;
System.out.println("num msgs before: " + num_msgs_sent_before + ", num msgs after: " + num_msgs_sent_after);
assert num_msgs_sent_before <= num_... |
27,810 | import org.apache.cassandra.db.DBConstants;
import org.apache.cassandra.utils.FBUtilities;
public class CounterContext implements IContext
{
private static final int idLength;
<BUG>private static final FBUtilities.ByteArrayWrapper idWrapper;
private static final int clockLength = DBConstants.longSize_;</BUG>
private st... | private static final byte[] localId;
private static final int clockLength = DBConstants.longSize_;
|
27,811 | {
private static final CounterContext counterContext = new CounterContext();
}
static
{
<BUG>byte[] id = FBUtilities.getLocalAddress().getAddress();
idLength = id.length;
idWrapper = new FBUtilities.ByteArrayWrapper(id);</BUG>
stepLength = idLength + clockLength + countLength;
| private static final int idLength;
private static final byte[] localId;
private static final int clockLength = DBConstants.longSize_;
private static final int countLength = DBConstants.longSize_;
private static final int stepLength; // length: id + logical clock + count
private static class LazyHolder
localId = FBUtil... |
27,812 | public byte[] cleanNodeCounts(byte[] context, InetAddress node)
{
byte[] nodeId = node.getAddress();
for (int offset = 0; offset < context.length; offset += stepLength)
{
<BUG>if (FBUtilities.compareByteSubArrays(context, offset, nodeId, 0, idLength) != 0)
continue;
byte[] truncatedContext = new byte[context.length - ... | int cmp = FBUtilities.compareByteSubArrays(context, offset, nodeId, 0, idLength);
if (cmp < 0)
else if (cmp == 0)
byte[] truncatedContext = new byte[context.length - stepLength];
|
27,813 | 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,814 | 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,815 | 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,816 | 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,817 | 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,818 | 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,819 | 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,820 | {
ReverseDependencyLink p1 = (ReverseDependencyLink) o1;
ReverseDependencyLink p2 = (ReverseDependencyLink) o2;
return p1.getProject().getId().compareTo( p2.getProject().getId() );
}
<BUG>else
{</BUG>
return 0;
}
}
| iconError( sink );
|
27,821 | private void drainFromStart(SimpleList list) {
String[] values = list.values();
Stopwatch stopwatch = Stopwatch.createStarted();
for (String value : values) {
list.delete(value);
<BUG>}
stopwatch.stop();
printTime("drain", stopwatch.elapsed(TimeUnit.MILLISECONDS));</BUG>
}
private void drainFromEnd(SimpleList list) {
| printTime("drain", stopwatch.stop());
|
27,822 | stopwatch.stop();
printTime("add", stopwatch.elapsed(TimeUnit.MILLISECONDS));</BUG>
return list;
}
<BUG>private static void printTime(String label, long duration) {
String text = String.format("%s: %6d ", label, duration);
</BUG>
System.out.print(text);
}
| private SimpleList listWithItems() {
Stopwatch stopwatch = Stopwatch.createStarted();
SimpleList list = factory.create();
for (int i = 0; i < itemCount; i++) {
list.add("item" + Integer.toString(i));
printTime("add", stopwatch.stop());
private static void printTime(String label, Stopwatch watch) {
String text = String.... |
27,823 | 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,824 | 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,825 | 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,826 | 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,827 | 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,828 | 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,829 | 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,830 | {
ReverseDependencyLink p1 = (ReverseDependencyLink) o1;
ReverseDependencyLink p2 = (ReverseDependencyLink) o2;
return p1.getProject().getId().compareTo( p2.getProject().getId() );
}
<BUG>else
{</BUG>
return 0;
}
}
| iconError( sink );
|
27,831 | {
private final PushBufferDataSource dataSource;</BUG>
private boolean mute;
public MutePushBufferDataSource(PushBufferDataSource dataSource)
<BUG>{
super(
(dataSource instanceof CaptureDevice)
? (CaptureDevice) dataSource
: null);
this.dataSource = dataSource;</BUG>
}
| super(dataSource);
|
27,832 | }
}
});
}
} else {
<BUG>if (n <= m) {
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {</BUG>
a[i][j] = operator.applyAsBoolean(a[i][j]);
}
| public boolean[] row(final int rowIndex) {
N.checkArgument(rowIndex >= 0 && rowIndex < n, "Invalid row Index: %s", rowIndex);
return a[rowIndex];
|
27,833 | }
}
});
}
} else {
<BUG>if (n <= m) {
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {</BUG>
result[i][j] = zipFunction.apply(a[i][j], b[i][j]);
}
| public boolean get(final int i, final int j) {
return a[i][j];
|
27,834 | }
}
});
}
} else {
<BUG>if (n <= m) {
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {</BUG>
result[i][j] = zipFunction.apply(a[i][j], b[i][j], c[i][j]);
}
| return new BooleanMatrix(c);
|
27,835 | }
public AsyncExecutor(int maxConcurrentThreadNumber, long keepAliveTime, TimeUnit unit) {
this.maxConcurrentThreadNumber = maxConcurrentThreadNumber;
this.keepAliveTime = keepAliveTime;
this.unit = unit;
<BUG>}
public AsyncExecutor(final ExecutorService executorService) {
this(8, 300, TimeUnit.SECONDS);
this.executorS... | [DELETED] |
27,836 | results.add(execute(cmd));
}
return results;
}
public <T> CompletableFuture<T> execute(final Callable<T> command) {
<BUG>final CompletableFuture<T> future = new CompletableFuture<T>(this, command);
getExecutorService().execute(future);</BUG>
return future;
}
public <T> List<CompletableFuture<T>> execute(final Callable<... | final CompletableFuture<T> future = new CompletableFuture<>(this, command);
getExecutorService().execute(future);
|
27,837 | package net.i2p.router.web;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
public class CSSHelper extends HelperBase {
private static final Map<String, Boolean> _UACache = new ConcurrentHashMap();
<BUG>public CSSHelper() {}
public static final String PROP_THEME_NAME = "routerconsole.theme";</BUG>
... | public static final String THEME_CONFIG_FILE = "themes.config";
public static final String PROP_THEME_NAME = "routerconsole.theme";
|
27,838 | if (userAgent != null && userAgent.contains("MSIE")) {
url += FORCE + "/";
} else {
if (_context == null)
throw new IllegalStateException("No contexts. This is usually because the router is either starting up or shutting down.");
<BUG>String theme = _context.getProperty(PROP_THEME_NAME, DEFAULT_THEME);
</BUG>
url += th... | String theme = _context.readConfigFile(THEME_CONFIG_FILE).getProperty(PROP_THEME_NAME, DEFAULT_THEME);
|
27,839 | import java.util.TreeSet;
import java.util.Set;
public class ConfigUIHelper extends HelperBase {
public String getSettings() {
StringBuilder buf = new StringBuilder(512);
<BUG>String current = _context.getProperty(CSSHelper.PROP_THEME_NAME, CSSHelper.DEFAULT_THEME);
</BUG>
Set<String> themes = themeSet();
for (String t... | String current = _context.readConfigFile(CSSHelper.THEME_CONFIG_FILE).getProperty(CSSHelper.PROP_THEME_NAME, CSSHelper.DEFAULT_THEME);
|
27,840 | holder.shortName.setText(category.shortName());
Context context = holder.itemView.getContext();
String lessonNumber = context.getString(R.string.lesson) + " " + attendance.lessonNumber();
holder.lesson.setText(lessonNumber);
EntityDataStore<Persistable> data = MainApplication.getData();
<BUG>PlainLesson lesson = data.f... | PlainLesson lesson = data.findByKey(PlainLesson.class, attendance.lesson());
Subject subject = data.findByKey(Subject.class, lesson.subject());
holder.subject.setText(subject.name());
|
27,841 | private String idFromIndex(Class<? extends Identifiable> clazz, int index) {
List<? extends Identifiable> list = getList(clazz);
Identifiable o = list.get(index % list.size());
return o.id();
}
<BUG>private HasId hasId(Class<? extends Identifiable> clazz, int index) {
return HasId.of(idFromIndex(clazz, index));
}
priva... | private List<String> multipleIds(Class<? extends Identifiable> clazz, int index) {
return Lists.newArrayList(idFromIndex(clazz, index));
|
27,842 | List<Attendance> attendances = data.select(Attendance.class).get().toList();
Map<LocalDate, AttendanceHeaderItem> headerItemMap = new HashMap<>();
for (Attendance attendance : attendances) {
LocalDate date = attendance.date();
AttendanceCategory category = MainApplication.getData()
<BUG>.findByKey(AttendanceCategory.cl... | .findByKey(AttendanceCategory.class, attendance.type());
if (!category.presenceKind()) {
|
27,843 | .substitutionClass(true)
.teacher(lessonTeacher())
.substitutionClass(true)
.orgDate(LocalDate.parse("2017-02-06"))
.orgLessonNo(2)
<BUG>.orgLesson(HasId.of("1822337"))
.orgSubject(HasId.of("44565"))
.orgTeacher(HasId.of("1235090"))
.build();</BUG>
}
| .orgLesson("1822337")
.orgSubject("44565")
.orgTeacher("1235090")
.build();
|
27,844 | .id(idFor(Announcement.class))
.startDate(LocalDate.parse("2016-09-21"))
.endDate(LocalDate.parse("2017-06-14"))
.subject("Tytuł ogłoszenia")
.content("Treść ogłoszenia")
<BUG>.addedBy(HasId.of(MOCK_ID))
.build();</BUG>
}
public ImmutableMe me() {
return ImmutableMe.of(new LibrusAccount.Builder()
| .addedBy(MOCK_ID)
.build();
|
27,845 | .day(LocalDate.now())
.build();
}
private GradeCategory gradeCategory() {
return new GradeCategory.Builder()
<BUG>.color(HasId.of(MOCK_ID))
.id(MOCK_ID)</BUG>
.name("Mock grade category")
.weight(5)
.build();
| .color(MOCK_ID)
.id(MOCK_ID)
|
27,846 | private ImmutableAttendance attendance() {
return new Attendance.Builder()
.id(idFor(Attendance.class))
.date(LocalDate.now())
.addDate(LocalDateTime.now())
<BUG>.addedBy(HasId.of(MOCK_ID))
.lesson(HasId.of(MOCK_ID))
.lessonNumber(1)
.type(HasId.of(MOCK_ID))
.semester(1)</BUG>
.build();
| .addedBy(MOCK_ID)
.lesson(MOCK_ID)
.type(MOCK_ID)
.semester(1)
|
27,847 | public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments() != null) {
announcement = (Announcement) getArguments().getSerializable(ARG_ANNOUNCEMENT);
author = MainApplication.getData()
<BUG>.findByKey(Teacher.class, announcement.addedBy().id());
}</BUG>
}
@Override
public V... | .findByKey(Teacher.class, announcement.addedBy());
|
27,848 | else if (5 <= size) title = size + " nowych ocen";
else title = "Nowe oceny: " + size;
Notification.InboxStyle style = new Notification.InboxStyle()
.setBigContentTitle(title);
for (Grade g : grades) {
<BUG>String subject = MainApplication.getData().findByKey(Subject.class, g.subject().id()).name();
style.addLine(subje... | String subject = MainApplication.getData().findByKey(Subject.class, g.subject()).name();
style.addLine(subject + " " + g.grade());
|
27,849 | import org.joda.time.LocalTime;
import javax.persistence.Embedded;
import io.requery.Column;
import io.requery.Convert;
import io.requery.Key;
<BUG>import io.requery.Superclass;
import pl.librus.client.sql.LocalTimeConverter;</BUG>
@Superclass
public abstract class BaseLesson {
@Key
| import pl.librus.client.api.IdDeserializer;
import pl.librus.client.sql.LocalTimeConverter;
|
27,850 | public abstract LocalDate startDate();
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
public abstract LocalDate endDate();
public abstract String subject();
public abstract String content();
<BUG>@Embedded
public abstract HasId addedBy();
</BUG>
public static class Builder extends ImmutableAnnounc... | @JsonDeserialize(using = IdDeserializer.class)
public abstract String addedBy();
|
27,851 | @Value.Style(builder = "new")
@JsonDeserialize(as = ImmutableAttendance.class)
public abstract class Attendance implements Persistable{
@Key
public abstract String id();
<BUG>@Embedded
public abstract HasId lesson();
@Embedded
public abstract HasId type();
@Embedded
public abstract HasId addedBy();
</BUG>
@JsonFormat... | @JsonDeserialize(using = IdDeserializer.class)
public abstract String lesson();
@JsonDeserialize(using = IdDeserializer.class)
public abstract String type();
@JsonDeserialize(using = IdDeserializer.class)
public abstract String addedBy();
|
27,852 | import javax.measure.quantity.Speed;
import javax.measure.quantity.Time;
import org.junit.Assert;
import org.junit.Test;
import tec.uom.se.ComparableQuantity;
<BUG>import tec.uom.se.function.QuantityOperations;
import tec.uom.se.quantity.Quantities;</BUG>
import tec.uom.se.util.SI;
public class DecimalComparableQuantit... | [DELETED] |
27,853 | public class DecimalComparableQuantityTest {
@Test
public void divideOperationsTest() {
ComparableQuantity<Length> metre = Quantities.getQuantity(BigDecimal.TEN, SI.METRE);
ComparableQuantity<Time> time = Quantities.getQuantity(BigDecimal.TEN, SI.SECOND);
<BUG>ComparableQuantity<Speed> speed = metre.divide(QuantityOper... | ComparableQuantity<Speed> speed = metre.divide(time, Speed.class);
Assert.assertEquals(Integer.valueOf(speed.getValue().intValue()), Integer.valueOf(1));
|
27,854 | import javax.measure.quantity.Speed;
import javax.measure.quantity.Time;
import org.junit.Assert;
import org.junit.Test;
import tec.uom.se.ComparableQuantity;
<BUG>import tec.uom.se.function.QuantityOperations;
import tec.uom.se.quantity.Quantities;</BUG>
import tec.uom.se.util.SI;
public class DoubleComparableQuantity... | [DELETED] |
27,855 | public class DoubleComparableQuantityTest {
@Test
public void divideOperationsTest() {
ComparableQuantity<Length> metre = Quantities.getQuantity(10D, SI.METRE);
ComparableQuantity<Time> time = Quantities.getQuantity(10D, SI.SECOND);
<BUG>ComparableQuantity<Speed> speed = metre.divide(QuantityOperations.of(time, Speed.c... | ComparableQuantity<Speed> speed = metre.divide(time, Speed.class);
Assert.assertEquals(Integer.valueOf(speed.getValue().intValue()), Integer.valueOf(1));
|
27,856 | import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.LocalFileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.fs.permission.FsPermission;
import org.apache.hadoop.util.Progressable;
<BUG>import static org.apache.hadoop.fs.s3a.S3AConstants.*;
public class S3AFileSystem extends FileSyste... | import static org.apache.hadoop.fs.s3a.Constants.*;
public class S3AFileSystem extends FileSystem {
|
27,857 | public void initialize(URI name, Configuration conf) throws IOException {
super.initialize(name, conf);
uri = URI.create(name.getScheme() + "://" + name.getAuthority());
workingDir = new Path("/user", System.getProperty("user.name")).makeQualified(this.uri,
this.getWorkingDirectory());
<BUG>String accessKey = conf.get(... | String accessKey = conf.get(NEW_ACCESS_KEY, conf.get(OLD_ACCESS_KEY, null));
String secretKey = conf.get(NEW_SECRET_KEY, conf.get(OLD_SECRET_KEY, null));
|
27,858 | } else {
accessKey = userInfo;
}
}
AWSCredentialsProviderChain credentials = new AWSCredentialsProviderChain(
<BUG>new S3ABasicAWSCredentialsProvider(accessKey, secretKey),
new InstanceProfileCredentialsProvider(),
new S3AAnonymousAWSCredentialsProvider()
);</BUG>
bucket = name.getHost();
| new BasicAWSCredentialsProvider(accessKey, secretKey),
new AnonymousAWSCredentialsProvider()
|
27,859 |
awsConf.setSocketTimeout(conf.getInt(SOCKET_TIMEOUT, DEFAULT_SOCKET_TIMEOUT));
</BUG>
s3 = new AmazonS3Client(credentials, awsConf);
<BUG>maxKeys = conf.getInt(MAX_PAGING_KEYS, DEFAULT_MAX_PAGING_KEYS);
partSize = conf.getLong(MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE);
partSizeThreshold = conf.getInt(MIN_MULTIPART_THR... | new InstanceProfileCredentialsProvider(),
new AnonymousAWSCredentialsProvider()
bucket = name.getHost();
ClientConfiguration awsConf = new ClientConfiguration();
awsConf.setMaxConnections(conf.getInt(NEW_MAXIMUM_CONNECTIONS, conf.getInt(OLD_MAXIMUM_CONNECTIONS, DEFAULT_MAXIMUM_CONNECTIONS)));
awsConf.setProtocol(conf.g... |
27,860 | cannedACL = null;
}
if (!s3.doesBucketExist(bucket)) {
throw new IOException("Bucket " + bucket + " does not exist");
}
<BUG>boolean purgeExistingMultipart = conf.getBoolean(PURGE_EXISTING_MULTIPART, DEFAULT_PURGE_EXISTING_MULTIPART);
long purgeExistingMultipartAge = conf.getLong(PURGE_EXISTING_MULTIPART_AGE, DEFAULT_... | boolean purgeExistingMultipart = conf.getBoolean(NEW_PURGE_EXISTING_MULTIPART, conf.getBoolean(OLD_PURGE_EXISTING_MULTIPART, DEFAULT_PURGE_EXISTING_MULTIPART));
long purgeExistingMultipartAge = conf.getLong(NEW_PURGE_EXISTING_MULTIPART_AGE, conf.getLong(OLD_PURGE_EXISTING_MULTIPART_AGE, DEFAULT_PURGE_EXISTING_MULTIPART... |
27,861 | import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
<BUG>import static org.apache.hadoop.fs.s3a.S3AConstants.*;
public class S3AOutputStream extends OutputStream {</BUG>
private OutputStream backupStream;
private File backup... | import static org.apache.hadoop.fs.s3a.Constants.*;
public class S3AOutputStream extends OutputStream {
|
27,862 | this.client = client;
this.progress = progress;
this.fs = fs;
this.cannedACL = cannedACL;
this.statistics = statistics;
<BUG>partSize = conf.getLong(MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE);
partSizeThreshold = conf.getInt(MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD);
</BUG>
if (conf.get(BUFFER_DIR, null) ... | partSize = conf.getLong(OLD_MULTIPART_SIZE, DEFAULT_MULTIPART_SIZE);
partSizeThreshold = conf.getInt(OLD_MIN_MULTIPART_THRESHOLD, DEFAULT_MIN_MULTIPART_THRESHOLD);
|
27,863 | Integer datasetId;
String datasetUrn;
String capacityName;
String capacityType;
String capacityUnit;
<BUG>String capacityLow;
String capacityHigh;
</BUG>
Long modifiedTime;
| Long capacityLow;
Long capacityHigh;
|
27,864 | import com.fasterxml.jackson.databind.ObjectMapper;
public class DatasetFieldPathRecord {
String fieldPath;
String role;
public DatasetFieldPathRecord() {
<BUG>}
@Override
public String toString() {
try {
return new ObjectMapper().writeValueAsString(this);
} catch (JsonProcessingException ex) {
return null;
}</BUG>
}
| [DELETED] |
27,865 | new DatabaseWriter(JdbcUtil.wherehowsJdbcTemplate, DATASET_INVENTORY_TABLE);
public static final String GET_DATASET_DEPLOYMENT_BY_DATASET_ID =
"SELECT * FROM " + DATASET_DEPLOYMENT_TABLE + " WHERE dataset_id = :dataset_id";
public static final String GET_DATASET_DEPLOYMENT_BY_URN =
"SELECT * FROM " + DATASET_DEPLOYMENT... | public static final String DELETE_DATASET_DEPLOYMENT_BY_DATASET_ID =
"DELETE FROM " + DATASET_DEPLOYMENT_TABLE + " WHERE dataset_id=?";
|
27,866 | </BUG>
public static final String GET_DATASET_CAPACITY_BY_DATASET_ID =
"SELECT * FROM " + DATASET_CAPACITY_TABLE + " WHERE dataset_id = :dataset_id";
public static final String GET_DATASET_CAPACITY_BY_URN =
"SELECT * FROM " + DATASET_CAPACITY_TABLE + " WHERE dataset_urn = :dataset_urn";
<BUG>public static final String ... | new DatabaseWriter(JdbcUtil.wherehowsJdbcTemplate, DATASET_INVENTORY_TABLE);
public static final String GET_DATASET_DEPLOYMENT_BY_DATASET_ID =
"SELECT * FROM " + DATASET_DEPLOYMENT_TABLE + " WHERE dataset_id = :dataset_id";
public static final String GET_DATASET_DEPLOYMENT_BY_URN =
"SELECT * FROM " + DATASET_DEPLOYMENT... |
27,867 | "SELECT * FROM " + DATASET_CASE_SENSITIVE_TABLE + " WHERE dataset_urn = :dataset_urn";
public static final String GET_DATASET_REFERENCE_BY_DATASET_ID =
"SELECT * FROM " + DATASET_REFERENCE_TABLE + " WHERE dataset_id = :dataset_id";
public static final String GET_DATASET_REFERENCE_BY_URN =
"SELECT * FROM " + DATASET_REF... | public static final String DELETE_DATASET_REFERENCE_BY_DATASET_ID =
"DELETE FROM " + DATASET_REFERENCE_TABLE + " WHERE dataset_id=?";
|
27,868 | "SELECT * FROM " + DATASET_SECURITY_TABLE + " WHERE dataset_urn = :dataset_urn";
public static final String GET_DATASET_OWNER_BY_DATASET_ID =
"SELECT * FROM " + DATASET_OWNER_TABLE + " WHERE dataset_id = :dataset_id ORDER BY sort_id";
public static final String GET_DATASET_OWNER_BY_URN =
"SELECT * FROM " + DATASET_OWNE... | public static final String DELETE_DATASET_OWNER_BY_DATASET_ID =
"DELETE FROM " + DATASET_OWNER_TABLE + " WHERE dataset_id=?";
|
27,869 | "SELECT app_id FROM " + EXTERNAL_GROUP_TABLE + " WHERE group_id = :group_id GROUP BY group_id";
public static final String GET_DATASET_CONSTRAINT_BY_DATASET_ID =
"SELECT * FROM " + DATASET_CONSTRAINT_TABLE + " WHERE dataset_id = :dataset_id";
public static final String GET_DATASET_CONSTRAINT_BY_URN =
"SELECT * FROM " +... | public static final String DELETE_DATASET_CONSTRAINT_BY_DATASET_ID =
"DELETE FROM " + DATASET_CONSTRAINT_TABLE + " WHERE dataset_id=?";
|
27,870 | </BUG>
public static final String GET_DATASET_INDEX_BY_DATASET_ID =
"SELECT * FROM " + DATASET_INDEX_TABLE + " WHERE dataset_id = :dataset_id";
public static final String GET_DATASET_INDEX_BY_URN =
"SELECT * FROM " + DATASET_INDEX_TABLE + " WHERE dataset_urn = :dataset_urn";
<BUG>public static final String DELETE_DATAS... | "SELECT app_id FROM " + EXTERNAL_GROUP_TABLE + " WHERE group_id = :group_id GROUP BY group_id";
public static final String GET_DATASET_CONSTRAINT_BY_DATASET_ID =
"SELECT * FROM " + DATASET_CONSTRAINT_TABLE + " WHERE dataset_id = :dataset_id";
public static final String GET_DATASET_CONSTRAINT_BY_URN =
"SELECT * FROM " +... |
27,871 | DatasetSecurityRecord record = om.convertValue(security, DatasetSecurityRecord.class);
record.setDatasetId(datasetId);
record.setDatasetUrn(urn);
record.setModifiedTime(System.currentTimeMillis() / 1000);
try {
<BUG>Map<String, Object> result = getDatasetSecurityByDatasetId(datasetId);
</BUG>
String[] columns = record.... | DatasetSecurityRecord result = getDatasetSecurityByDatasetId(datasetId);
|
27,872 | "confidential_flags", "is_recursive", "partitioned", "indexed", "namespace", "default_comment_id", "comment_ids"};
}
@Override
public List<Object> fillAllFields() {
return null;
<BUG>}
public String[] getFieldDetailColumns() {</BUG>
return new String[]{"dataset_id", "sort_id", "parent_sort_id", "parent_path", "field_na... | @JsonIgnore
public String[] getFieldDetailColumns() {
|
27,873 | partitioned != null && partitioned ? "Y" : "N", isRecursive != null && isRecursive ? "Y" : "N",
confidentialFlags, defaultValue, namespace, defaultCommentId, commentIds};
}
public DatasetFieldSchemaRecord() {
}
<BUG>@Override
public String toString() {
try {
return new ObjectMapper().writeValueAsString(this.getFieldVal... | [DELETED] |
27,874 | String fieldPath;
String descend;
Integer prefixLength;
String filter;
public DatasetFieldIndexRecord() {
<BUG>}
@Override
public String toString() {
try {
return new ObjectMapper().writeValueAsString(this);
} catch (JsonProcessingException ex) {
return null;
}</BUG>
}
| [DELETED] |
27,875 | String actorUrn;
String type;
Long time;
String note;
public DatasetChangeAuditStamp() {
<BUG>}
@Override
public String toString() {
try {
return new ObjectMapper().writeValueAsString(this);
} catch (JsonProcessingException ex) {
return null;
}</BUG>
}
| [DELETED] |
27,876 | package wherehows.common.schemas;
<BUG>import com.fasterxml.jackson.annotation.JsonIgnore;
import java.lang.reflect.Field;
import java.util.HashMap;</BUG>
import java.util.List;
import java.util.Map;
| import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.IOException;
import java.util.Date;
import java.util.Collection;
import java.util.HashMap;
|
27,877 | 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,878 | 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,879 | 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,880 | 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,881 | 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,882 | 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,883 | 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,884 | 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,885 | 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,886 | 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,887 | 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,888 | 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,889 | 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,890 | 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,891 | 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,892 | 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,893 | + 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,894 | 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,895 | import spade.storage.Kafka;
import spade.utility.CommonFunctions;
import spade.utility.FileUtility;
public class ServerWriter implements DataWriter{
private Logger logger = Logger.getLogger(ServerWriter.class.getName());
<BUG>private long reportStatsAfterEveryMs = 60*1000; //default
private long startTime, statsLastRep... | private boolean reportingEnabled = false;
private long reportEveryMs;
private long startTime, lastReportedTime;
private long lastReportedRecordCount, recordCount;
private KafkaProducer<String, GenericContainer> serverWriter;
|
27,896 | import spade.core.Settings;
import spade.utility.CommonFunctions;
import spade.utility.FileUtility;
public class AuditEventReader {
private Logger logger = Logger.getLogger(this.getClass().getName());
<BUG>private long reportStatsAfterEveryMs = 60*1000;
private long recordCount = 0;
private long startTime = Syste... | private boolean reportingEnabled = false;
private long reportEveryMs;
private long startTime, lastReportedTime;
private long lastReportedRecordCount, recordCount;
private static final Pattern pattern_key_value = Pattern.compile("(\\w+)=\"*((?<=\")[^\"]+(?=\")|([^\\s]+))\"*");
|
27,897 | private static final Pattern pattern_eventid = Pattern.compile("msg=audit\\([0-9\\.]+\\:([0-9]+)\\):");
private SimpleEntry<String, BufferedReader> currentInputStreamReaderEntry;
private LinkedList<SimpleEntry<String, InputStream>> inputStreamEntries = new LinkedList<SimpleEntry<String, InputStream>>();
private TreeSet... | private long currentlyBufferedRecords = 0;
|
27,898 | printStats();
}</BUG>
if(currentInputStreamReaderEntry == null){ //all streams processed
return getEventData();
}else{ // not all streams processed
<BUG>while(currentRecordCount < maxRecordBufferSize){ //read audit records until max amount read
</BUG>
String line = currentInputStreamReaderEntry.getValue().readLine();
i... | lastReportedTime = currentTime;
lastReportedRecordCount = recordCount;
}
}
while(currentlyBufferedRecords < maxRecordBufferSize){ //read audit records until max amount read
|
27,899 | logger.log(Level.INFO, "Reading succeeded of '" + currentInputStreamReaderEntry.getKey() + "'");
initializeCurrentStreamReader(); //initialize the next stream
if(currentInputStreamReaderEntry == null){ //if there was no next stream to be initialized
break;
}
<BUG>}else{ //if input stream not completely read yet
recordC... | if(reportingEnabled){
Matcher event_start_matcher = pattern_eventid.matcher(line);
|
27,900 | logger.log(Level.SEVERE, "Event id null for line -> " + line);
}else{
if(eventId < lastEventId){
logger.log(Level.WARNING, "Out of order event beyond the window size -> " + line);
}else{
<BUG>currentRecordCount++; //increment the record count
</BUG>
if(eventIdToEventRecords.get(eventId) == null){
eventIdToEventRecords.... | currentlyBufferedRecords++; //increment the record count
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.