nus-yam/ex-repair huggingface dataset:
Program: 101338
Project: 101338
Buggy source:
@Test public void testFromRelCypherResult() throws Exception {
  final Relationship rel=gdb.getReferenceNode().createRelationshipTo(gdb.getReferenceNode(),DynamicRelationshipType.withName("String_Node_Str"));
  final CypherQueryExecutor.CypherResult result=result("String_Node_Str",rel);
  final SubGraph graph=SubGraph.from(result);
  assertEquals(1,graph.getNodes().size());
  final Map<Long,Map<String,Object>> rels=graph.getRelationships();
  assertEquals(1,rels.size());
  assertEquals(true,rels.containsKey(rel.getId()));
}

Fixed version (ground truth):
@Test public void testFromRelCypherResult() throws Exception {
  final Relationship rel=aNode.createRelationshipTo(aNode,DynamicRelationshipType.withName("String_Node_Str"));
  final CypherQueryExecutor.CypherResult result=result("String_Node_Str",rel);
  final SubGraph graph=SubGraph.from(gdb,result);
  assertEquals(1,graph.getNodes().size());
  final Map<Long,Map<String,Object>> rels=graph.getRelationships();
  assertEquals(1,rels.size());
  assertEquals(true,rels.containsKey(rel.getId()));
}
Program: 101339
Project: 101339
Buggy source:
@Test public void testMarkRelationshipsFromVariableLength() throws Exception {
  final Node n1=gdb.createNode();
  final Node n0=gdb.getReferenceNode();
  final Relationship relationship=n0.createRelationshipTo(n1,DynamicRelationshipType.withName("String_Node_Str"));
  final SubGraph graph=SubGraph.from(gdb);
  final CypherQueryExecutor executor=new CypherQueryExecutor(gdb,null);
  final CypherQueryExecutor.CypherResult result=executor.cypherQuery("String_Node_Str",null);
  graph.markSelection(result);
  final Map<String,Object> nodeData=graph.getNodes().get(n0.getId());
  System.out.println("String_Node_Str" + nodeData);
  assertEquals(true,nodeData.containsKey("String_Node_Str"));
  final Map<String,Object> relData=graph.getRelationships().get(relationship.getId());
  System.out.println("String_Node_Str" + relData);
  assertEquals(true,relData.containsKey("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void testMarkRelationshipsFromVariableLength() throws Exception {
  final Node n1=gdb.createNode();
  final Node n0=aNode;
  final Relationship relationship=n0.createRelationshipTo(n1,DynamicRelationshipType.withName("String_Node_Str"));
  final SubGraph graph=SubGraph.from(gdb);
  final CypherQueryExecutor executor=new CypherQueryExecutor(gdb,null);
  final CypherQueryExecutor.CypherResult result=executor.cypherQuery("String_Node_Str",null);
  graph.markSelection(result);
  final Map<String,Object> nodeData=graph.getNodes().get(n0.getId());
  System.out.println("String_Node_Str" + nodeData);
  assertEquals(true,nodeData.containsKey("String_Node_Str"));
  final Map<String,Object> relData=graph.getRelationships().get(relationship.getId());
  System.out.println("String_Node_Str" + relData);
  assertEquals(true,relData.containsKey("String_Node_Str"));
}
Program: 101340
Project: 101340
Buggy source:
@Before public void setUp() throws Exception {
  gdb=new ImpermanentGraphDatabase();
  gdb.beginTx();
}

Fixed version (ground truth):
@Before public void setUp() throws Exception {
  gdb=new TestGraphDatabaseFactory().newImpermanentDatabase();
  gdb.beginTx();
  aNode=gdb.createNode();
}
Program: 101341
Project: 101341
Buggy source:
@Test public void testFromPathCypherResult() throws Exception {
  final Relationship rel=gdb.getReferenceNode().createRelationshipTo(gdb.getReferenceNode(),DynamicRelationshipType.withName("String_Node_Str"));
  final Path path=new PathImpl.Builder(gdb.getReferenceNode()).push(rel).build();
  final CypherQueryExecutor.CypherResult result=result("String_Node_Str",path);
  final SubGraph graph=SubGraph.from(result);
  assertEquals(1,graph.getNodes().size());
  final Map<Long,Map<String,Object>> rels=graph.getRelationships();
  assertEquals(1,rels.size());
  assertEquals(true,rels.containsKey(rel.getId()));
}

Fixed version (ground truth):
@Test public void testFromPathCypherResult() throws Exception {
  final Relationship rel=aNode.createRelationshipTo(aNode,DynamicRelationshipType.withName("String_Node_Str"));
  final Path path=new PathImpl.Builder(aNode).push(rel).build();
  final CypherQueryExecutor.CypherResult result=result("String_Node_Str",path);
  final SubGraph graph=SubGraph.from(gdb,result);
  assertEquals(1,graph.getNodes().size());
  final Map<Long,Map<String,Object>> rels=graph.getRelationships();
  assertEquals(1,rels.size());
  assertEquals(true,rels.containsKey(rel.getId()));
}
Program: 101342
Project: 101342
Buggy source:
private Object toJsonCompatible(Object value){
  if (value instanceof Node) {
    final Node node=(Node)value;
    final Map<String,Object> result=SubGraph.toMap(node);
    result.put("String_Node_Str",node.getId());
    final List<String> labelNames=SubGraph.getLabelNames(node);
    if (!labelNames.isEmpty())     result.put("String_Node_Str",labelNames);
    return result;
  }
  if (value instanceof Relationship) {
    final Relationship relationship=(Relationship)value;
    final Map<String,Object> result=SubGraph.toMap(relationship);
    result.put("String_Node_Str",relationship.getId());
    result.put("String_Node_Str",relationship.getStartNode().getId());
    result.put("String_Node_Str",relationship.getEndNode().getId());
    result.put("String_Node_Str",relationship.getType().name());
    return result;
  }
  if (value instanceof Iterable) {
    final List<Object> result=new ArrayList<Object>();
    for (    Object inner : (Iterable)value) {
      result.add(toJsonCompatible(inner));
    }
    return result;
  }
  return value;
}

Fixed version (ground truth):
private Object toJsonCompatible(Object value){
  if (value instanceof Node) {
    final Node node=(Node)value;
    final Map<String,Object> result=SubGraph.toMap((PropertyContainer)node);
    result.put("String_Node_Str",node.getId());
    final List<String> labelNames=SubGraph.getLabelNames(node);
    if (!labelNames.isEmpty())     result.put("String_Node_Str",labelNames);
    return result;
  }
  if (value instanceof Relationship) {
    final Relationship relationship=(Relationship)value;
    final Map<String,Object> result=SubGraph.toMap((PropertyContainer)relationship);
    result.put("String_Node_Str",relationship.getId());
    result.put("String_Node_Str",relationship.getStartNode().getId());
    result.put("String_Node_Str",relationship.getEndNode().getId());
    result.put("String_Node_Str",relationship.getType().name());
    return result;
  }
  if (value instanceof Iterable) {
    final List<Object> result=new ArrayList<Object>();
    for (    Object inner : (Iterable)value) {
      result.add(toJsonCompatible(inner));
    }
    return result;
  }
  return value;
}
Program: 101343
Project: 101343
Buggy source:
public Map mergeGeoff(String geoff){
  try {
    final Map<String,Object> result=new LinkedHashMap<String,Object>();
    for (    Map.Entry<String,PropertyContainer> entry : geoffService.mergeGeoff(geoff).entrySet()) {
      result.put(entry.getKey(),geoffExportService.toMap(entry.getValue()));
    }
    return result;
  }
 catch (  SubgraphError subgraphError) {
    throw new RuntimeException("String_Node_Str" + geoff,subgraphError);
  }
catch (  SyntaxError syntaxError) {
    throw new RuntimeException("String_Node_Str" + geoff,syntaxError);
  }
}

Fixed version (ground truth):
public Map<String,Object> mergeGeoff(String geoff){
  try {
    final Map<String,Object> result=new LinkedHashMap<String,Object>();
    for (    Map.Entry<String,PropertyContainer> entry : geoffService.mergeGeoff(geoff).entrySet()) {
      result.put(entry.getKey(),geoffExportService.toMap(entry.getValue()));
    }
    return result;
  }
 catch (  SubgraphError subgraphError) {
    throw new RuntimeException("String_Node_Str" + geoff,subgraphError);
  }
catch (  SyntaxError syntaxError) {
    throw new RuntimeException("String_Node_Str" + geoff,syntaxError);
  }
}
Program: 101344
Project: 101344
Buggy source:
public Map<String,Object> add(Relationship rel){
  final long id=rel.getId();
  if (relationships.containsKey(id)) {
    return relationships.get(id);
  }
  final Map<String,Object> data=toMap(rel);
  addRel(id,data);
  add(rel.getStartNode());
  add(rel.getEndNode());
  return data;
}

Fixed version (ground truth):
public Map<String,Object> add(Relationship rel){
  final long id=rel.getId();
  if (relationships.containsKey(id)) {
    return relationships.get(id);
  }
  final Map<String,Object> data=toMap(rel);
  addResolvedNodeIndexes(data,rel);
  addRel(id,data);
  add(rel.getStartNode());
  add(rel.getEndNode());
  return data;
}
Program: 101345
Project: 101345
Buggy source:
public CypherQueryExecutor(GraphDatabaseService gdb,Index index){
  this.index=index;
  executionEngine=new ExecutionEngine(gdb,StringLogger.SYSTEM);
}

Fixed version (ground truth):
public CypherQueryExecutor(GraphDatabaseService gdb,Index index){
  this.gdb=gdb;
  this.index=index;
  executionEngine=new ExecutionEngine(gdb,StringLogger.SYSTEM);
}
Program: 101346
Project: 101346
Buggy source:
private CypherResult cypherQuery(String query){
  if (isMutatingQuery(query)) {
    registerProperties(query);
  }
  query=removeSemicolon(query);
  long time=System.currentTimeMillis();
  final ExecutionResult result=executionEngine.profile(query);
  final Collection<Map<String,Object>> data=IteratorUtil.asCollection(result);
  time=System.currentTimeMillis() - time;
  return new CypherResult(result.columns(),data,result.getQueryStatistics(),time,result.executionPlanDescription());
}

Fixed version (ground truth):
private CypherResult cypherQuery(String query){
  if (isMutatingQuery(query)) {
    registerProperties(query);
  }
  query=removeSemicolon(query);
  long time=System.currentTimeMillis();
  Transaction tx=gdb.beginTx();
  try {
    final ExecutionResult result=executionEngine.profile(query);
    final Collection<Map<String,Object>> data=IteratorUtil.asCollection(result);
    time=System.currentTimeMillis() - time;
    CypherResult cypherResult=new CypherResult(result.columns(),data,result.getQueryStatistics(),time,result.executionPlanDescription());
    tx.success();
    return cypherResult;
  }
  finally {
    tx.finish();
  }
}
Program: 101347
Project: 101347
Buggy source:
private void enableAutoIndex(AutoIndexer<? extends PropertyContainer> autoIndexer){
  autoIndexer.setEnabled(true);
  autoIndexer.getAutoIndex();
}

Fixed version (ground truth):
private void enableAutoIndex(AutoIndexer<? extends PropertyContainer> autoIndexer){
  autoIndexer.setEnabled(true);
}
Program: 101348
Project: 101348
Buggy source:
public static Neo4jService getService(final HttpServletRequest request){
  HttpSession session=request.getSession(true);
  Neo4jService service=(Neo4jService)session.getAttribute(SERVICE);
  if (service != null)   return service;
  service=databaseInfo.shouldCreateNew() ? new Neo4jService() : new Neo4jService(databaseInfo.getDatabase());
  if (databaseInfo.shouldImport()) {
    service.initializeFrom(SubGraph.from(databaseInfo.getDatabase()));
  }
  session.setAttribute(SERVICE,service);
  return service;
}

Fixed version (ground truth):
public static Neo4jService getService(final HttpServletRequest request){
  try {
    HttpSession session=request.getSession(true);
    Neo4jService service=(Neo4jService)session.getAttribute(SERVICE);
    if (service != null)     return service;
    service=databaseInfo.shouldCreateNew() ? new Neo4jService() : new Neo4jService(databaseInfo.getDatabase());
    if (databaseInfo.shouldImport()) {
      service.initializeFrom(SubGraph.from(databaseInfo.getDatabase()));
    }
    session.setAttribute(SERVICE,service);
    return service;
  }
 catch (  LifecycleException lce) {
    reset(request);
    SessionHoldingListener.cleanSessions();
    throw new RuntimeException(lce);
  }
catch (  OutOfMemoryError oom) {
    reset(request);
    SessionHoldingListener.cleanSessions();
    throw new RuntimeException(oom);
  }
}
Program: 101350
Project: 101350
Buggy source:
public PagesBean(JSONObject json) throws ParseException {
  try {
    title=json.getString("String_Node_Str");
    columns=json.getInt("String_Node_Str");
    JSONArray layout=json.getJSONArray("String_Node_Str");
    this.layout=new ColumnBean[layout.length()];
    for (int i=0; i < layout.length(); i++) {
      ColumnBean c=new ColumnBean(layout.getJSONArray(i));
      this.layout[i]=c;
    }
  }
 catch (  JSONException e) {
    log.error(ExceptionUtil.getStackTrace(e));
    throw new ParseException(ExceptionUtil.getStackTrace(e),0);
  }
}

Fixed version (ground truth):
public PagesBean(JSONObject json) throws ParseException {
  try {
    title=json.getString("String_Node_Str");
    columns=json.getInt("String_Node_Str");
    JSONArray layout=json.getJSONArray("String_Node_Str");
    this.layout=new ColumnBean[layout.length()];
    for (int i=0; i < layout.length(); i++) {
      ColumnBean c=new ColumnBean(layout.getJSONArray(i));
      this.layout[i]=c;
    }
    if (json.has("String_Node_Str")) {
      JSONArray ja=json.getJSONArray("String_Node_Str");
      columnSizes=new int[ja.length()];
      for (int i=0; i < ja.length(); i++) {
        columnSizes[i]=ja.getInt(i);
      }
    }
  }
 catch (  JSONException e) {
    log.error(ExceptionUtil.getStackTrace(e));
    throw new ParseException(ExceptionUtil.getStackTrace(e),0);
  }
}
Program: 101351
Project: 101351
Buggy source:
public ParametersBean(JSONObject json) throws ParseException {
  try {
    name=json.getString("String_Node_Str");
    type=json.getString("String_Node_Str");
    value=json.getString("String_Node_Str");
    if (json.has("String_Node_Str")) {
      label=json.getString("String_Node_Str");
    }
 else {
      label=json.getString("String_Node_Str");
    }
    if (json.get("String_Node_Str").toString().intern() == "String_Node_Str".intern()) {
      control=json.getString("String_Node_Str");
    }
    if (json.has("String_Node_Str")) {
      JSONArray aj=json.getJSONArray("String_Node_Str");
      options=new OptionBean[aj.length()];
      for (int i=0; i < aj.length(); i++) {
        OptionBean o=new OptionBean(aj.getJSONObject(i));
        options[i]=o;
      }
    }
  }
 catch (  Exception e) {
    log.error(ExceptionUtil.getStackTrace(e));
    throw new ParseException(ExceptionUtil.getStackTrace(e),0);
  }
}

Fixed version (ground truth):
public ParametersBean(JSONObject json) throws ParseException {
  try {
    name=json.getString("String_Node_Str");
    type=json.getString("String_Node_Str");
    if (json.has("String_Node_Str")) {
      if (json.get("String_Node_Str").getClass() == JSONArray.class) {
        JSONArray ja=json.getJSONArray("String_Node_Str");
        Collection<String> c=new HashSet<String>();
        for (int i=0; i < ja.length(); i++) {
          c.add(ja.getString(i));
        }
        this.value=c;
      }
 else {
        Collection<String> c=new HashSet<String>();
        c.add(json.getString("String_Node_Str"));
        this.value=c;
      }
    }
    if (json.has("String_Node_Str")) {
      label=json.getString("String_Node_Str");
    }
 else {
      label=json.getString("String_Node_Str");
    }
    if (json.get("String_Node_Str").toString().intern() == "String_Node_Str".intern()) {
      control=json.getString("String_Node_Str");
    }
    if (json.has("String_Node_Str")) {
      callback=json.getString("String_Node_Str");
    }
    if (json.has("String_Node_Str")) {
      JSONArray aj=json.getJSONArray("String_Node_Str");
      options=new OptionBean[aj.length()];
      for (int i=0; i < aj.length(); i++) {
        OptionBean o=new OptionBean(aj.getJSONObject(i));
        options[i]=o;
      }
    }
    if (json.has("String_Node_Str")) {
      edit=json.getInt("String_Node_Str");
    }
  }
 catch (  Exception e) {
    log.error(ExceptionUtil.getStackTrace(e));
    throw new ParseException(ExceptionUtil.getStackTrace(e),0);
  }
}
Program: 101352
Project: 101352
Buggy source:
@XmlElement public String getValue(){
  return value;
}

Fixed version (ground truth):
@XmlElement public Collection<String> getValue(){
  return value;
}
Program: 101353
Project: 101353
Buggy source:
public void setValue(String value){
  this.value=value;
}

Fixed version (ground truth):
public void setValue(Collection<String> value){
  this.value=value;
}
Program: 101354
Project: 101354
Buggy source:
public JSONObject deserialize(){
  JSONObject json=new JSONObject();
  try {
    json.put("String_Node_Str",this.name);
    json.put("String_Node_Str",this.type);
    json.put("String_Node_Str",this.value);
    if (control != null) {
      json.put("String_Node_Str",this.control);
    }
    json.put("String_Node_Str",this.label);
    if (options != null) {
      JSONArray ja=new JSONArray();
      for (int i=0; i < options.length; i++) {
        ja.put(this.options[i].deserialize());
      }
      json.put("String_Node_Str",(JSONArray)ja);
    }
  }
 catch (  Exception e) {
    log.error(ExceptionUtil.getStackTrace(e));
  }
  return json;
}

Fixed version (ground truth):
public JSONObject deserialize(){
  JSONObject json=new JSONObject();
  try {
    json.put("String_Node_Str",this.name);
    json.put("String_Node_Str",this.type);
    if (this.value != null) {
      JSONArray ja=new JSONArray();
      for (      String s : this.value) {
        ja.put(s);
      }
      json.put("String_Node_Str",ja);
    }
    if (control != null) {
      json.put("String_Node_Str",this.control);
    }
    json.put("String_Node_Str",this.label);
    json.put("String_Node_Str",this.edit);
    if (this.callback != null) {
      json.put("String_Node_Str",callback);
    }
    if (options != null) {
      JSONArray ja=new JSONArray();
      for (int i=0; i < options.length; i++) {
        ja.put(this.options[i].deserialize());
      }
      json.put("String_Node_Str",ja);
    }
  }
 catch (  Exception e) {
    log.error(ExceptionUtil.getStackTrace(e));
  }
  return json;
}
Program: 101355
Project: 101355
Buggy source:
private JRadioButton getImperialButton(){
  if (myImperialButton == null) {
    myImperialButton=new JRadioButton("String_Node_Str");
    myImperialButton.setSelected(true);
    myImperialButton.addActionListener(new ActionListener(){
      @Override public void actionPerformed(      final ActionEvent e){
        if (myImperialButton.isSelected()) {
          getMetricButton().setSelected(false);
          if (myAoolpathsProcessor != null) {
            myAoolpathsProcessor.setOutputMetricCoordinates(false);
          }
        }
      }
    }
);
  }
  return myImperialButton;
}

Fixed version (ground truth):
private JRadioButton getImperialButton(){
  if (myImperialButton == null) {
    myImperialButton=new JRadioButton("String_Node_Str");
    myImperialButton.setSelected(true);
    myImperialButton.setToolTipText("String_Node_Str");
    myImperialButton.addActionListener(new ActionListener(){
      @Override public void actionPerformed(      final ActionEvent e){
        if (myImperialButton.isSelected()) {
          getMetricButton().setSelected(false);
          if (myAoolpathsProcessor != null) {
            myAoolpathsProcessor.setOutputMetricCoordinates(false);
          }
        }
      }
    }
);
  }
  return myImperialButton;
}
Program: 101356
Project: 101356
Buggy source:
private JRadioButton getMetricButton(){
  if (myMetricButton == null) {
    myMetricButton=new JRadioButton("String_Node_Str");
    myMetricButton.setSelected(false);
    myMetricButton.addActionListener(new ActionListener(){
      @Override public void actionPerformed(      final ActionEvent e){
        if (myMetricButton.isSelected()) {
          getImperialButton().setSelected(false);
          if (myAoolpathsProcessor != null) {
            myAoolpathsProcessor.setOutputMetricCoordinates(true);
          }
        }
      }
    }
);
  }
  return myMetricButton;
}

Fixed version (ground truth):
private JRadioButton getMetricButton(){
  if (myMetricButton == null) {
    myMetricButton=new JRadioButton("String_Node_Str");
    myMetricButton.setSelected(false);
    myMetricButton.setToolTipText("String_Node_Str");
    myMetricButton.addActionListener(new ActionListener(){
      @Override public void actionPerformed(      final ActionEvent e){
        if (myMetricButton.isSelected()) {
          getImperialButton().setSelected(false);
          if (myAoolpathsProcessor != null) {
            myAoolpathsProcessor.setOutputMetricCoordinates(true);
          }
        }
      }
    }
);
  }
  return myMetricButton;
}
Program: 101357
Project: 101357
Buggy source:
private JPanel getInitialYPanel(){
  if (myInitialYPanel == null) {
    myInitialYPanel=new JPanel();
    myInitialYPanel.setLayout(new BorderLayout());
    myInitialYPanel.add(new JLabel("String_Node_Str"),BorderLayout.WEST);
    final JTextField field=new JTextField(NumberFormat.getInstance().format(0.0));
    myInitialYPanel.add(field,BorderLayout.CENTER);
    myInitialYPanel.addPropertyChangeListener("String_Node_Str",new PropertyChangeListener(){
      @Override public void propertyChange(      PropertyChangeEvent evt){
        field.setEnabled(myInitialYPanel.isEnabled());
      }
    }
);
    myInitialYPanel.setEnabled(false);
    field.getDocument().addUndoableEditListener(new UndoableEditListener(){
      @Override public void undoableEditHappened(      UndoableEditEvent evt){
        try {
          selectedInitialYCoordinate=NumberFormat.getInstance().parse(field.getText()).doubleValue();
          if (myAoolpathsProcessor != null) {
            myAoolpathsProcessor.setAbsoluteYStart(selectedInitialYCoordinate);
          }
        }
 catch (        ParseException e) {
          evt.getEdit().undo();
        }
      }
    }
);
  }
  return myInitialYPanel;
}

Fixed version (ground truth):
private JPanel getInitialYPanel(){
  if (myInitialYPanel == null) {
    myInitialYPanel=new JPanel();
    myInitialYPanel.setLayout(new BorderLayout());
    myInitialYPanel.add(new JLabel("String_Node_Str"),BorderLayout.WEST);
    final JTextField field=new JTextField(NumberFormat.getInstance().format(0.0));
    myInitialYPanel.add(field,BorderLayout.CENTER);
    myInitialYPanel.setToolTipText("String_Node_Str");
    myInitialYPanel.addPropertyChangeListener("String_Node_Str",new PropertyChangeListener(){
      @Override public void propertyChange(      PropertyChangeEvent evt){
        field.setEnabled(myInitialYPanel.isEnabled());
      }
    }
);
    myInitialYPanel.setEnabled(false);
    field.getDocument().addUndoableEditListener(new UndoableEditListener(){
      @Override public void undoableEditHappened(      UndoableEditEvent evt){
        try {
          selectedInitialYCoordinate=NumberFormat.getInstance().parse(field.getText()).doubleValue();
          if (myAoolpathsProcessor != null) {
            myAoolpathsProcessor.setAbsoluteYStart(selectedInitialYCoordinate);
          }
        }
 catch (        ParseException e) {
          evt.getEdit().undo();
        }
      }
    }
);
  }
  return myInitialYPanel;
}
Program: 101358
Project: 101358
Buggy source:
private JPanel getZCuttingHeightPanel(){
  if (myZCuttingHeightPanel == null) {
    myZCuttingHeightPanel=new JPanel();
    myZCuttingHeightPanel.setLayout(new BorderLayout());
    myZCuttingHeightPanel.add(new JLabel("String_Node_Str"),BorderLayout.WEST);
    final JTextField field=new JTextField(NumberFormat.getInstance().format(0.0));
    myZCuttingHeightPanel.add(field,BorderLayout.CENTER);
    myZCuttingHeightPanel.addPropertyChangeListener("String_Node_Str",new PropertyChangeListener(){
      @Override public void propertyChange(      PropertyChangeEvent evt){
        field.setEnabled(myZCuttingHeightPanel.isEnabled());
      }
    }
);
    myZCuttingHeightPanel.setEnabled(false);
    field.getDocument().addUndoableEditListener(new UndoableEditListener(){
      @Override public void undoableEditHappened(      UndoableEditEvent evt){
        try {
          selectedZCuttingHeight=NumberFormat.getInstance().parse(field.getText()).doubleValue();
          if (myAoolpathsProcessor != null) {
            myAoolpathsProcessor.setZCuttingHeight(selectedZCuttingHeight);
          }
        }
 catch (        ParseException e) {
          evt.getEdit().undo();
        }
      }
    }
);
  }
  return myZCuttingHeightPanel;
}

Fixed version (ground truth):
private JPanel getZCuttingHeightPanel(){
  if (myZCuttingHeightPanel == null) {
    myZCuttingHeightPanel=new JPanel();
    myZCuttingHeightPanel.setLayout(new BorderLayout());
    myZCuttingHeightPanel.add(new JLabel("String_Node_Str"),BorderLayout.WEST);
    myZCuttingHeightPanel.setToolTipText("String_Node_Str");
    final JTextField field=new JTextField(NumberFormat.getInstance().format(0.0));
    myZCuttingHeightPanel.add(field,BorderLayout.CENTER);
    myZCuttingHeightPanel.addPropertyChangeListener("String_Node_Str",new PropertyChangeListener(){
      @Override public void propertyChange(      PropertyChangeEvent evt){
        field.setEnabled(myZCuttingHeightPanel.isEnabled());
      }
    }
);
    myZCuttingHeightPanel.setEnabled(false);
    field.getDocument().addUndoableEditListener(new UndoableEditListener(){
      @Override public void undoableEditHappened(      UndoableEditEvent evt){
        try {
          selectedZCuttingHeight=NumberFormat.getInstance().parse(field.getText()).doubleValue();
          if (myAoolpathsProcessor != null) {
            myAoolpathsProcessor.setZCuttingHeight(selectedZCuttingHeight);
          }
        }
 catch (        ParseException e) {
          evt.getEdit().undo();
        }
      }
    }
);
  }
  return myZCuttingHeightPanel;
}
Program: 101359
Project: 101359
Buggy source:
private JPanel getInitialXPanel(){
  if (myInitialXPanel == null) {
    myInitialXPanel=new JPanel();
    myInitialXPanel.setLayout(new BorderLayout());
    myInitialXPanel.add(new JLabel("String_Node_Str"),BorderLayout.WEST);
    final JTextField field=new JTextField(NumberFormat.getInstance().format(0.0));
    myInitialXPanel.add(field,BorderLayout.CENTER);
    myInitialXPanel.addPropertyChangeListener("String_Node_Str",new PropertyChangeListener(){
      @Override public void propertyChange(      PropertyChangeEvent evt){
        field.setEnabled(myInitialXPanel.isEnabled());
      }
    }
);
    myInitialXPanel.setEnabled(false);
    field.getDocument().addUndoableEditListener(new UndoableEditListener(){
      @Override public void undoableEditHappened(      UndoableEditEvent evt){
        try {
          selectedInitialXCoordinate=NumberFormat.getInstance().parse(field.getText()).doubleValue();
          if (myAoolpathsProcessor != null) {
            myAoolpathsProcessor.setAbsoluteXStart(selectedInitialXCoordinate);
          }
        }
 catch (        ParseException e) {
          evt.getEdit().undo();
        }
      }
    }
);
  }
  return myInitialXPanel;
}

Fixed version (ground truth):
private JPanel getInitialXPanel(){
  if (myInitialXPanel == null) {
    myInitialXPanel=new JPanel();
    myInitialXPanel.setLayout(new BorderLayout());
    myInitialXPanel.add(new JLabel("String_Node_Str"),BorderLayout.WEST);
    final JTextField field=new JTextField(NumberFormat.getInstance().format(0.0));
    myInitialXPanel.add(field,BorderLayout.CENTER);
    myInitialYPanel.setToolTipText("String_Node_Str");
    myInitialXPanel.addPropertyChangeListener("String_Node_Str",new PropertyChangeListener(){
      @Override public void propertyChange(      PropertyChangeEvent evt){
        field.setEnabled(myInitialXPanel.isEnabled());
      }
    }
);
    myInitialXPanel.setEnabled(false);
    field.getDocument().addUndoableEditListener(new UndoableEditListener(){
      @Override public void undoableEditHappened(      UndoableEditEvent evt){
        try {
          selectedInitialXCoordinate=NumberFormat.getInstance().parse(field.getText()).doubleValue();
          if (myAoolpathsProcessor != null) {
            myAoolpathsProcessor.setAbsoluteXStart(selectedInitialXCoordinate);
          }
        }
 catch (        ParseException e) {
          evt.getEdit().undo();
        }
      }
    }
);
  }
  return myInitialXPanel;
}
Program: 101360
Project: 101360
Buggy source:
private Component getZDownMovementPanel(){
  if (myZDownMovementPanel == null) {
    myZDownMovementPanel=new JPanel();
    myZDownMovementPanel.setLayout(new BorderLayout());
    myZDownMovementPanel.add(new JLabel("String_Node_Str"),BorderLayout.WEST);
    final JTextField field=new JTextField(NumberFormat.getInstance().format(ToolpathsProcessor.CLEARANCE_Z));
    myZDownMovementPanel.add(field,BorderLayout.CENTER);
    field.getDocument().addUndoableEditListener(new UndoableEditListener(){
      @Override public void undoableEditHappened(      UndoableEditEvent evt){
        try {
          selectedZClearance=NumberFormat.getInstance().parse(field.getText()).doubleValue();
          if (myAoolpathsProcessor != null) {
            myAoolpathsProcessor.setZClearance(selectedZClearance);
          }
        }
 catch (        ParseException e) {
          evt.getEdit().undo();
        }
      }
    }
);
  }
  return myZDownMovementPanel;
}

Fixed version (ground truth):
private Component getZDownMovementPanel(){
  if (myZDownMovementPanel == null) {
    myZDownMovementPanel=new JPanel();
    myZDownMovementPanel.setLayout(new BorderLayout());
    myZDownMovementPanel.add(new JLabel("String_Node_Str"),BorderLayout.WEST);
    myZDownMovementPanel.setToolTipText("String_Node_Str");
    final JTextField field=new JTextField(NumberFormat.getInstance().format(ToolpathsProcessor.CLEARANCE_Z));
    myZDownMovementPanel.add(field,BorderLayout.CENTER);
    field.getDocument().addUndoableEditListener(new UndoableEditListener(){
      @Override public void undoableEditHappened(      UndoableEditEvent evt){
        try {
          selectedZClearance=NumberFormat.getInstance().parse(field.getText()).doubleValue();
          if (myAoolpathsProcessor != null) {
            myAoolpathsProcessor.setZClearance(selectedZClearance);
          }
        }
 catch (        ParseException e) {
          evt.getEdit().undo();
        }
      }
    }
);
  }
  return myZDownMovementPanel;
}
Program: 101361
Project: 101361
Buggy source:
private void gCodeCutterUp(Writer w,final Point3d p) throws IOException {
  if (w != null) {
    if (isOutputAbsoluteCoordinates()) {
      w.write("String_Node_Str" + gCodeFormat.format(p.x + getAbsoluteXStart()) + "String_Node_Str"+ gCodeFormat.format(p.y + getAbsoluteYStart())+ "String_Node_Str"+ gCodeFormat.format(getZCuttingHeight() + getZClearance())+ "String_Node_Str");
      p.z=getZClearance();
    }
 else {
      w.write("String_Node_Str" + gCodeFormat.format(getZClearance()) + "String_Node_Str");
    }
  }
  gCodeStrokes.add(new GCodeStroke(new Vector3f(0.0f,0.0f,(float)getZClearance()),G_CODE_COLOR_NORMAL));
}

Fixed version (ground truth):
private void gCodeCutterUp(Writer w,final Point3d p) throws IOException {
  if (w != null) {
    if (isOutputAbsoluteCoordinates()) {
      w.write("String_Node_Str" + gCodeFormat.format(convertUnits(p.x) + getAbsoluteXStart()) + "String_Node_Str"+ gCodeFormat.format(convertUnits(p.y) + getAbsoluteYStart())+ "String_Node_Str"+ gCodeFormat.format(getZCuttingHeight() + getZClearance())+ "String_Node_Str");
      p.z=getZClearance();
    }
 else {
      w.write("String_Node_Str" + gCodeFormat.format(getZClearance()) + "String_Node_Str");
    }
  }
  gCodeStrokes.add(new GCodeStroke(new Vector3f(0.0f,0.0f,(float)getZClearance()),G_CODE_COLOR_NORMAL));
}
Program: 101362
Project: 101362
Buggy source:
private void gCodeCutterDown(final Writer w,final Point3d p) throws IOException {
  if (w != null) {
    if (isOutputAbsoluteCoordinates()) {
      w.write("String_Node_Str" + gCodeFormat.format(p.x + getAbsoluteXStart()) + "String_Node_Str"+ gCodeFormat.format(p.y + getAbsoluteYStart())+ "String_Node_Str"+ gCodeFormat.format(getZCuttingHeight())+ "String_Node_Str");
      p.z=0.0;
    }
 else {
      w.write("String_Node_Str" + gCodeFormat.format(-1 * getZClearance()) + "String_Node_Str");
    }
  }
  gCodeStrokes.add(new GCodeStroke(new Vector3f(0.0f,0.0f,(float)(-1 * getZClearance())),G_CODE_COLOR_NORMAL));
}

Fixed version (ground truth):
private void gCodeCutterDown(final Writer w,final Point3d p) throws IOException {
  if (w != null) {
    if (isOutputAbsoluteCoordinates()) {
      w.write("String_Node_Str" + gCodeFormat.format(convertUnits(p.x) + getAbsoluteXStart()) + "String_Node_Str"+ gCodeFormat.format(convertUnits(p.y) + getAbsoluteYStart())+ "String_Node_Str"+ gCodeFormat.format(getZCuttingHeight())+ "String_Node_Str");
      p.z=0.0;
    }
 else {
      w.write("String_Node_Str" + gCodeFormat.format(-1 * getZClearance()) + "String_Node_Str");
    }
  }
  gCodeStrokes.add(new GCodeStroke(new Vector3f(0.0f,0.0f,(float)(-1 * getZClearance())),G_CODE_COLOR_NORMAL));
}
Program: 101363
Project: 101363
Buggy source:
/** 
 * Simplistic loading of YAML initial data file.
 */
public void loadInitialData(){
  Logger.info("String_Node_Str");
  Map<String,List<Object>> data=(Map<String,List<Object>>)Yaml.load("String_Node_Str");
  if (PlayVersion.count() == 0) {
    final List<Object> versions=data.get("String_Node_Str");
    Logger.debug(String.format("String_Node_Str",versions.size()));
    Ebean.save(versions);
  }
  if (User.count() <= 1) {
    final List<User> users=CollectionUtils.castTo(data.get("String_Node_Str"),User.class);
    for (    User user : users) {
      user.rates=new ArrayList<Rate>();
    }
    Logger.debug(String.format("String_Node_Str",users.size()));
    Ebean.save(users);
  }
  if (Module.count() == 0) {
    final List<Module> modules=CollectionUtils.castTo(data.get("String_Node_Str"),Module.class);
    Logger.debug(String.format("String_Node_Str",modules.size()));
    for (    Module module : modules) {
      module.rating=new Rating(true);
    }
    Ebean.save(modules);
  }
  if (ModuleVersion.count() == 0) {
    final List<Object> versions=data.get("String_Node_Str");
    Logger.debug(String.format("String_Node_Str",versions.size()));
    Ebean.save(versions);
  }
}

Fixed version (ground truth):
/** 
 * Simplistic loading of YAML initial data file.
 */
public void loadInitialData(){
  Logger.info("String_Node_Str");
  Map<String,List<Object>> data=(Map<String,List<Object>>)Yaml.load("String_Node_Str");
  if (PlayVersion.count() == 0) {
    final List<Object> versions=data.get("String_Node_Str");
    Logger.debug(String.format("String_Node_Str",versions.size()));
    Ebean.save(versions);
  }
  if (User.count() <= 1) {
    final List<User> users=CollectionUtils.castTo(data.get("String_Node_Str"),User.class);
    for (    User user : users) {
      user.rates=new ArrayList<Rate>();
    }
    Logger.debug(String.format("String_Node_Str",users.size()));
    Ebean.save(users);
  }
  if (Module.count() == 0) {
    final List<Module> modules=CollectionUtils.castTo(data.get("String_Node_Str"),Module.class);
    Logger.debug(String.format("String_Node_Str",modules.size()));
    for (    Module module : modules) {
      module.rating=new Rating(true);
    }
    Ebean.save(modules);
  }
  if (ModuleVersion.count() == 0) {
    final List<ModuleVersion> versions=CollectionUtils.castTo(data.get("String_Node_Str"),ModuleVersion.class);
    Logger.debug(String.format("String_Node_Str",versions.size()));
    for (int i=0, versionsSize=versions.size(); i < versionsSize; i++) {
      ModuleVersion version=versions.get(i);
      BinaryContent binaryContent=new BinaryContent();
      binaryContent.content=new byte[0];
      binaryContent.contentLength=0;
      version.binaryFile=binaryContent;
    }
    Ebean.save(versions);
  }
}
Program: 101364
Project: 101364
Buggy source:
@Before public void setUp() throws Exception {
  System.out.println("String_Node_Str");
  t=new Todo();
}

Fixed version (ground truth):
@Before public void setUp() throws Exception {
  System.out.println("String_Node_Str");
}
Program: 101365
Project: 101365
Buggy source:
public MergeChanges(int anInt,String s){
  aDouble=1.0;
  this.anInt=anInt;
  this.flag=false;
  this.anInt=anInt + 2;
  this.aFloat=2F;
  this.string=s + "String_Node_Str";
}

Fixed version (ground truth):
public MergeChanges(int anInt,String s){
  aDouble=1.0;
  this.anInt=anInt;
  this.flag=false;
  this.anInt=anInt + 1;
  this.aFloat=2F;
  this.string=s + "String_Node_Str";
}
Program: 101366
Project: 101366
Buggy source:
/** 
 * FIXME timeout intelligently. FIXME test whether we can declare a type conversion for a Map.
 */
public static void amqpPublish(int brokerId,String exchange,String routingKey,String message,Map<String,String> properties){
  Connection connection=null;
  Channel channel=null;
  try {
    BrokerConnectionState connectionState=getConnectionState(brokerId);
    connection=openConnection(connectionState);
    channel=connection.createChannel();
    channel.basicPublish(exchange,routingKey,false,false,null,message.getBytes());
  }
 catch (  IOException ioe) {
    ioe.printStackTrace();
  }
 finally {
    try {
      if (channel != null) {
        channel.close();
      }
      if (connection != null) {
        connection.close(CONNECTION_CLOSE_TIMEOUT);
      }
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
}

Fixed version (ground truth):
/** 
 * FIXME timeout intelligently. FIXME test whether we can declare a type conversion for a Map.
 */
public static void amqpPublish(int brokerId,String exchange,String routingKey,String message,Map<String,String> properties){
  Connection connection=null;
  Channel channel=null;
  try {
    BrokerConnectionState connectionState=getConnectionState(brokerId);
    connection=openConnection(connectionState);
    channel=connection.createChannel();
    channel.basicPublish(exchange,routingKey,false,false,null,message.getBytes());
    state.put(brokerId,connectionState.currentAddress);
  }
 catch (  IOException ioe) {
    ioe.printStackTrace();
  }
 finally {
    try {
      if (channel != null) {
        channel.close();
      }
      if (connection != null) {
        connection.close(CONNECTION_CLOSE_TIMEOUT);
      }
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
}
Program: 101367
Project: 101367
Buggy source:
public static void amqpPrintFullConfiguration(int brokerId){
  BrokerConnectionState connectionState=new BrokerConnectionState();
  fillAllAdresses(connectionState,brokerId);
  if (connectionState.addresses != null) {
    Iterator<FullAddress> fullAddressesIter=connectionState.addresses.iterator();
    while (fullAddressesIter.hasNext()) {
      FullAddress currFullAddress=(FullAddress)fullAddressesIter.next();
      System.out.println(currFullAddress);
    }
  }
}

Fixed version (ground truth):
public static void amqpPrintFullConfiguration(int brokerId){
  BrokerConnectionState connectionState=new BrokerConnectionState();
  fillAllAdresses(connectionState,brokerId);
  FullAddress activeBroker=state.get(brokerId);
  boolean foundActiveInDb=false;
  if (connectionState.addresses != null) {
    Iterator<FullAddress> fullAddressesIter=connectionState.addresses.iterator();
    while (fullAddressesIter.hasNext()) {
      FullAddress currFullAddress=(FullAddress)fullAddressesIter.next();
      if (currFullAddress.equals(activeBroker)) {
        System.out.println(currFullAddress + "String_Node_Str");
        foundActiveInDb=true;
      }
 else {
        System.out.println(currFullAddress);
      }
    }
  }
  if (activeBroker == null) {
    System.out.println("String_Node_Str");
  }
 else   if (!foundActiveInDb) {
    System.out.println("String_Node_Str" + activeBroker + "String_Node_Str");
  }
}
Program: 101368
Project: 101368
Buggy source:
private static BrokerConnectionState getConnectionState(int brokerId){
  BrokerConnectionState connectionState=new BrokerConnectionState();
  fillAllAdresses(connectionState,brokerId);
  return connectionState;
}

Fixed version (ground truth):
private static BrokerConnectionState getConnectionState(int brokerId){
  BrokerConnectionState connectionState=new BrokerConnectionState();
  fillAllAdresses(connectionState,brokerId);
  connectionState.currentAddress=state.get(brokerId);
  return connectionState;
}
Program: 101369
Project: 101369
Buggy source:
@Test public void testIsTemplate(){
  ScanConfiguration configuration=mock(ScanConfiguration.class);
  when(configuration.getMasterLocale()).thenReturn("String_Node_Str");
  assertTrue(getFixture().isTemplate(new File("String_Node_Str"),configuration));
  assertFalse(getFixture().isTemplate(new File("String_Node_Str"),configuration));
  assertFalse(getFixture().isTemplate(new File("String_Node_Str"),configuration));
}

Fixed version (ground truth):
@Test public void testIsTemplate(){
  ScanConfiguration configuration=mock(ScanConfiguration.class);
  when(configuration.getMasterLocale()).thenReturn("String_Node_Str");
  assertTrue(getFixture().isTemplate(new File("String_Node_Str"),configuration.getMasterLocale()));
  assertFalse(getFixture().isTemplate(new File("String_Node_Str"),configuration.getMasterLocale()));
  assertFalse(getFixture().isTemplate(new File("String_Node_Str"),configuration.getMasterLocale()));
}
Program: 101370
Project: 101370
Buggy source:
public static URI computeLocaleResourceLocation(Locale locale,ProjectVersion version,URI templateLocation){
  PropertyScanner scanner=createScanner(version);
  File path=scanner.computeTranslationPath(new File(templateLocation.toFileString()),version.getTemplate().getLocale(),locale);
  URI location=URI.createFileURI(path.getAbsolutePath());
  location=location.deresolve(templateLocation);
  return location;
}

Fixed version (ground truth):
public static URI computeLocaleResourceLocation(Locale locale,ProjectVersion version,URI templateLocation){
  PropertyScanner scanner=createScanner(version);
  URI parentPath=version.absoluteFilePath();
  File path=scanner.computeTranslationPath(new File(parentPath.toFileString() + templateLocation.toString()),version.getTemplate().getLocale(),locale);
  URI location=URI.createFileURI(path.getAbsolutePath());
  URI trimmedLocation=URI.createURI(location.segment(parentPath.segmentCount()));
  for (int i=parentPath.segmentCount() + 1; i < location.segmentCount(); i++) {
    trimmedLocation=trimmedLocation.appendSegment(location.segment(i));
  }
  return trimmedLocation;
}
Program: 101371
Project: 101371
Buggy source:
@Override public R getObject(){
  return null;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public List<R> getObject(){
  CDOObject model=getDomainObject();
  EStructuralFeature feature=model.eClass().getEStructuralFeature(featureName);
  List<R> result=(List<R>)model.eGet(feature);
  return result;
}
Program: 101372
Project: 101372
Buggy source:
@Override public void setObject(R object){
}

Fixed version (ground truth):
@Override public void setObject(List<R> object){
}
Program: 101373
Project: 101373
Buggy source:
public ProjectConfigSection(String id,IModel<Project> model){
  super(id,model);
  ListView<ProjectVersion> project=new ListView<ProjectVersion>("String_Node_Str",getModelObject().getChildren()){
    private static final long serialVersionUID=1L;
    @Override protected void populateItem(    ListItem<ProjectVersion> item){
      item.add(new Label("String_Node_Str",item.getModelObject().getName()));
    }
  }
;
  add(project);
}

Fixed version (ground truth):
public ProjectConfigSection(String id,IModel<Project> model){
  super(id,model);
  ComplexEObjectListDataProvider<ProjectVersion> provider=new ComplexEObjectListDataProvider<ProjectVersion>(model.getObject(),PropertiesPackage.Literals.RESOLVABLE__CHILDREN);
  ListView<ProjectVersion> project=new ListView<ProjectVersion>("String_Node_Str",provider){
    private static final long serialVersionUID=1L;
    @Override protected void populateItem(    ListItem<ProjectVersion> item){
      item.add(new Label("String_Node_Str",item.getModelObject().getName()));
    }
  }
;
  add(project);
}
Program: 101374
Project: 101374
Buggy source:
public WorkspaceConfigSection(String id,IModel<Workspace> object){
  super(id,object);
  ListView<Project> project=new ListView<Project>("String_Node_Str",getModelObject().getChildren()){
    private static final long serialVersionUID=1L;
    @Override protected void populateItem(    ListItem<Project> item){
      item.add(new Label("String_Node_Str",item.getModelObject().getName()));
    }
  }
;
  add(project);
}

Fixed version (ground truth):
public WorkspaceConfigSection(String id,IModel<Workspace> object){
  super(id,object);
  ComplexEObjectListDataProvider<Project> provider=new ComplexEObjectListDataProvider<Project>(object.getObject(),PropertiesPackage.Literals.RESOLVABLE__CHILDREN);
  ListView<Project> project=new ListView<Project>("String_Node_Str",provider){
    private static final long serialVersionUID=1L;
    @Override protected void populateItem(    ListItem<Project> item){
      item.add(new Label("String_Node_Str",item.getModelObject().getName()));
    }
  }
;
  add(project);
}
Program: 101375
Project: 101375
Buggy source:
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
@Override public int internalUpdatePercentComplete(){
  int translatedProps=0;
  for (  PropertyFileDescriptor descriptor : getDescriptors()) {
    translatedProps+=descriptor.getKeys();
  }
  setPropertyCount(translatedProps);
  if (!isMaster()) {
    int totalProps=getProjectVersion().getTemplate().getPropertyCount();
    return Math.min(100,(int)Math.floor(((translatedProps / (double)totalProps) * 100)));
  }
 else   return 100;
}

Fixed version (ground truth):
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
@Override public int internalUpdatePercentComplete(){
  int translatedProps=0;
  for (  PropertyFileDescriptor descriptor : getDescriptors()) {
    translatedProps+=descriptor.getKeys();
  }
  setPropertyCount(translatedProps);
  if (!isMaster()) {
    int totalProps=getParent().getTemplate().getPropertyCount();
    return Math.min(100,(int)Math.floor(((translatedProps / (double)totalProps) * 100)));
  }
 else   return 100;
}
Program: 101376
Project: 101376
Buggy source:
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
public boolean isMaster(){
  return getProjectVersion() != null && getProjectVersion().getTemplate() == this;
}

Fixed version (ground truth):
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
public boolean isMaster(){
  return getParent() != null && getParent().getTemplate() == this;
}
Program: 101378
Project: 101378
Buggy source:
private PropertyFileDescriptor createDescriptor(ProjectLocale projectLocale,URI childURI){
  PropertyFileDescriptor fileDescriptor=PropertiesFactory.eINSTANCE.createPropertyFileDescriptor();
  fileDescriptor.setLocation(childURI);
  fileDescriptor.setVariant(projectLocale.getLocale());
  projectLocale.getDescriptors().add(fileDescriptor);
  return fileDescriptor;
}

Fixed version (ground truth):
private PropertyFileDescriptor createDescriptor(ProjectLocale projectLocale,URI childURI){
  PropertyFileDescriptor fileDescriptor=PropertiesFactory.eINSTANCE.createPropertyFileDescriptor();
  fileDescriptor.setLocation(childURI);
  fileDescriptor.setVariant(projectLocale.getLocale());
  projectLocale.getDescriptors().add(fileDescriptor);
  projectLocale.getChildren().add(fileDescriptor);
  return fileDescriptor;
}
Program: 101379
Project: 101379
Buggy source:
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
public ProjectLocale getProjectLocale(){
  return (ProjectLocale)eContainer();
}

Fixed version (ground truth):
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
public ProjectLocale getProjectLocale(){
  return (ProjectLocale)eDynamicGet(PropertiesPackage.PROPERTY_FILE_DESCRIPTOR__PROJECT_LOCALE,PropertiesPackage.Literals.PROPERTY_FILE_DESCRIPTOR__PROJECT_LOCALE,true,true);
}
Program: 101380
Project: 101380
Buggy source:
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
public C getChild(String name){
  throw new UnsupportedOperationException();
}

Fixed version (ground truth):
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
public C getChild(String name){
  for (  C child : getChildren()) {
    if (child.getName().equals(name))     return child;
  }
  return null;
}
Program: 101381
Project: 101381
Buggy source:
@Override public void commit(Preferences config){
  form.commit();
  String newName=version.getParent().getName();
  if (!newName.equals(projectName)) {
    renameProject(projectName,newName);
  }
}

Fixed version (ground truth):
@Override public void commit(Preferences config){
  form.commit();
  String newName=getDomainObject().getName();
  if (!newName.equals(projectName)) {
    renameProject(projectName,newName);
  }
}