nus-yam/ex-repair huggingface dataset:
Program: 90437
Project: 90437
Buggy source:
void FixedFormat(final String pattern,final String datePattern,final int escapeCount,final char timeSeparator,final int timeSepLength,final char millisSeparator,final int millisSepLength){
  this.timeSeparatorChar=timeSeparator;
  this.timeSeparatorLength=timeSepLength;
  this.millisSeparatorChar=millisSeparator;
  this.millisSeparatorLength=millisSepLength;
  this.pattern=Objects.requireNonNull(pattern);
  this.datePattern=datePattern;
  this.escapeCount=escapeCount;
}

Fixed version (ground truth):
void FixedFormat(final String pattern,final String datePattern,final int escapeCount,final char timeSeparator,final int timeSepLength,final char millisSeparator,final int millisSepLength,final int secondFractionDigits){
  this.timeSeparatorChar=timeSeparator;
  this.timeSeparatorLength=timeSepLength;
  this.millisSeparatorChar=millisSeparator;
  this.millisSeparatorLength=millisSepLength;
  this.pattern=Objects.requireNonNull(pattern);
  this.datePattern=datePattern;
  this.escapeCount=escapeCount;
  this.secondFractionDigits=secondFractionDigits;
}
Program: 90438
Project: 90438
Buggy source:
@PluginFactory public static Script createScript(@PluginAttribute("String_Node_Str") final String name,@PluginAttribute("String_Node_Str") String language,@PluginValue("String_Node_Str") final String scriptText){
  if (language == null) {
    LOGGER.info("String_Node_Str",DEFAULT_LANGUAGE);
    language=DEFAULT_LANGUAGE;
  }
  if (scriptText == null) {
    LOGGER.error("String_Node_Str",name);
    return null;
  }
  return new Script(name,language,scriptText);
}

Fixed version (ground truth):
@PluginFactory public static Script createScript(@PluginAttribute("String_Node_Str") final String name,@PluginAttribute(ATTR_LANGUAGE) String language,@PluginValue(ATTR_SCRIPT_TEXT) final String scriptText){
  if (language == null) {
    LOGGER.error("String_Node_Str",ATTR_LANGUAGE,PLUGIN_NAME,name);
    language=DEFAULT_LANGUAGE;
  }
  if (scriptText == null) {
    LOGGER.error("String_Node_Str",ATTR_SCRIPT_TEXT,PLUGIN_NAME,name);
    return null;
  }
  return new Script(name,language,scriptText);
}
Program: 90439
Project: 90439
Buggy source:
@Test public void testReconfiguration() throws Exception {
  final Configuration oldConfig=context.getConfiguration();
  final int MONITOR_INTERVAL_SECONDS=5;
  final File file=new File(CONFIG);
  final long orig=file.lastModified();
  final long newTime=orig + 10000;
  assertTrue("String_Node_Str",file.setLastModified(newTime));
  TimeUnit.SECONDS.sleep(MONITOR_INTERVAL_SECONDS + 1);
  for (int i=0; i < 17; ++i) {
    logger.debug("String_Node_Str");
  }
  final int loopCount=0;
  Configuration newConfig;
  do {
    Thread.sleep(100);
    newConfig=context.getConfiguration();
  }
 while (newConfig == oldConfig && loopCount < 5);
  assertNotSame("String_Node_Str",newConfig,oldConfig);
}

Fixed version (ground truth):
@Test public void testReconfiguration() throws Exception {
  final Configuration oldConfig=context.getConfiguration();
  final int MONITOR_INTERVAL_SECONDS=5;
  final File file=new File(CONFIG);
  final long orig=file.lastModified();
  final long newTime=orig + 10000;
  assertTrue("String_Node_Str",file.setLastModified(newTime));
  TimeUnit.SECONDS.sleep(MONITOR_INTERVAL_SECONDS + 1);
  for (int i=0; i < 17; ++i) {
    logger.info("String_Node_Str");
  }
  int loopCount=0;
  Configuration newConfig;
  do {
    Thread.sleep(100);
    newConfig=context.getConfiguration();
  }
 while (newConfig == oldConfig && loopCount++ < 5);
  assertNotSame("String_Node_Str",newConfig,oldConfig);
}
Program: 90440
Project: 90440
Buggy source:
private int writeTime(int ms,final char[] buffer,int pos){
  final int hours=ms / 3600000;
  ms-=3600000 * hours;
  final int minutes=ms / 60000;
  ms-=60000 * minutes;
  final int seconds=ms / 1000;
  ms-=1000 * seconds;
  int temp=hours / 10;
  buffer[pos++]=((char)(temp + '0'));
  buffer[pos++]=((char)(hours - 10 * temp + '0'));
  buffer[pos]=timeSeparatorChar;
  pos+=timeSeparatorLength;
  temp=minutes / 10;
  buffer[pos++]=((char)(temp + '0'));
  buffer[pos++]=((char)(minutes - 10 * temp + '0'));
  buffer[pos]=timeSeparatorChar;
  pos+=timeSeparatorLength;
  temp=seconds / 10;
  buffer[pos++]=((char)(temp + '0'));
  buffer[pos++]=((char)(seconds - 10 * temp + '0'));
  buffer[pos]=millisSeparatorChar;
  pos+=millisSeparatorLength;
  temp=ms / 100;
  buffer[pos++]=((char)(temp + '0'));
  ms-=100 * temp;
  temp=ms / 10;
  buffer[pos++]=((char)(temp + '0'));
  ms-=10 * temp;
  buffer[pos++]=((char)(ms + '0'));
  return pos;
}

Fixed version (ground truth):
private int writeTime(int ms,final char[] buffer,int pos){
  final int hourOfDay=ms / 3600000;
  final int hours=hourOfDay + daylightSavingTime(hourOfDay) / 3600000;
  ms-=3600000 * hourOfDay;
  final int minutes=ms / 60000;
  ms-=60000 * minutes;
  final int seconds=ms / 1000;
  ms-=1000 * seconds;
  int temp=hours / 10;
  buffer[pos++]=((char)(temp + '0'));
  buffer[pos++]=((char)(hours - 10 * temp + '0'));
  buffer[pos]=timeSeparatorChar;
  pos+=timeSeparatorLength;
  temp=minutes / 10;
  buffer[pos++]=((char)(temp + '0'));
  buffer[pos++]=((char)(minutes - 10 * temp + '0'));
  buffer[pos]=timeSeparatorChar;
  pos+=timeSeparatorLength;
  temp=seconds / 10;
  buffer[pos++]=((char)(temp + '0'));
  buffer[pos++]=((char)(seconds - 10 * temp + '0'));
  buffer[pos]=millisSeparatorChar;
  pos+=millisSeparatorLength;
  temp=ms / 100;
  buffer[pos++]=((char)(temp + '0'));
  ms-=100 * temp;
  temp=ms / 10;
  buffer[pos++]=((char)(temp + '0'));
  ms-=10 * temp;
  buffer[pos++]=((char)(ms + '0'));
  return pos;
}
Program: 90441
Project: 90441
Buggy source:
private void updateMidnightMillis(final long now){
  if (now >= midnightTomorrow || now < midnightToday) {
synchronized (this) {
      updateCachedDate(now);
      midnightToday=calcMidnightMillis(now,0);
      midnightTomorrow=calcMidnightMillis(now,1);
    }
  }
}

Fixed version (ground truth):
private void updateMidnightMillis(final long now){
  if (now >= midnightTomorrow || now < midnightToday) {
synchronized (this) {
      updateCachedDate(now);
      midnightToday=calcMidnightMillis(now,0);
      midnightTomorrow=calcMidnightMillis(now,1);
      updateDaylightSavingTime();
    }
  }
}
Program: 90442
Project: 90442
Buggy source:
@Test public void testCreateIfSupported_defaultIfOptionsArrayNull(){
  final FixedDateFormat fmt=FixedDateFormat.createIfSupported((String[])null);
  assertEquals(FixedFormat.DEFAULT.getPattern(),fmt.getFormat());
}

Fixed version (ground truth):
@Test public void testCreateIfSupported_defaultIfOptionsArrayNull(){
  final FixedDateFormat fmt=FixedDateFormat.createIfSupported((String[])null);
  assertEquals(DEFAULT.getPattern(),fmt.getFormat());
}
Program: 90443
Project: 90443
Buggy source:
@Test public void testCreateIfSupported_customTimeZoneIfOptionsArrayWithTimeZoneElement(){
  final FixedDateFormat fmt=FixedDateFormat.createIfSupported(new String[]{FixedFormat.DEFAULT.getPattern(),"String_Node_Str","String_Node_Str"});
  assertEquals(FixedFormat.DEFAULT.getPattern(),fmt.getFormat());
  assertEquals(TimeZone.getTimeZone("String_Node_Str"),fmt.getTimeZone());
}

Fixed version (ground truth):
@Test public void testCreateIfSupported_customTimeZoneIfOptionsArrayWithTimeZoneElement(){
  final FixedDateFormat fmt=FixedDateFormat.createIfSupported(new String[]{DEFAULT.getPattern(),"String_Node_Str","String_Node_Str"});
  assertEquals(DEFAULT.getPattern(),fmt.getFormat());
  assertEquals(TimeZone.getTimeZone("String_Node_Str"),fmt.getTimeZone());
}
Program: 90444
Project: 90444
Buggy source:
@Test public void testFixedFormat_getDatePatternReturnsDatePatternIfExists(){
  assertEquals("String_Node_Str",FixedFormat.COMPACT.getDatePattern());
  assertEquals("String_Node_Str",FixedFormat.DEFAULT.getDatePattern());
}

Fixed version (ground truth):
@Test public void testFixedFormat_getDatePatternReturnsDatePatternIfExists(){
  assertEquals("String_Node_Str",FixedFormat.COMPACT.getDatePattern());
  assertEquals("String_Node_Str",DEFAULT.getDatePattern());
}
Program: 90445
Project: 90445
Buggy source:
@Test public void testFixedFormat_getDatePatternLengthReturnsDatePatternLength(){
  assertEquals("String_Node_Str".length(),FixedFormat.COMPACT.getDatePatternLength());
  assertEquals("String_Node_Str".length(),FixedFormat.DEFAULT.getDatePatternLength());
}

Fixed version (ground truth):
@Test public void testFixedFormat_getDatePatternLengthReturnsDatePatternLength(){
  assertEquals("String_Node_Str".length(),FixedFormat.COMPACT.getDatePatternLength());
  assertEquals("String_Node_Str".length(),DEFAULT.getDatePatternLength());
}
Program: 90446
Project: 90446
Buggy source:
@Test public void testCreateIfSupported_defaultIfOptionsArrayWithSingleNullElement(){
  final FixedDateFormat fmt=FixedDateFormat.createIfSupported(new String[1]);
  assertEquals(FixedFormat.DEFAULT.getPattern(),fmt.getFormat());
  assertEquals(TimeZone.getDefault(),fmt.getTimeZone());
}

Fixed version (ground truth):
@Test public void testCreateIfSupported_defaultIfOptionsArrayWithSingleNullElement(){
  final FixedDateFormat fmt=FixedDateFormat.createIfSupported(new String[1]);
  assertEquals(DEFAULT.getPattern(),fmt.getFormat());
  assertEquals(TimeZone.getDefault(),fmt.getTimeZone());
}
Program: 90447
Project: 90447
Buggy source:
@Test public void testCreateIfSupported_defaultIfOptionsArrayEmpty(){
  final FixedDateFormat fmt=FixedDateFormat.createIfSupported(new String[0]);
  assertEquals(FixedFormat.DEFAULT.getPattern(),fmt.getFormat());
}

Fixed version (ground truth):
@Test public void testCreateIfSupported_defaultIfOptionsArrayEmpty(){
  final FixedDateFormat fmt=FixedDateFormat.createIfSupported(new String[0]);
  assertEquals(DEFAULT.getPattern(),fmt.getFormat());
}
Program: 90448
Project: 90448
Buggy source:
@Test public void testCreateIfSupported_defaultTimeZoneIfOptionsArrayWithSecondNullElement(){
  final FixedDateFormat fmt=FixedDateFormat.createIfSupported(new String[]{FixedFormat.DEFAULT.getPattern(),null,"String_Node_Str"});
  assertEquals(FixedFormat.DEFAULT.getPattern(),fmt.getFormat());
  assertEquals(TimeZone.getDefault(),fmt.getTimeZone());
}

Fixed version (ground truth):
@Test public void testCreateIfSupported_defaultTimeZoneIfOptionsArrayWithSecondNullElement(){
  final FixedDateFormat fmt=FixedDateFormat.createIfSupported(new String[]{DEFAULT.getPattern(),null,"String_Node_Str"});
  assertEquals(DEFAULT.getPattern(),fmt.getFormat());
  assertEquals(TimeZone.getDefault(),fmt.getTimeZone());
}
Program: 90449
Project: 90449
Buggy source:
@Test public void testFixedFormat_getFastDateFormatNonNullIfDateInPattern(){
  assertNotNull(FixedFormat.COMPACT.getFastDateFormat());
  assertNotNull(FixedFormat.DEFAULT.getFastDateFormat());
  assertEquals("String_Node_Str",FixedFormat.COMPACT.getFastDateFormat().getPattern());
  assertEquals("String_Node_Str",FixedFormat.DEFAULT.getFastDateFormat().getPattern());
}

Fixed version (ground truth):
@Test public void testFixedFormat_getFastDateFormatNonNullIfDateInPattern(){
  assertNotNull(FixedFormat.COMPACT.getFastDateFormat());
  assertNotNull(DEFAULT.getFastDateFormat());
  assertEquals("String_Node_Str",FixedFormat.COMPACT.getFastDateFormat().getPattern());
  assertEquals("String_Node_Str",DEFAULT.getFastDateFormat().getPattern());
}
Program: 90450
Project: 90450
Buggy source:
@Test public void tesStringOneArgLocaleFrance_MessageFormatMessage(){
  final String testMsg="String_Node_Str";
  final FormattedMessage msg=new FormattedMessage(Locale.FRANCE,testMsg,12);
  final String result=msg.getFormattedMessage();
  final String expected="String_Node_Str";
  assertEquals(expected,result);
}

Fixed version (ground truth):
@Test public void tesStringOneArgLocaleFrance_MessageFormatMessage(){
  final String testMsg="String_Node_Str";
  final FormattedMessage msg=new FormattedMessage(Locale.FRANCE,testMsg,12);
  final String result=msg.getFormattedMessage();
  final String expected="String_Node_Str" + SPACE + "String_Node_Str";
  assertEquals(expected,result);
}
Program: 90451
Project: 90451
Buggy source:
/** 
 * This method is called by the EventHandler that processes the RingBufferLogEvent in a separate thread. Merges the contents of the configuration map into the contextData, after replacing any variables in the property values with the StrSubstitutor-supplied actual values.
 * @param event the event to log
 */
public void actualAsyncLog(final RingBufferLogEvent event){
  final List<Property> properties=privateConfig.loggerConfig.getPropertyList();
  if (properties != null) {
    StringMap contextData=(StringMap)event.getContextData();
    if (contextData.isFrozen()) {
      final StringMap temp=ContextDataFactory.createContextData();
      temp.putAll(contextData);
      contextData=temp;
    }
    for (int i=0; i < properties.size(); i++) {
      final Property prop=properties.get(i);
      if (contextData.getValue(prop.getName()) != null) {
        continue;
      }
      final String value=prop.isValueNeedsLookup() ? privateConfig.config.getStrSubstitutor().replace(event,prop.getValue()) : prop.getValue();
      contextData.putValue(prop.getName(),prop.getValue());
    }
    event.setContextData(contextData);
  }
  final ReliabilityStrategy strategy=privateConfig.loggerConfig.getReliabilityStrategy();
  strategy.log(this,event);
}

Fixed version (ground truth):
/** 
 * This method is called by the EventHandler that processes the RingBufferLogEvent in a separate thread. Merges the contents of the configuration map into the contextData, after replacing any variables in the property values with the StrSubstitutor-supplied actual values.
 * @param event the event to log
 */
public void actualAsyncLog(final RingBufferLogEvent event){
  final List<Property> properties=privateConfig.loggerConfig.getPropertyList();
  if (properties != null) {
    StringMap contextData=(StringMap)event.getContextData();
    if (contextData.isFrozen()) {
      final StringMap temp=ContextDataFactory.createContextData();
      temp.putAll(contextData);
      contextData=temp;
    }
    for (int i=0; i < properties.size(); i++) {
      final Property prop=properties.get(i);
      if (contextData.getValue(prop.getName()) != null) {
        continue;
      }
      final String value=prop.isValueNeedsLookup() ? privateConfig.config.getStrSubstitutor().replace(event,prop.getValue()) : prop.getValue();
      contextData.putValue(prop.getName(),value);
    }
    event.setContextData(contextData);
  }
  final ReliabilityStrategy strategy=privateConfig.loggerConfig.getReliabilityStrategy();
  strategy.log(this,event);
}
Program: 90452
Project: 90452
Buggy source:
/** 
 * Writes the specified data to the specified destination.
 * @param data the data to write
 * @param offset where to start in the specified data array
 * @param length the number of bytes to write
 * @param destination the {@code ByteBufferDestination} to write to
 */
public static void writeTo(final byte[] data,int offset,int length,final ByteBufferDestination destination){
  int chunk=0;
  ByteBuffer buffer=destination.getByteBuffer();
  do {
    if (length > buffer.remaining()) {
      buffer=destination.drain(buffer);
    }
    chunk=Math.min(length,buffer.remaining());
    buffer.put(data,offset,chunk);
    offset+=chunk;
    length-=chunk;
  }
 while (length > 0);
}

Fixed version (ground truth):
/** 
 * Writes the specified data to the specified destination.
 * @param data the data to write
 * @param offset where to start in the specified data array
 * @param length the number of bytes to write
 * @param destination the {@code ByteBufferDestination} to write to
 */
public static void writeTo(final byte[] data,int offset,int length,final ByteBufferDestination destination){
  int chunk=0;
synchronized (destination) {
    ByteBuffer buffer=destination.getByteBuffer();
    do {
      if (length > buffer.remaining()) {
        buffer=destination.drain(buffer);
      }
      chunk=Math.min(length,buffer.remaining());
      buffer.put(data,offset,chunk);
      offset+=chunk;
      length-=chunk;
    }
 while (length > 0);
  }
}
Program: 90453
Project: 90453
Buggy source:
@Override public void start(){
  super.start();
  if (scheduledItems > 0) {
    LOGGER.debug("String_Node_Str",scheduledItems,SIMPLE_NAME);
    scheduledItems=Math.min(scheduledItems,MAX_SCHEDULED_ITEMS);
    executorService=new ScheduledThreadPoolExecutor(scheduledItems,Log4jThreadFactory.createDaemonThreadFactory("String_Node_Str"));
  }
 else {
    LOGGER.debug("String_Node_Str",SIMPLE_NAME);
  }
}

Fixed version (ground truth):
@Override public void start(){
  super.start();
  if (scheduledItems > 0) {
    LOGGER.debug("String_Node_Str",SIMPLE_NAME,scheduledItems);
    scheduledItems=Math.min(scheduledItems,MAX_SCHEDULED_ITEMS);
    executorService=new ScheduledThreadPoolExecutor(scheduledItems,Log4jThreadFactory.createDaemonThreadFactory("String_Node_Str"));
  }
 else {
    LOGGER.debug("String_Node_Str",SIMPLE_NAME);
  }
}
Program: 90454
Project: 90454
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void format(final LogEvent event,final StringBuilder toAppendTo){
  MapMessage msg;
  if (event.getMessage() instanceof MapMessage) {
    msg=(MapMessage)event.getMessage();
  }
 else {
    return;
  }
  final IndexedReadOnlyStringMap sortedMap=msg.getIndexedReadOnlyStringMap();
  if (key == null) {
    if (sortedMap.isEmpty()) {
      toAppendTo.append("String_Node_Str");
      return;
    }
    final StringBuilder sb=toAppendTo.append("String_Node_Str");
    for (int i=0; i < sortedMap.size(); i++) {
      if (sb.length() > 1) {
        sb.append("String_Node_Str");
      }
      sb.append(sortedMap.getKeyAt(i)).append('=').append(sortedMap.getValueAt(i));
    }
    sb.append('}');
    toAppendTo.append(sb);
  }
 else {
    final String val=sortedMap.getValue(key);
    if (val != null) {
      toAppendTo.append(val);
    }
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void format(final LogEvent event,final StringBuilder toAppendTo){
  MapMessage msg;
  if (event.getMessage() instanceof MapMessage) {
    msg=(MapMessage)event.getMessage();
  }
 else {
    return;
  }
  final IndexedReadOnlyStringMap sortedMap=msg.getIndexedReadOnlyStringMap();
  if (key == null) {
    if (sortedMap.isEmpty()) {
      toAppendTo.append("String_Node_Str");
      return;
    }
    toAppendTo.append("String_Node_Str");
    for (int i=0; i < sortedMap.size(); i++) {
      if (i > 0) {
        toAppendTo.append("String_Node_Str");
      }
      toAppendTo.append(sortedMap.getKeyAt(i)).append('=').append(sortedMap.getValueAt(i));
    }
    toAppendTo.append('}');
  }
 else {
    final String val=sortedMap.getValue(key);
    if (val != null) {
      toAppendTo.append(val);
    }
  }
}
Program: 90455
Project: 90455
Buggy source:
@Test public void testConverter(){
  final MapMessage msg=new MapMessage();
  msg.put("String_Node_Str","String_Node_Str");
  msg.put("String_Node_Str","String_Node_Str");
  msg.put("String_Node_Str","String_Node_Str");
  final MapPatternConverter converter=MapPatternConverter.newInstance(null);
  final LogEvent event=Log4jLogEvent.newBuilder().setLoggerName("String_Node_Str").setLevel(Level.DEBUG).setMessage(msg).build();
  final StringBuilder sb=new StringBuilder();
  converter.format(event,sb);
  final String str=sb.toString();
  String expected="String_Node_Str";
  assertTrue("String_Node_Str" + expected + "String_Node_Str"+ str,str.contains(expected));
  expected="String_Node_Str";
  assertTrue("String_Node_Str",str.contains(expected));
  expected="String_Node_Str";
  assertTrue("String_Node_Str",str.contains(expected));
}

Fixed version (ground truth):
@Test public void testConverter(){
  final MapMessage msg=new MapMessage();
  msg.put("String_Node_Str","String_Node_Str");
  msg.put("String_Node_Str","String_Node_Str");
  msg.put("String_Node_Str","String_Node_Str");
  final MapPatternConverter converter=MapPatternConverter.newInstance(null);
  final LogEvent event=Log4jLogEvent.newBuilder().setLoggerName("String_Node_Str").setLevel(Level.DEBUG).setMessage(msg).build();
  final StringBuilder sb=new StringBuilder();
  converter.format(event,sb);
  final String str=sb.toString();
  String expected="String_Node_Str";
  assertTrue("String_Node_Str" + expected + "String_Node_Str"+ str,str.contains(expected));
  expected="String_Node_Str";
  assertTrue("String_Node_Str",str.contains(expected));
  expected="String_Node_Str";
  assertTrue("String_Node_Str",str.contains(expected));
  assertEquals("String_Node_Str",str);
}
Program: 90456
Project: 90456
Buggy source:
/** 
 * Get the time zone used by this parser. <p> The default   {@link TimeZone} used to create a {@link Date} when the {@link TimeZone} is not specified by theformat pattern. </p>
 * @return the time zone
 */
TimeZone getTimeZone();

Fixed version (ground truth):
/** 
 * Gets the time zone used by this parser. <p> The default   {@link TimeZone} used to create a {@link Date} when the {@link TimeZone} is not specified by theformat pattern. </p>
 * @return the time zone
 */
TimeZone getTimeZone();
Program: 90457
Project: 90457
Buggy source:
/** 
 * Equivalent to DateFormat.parse(String, ParsePosition). See   {@link java.text.DateFormat#parse(String,ParsePosition)} for more information.
 * @param source A <code>String</code>, part of which should be parsed.
 * @param pos A <code>ParsePosition</code> object with index and error index information as described above.
 * @return A <code>Date</code> parsed from the string. In case of error, returns null.
 * @throws NullPointerException if text or pos is null.
 */
Date parse(String source,ParsePosition pos);

Fixed version (ground truth):
/** 
 * Parses a formatted date string according to the format.  Updates the Calendar with parsed fields. Upon success, the ParsePosition index is updated to indicate how much of the source text was consumed. Not all source text needs to be consumed.  Upon parse failure, ParsePosition error index is updated to the offset of the source text which does not match the supplied format.
 * @param source The text to parse.
 * @param pos On input, the position in the source to start parsing, on output, updated position.
 * @param calendar The calendar into which to set parsed fields.
 * @return true, if source has been parsed (pos parsePosition is updated); otherwise false (and pos errorIndex is updated)
 * @throws IllegalArgumentException when Calendar has been set to be not lenient, and a parsed field isout of range.
 */
boolean parse(String source,ParsePosition pos,Calendar calendar);
Program: 90458
Project: 90458
Buggy source:
/** 
 * Get the pattern used by this parser.
 * @return the pattern, {@link java.text.SimpleDateFormat} compatible
 */
String getPattern();

Fixed version (ground truth):
/** 
 * Gets the pattern used by this parser.
 * @return the pattern, {@link java.text.SimpleDateFormat} compatible
 */
String getPattern();
Program: 90459
Project: 90459
Buggy source:
/** 
 * Get the locale used by this parser.
 * @return the locale
 */
Locale getLocale();

Fixed version (ground truth):
/** 
 * Gets the locale used by this parser.
 * @return the locale
 */
Locale getLocale();
Program: 90460
Project: 90460
Buggy source:
/** 
 * Parse a date/time string according to the given parse position.
 * @param source A <code>String</code> whose beginning should be parsed.
 * @param pos the parse position
 * @return a <code>java.util.Date</code> object
 * @see java.text.DateFormat#parseObject(String,ParsePosition)
 */
Object parseObject(String source,ParsePosition pos);

Fixed version (ground truth):
/** 
 * Parses a date/time string according to the given parse position.
 * @param source A <code>String</code> whose beginning should be parsed.
 * @param pos the parse position
 * @return a <code>java.util.Date</code> object
 * @see java.text.DateFormat#parseObject(String,ParsePosition)
 */
Object parseObject(String source,ParsePosition pos);
Program: 90461
Project: 90461
Buggy source:
@Override public Date parse(final String source,final ParsePosition pos){
  return parser.parse(source,pos);
}

Fixed version (ground truth):
@Override public boolean parse(String source,ParsePosition pos,Calendar calendar){
  return parser.parse(source,pos,calendar);
}
Program: 90462
Project: 90462
Buggy source:
private String createClassPath(Class<?> cls){
  final String resource="String_Node_Str" + cls.getName().replace('.','/') + "String_Node_Str";
  final URL url=cls.getResource(resource);
  String location=url.toString();
  if (location.startsWith("String_Node_Str")) {
    location=location.substring("String_Node_Str".length(),location.indexOf('!'));
  }
  if (location.startsWith("String_Node_Str")) {
    location=location.substring("String_Node_Str".length());
  }
  if (location.endsWith(resource)) {
    location=location.substring(0,location.length() - resource.length());
  }
  return location.isEmpty() ? "String_Node_Str" : location;
}

Fixed version (ground truth):
private String createClassPath(Class<?> cls){
  final String resource="String_Node_Str" + cls.getName().replace('.','/') + "String_Node_Str";
  final URL url=cls.getResource(resource);
  String location=url.toString();
  if (location.startsWith("String_Node_Str")) {
    location=location.substring("String_Node_Str".length(),location.indexOf('!'));
  }
  if (location.startsWith("String_Node_Str")) {
    location=location.substring("String_Node_Str".length());
  }
  if (location.endsWith(resource)) {
    location=location.substring(0,location.length() - resource.length());
  }
  if (!new File(location).exists()) {
    location=File.separator + location;
  }
  return location.isEmpty() ? "String_Node_Str" : location;
}
Program: 90463
Project: 90463
Buggy source:
/** 
 * If there are no configuration properties, this injector will return the thread context's internal data structure. Otherwise the configuration properties are combined with the thread context key-value pairs into the specified reusable StringMap.
 * @param props list of configuration properties, may be {@code null}
 * @param reusable a {@code StringMap} instance that may be reused to avoid creating temporary objects
 * @return a {@code StringMap} combining configuration properties with thread context data
 */
@Override public StringMap injectContextData(final List<Property> props,final StringMap reusable){
  final StringMap immutableCopy=ThreadContextAccess.getThreadContextMap2().getReadOnlyContextData();
  if (props == null || props.isEmpty()) {
    return immutableCopy;
  }
  copyProperties(props,reusable);
  reusable.putAll(immutableCopy);
  return reusable;
}

Fixed version (ground truth):
/** 
 * If there are no configuration properties, this injector will return the thread context's internal data structure. Otherwise the configuration properties are combined with the thread context key-value pairs into the specified reusable StringMap.
 * @param props list of configuration properties, may be {@code null}
 * @param ignore a {@code StringMap} instance from the log event
 * @return a {@code StringMap} combining configuration properties with thread context data
 */
@Override public StringMap injectContextData(final List<Property> props,final StringMap ignore){
  final StringMap immutableCopy=ThreadContextAccess.getThreadContextMap2().getReadOnlyContextData();
  if (props == null || props.isEmpty()) {
    return immutableCopy;
  }
  final StringMap result=ContextDataFactory.createContextData();
  copyProperties(props,result);
  result.putAll(immutableCopy);
  return result;
}
Program: 90464
Project: 90464
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public MutableContextData getMutableContextData(){
  final MutableContextData map=localMap.get();
  return map == null ? createMutableContextData() : map;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public MutableContextData getMutableContextData(){
  final MutableContextData map=localMap.get();
  return map == null ? EMPTY_CONTEXT_DATA : map;
}
Program: 90465
Project: 90465
Buggy source:
@Override public AppenderSet build(){
  if (configuration == null) {
    LOGGER.error("String_Node_Str");
  }
  final List<Node> children=node.getChildren();
  final Map<String,Node> map=new HashMap<>(node == null ? 0 : children.size());
  if (children == null) {
    LOGGER.error("String_Node_Str",this);
    return null;
  }
  for (  final Node childNode : children) {
    final String key=childNode.getAttributes().get("String_Node_Str");
    if (key == null) {
      LOGGER.error("String_Node_Str",childNode,children);
    }
 else {
      map.put(key,childNode);
    }
  }
  return new AppenderSet(configuration,map);
}

Fixed version (ground truth):
@Override public AppenderSet build(){
  if (configuration == null) {
    LOGGER.error("String_Node_Str",this);
    return null;
  }
  if (node == null) {
    LOGGER.error("String_Node_Str",this);
    return null;
  }
  final List<Node> children=node.getChildren();
  if (children == null) {
    LOGGER.error("String_Node_Str",this);
    return null;
  }
  final Map<String,Node> map=new HashMap<>(children.size());
  for (  final Node childNode : children) {
    final String key=childNode.getAttributes().get("String_Node_Str");
    if (key == null) {
      LOGGER.error("String_Node_Str",childNode,children);
    }
 else {
      map.put(key,childNode);
    }
  }
  return new AppenderSet(configuration,map);
}
Program: 90466
Project: 90466
Buggy source:
/** 
 * Appender Filter method. The default returns NEUTRAL.
 * @param logger the Logger.
 * @param level The logging Level.
 * @param marker The Marker, if any.
 * @param msg The message, if present.
 * @param p0 the message parameters
 * @param p1 the message parameters
 * @param p2 the message parameters
 * @param p3 the message parameters
 * @param p4 the message parameters
 * @param p5 the message parameters
 * @param p6 the message parameters
 * @param p7 the message parameters
 * @param p8 the message parameters
 * @param p9 the message parameters
 * @return The Result of filtering.
 */
@Override public Result filter(final Logger logger,final Level level,final Marker marker,final String msg,final Object p0,final Object p1,final Object p2,final Object p3,final Object p4,final Object p5,final Object p6,final Object p7,final Object p8,final Object p9){
  return Result.NEUTRAL;
}

Fixed version (ground truth):
/** 
 * Appender Filter method. The default returns NEUTRAL.
 * @param logger the Logger.
 * @param level The logging Level.
 * @param marker The Marker, if any.
 * @param msg The message, if present.
 * @param p0 the message parameters
 * @param p1 the message parameters
 * @param p2 the message parameters
 * @param p3 the message parameters
 * @param p4 the message parameters
 * @param p5 the message parameters
 * @param p6 the message parameters
 * @param p7 the message parameters
 * @param p8 the message parameters
 * @param p9 the message parameters
 * @return The Result of filtering.
 */
@Override public Result filter(final Logger logger,final Level level,final Marker marker,final String msg,final Object p0,final Object p1,final Object p2,final Object p3,final Object p4,final Object p5,final Object p6,final Object p7,final Object p8,final Object p9){
  return filter(logger,level,marker,msg,new Object[]{p0,p1,p2,p3,p4,p5,p6,p7,p8,p9});
}
Program: 90467
Project: 90467
Buggy source:
@Override public void remove(final String key){
  if (keys == EMPTY) {
    return;
  }
  final int index=indexOfKey(key);
  if (index >= 0) {
    assertNotFrozen();
    assertNoConcurrentModification();
    System.arraycopy(keys,index + 1,keys,index,size - index);
    System.arraycopy(values,index + 1,values,index,size - index);
    size--;
  }
}

Fixed version (ground truth):
@Override public void remove(final String key){
  if (keys == EMPTY) {
    return;
  }
  final int index=indexOfKey(key);
  if (index >= 0) {
    assertNotFrozen();
    assertNoConcurrentModification();
    System.arraycopy(keys,index + 1,keys,index,size - 1 - index);
    System.arraycopy(values,index + 1,values,index,size - 1 - index);
    keys[size - 1]=null;
    values[size - 1]=null;
    size--;
  }
}
Program: 90468
Project: 90468
Buggy source:
/** 
 * This method is called by the EventHandler that processes the RingBufferLogEvent in a separate thread. Merges the contents of the configuration map into the contextData, after replacing any variables in the property values with the StrSubstitutor-supplied actual values.
 * @param event the event to log
 */
public void actualAsyncLog(final RingBufferLogEvent event){
  final Map<Property,Boolean> properties=privateConfig.loggerConfig.getProperties();
  if (properties != null) {
    MutableContextData contextData=(MutableContextData)event.getContextData();
    for (    final Map.Entry<Property,Boolean> entry : properties.entrySet()) {
      final Property prop=entry.getKey();
      if (contextData.getValue(prop.getName()) != null) {
        continue;
      }
      final String value=entry.getValue() ? privateConfig.config.getStrSubstitutor().replace(event,prop.getValue()) : prop.getValue();
      contextData.putValue(prop.getName(),prop.getValue());
    }
  }
  final ReliabilityStrategy strategy=privateConfig.loggerConfig.getReliabilityStrategy();
  strategy.log(this,event);
}

Fixed version (ground truth):
/** 
 * This method is called by the EventHandler that processes the RingBufferLogEvent in a separate thread. Merges the contents of the configuration map into the contextData, after replacing any variables in the property values with the StrSubstitutor-supplied actual values.
 * @param event the event to log
 */
public void actualAsyncLog(final RingBufferLogEvent event){
  final List<Property> properties=privateConfig.loggerConfig.getPropertyList();
  if (properties != null) {
    MutableContextData contextData=(MutableContextData)event.getContextData();
    if (contextData.isFrozen()) {
      final MutableContextData temp=ContextDataFactory.createContextData();
      temp.putAll(contextData);
      contextData=temp;
    }
    for (int i=0; i < properties.size(); i++) {
      final Property prop=properties.get(i);
      if (contextData.getValue(prop.getName()) != null) {
        continue;
      }
      final String value=prop.isValueNeedsLookup() ? privateConfig.config.getStrSubstitutor().replace(event,prop.getValue()) : prop.getValue();
      contextData.putValue(prop.getName(),prop.getValue());
    }
    event.setContextData(contextData);
  }
  final ReliabilityStrategy strategy=privateConfig.loggerConfig.getReliabilityStrategy();
  strategy.log(this,event);
}
Program: 90469
Project: 90469
Buggy source:
@Override public void putAll(final ContextData source){
  assertNotFrozen();
  assertNoConcurrentModification();
  if (source instanceof ArrayContextData) {
    initFrom0((ArrayContextData)source);
  }
 else   if (source != null) {
    if (source == this) {
      return;
    }
    source.forEach(PUT_ALL,this);
  }
}

Fixed version (ground truth):
@Override public void putAll(final ContextData source){
  assertNotFrozen();
  assertNoConcurrentModification();
  if (source instanceof ArrayContextData && this.size == 0) {
    initFrom0((ArrayContextData)source);
  }
 else   if (source != null) {
    if (source == this) {
      return;
    }
    source.forEach(PUT_ALL,this);
  }
}
Program: 90470
Project: 90470
Buggy source:
/** 
 * Initialize the fields of this   {@code MutableLogEvent} from another event.Similar in purpose and usage as  {@link org.apache.logging.log4j.core.impl.Log4jLogEvent.LogEventProxy}, but a mutable version. <p> This method is used on async logger ringbuffer slots holding MutableLogEvent objects in each slot. </p>
 * @param event the event to copy data from
 */
public void initFrom(final LogEvent event){
  this.loggerFqcn=event.getLoggerFqcn();
  this.marker=event.getMarker();
  this.level=event.getLevel();
  this.loggerName=event.getLoggerName();
  this.timeMillis=event.getTimeMillis();
  this.thrown=event.getThrown();
  this.thrownProxy=event.getThrownProxy();
  if (event.getContextData() instanceof MutableContextData) {
    this.contextData=(MutableContextData)event.getContextData();
  }
 else {
    this.contextData.putAll(event.getContextData());
  }
  this.contextStack=event.getContextStack();
  this.source=event.isIncludeLocation() ? event.getSource() : null;
  this.threadId=event.getThreadId();
  this.threadName=event.getThreadName();
  this.threadPriority=event.getThreadPriority();
  this.endOfBatch=event.isEndOfBatch();
  this.includeLocation=event.isIncludeLocation();
  this.nanoTime=event.getNanoTime();
  setMessage(event.getMessage());
}

Fixed version (ground truth):
/** 
 * Initialize the fields of this   {@code MutableLogEvent} from another event.Similar in purpose and usage as  {@link org.apache.logging.log4j.core.impl.Log4jLogEvent.LogEventProxy}, but a mutable version. <p> This method is used on async logger ringbuffer slots holding MutableLogEvent objects in each slot. </p>
 * @param event the event to copy data from
 */
public void initFrom(final LogEvent event){
  this.loggerFqcn=event.getLoggerFqcn();
  this.marker=event.getMarker();
  this.level=event.getLevel();
  this.loggerName=event.getLoggerName();
  this.timeMillis=event.getTimeMillis();
  this.thrown=event.getThrown();
  this.thrownProxy=event.getThrownProxy();
  this.contextData.putAll(event.getContextData());
  this.contextStack=event.getContextStack();
  this.source=event.isIncludeLocation() ? event.getSource() : null;
  this.threadId=event.getThreadId();
  this.threadName=event.getThreadName();
  this.threadPriority=event.getThreadPriority();
  this.endOfBatch=event.isEndOfBatch();
  this.includeLocation=event.isIncludeLocation();
  this.nanoTime=event.getNanoTime();
  setMessage(event.getMessage());
}
Program: 90471
Project: 90471
Buggy source:
@Override public Configuration getConfiguration(final LoggerContext loggerContext,final ConfigurationSource source){
  final ConfigurationBuilder<BuiltConfiguration> builder;
  try (final InputStream configStream=source.getInputStream()){
    builder=new Log4j1ConfigurationParser().buildConfigurationBuilder(configStream);
  }
 catch (  IOException e) {
    throw new ConfigurationException("String_Node_Str" + source.toString(),e);
  }
  if (builder == null)   return null;
  return builder.build();
}

Fixed version (ground truth):
@Override public Configuration getConfiguration(final LoggerContext loggerContext,final ConfigurationSource source){
  final ConfigurationBuilder<BuiltConfiguration> builder;
  try (final InputStream configStream=source.getInputStream()){
    builder=new Log4j1ConfigurationParser().buildConfigurationBuilder(configStream);
  }
 catch (  IOException e) {
    throw new ConfigurationException("String_Node_Str" + source.toString(),e);
  }
  return builder.build();
}
Program: 90473
Project: 90473
Buggy source:
public IdlePurgePolicy(long timeToLive,long checkInterval,final ConfigurationScheduler scheduler){
  this.timeToLive=timeToLive;
  this.checkInterval=checkInterval;
  this.scheduler=scheduler;
}

Fixed version (ground truth):
public IdlePurgePolicy(final long timeToLive,final long checkInterval,final ConfigurationScheduler scheduler){
  this.timeToLive=timeToLive;
  this.checkInterval=checkInterval;
  this.scheduler=scheduler;
}
Program: 90474
Project: 90474
Buggy source:
/** 
 * Delete specified appender
 * @param key The appender's key
 */
public void deleteAppender(final String key){
  LOGGER.debug("String_Node_Str" + key);
  AppenderControl control=appenders.remove(key);
  control.getAppender().stop();
  LOGGER.debug("String_Node_Str" + key + "String_Node_Str");
  final AppenderControl control=appenders.remove(key);
  if (null != control) {
    LOGGER.debug("String_Node_Str" + key + "String_Node_Str");
    control.getAppender().stop();
  }
 else {
    LOGGER.debug("String_Node_Str" + key + "String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Delete specified appender
 * @param key The appender's key
 */
public void deleteAppender(final String key){
  LOGGER.debug("String_Node_Str" + key + "String_Node_Str");
  final AppenderControl control=appenders.remove(key);
  if (null != control) {
    LOGGER.debug("String_Node_Str" + key + "String_Node_Str");
    control.getAppender().stop();
  }
 else {
    LOGGER.debug("String_Node_Str" + key + "String_Node_Str");
  }
}
Program: 90475
Project: 90475
Buggy source:
/** 
 * Determines if there are any packages to filter.
 * @return true if there are packages, false otherwise.
 */
public boolean hasPackages(){
  return this.packages != null && !this.packages.isEmpty();
}

Fixed version (ground truth):
/** 
 * Determines if there are any packages to filter.
 * @return true if there are packages, false otherwise.
 */
public boolean hasPackages(){
  return this.ignorePackages != null && !this.ignorePackages.isEmpty();
}
Program: 90476
Project: 90476
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public String toString(){
  final StringBuilder s=new StringBuilder();
  s.append('{').append(allLines() ? FULL : this.lines == 2 ? SHORT : anyLines() ? String.valueOf(this.lines) : NONE).append('}');
  s.append("String_Node_Str").append(this.separator).append("String_Node_Str");
  if (hasPackages()) {
    s.append("String_Node_Str");
    for (    final String p : this.packages) {
      s.append(p).append(',');
    }
    s.deleteCharAt(s.length() - 1);
    s.append("String_Node_Str");
  }
  return s.toString();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public String toString(){
  final StringBuilder s=new StringBuilder();
  s.append('{').append(allLines() ? FULL : this.lines == 2 ? SHORT : anyLines() ? String.valueOf(this.lines) : NONE).append('}');
  s.append("String_Node_Str").append(this.separator).append("String_Node_Str");
  if (hasPackages()) {
    s.append("String_Node_Str");
    for (    final String p : this.ignorePackages) {
      s.append(p).append(',');
    }
    s.deleteCharAt(s.length() - 1);
    s.append("String_Node_Str");
  }
  return s.toString();
}
Program: 90478
Project: 90478
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void format(final LogEvent event,final StringBuilder toAppendTo){
  final ThrowableProxy proxy=event.getThrownProxy();
  final Throwable throwable=event.getThrown();
  if ((throwable != null || proxy != null) && options.anyLines()) {
    if (proxy == null) {
      super.format(event,toAppendTo);
      return;
    }
    final String extStackTrace=proxy.getExtendedStackTraceAsString(options.getPackages(),options.getTextRenderer());
    final int len=toAppendTo.length();
    if (len > 0 && !Character.isWhitespace(toAppendTo.charAt(len - 1))) {
      toAppendTo.append(' ');
    }
    if (!options.allLines() || !Constants.LINE_SEPARATOR.equals(options.getSeparator())) {
      final StringBuilder sb=new StringBuilder();
      final String[] array=extStackTrace.split(Constants.LINE_SEPARATOR);
      final int limit=options.minLines(array.length) - 1;
      for (int i=0; i <= limit; ++i) {
        sb.append(array[i]);
        if (i < limit) {
          sb.append(options.getSeparator());
        }
      }
      toAppendTo.append(sb.toString());
    }
 else {
      toAppendTo.append(extStackTrace);
    }
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void format(final LogEvent event,final StringBuilder toAppendTo){
  final ThrowableProxy proxy=event.getThrownProxy();
  final Throwable throwable=event.getThrown();
  if ((throwable != null || proxy != null) && options.anyLines()) {
    if (proxy == null) {
      super.format(event,toAppendTo);
      return;
    }
    final String extStackTrace=proxy.getExtendedStackTraceAsString(options.getIgnorePackages(),options.getTextRenderer());
    final int len=toAppendTo.length();
    if (len > 0 && !Character.isWhitespace(toAppendTo.charAt(len - 1))) {
      toAppendTo.append(' ');
    }
    if (!options.allLines() || !Constants.LINE_SEPARATOR.equals(options.getSeparator())) {
      final StringBuilder sb=new StringBuilder();
      final String[] array=extStackTrace.split(Constants.LINE_SEPARATOR);
      final int limit=options.minLines(array.length) - 1;
      for (int i=0; i <= limit; ++i) {
        sb.append(array[i]);
        if (i < limit) {
          sb.append(options.getSeparator());
        }
      }
      toAppendTo.append(sb.toString());
    }
 else {
      toAppendTo.append(extStackTrace);
    }
  }
}
Program: 90479
Project: 90479
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void format(final LogEvent event,final StringBuilder toAppendTo){
  final ThrowableProxy proxy=event.getThrownProxy();
  final Throwable throwable=event.getThrown();
  if (throwable != null && options.anyLines()) {
    if (proxy == null) {
      super.format(event,toAppendTo);
      return;
    }
    final String trace=proxy.getCauseStackTraceAsString(options.getPackages());
    final int len=toAppendTo.length();
    if (len > 0 && !Character.isWhitespace(toAppendTo.charAt(len - 1))) {
      toAppendTo.append(' ');
    }
    if (!options.allLines() || !Constants.LINE_SEPARATOR.equals(options.getSeparator())) {
      final StringBuilder sb=new StringBuilder();
      final String[] array=trace.split(Constants.LINE_SEPARATOR);
      final int limit=options.minLines(array.length) - 1;
      for (int i=0; i <= limit; ++i) {
        sb.append(array[i]);
        if (i < limit) {
          sb.append(options.getSeparator());
        }
      }
      toAppendTo.append(sb.toString());
    }
 else {
      toAppendTo.append(trace);
    }
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void format(final LogEvent event,final StringBuilder toAppendTo){
  final ThrowableProxy proxy=event.getThrownProxy();
  final Throwable throwable=event.getThrown();
  if (throwable != null && options.anyLines()) {
    if (proxy == null) {
      super.format(event,toAppendTo);
      return;
    }
    final String trace=proxy.getCauseStackTraceAsString(options.getIgnorePackages());
    final int len=toAppendTo.length();
    if (len > 0 && !Character.isWhitespace(toAppendTo.charAt(len - 1))) {
      toAppendTo.append(' ');
    }
    if (!options.allLines() || !Constants.LINE_SEPARATOR.equals(options.getSeparator())) {
      final StringBuilder sb=new StringBuilder();
      final String[] array=trace.split(Constants.LINE_SEPARATOR);
      final int limit=options.minLines(array.length) - 1;
      for (int i=0; i <= limit; ++i) {
        sb.append(array[i]);
        if (i < limit) {
          sb.append(options.getSeparator());
        }
      }
      toAppendTo.append(sb.toString());
    }
 else {
      toAppendTo.append(trace);
    }
  }
}
Program: 90480
Project: 90480
Buggy source:
public void test(final String[] args){
  final String config=args == null || args.length == 0 ? "String_Node_Str" : args[0];
  final LoggerContext ctx=Configurator.initialize(ConsoleAppenderAnsiMessagesMain.class.getName(),config);
  final Logger logger=LogManager.getLogger(ConsoleAppenderJAnsiXExceptionMain.class);
  try {
    IllegalArgumentException e=new IllegalArgumentException("String_Node_Str");
    e.fillInStackTrace();
    throw new IllegalStateException("String_Node_Str",e);
  }
 catch (  Exception e) {
    logger.info("String_Node_Str",e);
  }
 finally {
    Configurator.shutdown(ctx);
  }
}

Fixed version (ground truth):
public void test(final String[] args){
  final String config=args == null || args.length == 0 ? "String_Node_Str" : args[0];
  final LoggerContext ctx=Configurator.initialize(ConsoleAppenderAnsiMessagesMain.class.getName(),config);
  final Logger logger=LogManager.getLogger(ConsoleAppenderJAnsiXExceptionMain.class);
  try {
    Files.getFileStore(Paths.get("String_Node_Str"));
  }
 catch (  Exception e) {
    IllegalArgumentException logE=new IllegalArgumentException("String_Node_Str",e);
    logger.info("String_Node_Str",logE);
  }
 finally {
    Configurator.shutdown(ctx);
  }
}