nus-yam/ex-repair huggingface dataset:
Program: 5203
Project: 5203
Buggy source:
/** 
 * Creates a new instance of the   {@link ScenarioInstance} entity. Sets the name and measurementEnvironmentUrl according to the given parameters.
 * @param scenarioDefinition
 * @param measurementEnvironmentUrl
 * @return a new instance of {@link ScenarioInstance} based on the given parameters
 */
public static ScenarioInstance createScenarioInstance(ScenarioDefinition scenarioDefinition,String measurementEnvironmentUrl){
  ScenarioInstance si=new ScenarioInstance();
  si.setName(scenarioDefinition.getName());
  si.setMeasurementEnvironmentUrl(measurementEnvironmentUrl);
  return si;
}

Fixed version (ground truth):
/** 
 * Creates a new instance of the   {@link ScenarioInstance} entity. Sets the name and measurementEnvironmentUrl according to the given parameters.
 * @param scenarioDefinition
 * @param measurementEnvironmentUrl
 * @return a new instance of {@link ScenarioInstance} based on the given parameters
 */
public static ScenarioInstance createScenarioInstance(ScenarioDefinition scenarioDefinition,String measurementEnvironmentUrl){
  ScenarioInstance si=new ScenarioInstance();
  si.setScenarioDefinition(scenarioDefinition);
  si.setName(scenarioDefinition.getName());
  si.setMeasurementEnvironmentUrl(measurementEnvironmentUrl);
  return si;
}
Program: 5204
Project: 5204
Buggy source:
/** 
 * Creates a new instance of the   {@link ExperimentSeries} entity. Sets the name, experimentDefintion and scenarioInstance according to the given parameters. Adds the newly created instance to the given scenarioInstance (resolving the relationship).
 * @param scenarioInstance
 * @param expSeriesDefinition
 * @return a new instance of {@link ExperimentSeries} based on the given parameters
 */
public static ExperimentSeries createExperimentSeries(ScenarioInstance scenarioInstance,ExperimentSeriesDefinition expSeriesDefinition){
  ExperimentSeries expSeries=new ExperimentSeries();
  expSeries.setName(expSeriesDefinition.getName());
  expSeries.setExperimentSeriesDefinition(expSeriesDefinition);
  expSeries.setScenarioInstance(scenarioInstance);
  scenarioInstance.getExperimentSeries().add(expSeries);
  return expSeries;
}

Fixed version (ground truth):
/** 
 * Creates a new instance of the   {@link ExperimentSeries} entity. Sets the name, experimentDefintion and scenarioInstance according to the given parameters. Adds the newly created instance to the given scenarioInstance (resolving the relationship).
 * @param scenarioInstance
 * @param expSeriesDefinition
 * @return a new instance of {@link ExperimentSeries} based on the given parameters
 */
public static ExperimentSeries createExperimentSeries(ScenarioInstance scenarioInstance,ExperimentSeriesDefinition expSeriesDefinition){
  ExperimentSeries expSeries=new ExperimentSeries();
  expSeries.setName(expSeriesDefinition.getName());
  expSeries.setScenarioInstance(scenarioInstance);
  scenarioInstance.getExperimentSeries().add(expSeries);
  return expSeries;
}
Program: 5205
Project: 5205
Buggy source:
public ExperimentSeriesDefinition getExperimentSeriesDefinition(){
  ExperimentSeriesDefinition returnValue;
  try {
    returnValue=(ExperimentSeriesDefinition)EMFUtil.loadFromSting(this.experimentSeriesDefinition);
  }
 catch (  IOException e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  return returnValue;
}

Fixed version (ground truth):
public ExperimentSeriesDefinition getExperimentSeriesDefinition(){
  ExperimentSeriesDefinition returnValue;
  ScenarioDefinition sd=this.scenarioInstance.getScenarioDefinition();
  returnValue=ScenarioDefinitionUtil.getExperimentSeriesDefinition(this.getName(),sd);
  return returnValue;
}
Program: 5206
Project: 5206
Buggy source:
/** 
 * Adds a set of new values to the column under construction (created by startColumn).
 * @param valueList Values to be added.
 */
public void addObservationValueLists(List<ParameterValueList> valueLists){
  if (nextColumn == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (!(nextColumn instanceof DataSetInputColumn)) {
    throw new IllegalStateException("String_Node_Str");
  }
  ((DataSetObservationColumn)nextColumn).getValueLists().addAll(valueLists);
}

Fixed version (ground truth):
/** 
 * Adds a set of new values to the column under construction (created by startColumn).
 * @param valueList Values to be added.
 */
public void addObservationValueLists(List<ParameterValueList> valueLists){
  if (nextColumn == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (!(nextColumn instanceof DataSetObservationColumn)) {
    throw new IllegalStateException("String_Node_Str");
  }
  ((DataSetObservationColumn)nextColumn).getValueLists().addAll(valueLists);
}
Program: 5207
Project: 5207
Buggy source:
public static DataSetAggregated createDummyResultDataSet(){
  DataSetColumnBuilder builder=new DataSetColumnBuilder();
  builder.startInputColumn(createDummyInputParameterDefinition("String_Node_Str"));
  builder.addInputValue(1);
  builder.addInputValue(2);
  builder.finishColumn();
  builder.startObservationColumn(createDummyObservationParameterDefinition("String_Node_Str"));
  ArrayList<Object> obsValues1=new ArrayList<Object>();
  obsValues1.add(10);
  obsValues1.add(10);
  builder.addObservationValues(obsValues1);
  ArrayList<Object> obsValues2=new ArrayList<Object>();
  obsValues2.add(20);
  obsValues2.add(20);
  builder.addObservationValues(obsValues2);
  builder.finishColumn();
  return builder.createDataSet();
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) public static DataSetAggregated createDummyResultDataSet(){
  DataSetColumnBuilder builder=new DataSetColumnBuilder();
  builder.startInputColumn(createDummyInputParameterDefinition("String_Node_Str"));
  builder.addInputValue(1);
  builder.addInputValue(2);
  builder.finishColumn();
  ParameterDefinition paramDef=createDummyObservationParameterDefinition("String_Node_Str");
  ArrayList<ParameterValueList> obsValueLists=new ArrayList<ParameterValueList>();
  builder.startObservationColumn(paramDef);
  ArrayList<Object> obsValues1=new ArrayList<Object>();
  obsValues1.add(10);
  obsValues1.add(10);
  obsValueLists.add(new ParameterValueList<Object>(paramDef,obsValues1));
  ArrayList<Object> obsValues2=new ArrayList<Object>();
  obsValues2.add(20);
  obsValues2.add(20);
  obsValueLists.add(new ParameterValueList(paramDef,obsValues2));
  builder.addObservationValueLists(obsValueLists);
  builder.finishColumn();
  return builder.createDataSet();
}
Program: 5208
Project: 5208
Buggy source:
@Override public String getFullName(){
  ParameterNamespace namespace=this.getNamespace();
  String result=createFullNamespaceString("String_Node_Str",namespace) + getName();
  System.out.println(result);
  return result;
}

Fixed version (ground truth):
@Override public String getFullName(){
  ParameterNamespace namespace=this.getNamespace();
  String result=createFullNamespaceString("String_Node_Str",namespace) + getName();
  return result;
}
Program: 5209
Project: 5209
Buggy source:
public static ScenarioInstance createDummyScenarioInstance(){
  ScenarioInstance scenarioInstance=new ScenarioInstance();
  scenarioInstance.setName("String_Node_Str");
  scenarioInstance.setMeasurementEnvironmentUrl("String_Node_Str");
  scenarioInstance.getExperimentSeries().addAll(createDummyExperimentSeries(2,scenarioInstance));
  return scenarioInstance;
}

Fixed version (ground truth):
public static ScenarioInstance createDummyScenarioInstance(){
  SoPeCoModelFactoryHandler.initFactories();
  ScenarioInstance scenarioInstance=new ScenarioInstance();
  scenarioInstance.setName("String_Node_Str");
  scenarioInstance.setMeasurementEnvironmentUrl("String_Node_Str");
  scenarioInstance.getExperimentSeries().addAll(createDummyExperimentSeries(2,scenarioInstance));
  return scenarioInstance;
}
Program: 5210
Project: 5210
Buggy source:
public List<ExperimentSeriesRun> getExperimentSeries(){
  return experimentSeries;
}

Fixed version (ground truth):
public List<ExperimentSeries> getExperimentSeries(){
  return experimentSeries;
}
Program: 5211
Project: 5211
Buggy source:
/** 
 * Creates a new InnerClass with the specified properties.
 * @param accessSpecifier
 * @param isAbstract
 * @param isFinal
 * @param isImmutable
 * @param sinceSpecifier
 * @param name
 * @param isStatic
 * @param outerClass
 */
public InnerClass(AccessSpecifier accessSpecifier,boolean isAbstract,boolean isFinal,boolean isImmutable,SinceSpecifier sinceSpecifier,String name,boolean isStatic,ConceptualClass outerClass){
  super(accessSpecifier,isAbstract,isFinal,isImmutable,sinceSpecifier,name);
  this.isStatic=isStatic;
  this.outerClass=outerClass;
}

Fixed version (ground truth):
/** 
 * Creates a new InnerClass with the specified properties.
 * @param accessSpecifier
 * @param isAbstract
 * @param isFinal
 * @param isImmutable
 * @param sinceSpecifier
 * @param name
 * @param isStatic
 */
public InnerClass(AccessSpecifier accessSpecifier,boolean isAbstract,boolean isFinal,boolean isImmutable,SinceSpecifier sinceSpecifier,String name,boolean isStatic){
  super(accessSpecifier,isAbstract,isFinal,isImmutable,sinceSpecifier,name);
  this.isStatic=isStatic;
}
Program: 5212
Project: 5212
Buggy source:
/** 
 * Creates a new InnerClass with the specified properties.
 * @param accessSpecifier
 * @param isAbstract
 * @param isFinal
 * @param isImmutable
 * @param sinceSpecifier
 * @param name
 * @param typeArguments
 * @param baseClass
 * @param interfaces
 * @param isStatic
 * @param outerClass
 */
public InnerClass(AccessSpecifier accessSpecifier,boolean isAbstract,boolean isFinal,boolean isImmutable,SinceSpecifier sinceSpecifier,String name,TypeArgument[] typeArguments,PointerType baseClass,PointerType[] interfaces,boolean isStatic,ConceptualClass outerClass){
  super(accessSpecifier,isAbstract,isFinal,isImmutable,sinceSpecifier,name,typeArguments,baseClass,interfaces);
  this.isStatic=isStatic;
  this.outerClass=outerClass;
}

Fixed version (ground truth):
/** 
 * Creates a new InnerClass with the specified properties.
 * @param accessSpecifier
 * @param isAbstract
 * @param isFinal
 * @param isImmutable
 * @param sinceSpecifier
 * @param name
 * @param isStatic
 * @param outerClass
 */
public InnerClass(AccessSpecifier accessSpecifier,boolean isAbstract,boolean isFinal,boolean isImmutable,SinceSpecifier sinceSpecifier,String name,boolean isStatic,ConceptualClass outerClass){
  super(accessSpecifier,isAbstract,isFinal,isImmutable,sinceSpecifier,name);
  this.isStatic=isStatic;
  this.outerClass=outerClass;
}
Program: 5213
Project: 5213
Buggy source:
private void resolveImports() throws ConceptualException {
  for (  CompilationUnitAST compilationUnit : compilationUnits) {
    Scope fileScope=fileScopes.get(compilationUnit);
    ImportDeclarationAST[] imports=compilationUnit.getImports();
    for (    ImportDeclarationAST importDeclaration : imports) {
      Scope importScope=fileScope.lookup(importDeclaration.getName().getNameStrings());
      if (importScope == null) {
        throw new ConceptualException("String_Node_Str" + importDeclaration.getName(),importDeclaration.getName().getParseInfo());
      }
      if (importDeclaration.isAll()) {
        fileScope.copyChildren(importScope);
      }
 else {
        NameAST[] names=importDeclaration.getName().getNames();
        String name=names[names.length - 1].getName();
        try {
          fileScope.addChild(name,importScope);
        }
 catch (        ScopeException e) {
          throw new ConceptualException("String_Node_Str" + name,importDeclaration.getParseInfo());
        }
      }
    }
  }
}

Fixed version (ground truth):
private void resolveImports() throws ConceptualException {
  Map<CompilationUnitAST,Scope> fileScopes=nameScanner.getFileScopes();
  for (  CompilationUnitAST compilationUnit : compilationUnits) {
    Scope fileScope=fileScopes.get(compilationUnit);
    ImportDeclarationAST[] imports=compilationUnit.getImports();
    for (    ImportDeclarationAST importDeclaration : imports) {
      Scope importScope=fileScope.lookup(importDeclaration.getName().getNameStrings());
      if (importScope == null) {
        throw new ConceptualException("String_Node_Str" + importDeclaration.getName(),importDeclaration.getName().getParseInfo());
      }
      if (importDeclaration.isAll()) {
        fileScope.copyChildren(importScope);
      }
 else {
        NameAST[] names=importDeclaration.getName().getNames();
        String name=names[names.length - 1].getName();
        try {
          fileScope.addChild(name,importScope);
        }
 catch (        ScopeException e) {
          throw new ConceptualException("String_Node_Str" + name,importDeclaration.getParseInfo());
        }
      }
    }
  }
}
Program: 5214
Project: 5214
Buggy source:
/** 
 * Translates the ASTs provided to this object's constructor into a conceptual object heirarchy.
 */
public void translate(){
  try {
    for (    CompilationUnitAST compilationUnit : compilationUnits) {
      nameScanner.scanCompilationUnit(compilationUnit);
    }
  }
 catch (  ScopeException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * Translates the ASTs provided to this object's constructor into a conceptual object heirarchy.
 */
public void translate(){
  try {
    for (    CompilationUnitAST compilationUnit : compilationUnits) {
      nameScanner.scanCompilationUnit(compilationUnit);
    }
  }
 catch (  ScopeException e) {
    e.printStackTrace();
  }
catch (  ConceptualException e) {
    e.printStackTrace();
  }
}
Program: 5215
Project: 5215
Buggy source:
/** 
 * Sets the members of this enum constant.
 * @param staticInitializer
 * @param constructors
 * @param properties
 * @param variables
 * @param variableInitializers
 * @param methods
 */
public void setMembers(StaticInitializer staticInitializer,Constructor[] constructors,Property[] properties,MemberVariable[] variables,VariableInitializers variableInitializers,Method[] methods){
  this.staticInitializer=staticInitializer;
  this.constructors=constructors;
  this.properties=properties;
  this.variables=variables;
  this.variableInitializers=variableInitializers;
  this.methods=methods;
}

Fixed version (ground truth):
/** 
 * Sets the members of this enum constant.
 * @param staticInitializer
 * @param variableInitializers
 * @param variables
 * @param properties
 * @param constructors
 * @param methods
 * @param innerClasses
 * @param innerInterfaces
 * @param innerEnums
 */
public void setMembers(StaticInitializer staticInitializer,VariableInitializers variableInitializers,MemberVariable[] variables,Property[] properties,Constructor[] constructors,Method[] methods,InnerClass[] innerClasses,ConceptualInterface[] innerInterfaces,ConceptualEnum[] innerEnums){
  this.staticInitializer=staticInitializer;
  this.variableInitializers=variableInitializers;
  this.variables=variables;
  this.properties=properties;
  this.constructors=constructors;
  this.methods=methods;
  this.innerClasses=innerClasses;
  this.innerInterfaces=innerInterfaces;
  this.innerEnums=innerEnums;
}
Program: 5216
Project: 5216
Buggy source:
/** 
 * Converts the specified EnumDefinitionAST into a ConceptualEnum
 * @param enumDefinitionAST - the EnumDefinitionAST to convert
 * @param enclosingScope - the scope to make the parent of the new conceptual object's scope
 * @return the Scope of the ConceptualEnum created, which has the ConceptualEnum as its value
 * @throws ConceptualException - if there is a problem with the conversion
 */
private Scope convertInnerEnum(EnumDefinitionAST enumDefinitionAST,Scope enclosingScope) throws ConceptualException {
  return convert(enumDefinitionAST,enclosingScope);
}

Fixed version (ground truth):
/** 
 * Converts the specified EnumDefinitionAST into a ConceptualEnum
 * @param enumDefinitionAST - the EnumDefinitionAST to convert
 * @param enclosingScope - the scope to make the parent of the new conceptual object's scope
 * @return the Scope of the ConceptualEnum created, which has the ConceptualEnum as its value
 * @throws ConceptualException - if there is a problem with the conversion
 * @throws ScopeException - if there is a scope collision
 */
private Scope convertInnerEnum(EnumDefinitionAST enumDefinitionAST,Scope enclosingScope) throws ConceptualException, ScopeException {
  return convert(enumDefinitionAST,enclosingScope);
}
Program: 5217
Project: 5217
Buggy source:
/** 
 * Converts the specified InterfaceDefinitionAST into a ConceptualInterface
 * @param interfaceDefinitionAST - the InterfaceDefinitionAST to convert
 * @param enclosingScope - the scope to make the parent of the new conceptual object's scope
 * @return the Scope of the ConceptualInterface created, which has the ConceptualInterface as its value
 * @throws ConceptualException - if there is a problem with the conversion
 */
private Scope convertInnerInterface(InterfaceDefinitionAST interfaceDefinitionAST,Scope enclosingScope) throws ConceptualException {
  return convert(interfaceDefinitionAST,enclosingScope);
}

Fixed version (ground truth):
/** 
 * Converts the specified InterfaceDefinitionAST into a ConceptualInterface
 * @param interfaceDefinitionAST - the InterfaceDefinitionAST to convert
 * @param enclosingScope - the scope to make the parent of the new conceptual object's scope
 * @return the Scope of the ConceptualInterface created, which has the ConceptualInterface as its value
 * @throws ConceptualException - if there is a problem with the conversion
 * @throws ScopeException - if there is a scope collision
 */
private Scope convertInnerInterface(InterfaceDefinitionAST interfaceDefinitionAST,Scope enclosingScope) throws ConceptualException, ScopeException {
  return convert(interfaceDefinitionAST,enclosingScope);
}
Program: 5221
Project: 5221
Buggy source:
public TimeAmountFileAppender(TimeAmountFileCallback callback,TimeAmount amount,TimeAmount staleFileCheck,String dir,long maxBytes,boolean gzip){
  this.amount=amount;
  this.callback=callback;
  this.directory=dir;
  this.maxBytes=maxBytes;
  this.gzip=gzip;
  this.cache=CacheBuilder.newBuilder().maximumSize(1000).expireAfterAccess(staleFileCheck.getAmount(),staleFileCheck.getTimeframe().getTimeUnit()).removalListener(new RemovalListener<Long,TimeAmountFile>(){
    @Override public void onRemoval(    RemovalNotification<Long,TimeAmountFile> rn){
      staleFile(rn.getValue());
    }
  }
).build(new CacheLoader<Long,TimeAmountFile>(){
    public TimeAmountFile load(    Long epoch) throws Exception {
      System.out.println("String_Node_Str" + epoch);
      return newFile(epoch);
    }
  }
);
  File f[]=new File(dir).listFiles();
  if (f != null) {
    for (    File file : f) {
      try {
        TimeAmountFile taf=new TimeAmountFile(file,maxBytes);
        if (file.getName().endsWith("String_Node_Str")) {
          if (new File(StringHelper.trim(file.getAbsolutePath(),"String_Node_Str")).exists()) {
            log.warn("String_Node_Str" + file.getAbsolutePath());
            file.delete();
            continue;
          }
        }
        this.cache.put(taf.getEpoch(),taf);
      }
 catch (      Exception x) {
        log.error("String_Node_Str",x);
      }
    }
  }
}

Fixed version (ground truth):
public TimeAmountFileAppender(TimeAmountFileCallback callback,TimeAmount amount,TimeAmount staleFileCheck,String dir,long maxBytes,boolean gzip){
  this.amount=amount;
  this.callback=callback;
  this.directory=dir;
  this.maxBytes=maxBytes;
  this.gzip=gzip;
  this.cache=CacheBuilder.newBuilder().maximumSize(1000).expireAfterAccess(staleFileCheck.getAmount(),staleFileCheck.getTimeframe().getTimeUnit()).removalListener(new RemovalListener<Long,TimeAmountFile>(){
    @Override public void onRemoval(    RemovalNotification<Long,TimeAmountFile> rn){
      staleFile(rn.getValue());
    }
  }
).build(new CacheLoader<Long,TimeAmountFile>(){
    public TimeAmountFile load(    Long epoch) throws Exception {
      System.out.println("String_Node_Str" + epoch);
      return newFile(epoch);
    }
  }
);
  File f[]=new File(dir).listFiles();
  if (f != null) {
    for (    File file : f) {
      try {
        TimeAmountFile taf=new TimeAmountFile(file,maxBytes);
        log.warn("String_Node_Str" + file.getAbsolutePath() + "String_Node_Str");
        if (file.getName().endsWith("String_Node_Str")) {
          if (new File(StringHelper.trim(file.getAbsolutePath(),"String_Node_Str")).exists()) {
            log.warn("String_Node_Str" + file.getAbsolutePath());
            file.delete();
            continue;
          }
 else {
            staleFile(taf);
            continue;
          }
        }
        this.cache.put(taf.getEpoch(),taf);
      }
 catch (      Exception x) {
        log.error("String_Node_Str",x);
      }
    }
  }
}
Program: 5222
Project: 5222
Buggy source:
@Override public void onRemoval(RemovalNotification<Long,TimeAmountFile> rn){
  staleFile(rn.getValue());
}

Fixed version (ground truth):
@Override public void onRemoval(RemovalNotification<Long,TimeAmountFile> rn){
  log.warn("String_Node_Str" + rn.getKey() + "String_Node_Str"+ rn.getValue());
  staleFile(rn.getValue());
}
Program: 5223
Project: 5223
Buggy source:
public TimeAmountFileAppender(TimeAmountFileCallback callback,TimeAmount amount,TimeAmount staleFileCheck,String dir,long maxBytes,boolean gzip){
  this.amount=amount;
  this.callback=callback;
  this.directory=dir;
  this.maxBytes=maxBytes;
  this.gzip=gzip;
  this.cache=CacheBuilder.newBuilder().maximumSize(1000).expireAfterAccess(staleFileCheck.getAmount(),staleFileCheck.getTimeframe().getTimeUnit()).removalListener(new RemovalListener<Long,TimeAmountFile>(){
    @Override public void onRemoval(    RemovalNotification<Long,TimeAmountFile> rn){
      staleFile(rn.getValue());
    }
  }
).build(new CacheLoader<Long,TimeAmountFile>(){
    public TimeAmountFile load(    Long epoch) throws Exception {
      System.out.println("String_Node_Str" + epoch);
      return newFile(epoch);
    }
  }
);
  File f[]=new File(dir).listFiles();
  if (f != null) {
    for (    File file : f) {
      try {
        TimeAmountFile taf=new TimeAmountFile(file,maxBytes);
        log.warn("String_Node_Str" + file.getAbsolutePath() + "String_Node_Str");
        if (file.getName().endsWith("String_Node_Str")) {
          if (new File(StringHelper.trim(file.getAbsolutePath(),"String_Node_Str")).exists()) {
            log.warn("String_Node_Str" + file.getAbsolutePath());
            file.delete();
            continue;
          }
 else {
            staleFile(taf);
            continue;
          }
        }
        this.cache.put(taf.getEpoch(),taf);
      }
 catch (      Exception x) {
        log.error("String_Node_Str",x);
      }
    }
  }
}

Fixed version (ground truth):
public TimeAmountFileAppender(TimeAmountFileCallback callback,TimeAmount amount,TimeAmount staleFileCheck,String dir,long maxBytes,boolean gzip){
  this.amount=amount;
  this.callback=callback;
  this.directory=dir;
  this.maxBytes=maxBytes;
  this.gzip=gzip;
  this.staleFileCheck=staleFileCheck;
}
Program: 5224
Project: 5224
Buggy source:
public synchronized void append(Date date,String str) throws Exception {
  long epoch=this.amount.toTrendrrEpoch(date).longValue();
  for (int i=0; i < 5; i++) {
    TimeAmountFile file=null;
    try {
      file=this.cache.get(epoch);
      file.append(str);
      return;
    }
 catch (    FileClosedException x) {
      this.staleFile(file);
      this.cache.invalidate(epoch);
    }
  }
  throw new TrendrrIOException("String_Node_Str" + epoch);
}

Fixed version (ground truth):
public synchronized void append(Date date,String str) throws Exception {
  if (this.cache == null) {
    this.init();
  }
  long epoch=this.amount.toTrendrrEpoch(date).longValue();
  for (int i=0; i < 5; i++) {
    TimeAmountFile file=null;
    try {
      file=this.cache.get(epoch);
      file.append(str);
      return;
    }
 catch (    FileClosedException x) {
      this.staleFile(file);
      this.cache.invalidate(epoch);
    }
  }
  throw new TrendrrIOException("String_Node_Str" + epoch);
}
Program: 5225
Project: 5225
Buggy source:
public void appendLine(Date date,String str) throws Exception {
  this.append(new Date(),str + "String_Node_Str");
}

Fixed version (ground truth):
public void appendLine(Date date,String str) throws Exception {
  this.append(date,str + "String_Node_Str");
}
Program: 5226
Project: 5226
Buggy source:
public static void main(String... strings) throws TrendrrException {
  String json="String_Node_Str";
  JSONStreamReader reader=new JSONStreamReader(new StringReader(json));
  DynMap mp;
  while ((mp=reader.readNext()) != null) {
    System.out.println(mp.toJSONString());
  }
}

Fixed version (ground truth):
public static void main(String... strings) throws TrendrrException {
  String json="String_Node_Str";
  try {
    json=FileHelper.loadString("String_Node_Str");
  }
 catch (  Exception e) {
    log.error("String_Node_Str",e);
  }
  JSONStreamReader reader=new JSONStreamReader(new StringReader(json));
  DynMap mp;
  while ((mp=reader.readNext()) != null) {
    System.out.println(mp.toJSONString());
  }
}
Program: 5227
Project: 5227
Buggy source:
/** 
 * returns null on eof. throws exception or returns parsed object.
 * @return
 * @throws IOException
 */
public DynMap readNext() throws TrendrrException {
  StringBuilder json=new StringBuilder("String_Node_Str");
  try {
    long numRead=0;
    int openBrackets=1;
    boolean isQuote=false;
    char previous='{';
    int current=this.reader.read();
    while (current != '{' && current != -1) {
      numRead++;
      if (numRead > this.maxBufferedChars) {
        throw new TrendrrParseException("String_Node_Str" + this.maxBufferedChars + "String_Node_Str");
      }
      current=this.reader.read();
    }
    do {
      current=this.reader.read();
      if (current == -1) {
        return null;
      }
      char c=(char)current;
      json.append(c);
      if (!isQuote) {
        if (c == '{') {
          openBrackets++;
        }
 else         if (c == '}') {
          openBrackets--;
        }
      }
      if (c == '"' && previous != '\\') {
        isQuote=!isQuote;
      }
      previous=c;
      numRead++;
      if (numRead > this.maxBufferedChars) {
        throw new TrendrrParseException("String_Node_Str" + this.maxBufferedChars + "String_Node_Str");
      }
    }
 while (openBrackets != 0);
    DynMap dm=DynMapFactory.instanceFromJSON(json.toString());
    if (dm == null) {
      throw new TrendrrParseException("String_Node_Str");
    }
    return dm;
  }
 catch (  IOException x) {
    throw new TrendrrIOException(x);
  }
}

Fixed version (ground truth):
/** 
 * returns null on eof. throws exception or returns parsed object.
 * @return
 * @throws IOException
 */
public DynMap readNext() throws TrendrrException {
  StringBuilder json=new StringBuilder("String_Node_Str");
  try {
    long numRead=0;
    int openBrackets=1;
    boolean isQuote=false;
    boolean isEscape=false;
    int current=this.reader.read();
    while (current != '{' && current != -1) {
      numRead++;
      if (numRead > this.maxBufferedChars) {
        throw new TrendrrParseException("String_Node_Str" + this.maxBufferedChars + "String_Node_Str"+ json.substring(0,256));
      }
      current=this.reader.read();
    }
    do {
      current=this.reader.read();
      if (current == -1) {
        return null;
      }
      char c=(char)current;
      json.append(c);
      if (!isQuote) {
        if (c == '{') {
          openBrackets++;
        }
 else         if (c == '}') {
          openBrackets--;
        }
      }
      if (c == '"' && !isEscape) {
        isQuote=!isQuote;
      }
      if (isQuote && !isEscape && c == '\\') {
        isEscape=true;
      }
 else {
        isEscape=false;
      }
      numRead++;
      if (numRead > this.maxBufferedChars) {
        throw new TrendrrParseException("String_Node_Str" + this.maxBufferedChars + "String_Node_Str"+ json.substring(0,256));
      }
    }
 while (openBrackets != 0);
    DynMap dm=DynMapFactory.instanceFromJSON(json.toString());
    if (dm == null) {
      throw new TrendrrParseException("String_Node_Str");
    }
    return dm;
  }
 catch (  IOException x) {
    throw new TrendrrIOException(x);
  }
}
Program: 5228
Project: 5228
Buggy source:
public TimeAmountCounter(TimeAmount timeamount,TimeAmountCounterCallback callback){
  this.timeframe=timeamount;
}

Fixed version (ground truth):
public TimeAmountCounter(TimeAmount timeamount,TimeAmountCounterCallback callback){
  this.timeframe=timeamount;
  this.callback=callback;
}
Program: 5229
Project: 5229
Buggy source:
/** 
 * Append to this file.  note that 
 * @param str
 * @throws FileClosedException
 * @throws IOException
 */
public synchronized void append(String str) throws FileClosedException, IOException {
  if (stale) {
    throw new FileClosedException();
  }
  if (curBytes >= maxBytes) {
    this.setStale();
    throw new FileClosedException();
  }
  this.lastWrite=new Date();
  this.writer.append(str);
}

Fixed version (ground truth):
/** 
 * Append to this file.  note that 
 * @param str
 * @throws FileClosedException
 * @throws IOException
 */
public synchronized void append(String str) throws FileClosedException, IOException {
  if (stale) {
    throw new FileClosedException();
  }
  if (maxBytes > 0 && curBytes >= maxBytes) {
    this.setStale();
    throw new FileClosedException();
  }
  this.lastWrite=new Date();
  this.writer.append(str);
  this.writer.flush();
}
Program: 5230
Project: 5230
Buggy source:
public TimeAmountFile load(Long epoch) throws Exception {
  return newFile(epoch);
}

Fixed version (ground truth):
public TimeAmountFile load(Long epoch) throws Exception {
  System.out.println("String_Node_Str" + epoch);
  return newFile(epoch);
}
Program: 5231
Project: 5231
Buggy source:
public TimeAmountFileAppender(TimeAmountFileCallback callback,TimeAmount amount,TimeAmount staleFileCheck,String dir,long maxBytes){
  this.amount=amount;
  this.callback=callback;
  this.directory=dir;
  this.cache=CacheBuilder.newBuilder().maximumSize(1000).expireAfterWrite(staleFileCheck.getAmount(),staleFileCheck.getTimeframe().getTimeUnit()).removalListener(new RemovalListener<Long,TimeAmountFile>(){
    @Override public void onRemoval(    RemovalNotification<Long,TimeAmountFile> rn){
      staleFile(rn.getValue());
    }
  }
).build(new CacheLoader<Long,TimeAmountFile>(){
    public TimeAmountFile load(    Long epoch) throws Exception {
      return newFile(epoch);
    }
  }
);
  File f[]=new File(dir).listFiles();
  if (f != null) {
    for (    File file : f) {
      try {
        TimeAmountFile taf=new TimeAmountFile(file,maxBytes);
        this.cache.put(taf.getEpoch(),taf);
      }
 catch (      Exception x) {
        log.error("String_Node_Str",x);
      }
    }
  }
}

Fixed version (ground truth):
public TimeAmountFileAppender(TimeAmountFileCallback callback,TimeAmount amount,TimeAmount staleFileCheck,String dir,long maxBytes){
  this.amount=amount;
  this.callback=callback;
  this.directory=dir;
  this.maxBytes=maxBytes;
  this.cache=CacheBuilder.newBuilder().maximumSize(1000).expireAfterWrite(staleFileCheck.getAmount(),staleFileCheck.getTimeframe().getTimeUnit()).removalListener(new RemovalListener<Long,TimeAmountFile>(){
    @Override public void onRemoval(    RemovalNotification<Long,TimeAmountFile> rn){
      staleFile(rn.getValue());
    }
  }
).build(new CacheLoader<Long,TimeAmountFile>(){
    public TimeAmountFile load(    Long epoch) throws Exception {
      System.out.println("String_Node_Str" + epoch);
      return newFile(epoch);
    }
  }
);
  File f[]=new File(dir).listFiles();
  if (f != null) {
    for (    File file : f) {
      try {
        TimeAmountFile taf=new TimeAmountFile(file,maxBytes);
        this.cache.put(taf.getEpoch(),taf);
      }
 catch (      Exception x) {
        log.error("String_Node_Str",x);
      }
    }
  }
}
Program: 5232
Project: 5232
Buggy source:
public synchronized void append(Date date,String str) throws Exception {
  long epoch=this.amount.toTrendrrEpoch(date).longValue();
  TimeAmountFile file=null;
  try {
    file=this.cache.get(epoch);
    file.append(str);
  }
 catch (  FileClosedException x) {
    this.staleFile(file);
    this.cache.invalidate(epoch);
    this.append(date,str);
    return;
  }
}

Fixed version (ground truth):
public synchronized void append(Date date,String str) throws Exception {
  long epoch=this.amount.toTrendrrEpoch(date).longValue();
  for (int i=0; i < 5; i++) {
    TimeAmountFile file=null;
    try {
      file=this.cache.get(epoch);
      file.append(str);
      return;
    }
 catch (    FileClosedException x) {
      this.staleFile(file);
      this.cache.invalidate(epoch);
    }
  }
  throw new TrendrrIOException("String_Node_Str" + epoch);
}
Program: 5233
Project: 5233
Buggy source:
protected Date getExpire(TimeAmount frame,Date date){
  Date expireMin=Timeframe.HOURS.add(date,24);
  Date expire=frame.add(date,100);
  if (expire.before(expireMin)) {
    expire=expireMin;
  }
  return expire;
}

Fixed version (ground truth):
protected Date getExpire(TimeAmount frame,Date date){
  Date expireMin=Timeframe.HOURS.add(date,24);
  Date expire=frame.add(date,100);
  if (expire.after(expireMin)) {
    expire=expireMin;
  }
  return expire;
}
Program: 5234
Project: 5234
Buggy source:
/** 
 * does a (FAST) removal of the specified element.
 * @param obj
 */
public synchronized boolean remove(T obj){
  Integer index=this.indexes.get(obj);
  if (index == null) {
    return false;
  }
  T item=heap.remove(heap.size() - 1);
  this.indexes.put(item,index);
  this.heap.set(index,item);
  this.pushDown(item);
  return true;
}

Fixed version (ground truth):
/** 
 * does a (FAST) removal of the specified element.
 * @param obj
 */
public synchronized boolean remove(T obj){
  Integer index=this.indexes.remove(obj);
  if (index == null) {
    return false;
  }
  if (index == heap.size() - 1) {
    heap.remove((int)index);
    return true;
  }
  T item=heap.remove(heap.size() - 1);
  this.indexes.put(item,index);
  this.heap.set(index,item);
  this.pushDown(item);
  return true;
}
Program: 5235
Project: 5235
Buggy source:
public Set<String> getFullKey(DynMap map){
  String fullkey="String_Node_Str";
  Set<String> keyset=new HashSet<String>();
  for (  Object key : map.keySet()) {
    if (map.getMap((String)key) != null) {
      fullkey=(String)key + "String_Node_Str" + ((getFullKey(map.getMap((String)key)).toArray())[0]);
    }
 else {
      fullkey=(String)key;
    }
    keyset.add(fullkey);
  }
  return keyset;
}

Fixed version (ground truth):
private Set<String> getFullKey(DynMap map){
  Set<String> keyset=new HashSet<String>();
  for (  Object key : map.keySet()) {
    if (map.getMap((String)key) != null) {
      Iterator it=(getFullKey(map.getMap((String)key))).iterator();
      while (it.hasNext())       keyset.add((String)key + "String_Node_Str" + it.next());
    }
 else {
      keyset.add((String)key);
    }
  }
  return keyset;
}
Program: 5236
Project: 5236
Buggy source:
public StrestResponse awaitResponse(long timeoutMillis) throws Throwable {
  try {
    if (timeoutMillis > 0) {
      lock.acquire(1);
    }
 else {
      if (!lock.tryAcquire(timeoutMillis,TimeUnit.MILLISECONDS)) {
        throw new TrendrrTimeoutException("String_Node_Str" + timeoutMillis + "String_Node_Str");
      }
    }
  }
 catch (  InterruptedException e) {
    log.error("String_Node_Str",e);
    throw e;
  }
  if (this.error != null) {
    throw this.error;
  }
  return this.response;
}

Fixed version (ground truth):
public StrestResponse awaitResponse(long timeoutMillis) throws Throwable {
  try {
    if (timeoutMillis <= 0) {
      lock.acquire(1);
    }
 else {
      if (!lock.tryAcquire(timeoutMillis,TimeUnit.MILLISECONDS)) {
        throw new TrendrrTimeoutException("String_Node_Str" + timeoutMillis + "String_Node_Str");
      }
    }
  }
 catch (  InterruptedException e) {
    log.error("String_Node_Str",e);
    throw e;
  }
  if (this.error != null) {
    throw this.error;
  }
  return this.response;
}
Program: 5237
Project: 5237
Buggy source:
/** 
 * parses any of the query params into a DynMap.  returns an empty map if there are no params to parse.
 * @param url
 * @return
 */
public static DynMap instanceFromURL(String url){
  if (!url.contains("String_Node_Str")) {
    return new DynMap();
  }
  String q=url.split("String_Node_Str")[1];
  return instanceFromURLEncoded(q);
}

Fixed version (ground truth):
/** 
 * parses any of the query params into a DynMap.  returns an empty map if there are no params to parse.
 * @param url
 * @return
 */
public static DynMap instanceFromURL(String url){
  String[] tmp=url.split("String_Node_Str");
  if (tmp.length < 2) {
    return new DynMap();
  }
  return instanceFromURLEncoded(tmp[1]);
}
Program: 5238
Project: 5238
Buggy source:
/** 
 * initializes the appender.  This will be called automatically on the first invocation of append.  Subsequent calls to init are simply ignored.
 */
public void init(){
  if (this.init.start()) {
    try {
      String directory=System.getProperty("String_Node_Str");
      if (filename.contains(File.separator)) {
        directory=filename.substring(0,filename.lastIndexOf(File.separator));
        if (!directory.startsWith(File.separator)) {
          directory=System.getProperty("String_Node_Str") + File.separator + directory;
        }
      }
      this.currentTE=this.toTE(getDate());
      for (      File f : FileHelper.listDirectory(new File(directory),false)) {
        String fn=f.getAbsolutePath();
        if (!fn.endsWith(this.fileExtension) || !fn.startsWith(this.filename)) {
          continue;
        }
        String tmp=fn;
        tmp=StringHelper.trim(tmp,this.fileExtension);
        if (!tmp.contains("String_Node_Str")) {
          continue;
        }
        tmp=tmp.replace(this.filename + "String_Node_Str","String_Node_Str");
        long te=TypeCast.cast(Long.class,tmp);
        if (te < this.minTE()) {
          System.out.println("String_Node_Str" + this.currentTE + "String_Node_Str"+ this.minTE());
          System.out.println("String_Node_Str" + fn);
          this.delete(f);
        }
      }
      this.newFile();
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
 finally {
      init.end();
    }
  }
}

Fixed version (ground truth):
/** 
 * initializes the appender.  This will be called automatically on the first invocation of append.  Subsequent calls to init are simply ignored.
 */
public void init(){
  if (this.init.start()) {
    try {
      String directory=System.getProperty("String_Node_Str");
      if (filename.contains(File.separator)) {
        directory=filename.substring(0,filename.lastIndexOf(File.separator));
        if (!directory.startsWith(File.separator)) {
          directory=System.getProperty("String_Node_Str") + File.separator + directory;
        }
      }
      this.currentTE=this.toTE(getDate());
      for (      File f : FileHelper.listDirectory(new File(directory),false)) {
        String fn=f.getAbsolutePath();
        if (!fn.endsWith(this.fileExtension) || !fn.startsWith(this.filename)) {
          continue;
        }
        String tmp=fn;
        tmp=StringHelper.trim(tmp,this.fileExtension);
        if (!tmp.contains("String_Node_Str")) {
          continue;
        }
        tmp=tmp.replace(this.filename + "String_Node_Str","String_Node_Str");
        long te=TypeCast.cast(Long.class,tmp);
        if (te < this.minTE()) {
          this.delete(f);
        }
      }
      this.newFile();
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
 finally {
      init.end();
    }
  }
}
Program: 5239
Project: 5239
Buggy source:
private void newFile() throws Exception {
  String oldFilename=this.currentFilename;
  this.currentTE=this.toTE(getDate());
  this.currentFilename=this.toFilename(this.currentTE);
  this.current=FileHelper.createNewFile(this.currentFilename);
  if (this.writer != null) {
    this.writer.close();
  }
  this.writer=new FileWriter(this.current);
  this.delete(new File(this.toFilename(this.minTE())));
  if (LINUX) {
    try {
      new File(this.filename + this.fileExtension).delete();
    }
 catch (    Exception x) {
      log.error("String_Node_Str",x);
    }
    try {
      Runtime rt=Runtime.getRuntime();
      Process result=null;
      String exe=new String("String_Node_Str" + "String_Node_Str" + this.currentFilename + "String_Node_Str"+ this.filename+ this.fileExtension);
      result=rt.exec(exe);
    }
 catch (    Exception x) {
      log.error("String_Node_Str",x);
    }
  }
  RollingFileCallback cb=this.getCallback();
  if (cb != null) {
    cb.onRollover(oldFilename,this.currentFilename);
  }
}

Fixed version (ground truth):
private void newFile() throws Exception {
  String oldFilename=this.currentFilename;
  this.currentTE=this.toTE(getDate());
  this.currentFilename=this.toFilename(this.currentTE);
  this.current=FileHelper.createNewFile(this.currentFilename);
  if (this.writer != null) {
    this.writer.close();
  }
  this.writer=new FileWriter(this.current,true);
  this.delete(new File(this.toFilename(this.minTE())));
  if (LINUX) {
    try {
      new File(this.filename + this.fileExtension).delete();
    }
 catch (    Exception x) {
      log.error("String_Node_Str",x);
    }
    try {
      Runtime rt=Runtime.getRuntime();
      Process result=null;
      String exe=new String("String_Node_Str" + "String_Node_Str" + this.currentFilename + "String_Node_Str"+ this.filename+ this.fileExtension);
      result=rt.exec(exe);
    }
 catch (    Exception x) {
      log.error("String_Node_Str",x);
    }
  }
  RollingFileCallback cb=this.getCallback();
  if (cb != null) {
    cb.onRollover(oldFilename,this.currentFilename);
  }
}
Program: 5240
Project: 5240
Buggy source:
public static void main(String... str) throws Exception {
  RollingFileAppender appender=new RollingFileAppender(Timeframe.SECONDS,10,10,"String_Node_Str",null,true);
  appender.init();
  Date start=new Date();
  for (int i=0; i < 1000000; i++) {
    appender.append(i + "String_Node_Str");
  }
  System.out.println("String_Node_Str" + (new Date().getTime() - start.getTime()));
}

Fixed version (ground truth):
public static void main(String... str) throws Exception {
  RollingFileAppender appender=new RollingFileAppender(Timeframe.MINUTES,10,10,"String_Node_Str",null,true);
  appender.init();
  Date start=new Date();
  for (int i=0; i < 1000000; i++) {
    appender.append(i + "String_Node_Str");
  }
  System.out.println("String_Node_Str" + (new Date().getTime() - start.getTime()));
}
Program: 5241
Project: 5241
Buggy source:
protected long minTE(){
  System.out.println(this.currentTE);
  return ((long)((this.currentTE - (this.maxFiles * this.timeframeAmount)) / this.timeframeAmount)) * this.timeframeAmount;
}

Fixed version (ground truth):
protected long minTE(){
  return ((long)((this.currentTE - (this.maxFiles * this.timeframeAmount)) / this.timeframeAmount)) * this.timeframeAmount;
}
Program: 5242
Project: 5242
Buggy source:
@Override protected DynMap doCast(Class clss,Object object){
  if (object instanceof Map) {
    return toDynMap((Map)object);
  }
  if (object instanceof String) {
    try {
      Object obj=JSONValue.parseWithException((String)object);
      if (obj instanceof Map) {
        return toDynMap((Map)obj);
      }
    }
 catch (    Exception x) {
      log.info("String_Node_Str" + object + "String_Node_Str"+ x.getMessage()+ "String_Node_Str");
    }
    return null;
  }
  Class cls=object.getClass();
  try {
    Method toMap=cls.getMethod("String_Node_Str");
    log.info("String_Node_Str");
    Map mp=(Map)toMap.invoke(object);
    return toDynMap((Map)mp);
  }
 catch (  NoSuchMethodError x) {
  }
catch (  Exception x) {
    log.info("String_Node_Str" + object + "String_Node_Str"+ x.getMessage()+ "String_Node_Str");
  }
  return null;
}

Fixed version (ground truth):
@Override protected DynMap doCast(Class clss,Object object){
  if (object instanceof Map) {
    return toDynMap((Map)object);
  }
  if (object instanceof String) {
    try {
      Object obj=JSONValue.parseWithException((String)object);
      if (obj instanceof Map) {
        return toDynMap((Map)obj);
      }
    }
 catch (    Exception x) {
      log.info("String_Node_Str" + object + "String_Node_Str"+ x.getMessage()+ "String_Node_Str");
    }
    return null;
  }
  Class cls=object.getClass();
  try {
    Method toMap=cls.getMethod("String_Node_Str");
    Map mp=(Map)toMap.invoke(object);
    return toDynMap((Map)mp);
  }
 catch (  NoSuchMethodError x) {
  }
catch (  Exception x) {
    log.info("String_Node_Str" + object + "String_Node_Str"+ x.getMessage()+ "String_Node_Str");
  }
  return null;
}
Program: 5243
Project: 5243
Buggy source:
/** 
 * initializes the appender.  This will be called automatically on the first invocation of append.  Subsequent calls to init are simply ignored.
 */
public void init(){
  if (this.init.start()) {
    try {
      String directory=filename.substring(0,filename.lastIndexOf(File.separator));
      System.out.println(directory);
      for (      File f : FileHelper.listDirectory(new File(directory),false)) {
        String fn=f.getAbsolutePath();
        if (!fn.endsWith(this.fileExtension) || !fn.startsWith(this.filename)) {
          continue;
        }
        String tmp=fn;
        tmp=StringHelper.trim(tmp,this.fileExtension);
        tmp=tmp.replace(this.filename + "String_Node_Str","String_Node_Str");
        long te=TypeCast.cast(Long.class,tmp);
        if (te < this.minTE()) {
          System.out.println("String_Node_Str" + this.currentTE + "String_Node_Str"+ this.minTE());
          System.out.println("String_Node_Str" + fn);
          this.delete(f);
        }
      }
      this.newFile();
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
 finally {
      init.end();
    }
  }
}

Fixed version (ground truth):
/** 
 * initializes the appender.  This will be called automatically on the first invocation of append.  Subsequent calls to init are simply ignored.
 */
public void init(){
  if (this.init.start()) {
    try {
      String directory=filename.substring(0,filename.lastIndexOf(File.separator));
      this.currentTE=this.toTE(new Date());
      for (      File f : FileHelper.listDirectory(new File(directory),false)) {
        String fn=f.getAbsolutePath();
        if (!fn.endsWith(this.fileExtension) || !fn.startsWith(this.filename)) {
          continue;
        }
        String tmp=fn;
        tmp=StringHelper.trim(tmp,this.fileExtension);
        if (!tmp.contains("String_Node_Str")) {
          continue;
        }
        tmp=tmp.replace(this.filename + "String_Node_Str","String_Node_Str");
        long te=TypeCast.cast(Long.class,tmp);
        if (te < this.minTE()) {
          System.out.println("String_Node_Str" + this.currentTE + "String_Node_Str"+ this.minTE());
          System.out.println("String_Node_Str" + fn);
          this.delete(f);
        }
      }
      this.newFile();
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
 finally {
      init.end();
    }
  }
}
Program: 5244
Project: 5244
Buggy source:
public static void main(String... str) throws Exception {
  RollingFileAppender appender=new RollingFileAppender(Timeframe.SECONDS,10,10,"String_Node_Str");
  appender.init();
  Date start=new Date();
  for (int i=0; i < 1000000; i++) {
    appender.append(i + "String_Node_Str");
    Sleep.seconds(1);
  }
  System.out.println("String_Node_Str" + (new Date().getTime() - start.getTime()));
}

Fixed version (ground truth):
public static void main(String... str) throws Exception {
  RollingFileAppender appender=new RollingFileAppender(Timeframe.SECONDS,10,10,"String_Node_Str",null,true);
  appender.init();
  Date start=new Date();
  for (int i=0; i < 1000000; i++) {
    appender.append(i + "String_Node_Str");
  }
  System.out.println("String_Node_Str" + (new Date().getTime() - start.getTime()));
}
Program: 5245
Project: 5245
Buggy source:
protected long minTE(){
  return ((long)((this.currentTE - (this.maxFiles * this.timeframeAmount)) / this.timeframeAmount)) * this.timeframeAmount;
}

Fixed version (ground truth):
protected long minTE(){
  System.out.println(this.currentTE);
  return ((long)((this.currentTE - (this.maxFiles * this.timeframeAmount)) / this.timeframeAmount)) * this.timeframeAmount;
}