nus-yam/ex-repair huggingface dataset:
Program: 133305
Project: 133305
Buggy source:
public void put(String key,Object value){
  Integer timeout=getTimeout(key);
  if (timeout == null) {
    return;
  }
  values.put(key,new TimedValue(value,timeout != null ? System.currentTimeMillis() + timeout : null));
}

Fixed version (ground truth):
public void put(String key,Object value){
  Integer timeout=getTimeout(key);
  if (timeout == null) {
    return;
  }
  values.put(key,new TimedValue(value,System.currentTimeMillis() + timeout));
}
Program: 133306
Project: 133306
Buggy source:
public void putAll(Map<String,Object> entries){
  for (  String key : entries.keySet()) {
    put(key,entries.get(key));
  }
}

Fixed version (ground truth):
public void putAll(Map<String,Object> entries){
  if (entries == null)   return;
  for (  Entry<String,Object> ent : entries.entrySet()) {
    put(ent.getKey(),ent.getValue());
  }
}
Program: 133307
Project: 133307
Buggy source:
/** 
 * Parse out the property entries and set them for the given element.
 * @param element
 * @param entries
 */
protected void setInMemoryProperties(T element,Iterable<Entry<Key,Value>> entries){
  Map<String,Object> props=new PropertyParser().parse(entries);
  for (  String key : props.keySet()) {
    element.setPropertyInMemory(key,props.get(key));
  }
}

Fixed version (ground truth):
/** 
 * Parse out the property entries and set them for the given element.
 * @param element
 * @param entries
 */
protected void setInMemoryProperties(T element,Iterable<Entry<Key,Value>> entries){
  Map<String,Object> props=new PropertyParser().parse(entries);
  if (props == null)   return;
  for (  Entry<String,Object> ent : props.entrySet()) {
    element.setPropertyInMemory(ent.getKey(),ent.getValue());
  }
}
Program: 133308
Project: 133308
Buggy source:
public Iterable<Edge> getEdges(Vertex vertex,Direction direction,String... labels){
  Scanner scan=getScanner();
  scan.setRange(new Range(vertex.getId().toString()));
  if (direction.equals(Direction.IN)) {
    scan.fetchColumnFamily(new Text(Constants.IN_EDGE));
  }
 else   if (direction.equals(Direction.OUT)) {
    scan.fetchColumnFamily(new Text(Constants.OUT_EDGE));
  }
 else {
    scan.fetchColumnFamily(new Text(Constants.IN_EDGE));
    scan.fetchColumnFamily(new Text(Constants.OUT_EDGE));
  }
  if (labels.length > 0) {
    applyEdgeLabelValueFilter(scan,labels);
  }
  return new ScannerIterable<Edge>(scan){
    @Override public Edge next(    PeekingIterator<Entry<Key,Value>> iterator){
      Entry<Key,Value> kv=iterator.next();
      String[] parts=kv.getKey().getColumnQualifier().toString().split(Constants.ID_DELIM);
      String label=(new String(kv.getValue().get())).split(Constants.ID_DELIM)[1];
      AccumuloEdge edge;
      if (kv.getKey().getColumnFamily().toString().equalsIgnoreCase(Constants.IN_EDGE)) {
        edge=new AccumuloEdge(globals,parts[1],new AccumuloVertex(globals,kv.getKey().getRow().toString()),new AccumuloVertex(globals,parts[0]),label);
      }
 else {
        edge=new AccumuloEdge(globals,parts[1],new AccumuloVertex(globals,parts[0]),new AccumuloVertex(globals,kv.getKey().getRow().toString()),label);
      }
      globals.getCaches().cache(edge,Edge.class);
      return edge;
    }
  }
;
}

Fixed version (ground truth):
public CloseableIterable<Edge> getEdges(Vertex vertex,Direction direction,String... labels){
  Scanner scan=getScanner();
  scan.setRange(new Range(vertex.getId().toString()));
  if (direction.equals(Direction.IN)) {
    scan.fetchColumnFamily(new Text(Constants.IN_EDGE));
  }
 else   if (direction.equals(Direction.OUT)) {
    scan.fetchColumnFamily(new Text(Constants.OUT_EDGE));
  }
 else {
    scan.fetchColumnFamily(new Text(Constants.IN_EDGE));
    scan.fetchColumnFamily(new Text(Constants.OUT_EDGE));
  }
  if (labels.length > 0) {
    applyEdgeLabelValueFilter(scan,labels);
  }
  return new ScannerIterable<Edge>(scan){
    @Override public Edge next(    PeekingIterator<Entry<Key,Value>> iterator){
      Entry<Key,Value> kv=iterator.next();
      String[] parts=kv.getKey().getColumnQualifier().toString().split(Constants.ID_DELIM);
      String label=(new String(kv.getValue().get())).split(Constants.ID_DELIM)[1];
      AccumuloEdge edge;
      if (kv.getKey().getColumnFamily().toString().equalsIgnoreCase(Constants.IN_EDGE)) {
        edge=new AccumuloEdge(globals,parts[1],new AccumuloVertex(globals,kv.getKey().getRow().toString()),new AccumuloVertex(globals,parts[0]),label);
      }
 else {
        edge=new AccumuloEdge(globals,parts[1],new AccumuloVertex(globals,parts[0]),new AccumuloVertex(globals,kv.getKey().getRow().toString()),label);
      }
      globals.getCaches().cache(edge,Edge.class);
      return edge;
    }
  }
;
}
Program: 133309
Project: 133309
Buggy source:
/** 
 * Rebuild this index for the given table.
 * @param table
 * @param key
 */
public void rebuildIndex(String key,Class<? extends Element> elementClass){
  ElementTableWrapper wrapper=globals.getElementWrapper(elementClass);
  if (wrapper instanceof VertexTableWrapper) {
    for (    Vertex v : ((VertexTableWrapper)wrapper).getVertices()) {
      rebuild(wrapper,v,key);
    }
  }
 else   if (wrapper instanceof EdgeTableWrapper) {
    for (    Edge e : ((EdgeTableWrapper)wrapper).getEdges()) {
      rebuild(wrapper,e,key);
    }
  }
 else {
    throw new AccumuloGraphException("String_Node_Str" + wrapper.getClass());
  }
  globals.checkedFlush();
}

Fixed version (ground truth):
/** 
 * Rebuild this index for the given table.
 * @param table
 * @param key
 */
public void rebuildIndex(String key,Class<? extends Element> elementClass){
  ElementTableWrapper wrapper=globals.getElementWrapper(elementClass);
  if (wrapper instanceof VertexTableWrapper) {
    CloseableIterable<Vertex> iter=((VertexTableWrapper)wrapper).getVertices();
    for (    Vertex v : iter) {
      rebuild(wrapper,v,key);
    }
    iter.close();
  }
 else   if (wrapper instanceof EdgeTableWrapper) {
    CloseableIterable<Edge> iter=((EdgeTableWrapper)wrapper).getEdges();
    for (    Edge e : iter) {
      rebuild(wrapper,e,key);
    }
    iter.close();
  }
 else {
    throw new AccumuloGraphException("String_Node_Str" + wrapper.getClass());
  }
  globals.checkedFlush();
}
Program: 133310
Project: 133310
Buggy source:
@Test public void testVertexInputMap() throws Exception {
  final String INSTANCE_NAME="String_Node_Str";
  final String TEST_TABLE_1="String_Node_Str";
  if (!System.getProperty("String_Node_Str").startsWith("String_Node_Str")) {
    Graph g=GraphFactory.open(new AccumuloGraphConfiguration().setInstanceName(INSTANCE_NAME).setUser("String_Node_Str").setPassword("String_Node_Str".getBytes()).setGraphName(TEST_TABLE_1).setInstanceType(InstanceType.Mock).setCreate(true).getConfiguration());
    for (int i=0; i < 100; i++) {
      g.addVertex(i + "String_Node_Str");
    }
    assertEquals(0,MRTester.main(new String[]{"String_Node_Str","String_Node_Str",TEST_TABLE_1,INSTANCE_NAME,"String_Node_Str"}));
    assertNull(e1);
    assertNull(e2);
  }
}

Fixed version (ground truth):
@Test public void testVertexInputMap() throws Exception {
  final String INSTANCE_NAME="String_Node_Str";
  final String TEST_TABLE_NAME="String_Node_Str";
  if (!System.getProperty("String_Node_Str").startsWith("String_Node_Str")) {
    Graph g=GraphFactory.open(new AccumuloGraphConfiguration().setInstanceName(INSTANCE_NAME).setUser("String_Node_Str").setPassword("String_Node_Str".getBytes()).setGraphName(TEST_TABLE_NAME).setInstanceType(InstanceType.Mock).setCreate(true).getConfiguration());
    for (int i=0; i < 100; i++) {
      g.addVertex(i + "String_Node_Str");
    }
    assertEquals(0,MRTester.main(new String[]{"String_Node_Str","String_Node_Str",TEST_TABLE_NAME,INSTANCE_NAME,"String_Node_Str"}));
    assertNull(e1);
    assertNull(e2);
    g.shutdown();
  }
}
Program: 133311
Project: 133311
Buggy source:
@Test public void testEdgeInputMap() throws Exception {
  final String INSTANCE_NAME="String_Node_Str";
  final String TEST_TABLE_1="String_Node_Str";
  if (!System.getProperty("String_Node_Str").startsWith("String_Node_Str")) {
    Graph g=GraphFactory.open(new AccumuloGraphConfiguration().setInstanceName(INSTANCE_NAME).setUser("String_Node_Str").setPassword("String_Node_Str".getBytes()).setGraphName(TEST_TABLE_1).setInstanceType(InstanceType.Mock).setAutoFlush(true).setCreate(true).getConfiguration());
    for (int i=0; i < 100; i++) {
      g.addEdge(null,g.addVertex(i + "String_Node_Str"),g.addVertex(i + "String_Node_Str"),"String_Node_Str");
    }
    assertEquals(0,MRTester.main(new String[]{"String_Node_Str","String_Node_Str",TEST_TABLE_1,INSTANCE_NAME,"String_Node_Str"}));
    assertNull(e1);
    assertNull(e2);
  }
}

Fixed version (ground truth):
@Test public void testEdgeInputMap() throws Exception {
  final String INSTANCE_NAME="String_Node_Str";
  final String TEST_TABLE_NAME="String_Node_Str";
  if (!System.getProperty("String_Node_Str").startsWith("String_Node_Str")) {
    Graph g=GraphFactory.open(new AccumuloGraphConfiguration().setInstanceName(INSTANCE_NAME).setUser("String_Node_Str").setPassword("String_Node_Str".getBytes()).setGraphName(TEST_TABLE_NAME).setInstanceType(InstanceType.Mock).setAutoFlush(true).setCreate(true).getConfiguration());
    for (int i=0; i < 100; i++) {
      Vertex v1=g.addVertex(i + "String_Node_Str");
      Vertex v2=g.addVertex(i + "String_Node_Str");
      g.addEdge(null,v1,v2,"String_Node_Str");
    }
    assertEquals(0,MRTester.main(new String[]{"String_Node_Str","String_Node_Str",TEST_TABLE_NAME,INSTANCE_NAME,"String_Node_Str"}));
    assertNull(e1);
    assertNull(e2);
    g.shutdown();
  }
}
Program: 133312
Project: 133312
Buggy source:
@Override public Vertex getVertex(Object id){
  if (id == null) {
    throw ExceptionFactory.vertexIdCanNotBeNull();
  }
  String myID;
  try {
    myID=(String)id;
  }
 catch (  ClassCastException e) {
    return null;
  }
  if (vertexCache != null) {
    Vertex vertex=vertexCache.retrieve(myID);
    if (vertex != null) {
      return vertex;
    }
  }
  Vertex vertex=new AccumuloVertex(this,myID);
  Scanner scan=null;
  try {
    if (!config.getSkipExistenceChecks()) {
      scan=getElementScanner(Vertex.class);
      scan.setRange(new Range(myID));
      scan.fetchColumn(TLABEL,TEXISTS);
      String[] preload=config.getPreloadedProperties();
      if (preload != null) {
        Text colf=new Text("String_Node_Str");
        for (        String key : preload) {
          if (StringFactory.LABEL.equals(key)) {
            colf.set(AccumuloGraph.LABEL);
          }
 else {
            colf.set(key);
          }
          scan.fetchColumnFamily(colf);
        }
      }
      Iterator<Entry<Key,Value>> iter=scan.iterator();
      if (!iter.hasNext()) {
        return null;
      }
      preloadProperties(iter,(AccumuloElement)vertex);
    }
  }
  finally {
    if (scan != null) {
      scan.close();
    }
  }
  if (vertexCache != null) {
    vertexCache.cache(vertex);
  }
  return vertex;
}

Fixed version (ground truth):
@Override public Vertex getVertex(Object id){
  if (id == null) {
    throw ExceptionFactory.vertexIdCanNotBeNull();
  }
  String myID=id.toString();
  if (vertexCache != null) {
    Vertex vertex=vertexCache.retrieve(myID);
    if (vertex != null) {
      return vertex;
    }
  }
  Vertex vertex=new AccumuloVertex(this,myID);
  Scanner scan=null;
  try {
    if (!config.getSkipExistenceChecks()) {
      scan=getElementScanner(Vertex.class);
      scan.setRange(new Range(myID));
      scan.fetchColumn(TLABEL,TEXISTS);
      String[] preload=config.getPreloadedProperties();
      if (preload != null) {
        Text colf=new Text("String_Node_Str");
        for (        String key : preload) {
          if (StringFactory.LABEL.equals(key)) {
            colf.set(AccumuloGraph.LABEL);
          }
 else {
            colf.set(key);
          }
          scan.fetchColumnFamily(colf);
        }
      }
      Iterator<Entry<Key,Value>> iter=scan.iterator();
      if (!iter.hasNext()) {
        return null;
      }
      preloadProperties(iter,(AccumuloElement)vertex);
    }
  }
  finally {
    if (scan != null) {
      scan.close();
    }
  }
  if (vertexCache != null) {
    vertexCache.cache(vertex);
  }
  return vertex;
}
Program: 133313
Project: 133313
Buggy source:
@Override public Edge getEdge(Object id){
  String myID;
  if (id == null) {
    throw ExceptionFactory.edgeIdCanNotBeNull();
  }
 else {
    try {
      myID=(String)id;
    }
 catch (    ClassCastException e) {
      return null;
    }
  }
  Edge edge=null;
  if (edgeCache != null) {
    edge=edgeCache.retrieve(myID);
    if (edge != null) {
      return edge;
    }
  }
  Scanner s;
  if (!config.getSkipExistenceChecks()) {
    s=getElementScanner(Edge.class);
    s.setRange(new Range(myID,myID));
    s.fetchColumnFamily(TLABEL);
    if (config.getPreloadedProperties() != null) {
      for (      String x : config.getPreloadedProperties()) {
        s.fetchColumnFamily(new Text(x));
      }
    }
    boolean found=s.iterator().hasNext();
    s.close();
    if (!found) {
      return null;
    }
  }
 else {
    return new AccumuloEdge(this,myID);
  }
  edge=new AccumuloEdge(this,myID);
  preloadProperties(s.iterator(),(AccumuloElement)edge);
  if (edgeCache != null) {
    edgeCache.cache(edge);
  }
  return edge;
}

Fixed version (ground truth):
@Override public Edge getEdge(Object id){
  if (id == null) {
    throw ExceptionFactory.edgeIdCanNotBeNull();
  }
  String myID=id.toString();
  Edge edge=null;
  if (edgeCache != null) {
    edge=edgeCache.retrieve(myID);
    if (edge != null) {
      return edge;
    }
  }
  Scanner s;
  if (!config.getSkipExistenceChecks()) {
    s=getElementScanner(Edge.class);
    s.setRange(new Range(myID,myID));
    s.fetchColumnFamily(TLABEL);
    if (config.getPreloadedProperties() != null) {
      for (      String x : config.getPreloadedProperties()) {
        s.fetchColumnFamily(new Text(x));
      }
    }
    boolean found=s.iterator().hasNext();
    s.close();
    if (!found) {
      return null;
    }
  }
 else {
    return new AccumuloEdge(this,myID);
  }
  edge=new AccumuloEdge(this,myID);
  preloadProperties(s.iterator(),(AccumuloElement)edge);
  if (edgeCache != null) {
    edgeCache.cache(edge);
  }
  return edge;
}
Program: 133314
Project: 133314
Buggy source:
@Test public void testVertexInputMap() throws Exception {
  final String INSTANCE_NAME="String_Node_Str";
  final String TEST_TABLE_1="String_Node_Str";
  if (!System.getProperty("String_Node_Str").startsWith("String_Node_Str")) {
    Graph g=GraphFactory.open(new AccumuloGraphConfiguration().setInstanceName(INSTANCE_NAME).setGraphName(TEST_TABLE_1).setInstanceType(InstanceType.Mock).create(true).getConfiguration());
    for (int i=0; i < 100; i++) {
      g.addVertex(i + "String_Node_Str");
    }
    assertEquals(0,MRTester.main(new String[]{"String_Node_Str","String_Node_Str",TEST_TABLE_1,INSTANCE_NAME,"String_Node_Str"}));
    assertNull(e1);
    assertNull(e2);
  }
}

Fixed version (ground truth):
@Test public void testVertexInputMap() throws Exception {
  final String INSTANCE_NAME="String_Node_Str";
  final String TEST_TABLE_1="String_Node_Str";
  if (!System.getProperty("String_Node_Str").startsWith("String_Node_Str")) {
    Graph g=GraphFactory.open(new AccumuloGraphConfiguration().setInstanceName(INSTANCE_NAME).setUser("String_Node_Str").setPassword("String_Node_Str".getBytes()).setGraphName(TEST_TABLE_1).setInstanceType(InstanceType.Mock).create(true).getConfiguration());
    for (int i=0; i < 100; i++) {
      g.addVertex(i + "String_Node_Str");
    }
    assertEquals(0,MRTester.main(new String[]{"String_Node_Str","String_Node_Str",TEST_TABLE_1,INSTANCE_NAME,"String_Node_Str"}));
    assertNull(e1);
    assertNull(e2);
  }
}
Program: 133315
Project: 133315
Buggy source:
@Test public void testEdgeInputMap() throws Exception {
  final String INSTANCE_NAME="String_Node_Str";
  final String TEST_TABLE_1="String_Node_Str";
  if (!System.getProperty("String_Node_Str").startsWith("String_Node_Str")) {
    Graph g=GraphFactory.open(new AccumuloGraphConfiguration().setInstanceName(INSTANCE_NAME).setGraphName(TEST_TABLE_1).setInstanceType(InstanceType.Mock).autoFlush(true).create(true).getConfiguration());
    for (int i=0; i < 100; i++) {
      g.addEdge(null,g.addVertex(i + "String_Node_Str"),g.addVertex(i + "String_Node_Str"),"String_Node_Str");
    }
    assertEquals(0,MRTester.main(new String[]{"String_Node_Str","String_Node_Str",TEST_TABLE_1,INSTANCE_NAME,"String_Node_Str"}));
    System.out.println(e1);
    assertNull(e1);
    assertNull(e2);
  }
}

Fixed version (ground truth):
@Test public void testEdgeInputMap() throws Exception {
  final String INSTANCE_NAME="String_Node_Str";
  final String TEST_TABLE_1="String_Node_Str";
  if (!System.getProperty("String_Node_Str").startsWith("String_Node_Str")) {
    Graph g=GraphFactory.open(new AccumuloGraphConfiguration().setInstanceName(INSTANCE_NAME).setUser("String_Node_Str").setPassword("String_Node_Str".getBytes()).setGraphName(TEST_TABLE_1).setInstanceType(InstanceType.Mock).autoFlush(true).create(true).getConfiguration());
    for (int i=0; i < 100; i++) {
      g.addEdge(null,g.addVertex(i + "String_Node_Str"),g.addVertex(i + "String_Node_Str"),"String_Node_Str");
    }
    assertEquals(0,MRTester.main(new String[]{"String_Node_Str","String_Node_Str",TEST_TABLE_1,INSTANCE_NAME,"String_Node_Str"}));
    System.out.println(e1);
    assertNull(e1);
    assertNull(e2);
  }
}
Program: 133316
Project: 133316
Buggy source:
@Test public void testVertexInputMap() throws Exception {
  final String INSTANCE_NAME="String_Node_Str";
  final String TEST_TABLE_1="String_Node_Str";
  if (!System.getProperty("String_Node_Str").startsWith("String_Node_Str")) {
    Graph g=GraphFactory.open(new AccumuloGraphConfiguration().setInstanceName(INSTANCE_NAME).setUser("String_Node_Str").setPassword("String_Node_Str".getBytes()).setGraphName(TEST_TABLE_1).setInstanceType(InstanceType.Mock).create(true).getConfiguration());
    for (int i=0; i < 100; i++) {
      g.addVertex(i + "String_Node_Str");
    }
    assertEquals(0,MRTester.main(new String[]{"String_Node_Str","String_Node_Str",TEST_TABLE_1,INSTANCE_NAME,"String_Node_Str"}));
    assertNull(e1);
    assertNull(e2);
  }
}

Fixed version (ground truth):
@Test public void testVertexInputMap() throws Exception {
  final String INSTANCE_NAME="String_Node_Str";
  final String TEST_TABLE_1="String_Node_Str";
  if (!System.getProperty("String_Node_Str").startsWith("String_Node_Str")) {
    Graph g=GraphFactory.open(new AccumuloGraphConfiguration().setInstanceName(INSTANCE_NAME).setGraphName(TEST_TABLE_1).setInstanceType(InstanceType.Mock).create(true).getConfiguration());
    for (int i=0; i < 100; i++) {
      g.addVertex(i + "String_Node_Str");
    }
    assertEquals(0,MRTester.main(new String[]{"String_Node_Str","String_Node_Str",TEST_TABLE_1,INSTANCE_NAME,"String_Node_Str"}));
    assertNull(e1);
    assertNull(e2);
  }
}
Program: 133317
Project: 133317
Buggy source:
@Test public void testEdgeInputMap() throws Exception {
  final String INSTANCE_NAME="String_Node_Str";
  final String TEST_TABLE_1="String_Node_Str";
  if (!System.getProperty("String_Node_Str").startsWith("String_Node_Str")) {
    Graph g=GraphFactory.open(new AccumuloGraphConfiguration().setInstanceName(INSTANCE_NAME).setUser("String_Node_Str").setPassword("String_Node_Str".getBytes()).setGraphName(TEST_TABLE_1).setInstanceType(InstanceType.Mock).autoFlush(true).create(true).getConfiguration());
    for (int i=0; i < 100; i++) {
      g.addEdge(null,g.addVertex(i + "String_Node_Str"),g.addVertex(i + "String_Node_Str"),"String_Node_Str");
    }
    assertEquals(0,MRTester.main(new String[]{"String_Node_Str","String_Node_Str",TEST_TABLE_1,INSTANCE_NAME,"String_Node_Str"}));
    System.out.println(e1);
    assertNull(e1);
    assertNull(e2);
  }
}

Fixed version (ground truth):
@Test public void testEdgeInputMap() throws Exception {
  final String INSTANCE_NAME="String_Node_Str";
  final String TEST_TABLE_1="String_Node_Str";
  if (!System.getProperty("String_Node_Str").startsWith("String_Node_Str")) {
    Graph g=GraphFactory.open(new AccumuloGraphConfiguration().setInstanceName(INSTANCE_NAME).setGraphName(TEST_TABLE_1).setInstanceType(InstanceType.Mock).autoFlush(true).create(true).getConfiguration());
    for (int i=0; i < 100; i++) {
      g.addEdge(null,g.addVertex(i + "String_Node_Str"),g.addVertex(i + "String_Node_Str"),"String_Node_Str");
    }
    assertEquals(0,MRTester.main(new String[]{"String_Node_Str","String_Node_Str",TEST_TABLE_1,INSTANCE_NAME,"String_Node_Str"}));
    System.out.println(e1);
    assertNull(e1);
    assertNull(e2);
  }
}
Program: 133318
Project: 133318
Buggy source:
/** 
 * Called to write all properties added to this builder out to Accumulo.
 * @throws MutationsRejectedException
 */
public void finish() throws MutationsRejectedException {
  writer.addMutation(mutation);
}

Fixed version (ground truth):
/** 
 * Called to write all properties added to this builder out to Accumulo.
 * @throws MutationsRejectedException
 */
public void finish() throws MutationsRejectedException {
  if (mutation.size() > 0) {
    writer.addMutation(mutation);
  }
}
Program: 133319
Project: 133319
Buggy source:
public SortedSet<Text> getSplits(){
  String val=getString(SPLITS);
  if ((val == null) || (val.trim().equals("String_Node_Str"))) {
    return null;
  }
  SortedSet<Text> splits=new TreeSet<Text>();
  for (  String s : val.split("String_Node_Str")) {
    splits.add(new Text(s));
  }
  return splits;
}

Fixed version (ground truth):
public SortedSet<Text> getSplits(){
  String val=getString(SPLITS);
  if ((val == null) || (val.trim().equals("String_Node_Str"))) {
    return null;
  }
  SortedSet<Text> splits=new TreeSet<Text>();
  for (  String s : val.trim().split("String_Node_Str")) {
    splits.add(new Text(s));
  }
  return splits;
}
Program: 133320
Project: 133320
Buggy source:
@Override public int compareTo(MapReduceVertex other){
  int val=this.id.compareTo(other.id);
  if (val != 0) {
    return val;
  }
  return getClass().getSimpleName().compareTo(other.getClass().getSimpleName());
}

Fixed version (ground truth):
@Override public int compareTo(MapReduceElement other){
  int val=this.id.compareTo(other.id);
  if (val != 0) {
    return val;
  }
  return getClass().getSimpleName().compareTo(other.getClass().getSimpleName());
}
Program: 133322
Project: 133322
Buggy source:
/** 
 * Render allure report page in project-reports.html.
 * @param sink  sink
 * @param title title
 */
private void render(Sink sink,String title){
  sink.head();
  sink.title();
  sink.text(title);
  sink.title_();
  sink.head_();
  sink.body();
  sink.lineBreak();
  sink.rawText("String_Node_Str");
  sink.link("String_Node_Str");
  sink.body_();
  sink.flush();
  sink.close();
}

Fixed version (ground truth):
/** 
 * Render allure report page in project-reports.html.
 * @param sink  sink
 * @param title title
 */
private void render(Sink sink,String title){
  sink.head();
  sink.title();
  sink.text(title);
  sink.title_();
  sink.head_();
  sink.body();
  sink.lineBreak();
  File indexHtmlFile=new File(outputDirectory,"String_Node_Str");
  String relativePath=reportingDirectory.toURI().relativize(indexHtmlFile.toURI()).getPath();
  sink.rawText(String.format("String_Node_Str",relativePath));
  sink.link(relativePath);
  sink.body_();
  sink.flush();
  sink.close();
}
Program: 133323
Project: 133323
Buggy source:
@Override protected void executeReport(Locale locale) throws MavenReportException {
  getLog().info("String_Node_Str" + reportVersion);
  getLog().info("String_Node_Str" + resultsPattern);
  File[] reportDirectories=getPathsByGlobs(projectBaseDirectory,resultsPattern);
  getLog().info(String.format("String_Node_Str",reportDirectories.length,resultsPattern));
  if (reportDirectories.length == 0) {
    throw new MavenReportException(String.format("String_Node_Str",resultsPattern));
  }
  try {
    DependencyResolver resolver=new DependencyResolver(repoSystem,repoSession,projectRepos);
    AllureReportBuilder builder=new AllureReportBuilder(reportVersion,outputDirectory,resolver);
    getLog().info("String_Node_Str" + outputDirectory);
    builder.processResults(reportDirectories);
    getLog().info("String_Node_Str");
    builder.unpackFace();
    getLog().info("String_Node_Str");
    render(getSink(),getName(locale));
  }
 catch (  AllureReportBuilderException e) {
    getLog().error("String_Node_Str",e);
    throw new MavenReportException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override protected void executeReport(Locale locale) throws MavenReportException {
  getLog().info("String_Node_Str" + reportVersion);
  getLog().info("String_Node_Str" + resultsPattern);
  File[] reportDirectories=getReportDirectories(projectBaseDirectory,resultsPattern);
  getLog().info(String.format("String_Node_Str",reportDirectories.length,resultsPattern));
  if (reportDirectories.length == 0) {
    throw new MavenReportException(String.format("String_Node_Str",resultsPattern));
  }
  try {
    DependencyResolver resolver=new DependencyResolver(repoSystem,repoSession,projectRepos);
    AllureReportBuilder builder=new AllureReportBuilder(reportVersion,outputDirectory,resolver);
    getLog().info("String_Node_Str" + outputDirectory);
    builder.processResults(reportDirectories);
    getLog().info("String_Node_Str");
    builder.unpackFace();
    getLog().info("String_Node_Str");
    render(getSink(),getName(locale));
  }
 catch (  AllureReportBuilderException e) {
    getLog().error("String_Node_Str",e);
    throw new MavenReportException("String_Node_Str",e);
  }
}
Program: 133327
Project: 133327
Buggy source:
/** 
 * Read the INI file lines into entries of an ArrayList so that it is easy to parse the sections into ICE.
 * @param iniFile The INI file to be read in.
 * @return An ArrayList of strings of the lines of the INI file.
 * @throws FileNotFoundException Thrown when the INI file cannot be found.
 * @throws IOException Thrown when the INI file cannot be read or closed.
 */
private ArrayList<String> readFileLines(IFile ifile) throws FileNotFoundException, IOException {
  BufferedReader reader=null;
  try {
    reader=new BufferedReader(new InputStreamReader(ifile.getContents()));
  }
 catch (  CoreException e) {
    logger.error(getClass().getName() + "String_Node_Str",e);
  }
  StringBuffer buffer=new StringBuffer();
  int fileByte;
  while ((fileByte=reader.read()) != -1) {
    buffer.append((char)fileByte);
  }
  reader.close();
  String[] bufferSplit=(buffer.toString()).split("String_Node_Str");
  ArrayList<String> fileLines=new ArrayList<String>(Arrays.asList(bufferSplit));
  fileLines.add("String_Node_Str");
  return fileLines;
}

Fixed version (ground truth):
/** 
 * Read the INI file lines into entries of an ArrayList so that it is easy to parse the sections into ICE.
 * @param iniFile The INI file to be read in.
 * @return An ArrayList of strings of the lines of the INI file.
 * @throws FileNotFoundException Thrown when the INI file cannot be found.
 * @throws IOException Thrown when the INI file cannot be read or closed.
 */
private ArrayList<String> readFileLines(IFile ifile) throws FileNotFoundException, IOException {
  BufferedReader reader=null;
  try {
    reader=new BufferedReader(new InputStreamReader(ifile.getContents()));
  }
 catch (  CoreException e) {
    logger.error(getClass().getName() + "String_Node_Str",e);
  }
  StringBuffer buffer=new StringBuffer();
  int fileByte;
  ArrayList<String> fileLines=new ArrayList<String>();
  String line=reader.readLine();
  while (line != null) {
    fileLines.add(line);
    line=reader.readLine();
  }
  reader.close();
  fileLines.add("String_Node_Str");
  return fileLines;
}
Program: 133332
Project: 133332
Buggy source:
/** 
 * This operation draws a browser on the page that displays the selected ICEResource.
 * @param formToolkit The FormToolkit that is used to create SWT widgets for this page.
 * @param form The IManagedForm on which the table should be drawn.
 */
protected Browser createBrowser(Composite parent,FormToolkit toolkit){
  Browser browser=null;
  try {
    browser=new Browser(parent,SWT.NONE);
    toolkit.adapt(browser);
    browser.setLayout(new GridLayout());
    browser.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
    browser.layout(true);
    if (!resourceComponent.isEmpty()) {
      browser.setText("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str");
    }
 else {
      browser.setText("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str");
    }
  }
 catch (  SWTError e) {
    logger.error(getClass().getName() + "String_Node_Str",e);
  }
  return browser;
}

Fixed version (ground truth):
/** 
 * This operation draws a browser on the page that displays the selected ICEResource.
 * @param formToolkit The FormToolkit that is used to create SWT widgets for this page.
 * @param form The IManagedForm on which the table should be drawn.
 */
protected Browser createBrowser(Composite parent,FormToolkit toolkit){
  Browser browser=null;
  try {
    browser=new Browser(parent,SWT.NONE);
    toolkit.adapt(browser);
    browser.layout(true);
    if (!resourceComponent.isEmpty()) {
      browser.setText("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str");
    }
 else {
      browser.setText("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str");
    }
  }
 catch (  SWTError e) {
    logger.error(getClass().getName() + "String_Node_Str",e);
  }
  return browser;
}
Program: 133333
Project: 133333
Buggy source:
@Override public void resourceChanged(IResourceChangeEvent event){
  if (event.getType() == IResourceChangeEvent.POST_CHANGE) {
    try {
      event.getDelta().accept(new IResourceDeltaVisitor(){
        public boolean visit(        IResourceDelta delta) throws CoreException {
          for (          ICEResource r : ICEResourcePage.this.resourceComponent.getResources()) {
            if (delta.getResource().getName().equals((new File(r.getPath()).getName()))) {
              ICEResourcePage.this.update(r);
            }
          }
          return true;
        }
      }
);
    }
 catch (    CoreException e) {
      e.printStackTrace();
    }
  }
}

Fixed version (ground truth):
@Override public void resourceChanged(IResourceChangeEvent event){
  if (event.getType() == IResourceChangeEvent.POST_CHANGE) {
    try {
      event.getDelta().accept(new IResourceDeltaVisitor(){
        @Override public boolean visit(        IResourceDelta delta) throws CoreException {
          for (          ICEResource r : ICEResourcePage.this.resourceComponent.getResources()) {
            if (delta.getResource().getName().equals((new File(r.getPath()).getName()))) {
              ICEResourcePage.this.update(r);
            }
          }
          return true;
        }
      }
);
    }
 catch (    CoreException e) {
      e.printStackTrace();
    }
  }
}
Program: 133334
Project: 133334
Buggy source:
/** 
 * The default constructor.
 * @param editor The FormEditor for which the Page should be constructed. This should be an  {@link ICEFormEditor}.
 * @param id The id of the page.
 * @param title The title of the page.
 */
public ICEResourcePage(FormEditor editor,String id,String title){
  super(editor,id,title);
  if (!(editor instanceof ICEFormEditor)) {
    logger.info("String_Node_Str");
  }
  String[] extensions={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  textFileExtensions=new ArrayList<String>(Arrays.asList(extensions));
  ResourcesPlugin.getWorkspace().addResourceChangeListener(this,IResourceChangeEvent.POST_CHANGE);
  return;
}

Fixed version (ground truth):
/** 
 * The default constructor.
 * @param editor The FormEditor for which the Page should be constructed. This should be an  {@link ICEFormEditor}.
 * @param id The id of the page.
 * @param title The title of the page.
 */
public ICEResourcePage(FormEditor editor,String id,String title){
  super(editor,id,title);
  if (!(editor instanceof ICEFormEditor)) {
    logger.info("String_Node_Str");
  }
  String[] extensions={"String_Node_Str","String_Node_Str","String_Node_Str"};
  textFileExtensions=new ArrayList<String>(Arrays.asList(extensions));
  ResourcesPlugin.getWorkspace().addResourceChangeListener(this,IResourceChangeEvent.POST_CHANGE);
  return;
}
Program: 133335
Project: 133335
Buggy source:
/** 
 * This operation overrides the default/abstract implementation of FormPage.createFormContents to create the contents of the ICEResourcePage.
 * @param managedForm The Form widget on which the ICEResourcePage exists.
 */
@Override protected void createFormContent(IManagedForm managedForm){
  final FormToolkit toolkit=managedForm.getToolkit();
  try {
    getSite().getWorkbenchWindow().getActivePage().showView(ICEResourceView.ID);
  }
 catch (  PartInitException e) {
    logger.error(getClass().getName() + "String_Node_Str",e);
  }
  pageComposite=managedForm.getForm().getBody();
  pageComposite.setLayout(stackLayout);
  getSite().getWorkbenchWindow().getSelectionService().addSelectionListener(this);
  pageComposite.addDisposeListener(new DisposeListener(){
    @Override public void widgetDisposed(    DisposeEvent event){
      getSite().getWorkbenchWindow().getSelectionService().removeSelectionListener(ICEResourcePage.this);
    }
  }
);
  browser=createBrowser(pageComposite,toolkit);
  stackLayout.topControl=browser;
  pageComposite.layout();
  plotGridComposite=new PlotGridComposite(pageComposite,SWT.NONE);
  toolkit.adapt(plotGridComposite);
  workbenchPage=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
  return;
}

Fixed version (ground truth):
/** 
 * This operation overrides the default/abstract implementation of FormPage.createFormContents to create the contents of the ICEResourcePage.
 * @param managedForm The Form widget on which the ICEResourcePage exists.
 */
@Override protected void createFormContent(IManagedForm managedForm){
  final FormToolkit toolkit=managedForm.getToolkit();
  try {
    getSite().getWorkbenchWindow().getActivePage().showView(ICEResourceView.ID);
  }
 catch (  PartInitException e) {
    logger.error(getClass().getName() + "String_Node_Str",e);
  }
  pageComposite=managedForm.getForm().getBody();
  pageComposite.setLayout(stackLayout);
  getSite().getWorkbenchWindow().getSelectionService().addSelectionListener(this);
  pageComposite.addDisposeListener(new DisposeListener(){
    @Override public void widgetDisposed(    DisposeEvent event){
      getSite().getWorkbenchWindow().getSelectionService().removeSelectionListener(ICEResourcePage.this);
    }
  }
);
  browser=createBrowser(pageComposite,toolkit);
  stackLayout.topControl=browser;
  if (browser == null) {
    Label label=new Label(pageComposite,SWT.CENTER);
    label.setText("String_Node_Str");
    stackLayout.topControl=label;
  }
  pageComposite.layout();
  plotGridComposite=new PlotGridComposite(pageComposite,SWT.NONE);
  toolkit.adapt(plotGridComposite);
  workbenchPage=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
  return;
}
Program: 133337
Project: 133337
Buggy source:
public boolean visit(IResourceDelta delta) throws CoreException {
  for (  ICEResource r : ICEResourcePage.this.resourceComponent.getResources()) {
    if (delta.getResource().getName().equals((new File(r.getPath()).getName()))) {
      ICEResourcePage.this.update(r);
    }
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean visit(IResourceDelta delta) throws CoreException {
  for (  ICEResource r : ICEResourcePage.this.resourceComponent.getResources()) {
    if (delta.getResource().getName().equals((new File(r.getPath()).getName()))) {
      ICEResourcePage.this.update(r);
    }
  }
  return true;
}
Program: 133339
Project: 133339
Buggy source:
@Override public void run(){
  IRemoteUIConnectionService uiConnService=connectionType.getService(IRemoteUIConnectionService.class);
  IRemoteUIConnectionWizard wizard=uiConnService.getConnectionWizard(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
  if (wizard != null) {
    wizard.setConnectionName(host);
    try {
      connection=wizard.open().save();
      if (connection != null) {
        connection.open(null);
      }
    }
 catch (    RemoteConnectionException e) {
      logger.error(getClass().getName() + "String_Node_Str",e);
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  IRemoteUIConnectionService uiConnService=finalType.getService(IRemoteUIConnectionService.class);
  IRemoteUIConnectionWizard wizard=uiConnService.getConnectionWizard(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
  if (wizard != null) {
    wizard.setConnectionName(host);
    try {
      connection=wizard.open().save();
      if (connection != null) {
        connection.open(null);
      }
    }
 catch (    RemoteConnectionException e) {
      logger.error(getClass().getName() + "String_Node_Str",e);
    }
  }
}
Program: 133340
Project: 133340
Buggy source:
/** 
 * <p> This operation configures a NekModel. It is used by both test operations. </p>
 * @return <p> A newly instantiated NekModel. </p>
 */
private NekModel setupNekItem(){
  NekModel model=new NekModel(projectSpace,new TestNekControllerFactory());
  return model;
}

Fixed version (ground truth):
/** 
 * <p> This operation configures a NekModel. It is used by both test operations. </p>
 * @return <p> A newly instantiated NekModel. </p>
 */
private NekModel setupNekItem(){
  IVizService service=new FakeVizService();
  IVizServiceFactory factory=new BasicVizServiceFactory();
  factory.register(service);
  VizServiceFactoryHolder.setVizServiceFactory(factory);
  NekModel model=new NekModel(projectSpace,new TestNekControllerFactory());
  return model;
}
Program: 133345
Project: 133345
Buggy source:
/** 
 * Update the new project manifest to have required packages imported.
 */
private void updateManifest(){
  String packageBase=fProjectProvider.getProjectName();
  String sep=System.getProperty("String_Node_Str");
  String manifestFile=fProjectProvider.getLocationPath().makeAbsolute().toOSString() + sep + fProjectProvider.getProjectName()+ sep+ "String_Node_Str"+ sep+ "String_Node_Str";
  StringBuilder manifestLines=new StringBuilder();
  manifestLines.append("String_Node_Str");
  manifestLines.append("String_Node_Str");
  manifestLines.append("String_Node_Str");
  manifestLines.append("String_Node_Str");
  manifestLines.append("String_Node_Str");
  manifestLines.append("String_Node_Str");
  manifestLines.append("String_Node_Str");
  manifestLines.append("String_Node_Str");
  manifestLines.append("String_Node_Str");
  manifestLines.append("String_Node_Str");
  manifestLines.append("String_Node_Str");
  manifestLines.append("String_Node_Str" + packageBase + "String_Node_Str");
  manifestLines.append("String_Node_Str" + packageBase + "String_Node_Str");
  try {
    Files.write(Paths.get(manifestFile),manifestLines.toString().getBytes(),StandardOpenOption.APPEND);
  }
 catch (  IOException e) {
    logger.error(getClass().getName() + "String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Update the new project manifest to have required packages imported.
 */
private void updateManifest(){
  IProject project=fProjectProvider.getProject();
  IFile manifestFile=project.getFolder("String_Node_Str").getFile("String_Node_Str");
  String packageBase=fProjectProvider.getProjectName();
  StringBuilder manifestLines=new StringBuilder();
  manifestLines.append("String_Node_Str");
  manifestLines.append("String_Node_Str" + packageBase + "String_Node_Str");
  manifestLines.append("String_Node_Str" + packageBase + "String_Node_Str");
  manifestLines.append("String_Node_Str");
  manifestLines.append("String_Node_Str");
  manifestLines.append("String_Node_Str");
  manifestLines.append("String_Node_Str");
  manifestLines.append("String_Node_Str");
  try {
    manifestFile.appendContents(new ByteArrayInputStream(manifestLines.toString().getBytes()),IResource.FORCE,null);
  }
 catch (  CoreException e) {
    e.printStackTrace();
  }
}
Program: 133347
Project: 133347
Buggy source:
@Override public void update(IUpdateable component){
  if (component == meshComp) {
    PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable(){
      @Override public void run(){
        editor.setDirty(true);
      }
    }
);
  }
}

Fixed version (ground truth):
@Override public void update(IUpdateable component){
  PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable(){
    @Override public void run(){
      editor.setDirty(true);
    }
  }
);
}
Program: 133348
Project: 133348
Buggy source:
/** 
 * Update elementTreeViewer when new elements are added to the mesh.
 * @param component
 * @see IUpdateableListener#update(IUpdateable)
 */
@Override public void update(IUpdateable component){
  logger.info("String_Node_Str" + "String_Node_Str");
  PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable(){
    @Override public void run(){
      if (elementTreeViewer != null) {
        logger.info("String_Node_Str" + "String_Node_Str");
        if (meshComponent != null) {
          elementTreeViewer.setInput(meshComponent.getPolygons());
        }
        elementTreeViewer.refresh();
        elementTreeViewer.getTree().redraw();
      }
    }
  }
);
  return;
}

Fixed version (ground truth):
/** 
 * Update elementTreeViewer when new elements are added to the mesh.
 * @param component
 * @see IUpdateableListener#update(IUpdateable)
 */
@Override public void update(IUpdateable component){
  if (component == meshComponent) {
    logger.info("String_Node_Str" + "String_Node_Str");
    PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable(){
      @Override public void run(){
        if (elementTreeViewer != null) {
          logger.info("String_Node_Str" + "String_Node_Str");
          if (meshComponent != null) {
            elementTreeViewer.setInput(meshComponent.getPolygons());
          }
          elementTreeViewer.refresh();
          elementTreeViewer.getTree().redraw();
        }
      }
    }
);
  }
  return;
}
Program: 133349
Project: 133349
Buggy source:
@Override public void update(IManagedUpdateable component,SubscriptionType[] types){
  notifyListeners();
}

Fixed version (ground truth):
@Override public void update(IManagedUpdateable component,SubscriptionType[] types){
  if (types.length != 1 || !SubscriptionType.PROPERTY.equals(types[0])) {
    notifyListeners();
  }
 else {
    notifyListeners(new ICEObject());
  }
}
Program: 133350
Project: 133350
Buggy source:
@Override public void setAllowedValues(List<String> values){
  allowedValues=values;
}

Fixed version (ground truth):
@Override public void setAllowedValues(List<String> values){
  allowedValues=values;
  if (allowedValues != null && !allowedValues.isEmpty()) {
    setValue(allowedValues.get(0));
  }
}
Program: 133351
Project: 133351
Buggy source:
/** 
 * This operation clears the Eclipse console. 
 */
public static void clearConsole(){
  if (console != null) {
    console.clearConsole();
  }
}

Fixed version (ground truth):
/** 
 * This operation clears the Eclipse console.
 */
public static void clearConsole(){
  if (console != null) {
    console.clearConsole();
  }
}
Program: 133352
Project: 133352
Buggy source:
/** 
 * This operation allows subclasses to post errors and return the  appropriate status to the Item executing the Action. 
 * @param errorMessage The descriptive message for the error.
 * @param exception A possible exception to print to the Logger.
 * @return status The error status.
 */
protected FormStatus actionError(String errorMessage,Exception exception){
  if (exception == null) {
    logger.error(errorMessage);
  }
 else {
    logger.error(errorMessage,exception);
  }
  status=FormStatus.InfoError;
  return status;
}

Fixed version (ground truth):
/** 
 * This operation allows subclasses to post errors and return the appropriate status to the Item executing the Action.
 * @param errorMessage The descriptive message for the error.
 * @param exception A possible exception to print to the Logger.
 * @return status The error status.
 */
protected FormStatus actionError(String errorMessage,Exception exception){
  if (exception == null) {
    logger.error(errorMessage);
  }
 else {
    logger.error(errorMessage,exception);
  }
  status=FormStatus.InfoError;
  return status;
}
Program: 133353
Project: 133353
Buggy source:
/** 
 * This static method initializes the data structures necessary  for Eclipse Console output for the Action.execute method. 
 */
protected static void initializeConsoleOutput(){
  Display.getDefault().asyncExec(new Runnable(){
    @Override public void run(){
      IWorkbenchPage page=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
      try {
        consoleView=(IConsoleView)page.showView(IConsoleConstants.ID_CONSOLE_VIEW);
        console=new MessageConsole("String_Node_Str",null);
        ConsolePlugin.getDefault().getConsoleManager().addConsoles(new IConsole[]{console});
        consoleView.display(console);
        console.activate();
        msgStream=console.newMessageStream();
        msgStream.setActivateOnWrite(true);
        msgStream.println("String_Node_Str");
      }
 catch (      PartInitException e) {
        logger.error("String_Node_Str" + "String_Node_Str");
        logger.error(getClass().getName() + "String_Node_Str",e);
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * This static method initializes the data structures necessary for Eclipse Console output for the Action.execute method.
 */
protected static void initializeConsoleOutput(){
  Display.getDefault().asyncExec(new Runnable(){
    @Override public void run(){
      IWorkbenchPage page=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
      try {
        consoleView=(IConsoleView)page.showView(IConsoleConstants.ID_CONSOLE_VIEW);
        if (console == null) {
          console=new MessageConsole("String_Node_Str",null);
          ConsolePlugin.getDefault().getConsoleManager().addConsoles(new IConsole[]{console});
          consoleView.display(console);
          console.activate();
          msgStream=console.newMessageStream();
          msgStream.setActivateOnWrite(true);
          msgStream.println("String_Node_Str");
        }
      }
 catch (      PartInitException e) {
        logger.error("String_Node_Str" + "String_Node_Str");
        logger.error(getClass().getName() + "String_Node_Str",e);
      }
    }
  }
);
}
Program: 133354
Project: 133354
Buggy source:
/** 
 * This operation can be used by subclasses to post text to  the Eclipse Console. 
 * @param sText The string to print to the Console.
 */
protected void postConsoleText(final String sText){
  if (msgStream == null) {
    initializeConsoleOutput();
  }
  Display.getDefault().asyncExec(new Runnable(){
    @Override public void run(){
      if (msgStream != null) {
        msgStream.println(sText);
      }
    }
  }
);
  return;
}

Fixed version (ground truth):
/** 
 * This operation can be used by subclasses to post text to the Eclipse Console.
 * @param sText The string to print to the Console.
 */
protected void postConsoleText(final String sText){
  if (msgStream == null) {
    initializeConsoleOutput();
  }
  Display.getDefault().asyncExec(new Runnable(){
    @Override public void run(){
      if (msgStream != null) {
        msgStream.println(sText);
      }
    }
  }
);
  return;
}