nus-yam/ex-repair huggingface dataset:
Program: 92452
Project: 92452
Buggy source:
/** 
 * Run the VariantDefinition(VariantDeclaration,DefinitionScope,String)
 * @throws CTFReaderException 
 */
@Test public void testVariantDefinition() throws CTFReaderException {
  VariantDeclaration declaration=new VariantDeclaration();
  declaration.setTag("String_Node_Str");
  VariantDeclaration variantDeclaration=new VariantDeclaration();
  variantDeclaration.setTag("String_Node_Str");
  VariantDefinition variantDefinition=new VariantDefinition(variantDeclaration,TestParams.createTrace(),"String_Node_Str");
  IDefinitionScope definitionScope=new StructDefinition(new StructDeclaration(1L),variantDefinition,"String_Node_Str");
  String fieldName="String_Node_Str";
  VariantDefinition result=new VariantDefinition(declaration,definitionScope,fieldName);
  assertNotNull(result);
}

Fixed version (ground truth):
/** 
 * Run the VariantDefinition(VariantDeclaration,DefinitionScope,String)
 * @throws CTFReaderException
 */
@Test public void testVariantDefinition() throws CTFReaderException {
  VariantDeclaration declaration=new VariantDeclaration();
  declaration.setTag("String_Node_Str");
  VariantDeclaration variantDeclaration=new VariantDeclaration();
  variantDeclaration.setTag("String_Node_Str");
  VariantDefinition variantDefinition=new VariantDefinition(variantDeclaration,TestParams.createTrace(),"String_Node_Str");
  IDefinitionScope definitionScope=new StructDefinition(new StructDeclaration(1L),variantDefinition,"String_Node_Str");
  String fieldName="String_Node_Str";
  VariantDefinition result=new VariantDefinition(declaration,definitionScope,fieldName);
  assertNotNull(result);
}
Program: 92453
Project: 92453
Buggy source:
/** 
 * Run the void setTagDefinition(EnumDefinition) method test.
 * @throws CTFReaderException 
 */
@Test public void testSetTagDefinition() throws CTFReaderException {
  VariantDeclaration vDecl;
  VariantDefinition vDef;
  StructDefinition structDef;
  EnumDefinition tagDefinition;
  String fName="String_Node_Str";
  vDecl=new VariantDeclaration();
  vDecl.setTag(fName);
  vDef=new VariantDefinition(vDecl,TestParams.createTrace(),fName);
  structDef=new StructDefinition(new StructDeclaration(1L),vDef,fName);
  tagDefinition=new EnumDefinition(new EnumDeclaration(new IntegerDeclaration(1,true,1,ByteOrder.BIG_ENDIAN,Encoding.ASCII,fName)),structDef,fName);
  fixture.setTagDefinition(tagDefinition);
}

Fixed version (ground truth):
/** 
 * Run the void setTagDefinition(EnumDefinition) method test.
 * @throws CTFReaderException
 */
@Test public void testSetTagDefinition() throws CTFReaderException {
  VariantDeclaration vDecl;
  VariantDefinition vDef;
  StructDefinition structDef;
  EnumDefinition tagDefinition;
  String fName="String_Node_Str";
  vDecl=new VariantDeclaration();
  vDecl.setTag(fName);
  vDef=new VariantDefinition(vDecl,TestParams.createTrace(),fName);
  structDef=new StructDefinition(new StructDeclaration(1L),vDef,fName);
  tagDefinition=new EnumDefinition(new EnumDeclaration(new IntegerDeclaration(1,true,1,ByteOrder.BIG_ENDIAN,Encoding.ASCII,fName,8)),structDef,fName);
  fixture.setTagDefinition(tagDefinition);
}
Program: 92454
Project: 92454
Buggy source:
/** 
 * Perform pre-test initialization. Not sure it needs to be that complicated, oh well...
 * @throws CTFReaderException 
 */
@Before public void setUp() throws CTFReaderException {
  VariantDeclaration vDecl1, vDecl2, vDecl3;
  VariantDefinition vDef1, vDef2;
  StructDefinition sDef1, sDef2;
  EnumDefinition eDef;
  String fName="String_Node_Str";
  vDecl1=new VariantDeclaration();
  vDecl2=new VariantDeclaration();
  vDecl3=new VariantDeclaration();
  vDecl1.setTag(fName);
  vDecl2.setTag(fName);
  vDecl3.setTag(fName);
  vDef1=new VariantDefinition(vDecl2,TestParams.createTrace(),fName);
  vDef2=new VariantDefinition(vDecl3,TestParams.createTrace(),fName);
  sDef1=new StructDefinition(new StructDeclaration(1L),vDef1,fName);
  sDef2=new StructDefinition(new StructDeclaration(1L),vDef2,fName);
  eDef=new EnumDefinition(new EnumDeclaration(new IntegerDeclaration(1,true,1,ByteOrder.BIG_ENDIAN,Encoding.ASCII,fName)),sDef2,fName);
  fixture=new VariantDefinition(vDecl1,sDef1,fName);
  fixture.setTagDefinition(eDef);
  fixture.setCurrentField(fName);
}

Fixed version (ground truth):
/** 
 * Perform pre-test initialization. Not sure it needs to be that complicated, oh well...
 * @throws CTFReaderException
 */
@Before public void setUp() throws CTFReaderException {
  VariantDeclaration vDecl1, vDecl2, vDecl3;
  VariantDefinition vDef1, vDef2;
  StructDefinition sDef1, sDef2;
  EnumDefinition eDef;
  String fName="String_Node_Str";
  vDecl1=new VariantDeclaration();
  vDecl2=new VariantDeclaration();
  vDecl3=new VariantDeclaration();
  vDecl1.setTag(fName);
  vDecl2.setTag(fName);
  vDecl3.setTag(fName);
  vDef1=new VariantDefinition(vDecl2,TestParams.createTrace(),fName);
  vDef2=new VariantDefinition(vDecl3,TestParams.createTrace(),fName);
  sDef1=new StructDefinition(new StructDeclaration(1L),vDef1,fName);
  sDef2=new StructDefinition(new StructDeclaration(1L),vDef2,fName);
  eDef=new EnumDefinition(new EnumDeclaration(new IntegerDeclaration(1,true,1,ByteOrder.BIG_ENDIAN,Encoding.ASCII,fName,8)),sDef2,fName);
  fixture=new VariantDefinition(vDecl1,sDef1,fName);
  fixture.setTagDefinition(eDef);
  fixture.setCurrentField(fName);
}
Program: 92455
Project: 92455
Buggy source:
public static CtfTmfTrace getTestTrace() throws TmfTraceException {
  if (trace == null) {
    trace=new CtfTmfTrace();
    trace.initTrace(null,traceFile,CtfTmfEvent.class);
  }
  return trace;
}

Fixed version (ground truth):
public synchronized static CtfTmfTrace getTestTrace() throws TmfTraceException {
  if (trace == null) {
    trace=new CtfTmfTrace();
    trace.initTrace(null,traceFile,CtfTmfEvent.class);
  }
  return trace;
}
Program: 92456
Project: 92456
Buggy source:
@AfterClass public static void cleanup(){
  stateFile.delete();
  stateFileBenchmark.delete();
}

Fixed version (ground truth):
@AfterClass public static void cleanup(){
  boolean ret1, ret2;
  ret1=stateFile.delete();
  ret2=stateFileBenchmark.delete();
  if (!(ret1 && ret2)) {
    System.err.println("String_Node_Str" + "String_Node_Str");
  }
}
Program: 92457
Project: 92457
Buggy source:
/** 
 * Return the absolute path of this attribute, as a single slash-separated String.
 * @return
 */
String getFullAttributeName(){
  String[] array;
  String ret="String_Node_Str";
  array=this.getFullAttribute();
  for (int i=0; i < array.length - 1; i++) {
    ret+=array[i] + '/';
  }
  ret+=array[array.length - 1];
  return ret;
}

Fixed version (ground truth):
/** 
 * Return the absolute path of this attribute, as a single slash-separated String.
 * @return
 */
String getFullAttributeName(){
  String[] array=this.getFullAttribute();
  StringBuffer buf=new StringBuffer();
  for (int i=0; i < array.length - 1; i++) {
    buf.append(array[i]);
    buf.append('/');
  }
  buf.append(array[array.length - 1]);
  return buf.toString();
}
Program: 92458
Project: 92458
Buggy source:
/** 
 * "Existing file" constructor Builds a attribute tree from a "mapping file" or mapping section previously saved somewhere.
 * @param ss StateSystem to which this AT is attached
 * @param fis File stream where to read the AT information. Make sure it's seeked at the right place!
 * @throws IOException
 */
AttributeTree(StateSystem ss,FileInputStream fis) throws IOException {
  this(ss);
  DataInputStream in=new DataInputStream(new BufferedInputStream(fis));
  final String errorMessage="String_Node_Str";
  ArrayList<String[]> list=new ArrayList<String[]>();
  byte[] curByteArray;
  String curFullString;
  String[] curStringArray;
  int res, remain, size;
  int expectedSize=0;
  int total=0;
  res=in.readInt();
  if (res != ATTRIB_TREE_MAGIC_NUMBER) {
    throw new IOException(errorMessage);
  }
  expectedSize=in.readInt();
  if (expectedSize <= 12) {
    throw new IOException(errorMessage);
  }
  remain=in.readInt();
  total+=12;
  for (; remain > 0; remain--) {
    size=in.readByte();
    curByteArray=new byte[size];
    in.read(curByteArray);
    curFullString=new String(curByteArray);
    curStringArray=curFullString.split("String_Node_Str");
    list.add(curStringArray);
    res=in.readByte();
    if (res != 0) {
      throw new IOException(errorMessage);
    }
    total+=curByteArray.length + 2;
  }
  if (total != expectedSize) {
    throw new IOException(errorMessage);
  }
  for (  String[] attrib : list) {
    this.getQuarkAndAdd(-1,attrib);
  }
}

Fixed version (ground truth):
/** 
 * "Existing file" constructor Builds a attribute tree from a "mapping file" or mapping section previously saved somewhere.
 * @param ss StateSystem to which this AT is attached
 * @param fis File stream where to read the AT information. Make sure it's seeked at the right place!
 * @throws IOException
 */
AttributeTree(StateSystem ss,FileInputStream fis) throws IOException {
  this(ss);
  DataInputStream in=new DataInputStream(new BufferedInputStream(fis));
  final String errorMessage="String_Node_Str";
  ArrayList<String[]> list=new ArrayList<String[]>();
  byte[] curByteArray;
  String curFullString;
  String[] curStringArray;
  int res, remain, size;
  int expectedSize=0;
  int total=0;
  res=in.readInt();
  if (res != ATTRIB_TREE_MAGIC_NUMBER) {
    throw new IOException(errorMessage);
  }
  expectedSize=in.readInt();
  if (expectedSize <= 12) {
    throw new IOException(errorMessage);
  }
  remain=in.readInt();
  total+=12;
  for (; remain > 0; remain--) {
    size=in.readByte();
    curByteArray=new byte[size];
    res=in.read(curByteArray);
    if (res != size) {
      throw new IOException(errorMessage);
    }
    curFullString=new String(curByteArray);
    curStringArray=curFullString.split("String_Node_Str");
    list.add(curStringArray);
    res=in.readByte();
    if (res != 0) {
      throw new IOException(errorMessage);
    }
    total+=curByteArray.length + 2;
  }
  if (total != expectedSize) {
    throw new IOException(errorMessage);
  }
  for (  String[] attrib : list) {
    this.getQuarkAndAdd(-1,attrib);
  }
}
Program: 92459
Project: 92459
Buggy source:
/** 
 * Print out the contents of the inner structures to the selected PrintWriter.
 */
@Override public void debugPrint(PrintWriter writer){
  writer.println("String_Node_Str");
  writer.println("String_Node_Str");
  for (int i=0; i < currentStateInfo.size(); i++) {
    writer.print(i + "String_Node_Str");
    if (currentStateInfo.get(i) == null) {
      writer.println("String_Node_Str");
    }
 else {
      writer.println(currentStateInfo.get(i).toString());
    }
  }
  writer.println('\n');
  super.debugPrint(writer);
  backend.debugPrint(writer);
}

Fixed version (ground truth):
/** 
 * Print out the contents of the inner structures to the selected PrintWriter.
 */
@Override public synchronized void debugPrint(PrintWriter writer){
  writer.println("String_Node_Str");
  writer.println("String_Node_Str");
  for (int i=0; i < currentStateInfo.size(); i++) {
    writer.print(i + "String_Node_Str");
    if (currentStateInfo.get(i) == null) {
      writer.println("String_Node_Str");
    }
 else {
      writer.println(currentStateInfo.get(i).toString());
    }
  }
  writer.println('\n');
  super.debugPrint(writer);
  backend.debugPrint(writer);
}
Program: 92460
Project: 92460
Buggy source:
/** 
 * Standard constructor
 * @param tree
 * @param newFile Are we creating a new file from scratch?
 * @throws IOException
 */
HT_IO(HistoryTree tree,boolean newFile) throws IOException {
  this.tree=tree;
  File historyTreeFile=tree.config.stateFile;
  if (newFile) {
    if (historyTreeFile.exists()) {
      historyTreeFile.delete();
    }
    historyTreeFile.createNewFile();
    fis=new FileInputStream(historyTreeFile);
    fos=new FileOutputStream(historyTreeFile,false);
  }
 else {
    this.fis=new FileInputStream(historyTreeFile);
    this.fos=new FileOutputStream(historyTreeFile,true);
  }
  this.fcIn=fis.getChannel();
  this.fcOut=fos.getChannel();
}

Fixed version (ground truth):
/** 
 * Standard constructor
 * @param tree
 * @param newFile Are we creating a new file from scratch?
 * @throws IOException
 */
HT_IO(HistoryTree tree,boolean newFile) throws IOException {
  this.tree=tree;
  File historyTreeFile=tree.config.stateFile;
  boolean success1=true, success2;
  if (newFile) {
    if (historyTreeFile.exists()) {
      success1=historyTreeFile.delete();
    }
    success2=historyTreeFile.createNewFile();
    if (!(success1 && success2)) {
      throw new IOException("String_Node_Str" + historyTreeFile.getName());
    }
    fis=new FileInputStream(historyTreeFile);
    fos=new FileOutputStream(historyTreeFile,false);
  }
 else {
    this.fis=new FileInputStream(historyTreeFile);
    this.fos=new FileOutputStream(historyTreeFile,true);
  }
  this.fcIn=fis.getChannel();
  this.fcOut=fos.getChannel();
}
Program: 92461
Project: 92461
Buggy source:
/** 
 * "Reader" constructor : instantiate a SHTree from an existing tree file on disk
 * @param existingFileName Path/filename of the history-file we are to open
 * @throws IOException
 */
HistoryTree(File existingStateFile) throws IOException {
  int rootNodeSeqNb, res;
  int bs, maxc;
  long ts;
  if ((!existingStateFile.exists()) || existingStateFile.length() <= 0) {
    throw new IOException("String_Node_Str");
  }
  FileInputStream fis=new FileInputStream(existingStateFile);
  ByteBuffer buffer=ByteBuffer.allocate(getTreeHeaderSize());
  FileChannel fc=fis.getChannel();
  buffer.order(ByteOrder.LITTLE_ENDIAN);
  buffer.clear();
  fc.read(buffer);
  buffer.flip();
  res=buffer.getInt();
  if (res != HISTORY_FILE_MAGIC_NUMBER) {
    throw new IOException("String_Node_Str");
  }
  res=buffer.getInt();
  if (res != MAJOR_VERSION) {
    throw new IOException("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  }
  res=buffer.getInt();
  bs=buffer.getInt();
  maxc=buffer.getInt();
  this.nodeCount=buffer.getInt();
  rootNodeSeqNb=buffer.getInt();
  fc.position(getTreeHeaderSize() + (long)rootNodeSeqNb * bs);
  buffer=ByteBuffer.allocate(8);
  buffer.order(ByteOrder.LITTLE_ENDIAN);
  buffer.clear();
  res=fc.read(buffer);
  assert(res == 8);
  buffer.flip();
  ts=buffer.getLong();
  this.config=new HTConfig(existingStateFile,bs,maxc,ts);
  fis.close();
  this.treeIO=new HT_IO(this,false);
  rebuildLatestBranch(rootNodeSeqNb);
  ts=latestBranch.firstElement().getNodeStart();
  this.treeEnd=latestBranch.firstElement().getNodeEnd();
}

Fixed version (ground truth):
/** 
 * "Reader" constructor : instantiate a SHTree from an existing tree file on disk
 * @param existingFileName Path/filename of the history-file we are to open
 * @throws IOException
 */
HistoryTree(File existingStateFile) throws IOException {
  int rootNodeSeqNb, res;
  int bs, maxc;
  long ts;
  if ((!existingStateFile.exists()) || existingStateFile.length() <= 0) {
    throw new IOException("String_Node_Str");
  }
  FileInputStream fis=new FileInputStream(existingStateFile);
  ByteBuffer buffer=ByteBuffer.allocate(getTreeHeaderSize());
  FileChannel fc=fis.getChannel();
  buffer.order(ByteOrder.LITTLE_ENDIAN);
  buffer.clear();
  fc.read(buffer);
  buffer.flip();
  res=buffer.getInt();
  if (res != HISTORY_FILE_MAGIC_NUMBER) {
    throw new IOException("String_Node_Str");
  }
  res=buffer.getInt();
  if (res != MAJOR_VERSION) {
    throw new IOException("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  }
  res=buffer.getInt();
  bs=buffer.getInt();
  maxc=buffer.getInt();
  this.nodeCount=buffer.getInt();
  rootNodeSeqNb=buffer.getInt();
  fc.position(getTreeHeaderSize() + (long)rootNodeSeqNb * bs);
  buffer=ByteBuffer.allocate(8);
  buffer.order(ByteOrder.LITTLE_ENDIAN);
  buffer.clear();
  res=fc.read(buffer);
  assert(res == 8);
  buffer.flip();
  ts=buffer.getLong();
  this.config=new HTConfig(existingStateFile,bs,maxc,ts);
  fis.close();
  this.treeIO=new HT_IO(this,false);
  rebuildLatestBranch(rootNodeSeqNb);
  this.treeEnd=latestBranch.firstElement().getNodeEnd();
}
Program: 92463
Project: 92463
Buggy source:
public TmfAsyncSequenceDiagramEvent(TmfEvent startEvent,TmfEvent endEvent,String sender,String receiver,String name){
  super(startEvent,sender,receiver,name);
  if (endEvent == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  fEndTime=endEvent.getTimestamp().clone();
}

Fixed version (ground truth):
public TmfAsyncSequenceDiagramEvent(ITmfEvent startEvent,ITmfEvent endEvent,String sender,String receiver,String name){
  super(startEvent,sender,receiver,name);
  if (endEvent == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  fEndTime=endEvent.getTimestamp().clone();
}
Program: 92464
Project: 92464
Buggy source:
public TmfSyncSequenceDiagramEvent(TmfEvent startEvent,String sender,String receiver,String name){
  if (startEvent == null || sender == null || receiver == null || name == null) {
    throw new IllegalArgumentException("String_Node_Str" + (startEvent == null ? "String_Node_Str" : "String_Node_Str") + (sender == null ? "String_Node_Str" : "String_Node_Str")+ (receiver == null ? "String_Node_Str" : "String_Node_Str")+ (name == null ? "String_Node_Str" : "String_Node_Str"));
  }
  fStartTime=startEvent.getTimestamp().clone();
  fSender=sender;
  fReceiver=receiver;
  fName=name;
}

Fixed version (ground truth):
public TmfSyncSequenceDiagramEvent(ITmfEvent startEvent,String sender,String receiver,String name){
  if (startEvent == null || sender == null || receiver == null || name == null) {
    throw new IllegalArgumentException("String_Node_Str" + (startEvent == null ? "String_Node_Str" : "String_Node_Str") + (sender == null ? "String_Node_Str" : "String_Node_Str")+ (receiver == null ? "String_Node_Str" : "String_Node_Str")+ (name == null ? "String_Node_Str" : "String_Node_Str"));
  }
  fStartTime=startEvent.getTimestamp().clone();
  fSender=sender;
  fReceiver=receiver;
  fName=name;
}
Program: 92468
Project: 92468
Buggy source:
@SuppressWarnings("String_Node_Str") @TmfSignalHandler public void traceParserUpdated(TmfTraceParserUpdatedSignal signal){
  if (signal.getTraceResource().equals(fFile)) {
    broadcast(new TmfTraceClosedSignal(this,fTrace));
    try {
      String name=fTrace.getName();
      fTrace=null;
      String traceTypeId=fFile.getPersistentProperty(TmfTraceElement.TRACETYPE);
      if (traceTypeId != null) {
        for (        IConfigurationElement ce : TmfTraceType.getTypeElements()) {
          if (traceTypeId.equals(ce.getAttribute(TmfTraceType.ID_ATTR))) {
            fTrace=(ITmfTrace<?>)ce.createExecutableExtension(TmfTraceType.TRACE_TYPE_ATTR);
            TmfEvent event=(TmfEvent)ce.createExecutableExtension(TmfTraceType.EVENT_TYPE_ATTR);
            String path=fFile.getLocationURI().getPath();
            fTrace.initTrace(name,path,event.getClass());
            fTrace.indexTrace(false);
            break;
          }
        }
      }
    }
 catch (    InvalidRegistryObjectException e) {
      e.printStackTrace();
    }
catch (    FileNotFoundException e) {
      e.printStackTrace();
    }
catch (    CoreException e) {
      e.printStackTrace();
    }
    fEventsTable.dispose();
    if (fTrace != null) {
      fEventsTable=createEventsTable(fParent,fTrace.getIndexPageSize());
      fEventsTable.setTrace(fTrace,true);
      broadcast(new TmfTraceOpenedSignal(this,fTrace,fFile,fEventsTable));
    }
 else {
      fEventsTable=new TmfEventsTable(fParent,0);
    }
    fParent.layout();
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @TmfSignalHandler public void traceParserUpdated(TmfTraceParserUpdatedSignal signal){
  if (signal.getTraceResource().equals(fFile)) {
    broadcast(new TmfTraceClosedSignal(this,fTrace));
    try {
      String name=fTrace.getName();
      fTrace=null;
      String traceTypeId=fFile.getPersistentProperty(TmfTraceElement.TRACETYPE);
      if (traceTypeId != null) {
        for (        IConfigurationElement ce : TmfTraceType.getTypeElements()) {
          if (traceTypeId.equals(ce.getAttribute(TmfTraceType.ID_ATTR))) {
            fTrace=(ITmfTrace<?>)ce.createExecutableExtension(TmfTraceType.TRACE_TYPE_ATTR);
            ITmfEvent event=(TmfEvent)ce.createExecutableExtension(TmfTraceType.EVENT_TYPE_ATTR);
            String path=fFile.getLocationURI().getPath();
            fTrace.initTrace(name,path,event.getClass());
            fTrace.indexTrace(false);
            break;
          }
        }
      }
    }
 catch (    InvalidRegistryObjectException e) {
      e.printStackTrace();
    }
catch (    FileNotFoundException e) {
      e.printStackTrace();
    }
catch (    CoreException e) {
      e.printStackTrace();
    }
    fEventsTable.dispose();
    if (fTrace != null) {
      fEventsTable=createEventsTable(fParent,fTrace.getIndexPageSize());
      fEventsTable.setTrace(fTrace,true);
      broadcast(new TmfTraceOpenedSignal(this,fTrace,fFile,fEventsTable));
    }
 else {
      fEventsTable=new TmfEventsTable(fParent,0);
    }
    fParent.layout();
  }
}
Program: 92470
Project: 92470
Buggy source:
@Override public void handleData(TmfEvent event){
  super.handleData(event);
}

Fixed version (ground truth):
@Override public void handleData(ITmfEvent event){
  super.handleData(event);
}
Program: 92471
Project: 92471
Buggy source:
@SuppressWarnings("String_Node_Str") @TmfSignalHandler public void experimentSelected(TmfExperimentSelectedSignal<TmfEvent> signal){
  TmfExperiment<TmfEvent> exp=(TmfExperiment<TmfEvent>)signal.getExperiment();
  if (!exp.equals(fExperiment)) {
    fExperiment=exp;
    setPartName(fTitlePrefix + "String_Node_Str" + fExperiment.getName());
    if (fEventsTable != null) {
      fEventsTable.dispose();
    }
    fEventsTable=createEventsTable(fParent);
    fEventsTable.setTrace(fExperiment,false);
    fEventsTable.refreshBookmarks(fExperiment.getBookmarksFile());
    fParent.layout();
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @TmfSignalHandler public void experimentSelected(TmfExperimentSelectedSignal<ITmfEvent> signal){
  TmfExperiment<ITmfEvent> exp=(TmfExperiment<ITmfEvent>)signal.getExperiment();
  if (!exp.equals(fExperiment)) {
    fExperiment=exp;
    setPartName(fTitlePrefix + "String_Node_Str" + fExperiment.getName());
    if (fEventsTable != null) {
      fEventsTable.dispose();
    }
    fEventsTable=createEventsTable(fParent);
    fEventsTable.setTrace(fExperiment,false);
    fEventsTable.refreshBookmarks(fExperiment.getBookmarksFile());
    fParent.layout();
  }
}
Program: 92472
Project: 92472
Buggy source:
@SuppressWarnings("String_Node_Str") @TmfSignalHandler public void experimentDisposed(TmfExperimentDisposedSignal<TmfEvent> signal){
  TmfExperiment<TmfEvent> experiment=(TmfExperiment<TmfEvent>)signal.getExperiment();
  if (experiment.equals(fExperiment)) {
    fEventsTable.setTrace(null,false);
    TmfUiPlugin.getDefault().getWorkbench().getWorkbenchWindows()[0].getShell().getDisplay().syncExec(new Runnable(){
      @Override public void run(){
        setPartName(fTitlePrefix);
      }
    }
);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @TmfSignalHandler public void experimentDisposed(TmfExperimentDisposedSignal<ITmfEvent> signal){
  TmfExperiment<ITmfEvent> experiment=(TmfExperiment<ITmfEvent>)signal.getExperiment();
  if (experiment.equals(fExperiment)) {
    fEventsTable.setTrace(null,false);
    TmfUiPlugin.getDefault().getWorkbench().getWorkbenchWindows()[0].getShell().getDisplay().syncExec(new Runnable(){
      @Override public void run(){
        setPartName(fTitlePrefix);
      }
    }
);
  }
}
Program: 92473
Project: 92473
Buggy source:
@Override @SuppressWarnings("String_Node_Str") public void createPartControl(Composite parent){
  fParent=parent;
  fTitlePrefix=getTitle();
  TmfExperiment<TmfEvent> experiment=(TmfExperiment<TmfEvent>)TmfExperiment.getCurrentExperiment();
  if (experiment != null) {
    experimentSelected(new TmfExperimentSelectedSignal<TmfEvent>(this,experiment));
  }
 else {
    fEventsTable=createEventsTable(parent);
  }
}

Fixed version (ground truth):
@Override @SuppressWarnings("String_Node_Str") public void createPartControl(Composite parent){
  fParent=parent;
  fTitlePrefix=getTitle();
  TmfExperiment<ITmfEvent> experiment=(TmfExperiment<ITmfEvent>)TmfExperiment.getCurrentExperiment();
  if (experiment != null) {
    experimentSelected(new TmfExperimentSelectedSignal<ITmfEvent>(this,experiment));
  }
 else {
    fEventsTable=createEventsTable(parent);
  }
}
Program: 92474
Project: 92474
Buggy source:
@Override public void run(){
  tsfviewer.setTimeBounds(range.getStartTime().getValue(),range.getEndTime().getValue());
}

Fixed version (ground truth):
@Override public void run(){
  if ((tsfviewer != null) && (!tsfviewer.getControl().isDisposed())) {
    tsfviewer.setTimeBounds(range.getStartTime().getValue(),range.getEndTime().getValue());
  }
}
Program: 92475
Project: 92475
Buggy source:
@TmfSignalHandler public void experimentUpdated(TmfExperimentUpdatedSignal signal){
  if (signal.getExperiment().equals(TmfExperiment.getCurrentExperiment())) {
    final TmfTimeRange range=signal.getExperiment().getTimeRange();
    if (range != TmfTimeRange.NULL_RANGE) {
      Display.getDefault().asyncExec(new Runnable(){
        @Override public void run(){
          tsfviewer.setTimeBounds(range.getStartTime().getValue(),range.getEndTime().getValue());
        }
      }
);
    }
  }
}

Fixed version (ground truth):
@TmfSignalHandler public void experimentUpdated(TmfExperimentUpdatedSignal signal){
  if (signal.getExperiment().equals(TmfExperiment.getCurrentExperiment())) {
    final TmfTimeRange range=signal.getExperiment().getTimeRange();
    if (range != TmfTimeRange.NULL_RANGE) {
      Display.getDefault().asyncExec(new Runnable(){
        @Override public void run(){
          if ((tsfviewer != null) && (!tsfviewer.getControl().isDisposed())) {
            tsfviewer.setTimeBounds(range.getStartTime().getValue(),range.getEndTime().getValue());
          }
        }
      }
);
    }
  }
}
Program: 92476
Project: 92476
Buggy source:
@Override public void run(){
  tsfviewer.setTimeBounds(range.getStartTime().getValue(),range.getEndTime().getValue());
}

Fixed version (ground truth):
@Override public void run(){
  if ((tsfviewer != null) && (!tsfviewer.getControl().isDisposed())) {
    tsfviewer.setTimeBounds(range.getStartTime().getValue(),range.getEndTime().getValue());
  }
}
Program: 92477
Project: 92477
Buggy source:
@TmfSignalHandler public void experimentUpdated(TmfExperimentUpdatedSignal signal){
  if (signal.getExperiment().equals(TmfExperiment.getCurrentExperiment())) {
    final TmfTimeRange range=signal.getExperiment().getTimeRange();
    if (range != TmfTimeRange.NULL_RANGE) {
      Display.getDefault().asyncExec(new Runnable(){
        @Override public void run(){
          tsfviewer.setTimeBounds(range.getStartTime().getValue(),range.getEndTime().getValue());
        }
      }
);
    }
  }
}

Fixed version (ground truth):
@TmfSignalHandler public void experimentUpdated(TmfExperimentUpdatedSignal signal){
  if (signal.getExperiment().equals(TmfExperiment.getCurrentExperiment())) {
    final TmfTimeRange range=signal.getExperiment().getTimeRange();
    if (range != TmfTimeRange.NULL_RANGE) {
      Display.getDefault().asyncExec(new Runnable(){
        @Override public void run(){
          if ((tsfviewer != null) && (!tsfviewer.getControl().isDisposed())) {
            tsfviewer.setTimeBounds(range.getStartTime().getValue(),range.getEndTime().getValue());
          }
        }
      }
);
    }
  }
}
Program: 92478
Project: 92478
Buggy source:
@Override public void setTimeBounds(long beginTime,long endTime){
  _beginTime=beginTime;
  _endTime=endTime;
  _time0_=beginTime;
  _time1_=endTime;
  _stateCtrl.adjustScrolls();
  _stateCtrl.redraw();
  _timeScaleCtrl.redraw();
}

Fixed version (ground truth):
@Override public void setTimeBounds(long beginTime,long endTime){
  _beginTime=beginTime;
  _endTime=endTime;
  _time0_=beginTime;
  _time1_=endTime;
  _stateCtrl.adjustScrolls();
}
Program: 92479
Project: 92479
Buggy source:
/** 
 * Run the void goToLastEvent() method test.
 * @throws CTFReaderException
 */
@Test public void testGoToLastEvent() throws CTFReaderException {
  fixture.goToLastEvent();
  long ts1=getTimestamp();
  long ts2=fixture.getEndTime();
  assertTrue(ts1 == ts2);
}

Fixed version (ground truth):
/** 
 * Run the void goToLastEvent() method test.
 * @throws CTFReaderException
 */
@Test public void testGoToLastEvent() throws CTFReaderException {
  fixture.goToLastEvent();
  long ts1=getTimestamp();
  long ts2=fixture.getEndTime();
  assertTrue(ts1 <= ts2);
}
Program: 92480
Project: 92480
Buggy source:
/** 
 * Run the CTFClock getClock() method test.
 */
@Test public void testGetClock_1(){
  CTFClock result=fixture.getClock();
  assertNull(result);
}

Fixed version (ground truth):
/** 
 * Run the CTFClock getClock() method test.
 */
@Test public void testGetClock_1(){
  CTFClock result=fixture.getClock();
  assertNotNull(result);
}
Program: 92481
Project: 92481
Buggy source:
/** 
 * Run the void addStream(Stream) method test.
 * @throws ParseException
 * @throws CTFReaderException 
 */
@Test public void testAddStream() throws ParseException, CTFReaderException {
  Stream stream=new Stream(TestParams.createTrace());
  stream.setId(1L);
  fixture.addStream(stream);
}

Fixed version (ground truth):
/** 
 * Run the void addStream(Stream) method test.
 * @throws ParseException
 * @throws CTFReaderException
 */
@Test public void testAddStream() throws ParseException, CTFReaderException {
  Stream stream=new Stream(TestParams.createTrace());
  stream.setId(1L);
  fixture.addStream(stream);
}
Program: 92482
Project: 92482
Buggy source:
/** 
 * Run the boolean isString() method test.
 */
@Test public void testIsString_ownDefs(){
  StringDefinition[] defs=createDefs();
  fixture.setDefinitions(defs);
  boolean result=fixture.isString();
  assertFalse(result);
}

Fixed version (ground truth):
/** 
 * Run the boolean isString() method test.
 */
@Test public void testIsString_ownDefs(){
  boolean result=stringArrayFixture.isString();
  assertFalse(result);
}
Program: 92483
Project: 92483
Buggy source:
/** 
 * Run the boolean isString() method test.
 */
@Test public void testIsString_emptyDef(){
  fixture.setDefinitions(new Definition[]{});
  boolean result=fixture.isString();
  assertFalse(result);
}

Fixed version (ground truth):
/** 
 * Run the boolean isString() method test.
 */
@Test public void testIsString_emptyDef(){
  charArrayFixture.setDefinitions(new Definition[]{});
  boolean result=charArrayFixture.isString();
  assertTrue(result);
}
Program: 92484
Project: 92484
Buggy source:
/** 
 * Run the Definition getElem(int) method test.
 */
@Test public void testGetElem_withDefs(){
  Definition defs[]=createDefs();
  fixture.setDefinitions(defs);
  int j=1;
  Definition result=fixture.getElem(j);
  assertNotNull(result);
}

Fixed version (ground truth):
/** 
 * Run the Definition getElem(int) method test.
 */
@Test public void testGetElem_withDefs(){
  Definition defs[]=createDefs();
  charArrayFixture.setDefinitions(defs);
  int j=1;
  Definition result=charArrayFixture.getElem(j);
  assertNotNull(result);
}
Program: 92485
Project: 92485
Buggy source:
/** 
 * Run the void read(BitBuffer) method test.
 */
@Test public void testRead_noDefs(){
  BitBuffer input=new BitBuffer(ByteBuffer.allocateDirect(128));
  fixture.read(input);
}

Fixed version (ground truth):
/** 
 * Run the void read(BitBuffer) method test.
 */
@Test public void testRead_noDefs(){
  BitBuffer input=new BitBuffer(ByteBuffer.allocateDirect(128));
  charArrayFixture.read(input);
}
Program: 92486
Project: 92486
Buggy source:
/** 
 * Run the ArrayDefinition(ArrayDeclaration,DefinitionScope,String) constructor test.
 */
@Test public void testArrayDefinition_baseDeclaration(){
  ArrayDeclaration declaration=fixture.getDeclaration();
  String fieldName="String_Node_Str";
  ArrayDefinition result=new ArrayDefinition(declaration,this.trace,fieldName);
  assertNotNull(result);
}

Fixed version (ground truth):
/** 
 * Run the ArrayDefinition(ArrayDeclaration,DefinitionScope,String) constructor test.
 */
@Test public void testArrayDefinition_baseDeclaration(){
  ArrayDeclaration declaration=charArrayFixture.getDeclaration();
  String fieldName="String_Node_Str";
  ArrayDefinition result=new ArrayDefinition(declaration,this.trace,fieldName);
  assertNotNull(result);
}
Program: 92487
Project: 92487
Buggy source:
/** 
 * Run the boolean isString() method test.
 */
@Test public void testIsString_complex(){
  final IntegerDeclaration id=new IntegerDeclaration(8,false,16,ByteOrder.LITTLE_ENDIAN,Encoding.UTF8,null);
  ArrayDeclaration ad=new ArrayDeclaration(0,id);
  ArrayDefinition ownFixture=new ArrayDefinition(ad,this.trace,"String_Node_Str");
  int size=4;
  IntegerDefinition[] defs=new IntegerDefinition[size];
  for (int i=0; i < size; i++) {
    String content="String_Node_Str" + i;
    defs[i]=new IntegerDefinition(new IntegerDeclaration(8,false,16,ByteOrder.LITTLE_ENDIAN,Encoding.UTF8,content),null,content);
    defs[i].setValue(i);
  }
  ownFixture.setDefinitions(defs);
  boolean result=ownFixture.isString();
  assertTrue(result);
}

Fixed version (ground truth):
/** 
 * Run the boolean isString() method test.
 */
@Test public void testIsString_complex(){
  final IntegerDeclaration id=new IntegerDeclaration(8,false,16,ByteOrder.LITTLE_ENDIAN,Encoding.UTF8,null);
  ArrayDeclaration ad=new ArrayDeclaration(0,id);
  ArrayDefinition ownFixture=new ArrayDefinition(ad,this.trace,"String_Node_Str");
  int size=4;
  int bits=8;
  IntegerDefinition[] defs=createIntDefs(size,bits);
  ownFixture.setDefinitions(defs);
  boolean result=ownFixture.isString();
  assertTrue(result);
}
Program: 92488
Project: 92488
Buggy source:
/** 
 * Run the String toString() method test.
 */
@Test public void testToString_withDefs(){
  int size=2;
  StringDefinition[] defs=new StringDefinition[size];
  for (int i=0; i < size; i++) {
    defs[i]=new StringDefinition(null,null,("String_Node_Str" + i));
  }
  fixture.setDefinitions(defs);
  String result=fixture.toString();
  assertNotNull(result);
}

Fixed version (ground truth):
/** 
 * Run the String toString() method test.
 */
@Test public void testToString_withDefs(){
  String result=charArrayFixture.toString();
  assertNotNull(result);
}
Program: 92489
Project: 92489
Buggy source:
/** 
 * Run the void read(BitBuffer) method test.
 */
@Test public void testRead_withDefs(){
  fixture.setDefinitions(new Definition[]{});
  BitBuffer input=new BitBuffer(java.nio.ByteBuffer.allocateDirect(128));
  fixture.read(input);
}

Fixed version (ground truth):
/** 
 * Run the void read(BitBuffer) method test.
 */
@Test public void testRead_withDefs(){
  charArrayFixture.setDefinitions(new Definition[]{});
  BitBuffer input=new BitBuffer(java.nio.ByteBuffer.allocateDirect(128));
  charArrayFixture.read(input);
}
Program: 92490
Project: 92490
Buggy source:
/** 
 * Run the ArrayDeclaration getDeclaration() method test.
 */
@Test public void testGetDeclaration(){
  fixture.setDefinitions(new Definition[]{});
  ArrayDeclaration result=fixture.getDeclaration();
  assertNotNull(result);
}

Fixed version (ground truth):
/** 
 * Run the ArrayDeclaration getDeclaration() method test.
 */
@Test public void testGetDeclaration(){
  charArrayFixture.setDefinitions(new Definition[]{});
  ArrayDeclaration result=charArrayFixture.getDeclaration();
  assertNotNull(result);
}
Program: 92491
Project: 92491
Buggy source:
/** 
 * Perform pre-test initialization. structDef shouldn't be null after parsing the CTFTraceReader object, so we can ignore the warning.
 * @throws CTFReaderException 
 */
@Before public void setUp() throws CTFReaderException {
  this.trace=TestParams.createTrace();
  CTFTraceReader tr=new CTFTraceReader(this.trace);
  String name="String_Node_Str";
  StructDefinition structDef=null;
  boolean foundArray=false;
  while (tr.hasMoreEvents() && !foundArray) {
    tr.advance();
    EventDefinition ed=tr.getCurrentEventDef();
    for (    String key : ed.fields.getDefinitions().keySet()) {
      structDef=ed.fields;
      Definition d=structDef.lookupDefinition(key);
      if (d instanceof ArrayDefinition) {
        foundArray=true;
        name=key;
        break;
      }
    }
  }
  fixture=structDef.lookupArray(name);
}

Fixed version (ground truth):
/** 
 * Perform pre-test initialization. structDef shouldn't be null after parsing the CTFTraceReader object, so we can ignore the warning.
 * @throws CTFReaderException
 */
@Before public void setUp() throws CTFReaderException {
  this.trace=TestParams.createTrace();
  charArrayFixture=createCharArray();
  stringArrayFixture=createStringArray();
  longArrayFixture=createLongArray();
}
Program: 92492
Project: 92492
Buggy source:
/** 
 * Run the Definition getElem(int) method test.
 */
@Test public void testGetElem_noDefs(){
  int i=0;
  Definition result=fixture.getElem(i);
  assertNotNull(result);
}

Fixed version (ground truth):
/** 
 * Run the Definition getElem(int) method test.
 */
@Test public void testGetElem_noDefs(){
  int i=0;
  Definition result=charArrayFixture.getElem(i);
  assertNotNull(result);
}
Program: 92493
Project: 92493
Buggy source:
@Before public void setUp(){
  fixture=new SequenceDeclaration("String_Node_Str",new StringDeclaration());
}

Fixed version (ground truth):
@Before public void setUp(){
  fixture=new SequenceDeclaration(fieldName,new StringDeclaration());
}
Program: 92494
Project: 92494
Buggy source:
/** 
 * Run the SequenceDefinition createDefinition(DefinitionScope,String) method test.
 */
@Test public void testCreateDefinition(){
  IntegerDeclaration id=new IntegerDeclaration(8,false,8,ByteOrder.LITTLE_ENDIAN,Encoding.UTF8,null);
  String fieldName="String_Node_Str";
  StructDeclaration structDec=new StructDeclaration(0);
  structDec.addField(fieldName,id);
  StructDefinition structDef=new StructDefinition(structDec,null,"String_Node_Str");
  long seqLen=10;
  structDef.lookupInteger(fieldName).setValue(seqLen);
  SequenceDefinition result=this.fixture.createDefinition(structDef,fieldName);
  assertNotNull(result);
}

Fixed version (ground truth):
/** 
 * Run the SequenceDefinition createDefinition(DefinitionScope,String) method test.
 */
@Test public void testCreateDefinition(){
  IntegerDeclaration id=new IntegerDeclaration(8,false,8,ByteOrder.LITTLE_ENDIAN,Encoding.UTF8,null);
  StructDeclaration structDec=new StructDeclaration(0);
  structDec.addField(fieldName,id);
  StructDefinition structDef=new StructDefinition(structDec,null,"String_Node_Str");
  long seqLen=10;
  structDef.lookupInteger(fieldName).setValue(seqLen);
  SequenceDefinition result=this.fixture.createDefinition(structDef,fieldName);
  assertNotNull(result);
}
Program: 92495
Project: 92495
Buggy source:
/** 
 * Constructs a TraceReader to read a trace.
 * @param trace The trace to read from.
 * @throws CTFReaderException
 */
public CTFTraceReader(CTFTrace trace){
  this.trace=trace;
  createStreamInputReaders();
  populateStreamInputReaderHeap();
  this.startTime=prio.peek().getCurrentEvent().timestamp;
  this.endTime=this.startTime;
  this.index=0;
}

Fixed version (ground truth):
/** 
 * Constructs a TraceReader to read a trace.
 * @param trace The trace to read from.
 * @throws CTFReaderException
 */
public CTFTraceReader(CTFTrace trace){
  this.trace=trace;
  createStreamInputReaders();
  populateStreamInputReaderHeap();
  this.startTime=prio.peek().getCurrentEvent().timestamp;
  this.endTime=this.startTime;
  this.index=0;
  startIndex=new long[prio.size()];
  for (int i=0; i < prio.size(); i++) {
    startIndex[i]=0;
  }
}
Program: 92496
Project: 92496
Buggy source:
/** 
 * Seeks to a given timestamp It will go to the event just after the timestamp or the timestamp itself. if a if a trace is 10 20 30 40 and you're looking for 19, it'll give you 20, it you want 20, you'll get 20, if you want 21, you'll get 30. You want -inf, you'll get the first element, you want +inf, you'll get the end of the file with no events.
 * @param timestamp the timestamp to seek to
 * @return true if the trace has more events following the timestamp
 */
public boolean seek(long timestamp){
  this.prio.clear();
  index=0;
  for (  StreamInputReader streamInputReader : this.streamInputReaders) {
    long offset=streamInputReader.seek(timestamp);
    if (streamInputReader.getCurrentEvent() != null) {
      this.prio.add(streamInputReader);
      index=Math.max(index,streamInputReader.getPacketReader().getCurrentPacket().indexBegin + offset);
    }
  }
  return hasMoreEvents();
}

Fixed version (ground truth):
/** 
 * Seeks to a given timestamp It will go to the event just after the timestamp or the timestamp itself. if a if a trace is 10 20 30 40 and you're looking for 19, it'll give you 20, it you want 20, you'll get 20, if you want 21, you'll get 30. You want -inf, you'll get the first element, you want +inf, you'll get the end of the file with no events.
 * @param timestamp the timestamp to seek to
 * @return true if the trace has more events following the timestamp
 */
public boolean seek(long timestamp){
  this.prio.clear();
  index=0;
  long offset=0;
  for (  StreamInputReader streamInputReader : this.streamInputReaders) {
    offset+=streamInputReader.seek(timestamp);
  }
  for (  StreamInputReader streamInputReader : this.streamInputReaders) {
    if (streamInputReader.getCurrentEvent() != null) {
      this.prio.add(streamInputReader);
      index=Math.max(index,streamInputReader.getPacketReader().getCurrentPacket().indexBegin + offset);
    }
  }
  return hasMoreEvents();
}
Program: 92497
Project: 92497
Buggy source:
/** 
 * Go to the next event.
 * @return True if an event was read.
 */
public boolean advance(){
  StreamInputReader top=this.prio.poll();
  if (top == null) {
    return false;
  }
  if (top.readNextEvent()) {
    this.prio.add(top);
    final long topEnd=top.getCurrentEvent().timestamp;
    this.endTime=Math.max(topEnd,this.endTime);
    this.eventCountPerTraceFile[top.getName()]++;
  }
  if (hasMoreEvents()) {
    index++;
    StreamInputPacketReader packetReader=top.getPacketReader();
    if (packetReader.hasMoreEvents() == false) {
      StreamInputPacketIndexEntry currentPacket=packetReader.getCurrentPacket();
      currentPacket.indexBegin=startIndex;
      currentPacket.rankEnd=index;
      startIndex=index + 1;
    }
  }
  return hasMoreEvents();
}

Fixed version (ground truth):
/** 
 * Go to the next event.
 * @return True if an event was read.
 */
public boolean advance(){
  StreamInputReader top=this.prio.poll();
  if (top == null) {
    return false;
  }
  if (top.readNextEvent()) {
    this.prio.add(top);
    final long topEnd=top.getCurrentEvent().timestamp;
    this.endTime=Math.max(topEnd,this.endTime);
    this.eventCountPerTraceFile[top.getName()]++;
  }
  if (hasMoreEvents()) {
    index++;
    StreamInputPacketReader packetReader=top.getPacketReader();
    if (packetReader.hasMoreEvents() == false) {
      int n=this.streamInputReaders.indexOf(packetReader);
      StreamInputPacketIndexEntry currentPacket=packetReader.getCurrentPacket();
      currentPacket.indexBegin=startIndex[n];
      currentPacket.indexEnd=index;
      startIndex[n]=index + 1;
    }
  }
  return hasMoreEvents();
}
Program: 92498
Project: 92498
Buggy source:
@Override public void setRank(long rank){
}

Fixed version (ground truth):
@Override public void setRank(long rank){
  seekRank(rank);
}
Program: 92499
Project: 92499
Buggy source:
@Override public long getRank(){
  final CtfTmfEvent current=getCurrentEvent();
  if (current != null) {
    return getCurrentEvent().getRank();
  }
  return 0;
}

Fixed version (ground truth):
@Override public long getRank(){
  return super.getIndex();
}
Program: 92500
Project: 92500
Buggy source:
@Override public void updateRank(int rank){
  curRank=rank;
}

Fixed version (ground truth):
@Override public void updateRank(int rank){
}
Program: 92501
Project: 92501
Buggy source:
@Override public boolean isValidRank(){
  return true;
}

Fixed version (ground truth):
@Override public boolean isValidRank(){
  return (getRank() > -1);
}
Program: 92502
Project: 92502
Buggy source:
@Override public double getLocationRatio(ITmfLocation<?> location){
  return 0;
}

Fixed version (ground truth):
@Override public double getLocationRatio(ITmfLocation<?> location){
  CtfIterator curLocation=(CtfIterator)location;
  return ((double)curLocation.getCurrentEvent().getTimestampValue() - curLocation.getStartTime()) / (curLocation.getEndTime() - curLocation.getStartTime());
}
Program: 92503
Project: 92503
Buggy source:
@Override public CtfTmfTrace clone() throws CloneNotSupportedException {
  CtfTmfTrace clone=null;
  clone=(CtfTmfTrace)super.clone();
  clone.setfCheckpoints(this.fCheckpoints);
  clone.fStartTime=this.fStartTime.clone();
  clone.fEndTime=this.fEndTime.clone();
  clone.fTrace=this.fTrace;
  return clone;
}

Fixed version (ground truth):
@Override public CtfTmfTrace clone() throws CloneNotSupportedException {
  CtfTmfTrace clone=null;
  clone=(CtfTmfTrace)super.clone();
  clone.fStartTime=this.fStartTime.clone();
  clone.fEndTime=this.fEndTime.clone();
  clone.fTrace=this.fTrace;
  return clone;
}
Program: 92504
Project: 92504
Buggy source:
/** 
 * Getter/Setter tests 
 */
public void testGetAndSetter(){
  ProbeEventInfo fixture=new ProbeEventInfo("String_Node_Str");
  assertTrue(fixture instanceof EventInfo);
  fixture.setAddress("String_Node_Str");
  String result=fixture.getAddress();
  assertNotNull(result);
  assertEquals("String_Node_Str",result);
  fixture.setOffset("String_Node_Str");
  result=fixture.getOffset();
  assertNotNull(result);
  assertEquals("String_Node_Str",result);
  fixture.setSymbol("String_Node_Str");
  result=fixture.getSymbol();
  assertNotNull(result);
  assertEquals("String_Node_Str",result);
}

Fixed version (ground truth):
/** 
 * Getter/Setter tests 
 */
public void testGetAndSetter(){
  ProbeEventInfo fixture=new ProbeEventInfo("String_Node_Str");
  fixture.setAddress("String_Node_Str");
  String result=fixture.getAddress();
  assertNotNull(result);
  assertEquals("String_Node_Str",result);
  fixture.setOffset("String_Node_Str");
  result=fixture.getOffset();
  assertNotNull(result);
  assertEquals("String_Node_Str",result);
  fixture.setSymbol("String_Node_Str");
  result=fixture.getSymbol();
  assertNotNull(result);
  assertEquals("String_Node_Str",result);
}
Program: 92505
Project: 92505
Buggy source:
/** 
 * Perform pre-test initialization.
 * @throws Exception if the initialization fails for some reason
 */
@Override public void setUp(){
  ModelImplFactory factory=new ModelImplFactory();
  fUstProviderInfo1=factory.getUstProviderInfo1();
  fUstProviderInfo2=factory.getUstProviderInfo2();
  fEventInfo1=factory.getBaseEventInfo1();
  fEventInfo1=factory.getBaseEventInfo2();
}

Fixed version (ground truth):
/** 
 * Perform pre-test initialization.
 * @throws Exception if the initialization fails for some reason
 */
@Override public void setUp(){
  ModelImplFactory factory=new ModelImplFactory();
  fUstProviderInfo1=factory.getUstProviderInfo1();
  fUstProviderInfo2=factory.getUstProviderInfo2();
  fEventInfo1=factory.getBaseEventInfo1();
  fEventInfo2=factory.getBaseEventInfo2();
}
Program: 92506
Project: 92506
Buggy source:
@Override public void setSessions(TraceSessionComponent[] sessions){
  fSessions=sessions;
}

Fixed version (ground truth):
@Override public void setSessions(TraceSessionComponent[] sessions){
  if (sessions != null) {
    fSessions=Arrays.copyOf(sessions,sessions.length);
    return;
  }
  fSessions=null;
}
Program: 92508
Project: 92508
Buggy source:
private boolean isComment(String line){
  return line.matches(COMMENT_KEY);
}

Fixed version (ground truth):
private boolean isComment(String line){
  if (line == null) {
    throw new RuntimeException("String_Node_Str");
  }
  return line.matches(COMMENT_KEY);
}